25 #ifndef __RPC_CLCLIENT_H__
26 #define __RPC_CLCLIENT_H__
30 extern APP_WORD gwClientInUsed;
36 #define ID_TIMEOUT_FRAG 0
37 #define ID_TIMEOUT_WAIT 1
38 #define ID_TIMEOUT_PING 2
39 #define ID_TIMEOUT_ACK 3
40 #define ID_TIMEOUT_CANCEL 4
41 #define ID_TIMEOUT_BROADCAST 5
43 #define NB_CLIENT_TIMER 6
44 APP_WORD rpc_tmFrag (APP_LPVOID lpData, APP_WORD wDummy);
45 APP_WORD rpc_tmWait (APP_LPVOID lpData, APP_WORD wDummy);
46 APP_WORD rpc_tmPing (APP_LPVOID lpData, APP_WORD wDummy);
47 APP_WORD rpc_tmAck (APP_LPVOID lpData, APP_WORD wDummy);
48 APP_WORD rpc_tmCancel (APP_LPVOID lpData, APP_WORD wDummy);
49 APP_WORD rpc_tmBroadcast(APP_LPVOID lpData, APP_WORD wDummy);
68 APP_DWORD dwRequestCount;
70 APP_DWORD dwRcvCancelID;
71 APP_DWORD dwExceptionStatus;
76 APP_WORD wOutSerialNum;
77 APP_WORD wContOutFragNum;
81 }PACK_ALIGNEMENT(ST_CL_CLIENT_MACHINE_RT);
87 APP_DWORD dwFaultStatus;
88 APP_DWORD dwRejectStatus;
92 ST_CLR_RPC_UUID uuidActivity;
98 APP_BOOL bLittleEndian;
99 APP_BYTE byRequestType;
103 }PACK_ALIGNEMENT(ST_CL_CLIENT_MACHINE_PDU);
118 APP_LPBYTE pbyInParam;
121 APP_BYTE byRequestType;
128 }PACK_ALIGNEMENT(ST_CL_CLIENT_MACHINE_SND);
137 APP_DWORD bBroadcast;
139 APP_DWORD bIdempotent;
140 APP_DWORD bLastInFrag;
142 APP_DWORD bRequestActive;
143 APP_DWORD bResponseActive;
144 APP_DWORD bRtPendingCancel;
146 APP_DWORD bSndLastFrag;
148 APP_DWORD bInProgress;
149 }PACK_ALIGNEMENT(ST_CL_CLIENT_COND);
152 #define TR_COND_IN_PROGRESS(machine) ((machine)->stCondition.bInProgress=1)
153 #define TR_COND_BROADCAST(machine) ((machine)->stCondition.bBroadcast=1)
154 #define TR_COND_BURST(machine) ((machine)->stCondition.bBurst=1)
155 #define TR_COND_IDEMPOTENT(machine) ((machine)->stCondition.bIdempotent=1)
156 #define TR_COND_LAST_IN_FRAG(machine) ((machine)->stCondition.bLastInFrag=1)
157 #define TR_COND_MAYBE(machine) ((machine)->stCondition.bMaybe=1)
158 #define TR_COND_REQUEST_ACTIVE(machine) ((machine)->stCondition.bRequestActive=1)
159 #define TR_COND_RESPONSE_ACTIVE(machine) ((machine)->stCondition.bResponseActive=1)
160 #define TR_COND_RT_PENDING_CANCEL(machine) ((machine)->stCondition.bRtPendingCancel=1)
161 #define TR_COND_SND_FRAG(machine) ((machine)->stCondition.bSndFrag=1)
162 #define TR_COND_SND_LAST_FRAG(machine) ((machine)->stCondition.bSndLastFrag=1)
163 #define TR_COND_WORKING_PDU(machine) ((machine)->stCondition.bWorkingPdu=1)
164 #define TR_COND_INIT_FACK(machine) ((machine)->stCondition.bInitFack=1)
167 #define FS_COND_IN_PROGRESS(machine) ((machine)->stCondition.bInProgress=0)
168 #define FS_COND_BROADCAST(machine) ((machine)->stCondition.bBroadcast=0)
169 #define FS_COND_BURST(machine) ((machine)->stCondition.bBurst=0)
170 #define FS_COND_IDEMPOTENT(machine) ((machine)->stCondition.bIdempotent=0)
171 #define FS_COND_LAST_IN_FRAG(machine) ((machine)->stCondition.bLastInFrag=0)
172 #define FS_COND_MAYBE(machine) ((machine)->stCondition.bMaybe=0)
173 #define FS_COND_REQUEST_ACTIVE(machine) ((machine)->stCondition.bRequestActive=0)
174 #define FS_COND_RESPONSE_ACTIVE(machine) ((machine)->stCondition.bResponseActive=0)
175 #define FS_COND_RT_PENDING_CANCEL(machine) ((machine)->stCondition.bRtPendingCancel=0)
176 #define FS_COND_SND_FRAG(machine) ((machine)->stCondition.bSndFrag=0)
177 #define FS_COND_SND_LAST_FRAG(machine) ((machine)->stCondition.bSndLastFrag=0)
178 #define FS_COND_WORKING_PDU(machine) ((machine)->stCondition.bWorkingPdu=0)
179 #define FS_COND_INIT_FACK(machine) ((machine)->stCondition.bInitFack=0)
182 #define COND_IN_PROGRESS(machine) ((machine)->stCondition.bInProgress)
183 #define COND_BROADCAST(machine) ((machine)->stCondition.bBroadcast)
184 #define COND_BURST(machine) ((machine)->stCondition.bBurst)
185 #define COND_IDEMPOTENT(machine) ((machine)->stCondition.bIdempotent)
186 #define COND_LAST_IN_FRAG(machine) ((machine)->stCondition.bLastInFrag)
187 #define COND_MAYBE(machine) ((machine)->stCondition.bMaybe)
188 #define COND_REQUEST_ACTIVE(machine) ((machine)->stCondition.bRequestActive)
189 #define COND_RESPONSE_ACTIVE(machine) ((machine)->stCondition.bResponseActive)
190 #define COND_RT_PENDING_CANCEL(machine) ((machine)->stCondition.bRtPendingCancel)
191 #define COND_SND_FRAG(machine) ((machine)->stCondition.bSndFrag)
192 #define COND_SND_LAST_FRAG(machine) ((machine)->stCondition.bSndLastFrag)
193 #define COND_INIT_FACK(machine) ((machine)->stCondition.bInitFack)
198 typedef enum _enClClient{
201 enClClientWorking =2,
202 enClClientCommFail=3,
206 typedef enum _enClClientData{
211 } EN_CLCLIENT_DATA_STATE;
213 typedef enum _enClClientPing{
217 } EN_CLCLIENT_PING_STATE;
224 ST_CL_CLIENT_COND stCondition;
226 ST_CL_CLIENT_MACHINE_RT stRT;
230 ST_CL_CLIENT_MACHINE_PDU stPDU;
231 ST_CL_CLIENT_MACHINE_SND stSND;
234 APP_DWORD enClClientState;
235 APP_DWORD enDataState;
236 APP_DWORD enPingState;
239 LPST_RPC_CALL pstRPCCall;
244 } PACK_ALIGNEMENT(ST_CL_CLIENT),APP_FAR *LPST_CL_CLIENT;
246 APP_VOID clclient_StartTimer(LPST_CL_CLIENT pstClClient,APP_BYTE byTimerIndex);
247 APP_VOID clclient_StopTimer(LPST_CL_CLIENT pstClClient,APP_BYTE byTimerIndex);
252 APP_VOID clclient_event_receive_pdu(LPST_CL_CLIENT pstClClient);
253 APP_VOID clclient_event_invoke_req(LPST_CL_CLIENT pstClClient);
254 APP_VOID clclient_event_client_cancel(LPST_CL_CLIENT pstClClient);
256 APP_VOID clclient_event_tmfrag(LPST_CL_CLIENT pstClClient);
257 APP_VOID clclient_event_tmwait(LPST_CL_CLIENT pstClClient);
258 APP_VOID clclient_event_tmping(LPST_CL_CLIENT pstClClient);
259 APP_VOID clclient_event_tmcancel(LPST_CL_CLIENT pstClClient);
260 APP_VOID clclient_event_tmack(LPST_CL_CLIENT pstClClient);
261 APP_VOID clclient_event_tmbroadcast(LPST_CL_CLIENT pstClClient);
267 APP_VOID APP_FAR clclient_action_enter_init_state(LPST_CL_CLIENT pstClClient);
268 APP_VOID APP_FAR clclient_action_enter_none_state(LPST_CL_CLIENT pstClClient);
269 APP_VOID APP_FAR clclient_action_resend_in_frags(LPST_CL_CLIENT pstClClient);
271 APP_VOID APP_FAR clclient_activity_send_packet(LPST_CL_CLIENT pstClClient);
272 APP_VOID APP_FAR clclient_activity_response_proxy(LPST_CL_CLIENT pstClClient);
278 APP_VOID APP_FAR clclient_InitStateMachine(LPST_CL_CLIENT pstClClient);
279 APP_VOID APP_FAR clclient_Step(LPST_CL_CLIENT pstClClient);
280 APP_VOID APP_FAR clclient_ExitStateMachine(LPST_CL_CLIENT pstClClient);
282 #include "os_unpck.h"
284 #ifdef __TEST_SIMU_ERROR__
287 APP_BOOL test_rpcclient_lost_packet(APP_DWORD dwPacket);
288 APP_BOOL test_rpcclient_do_not_rec_packet(APP_DWORD dwPacket);
Definition: stk_sckt.h:49
Definition: clclient.h:66
Definition: clclient.h:83
Definition: message.h:1163
Definition: clclient.h:221
Definition: clclient.h:134
Definition: schedule.h:40
Definition: clclient.h:116