Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

532 lines
23 KiB

  1. /***********************************************************************
  2. * *
  3. * Filename: h245fsm.h *
  4. * Module: H245 Finite State Machine Subsystem *
  5. * *
  6. ***********************************************************************
  7. * INTEL Corporation Proprietary Information *
  8. * *
  9. * This listing is supplied under the terms of a license agreement *
  10. * with INTEL Corporation and may not be copied nor disclosed except *
  11. * in accordance with the terms of that agreement. *
  12. * *
  13. * Copyright (c) 1996 Intel Corporation. All rights reserved. *
  14. ***********************************************************************
  15. * *
  16. * $Workfile: H245FSM.H $
  17. * $Revision: 1.6 $
  18. * $Modtime: 09 Dec 1996 13:40:40 $
  19. * $Log: S:/STURGEON/SRC/H245/INCLUDE/VCS/H245FSM.H_v $
  20. *
  21. * Rev 1.6 09 Dec 1996 13:40:52 EHOWARDX
  22. * Updated copyright notice.
  23. *
  24. * Rev 1.5 29 Jul 1996 16:57:14 EHOWARDX
  25. * Added H.223 Annex A Reconfiguration events.
  26. *
  27. * Rev 1.4 01 Jul 1996 22:08:32 EHOWARDX
  28. *
  29. * Updated stateless events.
  30. *
  31. * Rev 1.3 30 May 1996 23:38:20 EHOWARDX
  32. * Cleanup.
  33. *
  34. * Rev 1.2 29 May 1996 15:21:34 EHOWARDX
  35. * Change to use HRESULT.
  36. *
  37. * Rev 1.1 28 May 1996 14:10:04 EHOWARDX
  38. * Tel Aviv update.
  39. *
  40. * Rev 1.0 09 May 1996 21:04:50 EHOWARDX
  41. * Initial revision.
  42. *
  43. * Rev 1.12.1.3 09 May 1996 19:43:58 EHOWARDX
  44. * Eliminated two events for B-LCSE gratuitous state and changed
  45. * 2 macros.
  46. *
  47. * Rev 1.12.1.2 15 Apr 1996 10:43:34 EHOWARDX
  48. * Update.
  49. *
  50. * Rev 1.12.1.1 10 Apr 1996 21:06:10 EHOWARDX
  51. * Added 5 new state entitys.
  52. *
  53. * Rev 1.12.1.0 05 Apr 1996 11:47:14 EHOWARDX
  54. * Branched.
  55. * *
  56. ***********************************************************************/
  57. #ifndef H245FSM_H
  58. #define H245FSM_H
  59. #include <stdlib.h>
  60. #include "fsmexpor.h"
  61. #include "sr_api.h"
  62. #define MAXSTATES 4
  63. #define SUCCESS 0
  64. #define FAIL -1
  65. #define BAD (Output_t) -1
  66. #ifdef IGNORE
  67. #undef IGNORE
  68. #endif
  69. #define IGNORE (Output_t) NUM_OUTPUTS
  70. typedef MltmdSystmCntrlMssg PDU_t;
  71. // Signalling Entity definitions
  72. typedef unsigned char Entity_t;
  73. // Per-channel Signalling Entities
  74. #define LCSE_OUT (Entity_t) 0 // Uni-directional Logical Channel signalling Signalling Entity - Out-going
  75. #define LCSE_IN (Entity_t) 1 // Uni-directional Logical Channel signalling Signalling Entity - In-coming
  76. #define BLCSE_OUT (Entity_t) 2 // Bi-directional Logical Channel signalling Signalling Entity - Out-going
  77. #define BLCSE_IN (Entity_t) 3 // Bi-directional Logical Channel signalling Signalling Entity - In-coming
  78. #define CLCSE_OUT (Entity_t) 4 // Close Logical Channel signalling Signalling Entity - Out-going
  79. #define CLCSE_IN (Entity_t) 5 // Close Logical Channel signalling Signalling Entity - In-coming
  80. // Per H.245 Instance Signalling Entities
  81. #define CESE_OUT (Entity_t) 6 // Capability Exchange Signalling Entity - Out-going
  82. #define CESE_IN (Entity_t) 7 // Capability Exchange Signalling Entity - In-coming
  83. #define MTSE_OUT (Entity_t) 8 // Multiplex Table Signalling Entity - Out-going
  84. #define MTSE_IN (Entity_t) 9 // Multiplex Table Signalling Entity - In-coming
  85. #define RMESE_OUT (Entity_t)10 // Request Multiplex Entry Signalling Entity - Out-going
  86. #define RMESE_IN (Entity_t)11 // Request Multiplex Entry Signalling Entity - In-coming
  87. #define MRSE_OUT (Entity_t)12 // Mode Request Signalling Entity - Out-going
  88. #define MRSE_IN (Entity_t)13 // Mode Request Signalling Entity - In-coming
  89. #define MLSE_OUT (Entity_t)14 // Maintenance Loop Signalling Entity - Out-going
  90. #define MLSE_IN (Entity_t)15 // Maintenance Loop Signalling Entity - In-coming
  91. #define MSDSE (Entity_t)16 // Master Slave Determination Signalling Entity
  92. #define RTDSE (Entity_t)17 // Round Trip Delay Signalling Entity
  93. #define STATELESS (Entity_t)18 // No state machine associated with PDU
  94. #define NUM_ENTITYS 19
  95. // Event definitions
  96. typedef unsigned int Event_t;
  97. // Out-going Uni-directional Logical Channel (LCSE_OUT) events
  98. #define ReqUEstablish (Event_t) 0
  99. #define OpenUChAckPDU (Event_t) 1
  100. #define OpenUChRejectPDU (Event_t) 2
  101. #define CloseUChAckPDU (Event_t) 3
  102. #define ReqURelease (Event_t) 4
  103. #define T103Expiry (Event_t) 5
  104. // In-coming Uni-directional Logical Channel (LCSE_IN) events
  105. #define OpenUChPDU (Event_t) 6
  106. #define CloseUChPDU (Event_t) 7
  107. #define ResponseUEstablish (Event_t) 8
  108. #define EstablishUReject (Event_t) 9
  109. // Out-going Bi-directional Logical Channel (BLCSE_OUT) events
  110. #define ReqBEstablish (Event_t) 10
  111. #define OpenBChAckPDU (Event_t) 11
  112. #define OpenBChRejectPDU (Event_t) 12
  113. #define CloseBChAckPDU (Event_t) 13
  114. #define ReqClsBLCSE (Event_t) 14
  115. #define RspConfirmBLCSE (Event_t) 15
  116. #define T103OutExpiry (Event_t) 16
  117. // In-coming Bi-directional Logical Channel (BLCSE_IN) events
  118. #define OpenBChPDU (Event_t) 17
  119. #define CloseBChPDU (Event_t) 18
  120. #define ResponseBEstablish (Event_t) 19
  121. #define OpenBChConfirmPDU (Event_t) 20
  122. #define OpenRejectBLCSE (Event_t) 21
  123. #define T103InExpiry (Event_t) 22
  124. // Out-going Request Close Logical Channel (CLCSE_OUT) events
  125. #define ReqClose (Event_t) 23
  126. #define ReqChCloseAckPDU (Event_t) 24
  127. #define ReqChCloseRejectPDU (Event_t) 25
  128. #define T108Expiry (Event_t) 26
  129. // In-coming Request Close Logical Channel (CLCSE_IN) events
  130. #define ReqChClosePDU (Event_t) 27
  131. #define ReqChCloseReleasePDU (Event_t) 28
  132. #define CLCSE_CLOSE_response (Event_t) 29
  133. #define CLCSE_REJECT_request (Event_t) 30
  134. // Out-going Terminal Capablity Exchange (CESE_OUT) events
  135. #define TransferCapRequest (Event_t) 31
  136. #define TermCapSetAckPDU (Event_t) 32
  137. #define TermCapSetRejectPDU (Event_t) 33
  138. #define T101Expiry (Event_t) 34
  139. // In-coming Terminal Capablity Exchange (CESE_IN) events
  140. #define TermCapSetPDU (Event_t) 35
  141. #define TermCapSetReleasePDU (Event_t) 36
  142. #define CESE_TRANSFER_response (Event_t) 37
  143. #define CESE_REJECT_request (Event_t) 38
  144. // Out-going Multiplex Table (MTSE_OUT) events
  145. #define MTSE_TRANSFER_request (Event_t) 39
  146. #define MultiplexEntrySendAckPDU (Event_t) 40
  147. #define MultiplexEntrySendRejectPDU (Event_t) 41
  148. #define T104Expiry (Event_t) 42
  149. // In-coming Multiplex Table (MTSE_IN) events
  150. #define MultiplexEntrySendPDU (Event_t) 43
  151. #define MultiplexEntrySendReleasePDU (Event_t) 44
  152. #define MTSE_TRANSFER_response (Event_t) 45
  153. #define MTSE_REJECT_request (Event_t) 46
  154. // Out-going Request Multiplex Entry (RMESE_OUT) events
  155. #define RMESE_SEND_request (Event_t) 47
  156. #define RequestMultiplexEntryAckPDU (Event_t) 48
  157. #define RequestMultiplexEntryRejectPDU (Event_t) 49
  158. #define T107Expiry (Event_t) 50
  159. // In-coming Request Multiplex Entry (RMESE_IN) events
  160. #define RequestMultiplexEntryPDU (Event_t) 51
  161. #define RequestMultiplexEntryReleasePDU (Event_t) 52
  162. #define RMESE_SEND_response (Event_t) 53
  163. #define RMESE_REJECT_request (Event_t) 54
  164. // Out-going Mode Request (MRSE_OUT) events
  165. #define MRSE_TRANSFER_request (Event_t) 55
  166. #define RequestModeAckPDU (Event_t) 56
  167. #define RequestModeRejectPDU (Event_t) 57
  168. #define T109Expiry (Event_t) 58
  169. // In-coming Mode Request (MRSE_IN) events
  170. #define RequestModePDU (Event_t) 59
  171. #define RequestModeReleasePDU (Event_t) 60
  172. #define MRSE_TRANSFER_response (Event_t) 61
  173. #define MRSE_REJECT_request (Event_t) 62
  174. // Out-going Maintenance Loop (MLSE_OUT) events
  175. #define MLSE_LOOP_request (Event_t) 63
  176. #define MLSE_OUT_RELEASE_request (Event_t) 64
  177. #define MaintenanceLoopAckPDU (Event_t) 65
  178. #define MaintenanceLoopRejectPDU (Event_t) 66
  179. #define T102Expiry (Event_t) 67
  180. // In-coming Maintenance Loop (MLSE_IN) events
  181. #define MaintenanceLoopRequestPDU (Event_t) 68
  182. #define MaintenanceLoopOffCommandPDU (Event_t) 69
  183. #define MLSE_LOOP_response (Event_t) 70
  184. #define MLSE_IN_RELEASE_request (Event_t) 71
  185. // Master Slave Determination (MSDSE) events
  186. #define MSDetReq (Event_t) 72
  187. #define MSDetPDU (Event_t) 73
  188. #define MSDetAckPDU (Event_t) 74
  189. #define MSDetRejectPDU (Event_t) 75
  190. #define MSDetReleasePDU (Event_t) 76
  191. #define T106Expiry (Event_t) 77
  192. // Round Trip Delay Delay (RTDSE) events
  193. #define RTDSE_TRANSFER_request (Event_t) 78
  194. #define RoundTripDelayRequestPDU (Event_t) 79
  195. #define RoundTripDelayResponsePDU (Event_t) 80
  196. #define T105Expiry (Event_t) 81
  197. #define NUM_STATE_EVENTS 82
  198. // Events with no associated state entity
  199. #define NonStandardRequestPDU (Event_t) 82
  200. #define NonStandardResponsePDU (Event_t) 83
  201. #define NonStandardCommandPDU (Event_t) 84
  202. #define NonStandardIndicationPDU (Event_t) 85
  203. #define MiscellaneousCommandPDU (Event_t) 86
  204. #define MiscellaneousIndicationPDU (Event_t) 87
  205. #define CommunicationModeRequestPDU (Event_t) 88
  206. #define CommunicationModeResponsePDU (Event_t) 89
  207. #define CommunicationModeCommandPDU (Event_t) 90
  208. #define ConferenceRequestPDU (Event_t) 91
  209. #define ConferenceResponsePDU (Event_t) 92
  210. #define ConferenceCommandPDU (Event_t) 93
  211. #define ConferenceIndicationPDU (Event_t) 94
  212. #define SendTerminalCapabilitySetPDU (Event_t) 95
  213. #define EncryptionCommandPDU (Event_t) 96
  214. #define FlowControlCommandPDU (Event_t) 97
  215. #define EndSessionCommandPDU (Event_t) 98
  216. #define FunctionNotUnderstoodPDU (Event_t) 99
  217. #define JitterIndicationPDU (Event_t)100
  218. #define H223SkewIndicationPDU (Event_t)101
  219. #define NewATMVCIndicationPDU (Event_t)102
  220. #define UserInputIndicationPDU (Event_t)103
  221. #define H2250MaximumSkewIndicationPDU (Event_t)104
  222. #define MCLocationIndicationPDU (Event_t)105
  223. #define VendorIdentificationPDU (Event_t) 106
  224. #define FunctionNotSupportedPDU (Event_t) 107
  225. #define H223ReconfigPDU (Event_t)108
  226. #define H223ReconfigAckPDU (Event_t)109
  227. #define H223ReconfigRejectPDU (Event_t)110
  228. #define NUM_EVENTS 111
  229. // Output function definitions
  230. typedef unsigned char Output_t;
  231. // Out-going Open Uni-directional Logical Channel (LCSE_OUT) state functions
  232. #define EstablishReleased (Output_t) 0
  233. #define OpenAckAwaitingE (Output_t) 1
  234. #define OpenRejAwaitingE (Output_t) 2
  235. #define ReleaseAwaitingE (Output_t) 3
  236. #define T103AwaitingE (Output_t) 4
  237. #define ReleaseEstablished (Output_t) 5
  238. #define OpenRejEstablished (Output_t) 6
  239. #define CloseAckEstablished (Output_t) 7
  240. #define CloseAckAwaitingR (Output_t) 8
  241. #define OpenRejAwaitingR (Output_t) 9
  242. #define T103AwaitingR (Output_t) 10
  243. #define EstablishAwaitingR (Output_t) 11
  244. // In-coming Open Uni-directional Logical Channel (LCSE_IN) state functions
  245. #define OpenReleased (Output_t) 12
  246. #define CloseReleased (Output_t) 13
  247. #define ResponseAwaiting (Output_t) 14
  248. #define ReleaseAwaiting (Output_t) 15
  249. #define CloseAwaiting (Output_t) 16
  250. #define OpenAwaiting (Output_t) 17
  251. #define CloseEstablished (Output_t) 18
  252. #define OpenEstablished (Output_t) 19
  253. // Out-going Open Bi-directional Logical Channel (BLCSE_OUT) state functions
  254. #define EstablishReqBReleased (Output_t) 20
  255. #define OpenChannelAckBAwaitingE (Output_t) 21
  256. #define OpenChannelRejBAwaitingE (Output_t) 22
  257. #define ReleaseReqBOutAwaitingE (Output_t) 23
  258. #define T103ExpiryBAwaitingE (Output_t) 24
  259. #define ReleaseReqBEstablished (Output_t) 25
  260. #define OpenChannelRejBEstablished (Output_t) 26
  261. #define CloseChannelAckBEstablished (Output_t) 27
  262. #define CloseChannelAckAwaitingR (Output_t) 28
  263. #define OpenChannelRejBAwaitingR (Output_t) 29
  264. #define T103ExpiryBAwaitingR (Output_t) 30
  265. #define EstablishReqAwaitingR (Output_t) 31
  266. // In-coming Open Bi-directional Logical Channel (BLCSE_IN) state functions
  267. #define OpenChannelBReleased (Output_t) 32
  268. #define CloseChannelBReleased (Output_t) 33
  269. #define EstablishResBAwaitingE (Output_t) 34
  270. #define ReleaseReqBInAwaitingE (Output_t) 35
  271. #define CloseChannelBAwaitingE (Output_t) 36
  272. #define OpenChannelBAwaitingE (Output_t) 37
  273. #define OpenChannelConfirmBAwaitingE (Output_t) 38
  274. #define T103ExpiryBAwaitingC (Output_t) 39
  275. #define OpenChannelConfirmBAwaitingC (Output_t) 40
  276. #define CloseChannelBAwaitingC (Output_t) 41
  277. #define OpenChannelBAwaitingC (Output_t) 42
  278. #define CloseChannelBEstablished (Output_t) 43
  279. #define OpenChannelBEstablished (Output_t) 44
  280. // Out-going Request Close Logical Channel (CLCSE_OUT) state functions
  281. #define CloseRequestIdle (Output_t) 45
  282. #define RequestCloseAckAwaitingR (Output_t) 46
  283. #define RequestCloseRejAwaitingR (Output_t) 47
  284. #define T108ExpiryAwaitingR (Output_t) 48
  285. // In-coming Request Close Logical Channel (CLCSE_IN) state functions
  286. #define RequestCloseIdle (Output_t) 49
  287. #define CloseResponseAwaitingR (Output_t) 50
  288. #define RejectRequestAwaitingR (Output_t) 51
  289. #define RequestCloseReleaseAwaitingR (Output_t) 52
  290. #define RequestCloseAwaitingR (Output_t) 53
  291. // Out-going Terminal Capability Exchange (CESE_OUT) state functions
  292. #define RequestCapIdle (Output_t) 54
  293. #define TermCapAckAwaiting (Output_t) 55
  294. #define TermCapRejAwaiting (Output_t) 56
  295. #define T101ExpiryAwaiting (Output_t) 57
  296. // In-coming Terminal Capability Exchange (CESE_IN) state functions
  297. #define TermCapSetIdle (Output_t) 58
  298. #define ResponseCapAwaiting (Output_t) 59
  299. #define RejectCapAwaiting (Output_t) 60
  300. #define TermCapReleaseAwaiting (Output_t) 61
  301. #define TermCapSetAwaiting (Output_t) 62
  302. // Out-going Multiplex Table (MTSE_OUT) state functions
  303. #define MTSE0_TRANSFER_request (Output_t) 63
  304. #define MTSE1_TRANSFER_request (Output_t) 64
  305. #define MTSE1_MultiplexEntrySendAck (Output_t) 65
  306. #define MTSE1_MultiplexEntrySendRej (Output_t) 66
  307. #define MTSE1_T104Expiry (Output_t) 67
  308. // In-coming Multiplex Table (MTSE_IN) state functions
  309. #define MTSE0_MultiplexEntrySend (Output_t) 68
  310. #define MTSE1_MultiplexEntrySend (Output_t) 69
  311. #define MTSE1_MultiplexEntrySendRelease (Output_t) 70
  312. #define MTSE1_TRANSFER_response (Output_t) 71
  313. #define MTSE1_REJECT_request (Output_t) 72
  314. // Out-going Request Multiplex Entry (RMESE_OUT) state functions
  315. #define RMESE0_SEND_request (Output_t) 73
  316. #define RMESE1_SEND_request (Output_t) 74
  317. #define RMESE1_RequestMuxEntryAck (Output_t) 75
  318. #define RMESE1_RequestMuxEntryRej (Output_t) 76
  319. #define RMESE1_T107Expiry (Output_t) 77
  320. // In-coming Request Multiplex Entry (RMESE_IN) state functions
  321. #define RMESE0_RequestMuxEntry (Output_t) 78
  322. #define RMESE1_RequestMuxEntry (Output_t) 79
  323. #define RMESE1_RequestMuxEntryRelease (Output_t) 80
  324. #define RMESE1_SEND_response (Output_t) 81
  325. #define RMESE1_REJECT_request (Output_t) 82
  326. // Out-going Request Mode (MRSE_OUT) state functions
  327. #define MRSE0_TRANSFER_request (Output_t) 83
  328. #define MRSE1_TRANSFER_request (Output_t) 84
  329. #define MRSE1_RequestModeAck (Output_t) 85
  330. #define MRSE1_RequestModeRej (Output_t) 86
  331. #define MRSE1_T109Expiry (Output_t) 87
  332. // In-coming Request Mode (MRSE_OUT) state functions
  333. #define MRSE0_RequestMode (Output_t) 88
  334. #define MRSE1_RequestMode (Output_t) 89
  335. #define MRSE1_RequestModeRelease (Output_t) 90
  336. #define MRSE1_TRANSFER_response (Output_t) 91
  337. #define MRSE1_REJECT_request (Output_t) 92
  338. // Out-going Request Mode (MLSE_OUT) state functions
  339. #define MLSE0_LOOP_request (Output_t) 93
  340. #define MLSE1_MaintenanceLoopAck (Output_t) 94
  341. #define MLSE1_MaintenanceLoopRej (Output_t) 95
  342. #define MLSE1_OUT_RELEASE_request (Output_t) 96
  343. #define MLSE1_T102Expiry (Output_t) 97
  344. #define MLSE2_MaintenanceLoopRej (Output_t) 98
  345. #define MLSE2_OUT_RELEASE_request (Output_t) 99
  346. // In-coming Request Mode (MLSE_IN) state functions
  347. #define MLSE0_MaintenanceLoopRequest (Output_t)100
  348. #define MLSE1_MaintenanceLoopRequest (Output_t)101
  349. #define MLSE1_MaintenanceLoopOffCommand (Output_t)102
  350. #define MLSE1_LOOP_response (Output_t)103
  351. #define MLSE1_IN_RELEASE_request (Output_t)104
  352. #define MLSE2_MaintenanceLoopRequest (Output_t)105
  353. #define MLSE2_MaintenanceLoopOffCommand (Output_t)106
  354. // Master Slave Determination (MSDSE) state functions
  355. #define DetRequestIdle (Output_t)107
  356. #define MSDetIdle (Output_t)108
  357. #define MSDetAckOutgoing (Output_t)109
  358. #define MSDetOutgoing (Output_t)110
  359. #define MSDetRejOutgoing (Output_t)111
  360. #define MSDetReleaseOutgoing (Output_t)112
  361. #define T106ExpiryOutgoing (Output_t)113
  362. #define MSDetAckIncoming (Output_t)114
  363. #define MSDetIncoming (Output_t)115
  364. #define MSDetRejIncoming (Output_t)116
  365. #define MSDetReleaseIncoming (Output_t)117
  366. #define T106ExpiryIncoming (Output_t)118
  367. // Round Trip Delay (RTDSE) state functions
  368. #define RTDSE0_TRANSFER_request (Output_t)119
  369. #define RTDSE0_RoundTripDelayRequest (Output_t)120
  370. #define RTDSE1_TRANSFER_request (Output_t)121
  371. #define RTDSE1_RoundTripDelayRequest (Output_t)122
  372. #define RTDSE1_RoundTripDelayResponse (Output_t)123
  373. #define RTDSE1_T105Expiry (Output_t)124
  374. #define NUM_OUTPUTS 125
  375. // State definitions
  376. typedef unsigned char State_t;
  377. // Lookup Key definition
  378. typedef unsigned long Key_t;
  379. typedef enum
  380. {
  381. INDETERMINATE,
  382. MASTER,
  383. SLAVE
  384. } MS_Status_t;
  385. typedef struct Object_tag
  386. {
  387. struct Object_tag *pNext; // Linked list pointer
  388. struct InstanceStruct *pInstance; // H.245 instance structure pointer
  389. DWORD dwInst; // H.245 instance identifier
  390. unsigned int uNestLevel; // StateMachine recursive calls
  391. DWORD_PTR dwTransId; // Transaction Id from API
  392. DWORD_PTR dwTimerId; // Associated timer id
  393. Key_t Key; // Lookup key, e.g. channel number
  394. Entity_t Entity; // State Entity type, e.g. LCSE_OUT
  395. State_t State; // Current Entity state
  396. unsigned char byInSequence; // In-coming sequence number
  397. union
  398. {
  399. struct
  400. {
  401. unsigned short wLoopType;
  402. } mlse;
  403. struct
  404. {
  405. unsigned int sv_SDNUM;
  406. unsigned int sv_NCOUNT;
  407. } msdse;
  408. MultiplexEntrySendRelease mtse;
  409. RequestMultiplexEntryRelease rmese;
  410. } u; // Entity-specific data
  411. } Object_t;
  412. /* an instance will carry a table of object pointers */
  413. /* to be allocated in fsminit by calloc. */
  414. /* Each dwInst passed from API or SRP should invoke the */
  415. /* appropriate instance that contain the object table of */
  416. /* the protocol entities for this H.245 instance */
  417. typedef struct Fsm_Struct_tag
  418. {
  419. Object_t * Object_tbl[NUM_ENTITYS];// H.245 Signalling Entities
  420. DWORD dwInst; // H.245 Instance Identifier
  421. MS_Status_t sv_STATUS; // MSDSE Status
  422. unsigned char sv_TT; // MSDSE Terminal Type
  423. unsigned char byCeseOutSequence; // CESE_OUT sequence number
  424. unsigned char byMtseOutSequence; // MTSE_OUT sequence number
  425. unsigned char byMrseOutSequence; // MRSE_OUT sequence number
  426. unsigned char byRtdseSequence; // RTDSE sequence number
  427. } Fsm_Struct_t;
  428. /* FSM function prototypes */
  429. HRESULT
  430. PduParseOutgoing(struct InstanceStruct *pInstance, PDU_t *pPdu,
  431. Entity_t *pEntity, Event_t *pEvent, Key_t *pKey, int *pbCreate);
  432. HRESULT
  433. PduParseIncoming(struct InstanceStruct *pInstance, PDU_t *pPdu,
  434. Entity_t *pEntity, Event_t *pEvent, Key_t *pKey, int *pbCreate);
  435. int
  436. ObjectDestroy (Object_t *pObject);
  437. Object_t *
  438. ObjectFind(struct InstanceStruct *pInstance, Entity_t Entity, Key_t Key);
  439. HRESULT
  440. StateMachine (Object_t *pObject, PDU_t *pPdu, Event_t Event);
  441. HRESULT
  442. FsmTimerEvent(struct InstanceStruct *pInstance, DWORD_PTR dwTimerId, Object_t *pObject, Event_t Event);
  443. #define FsmStartTimer(pObject,pfnCallback,uTicks) \
  444. {ASSERT((pObject)->dwTimerId == 0); \
  445. (pObject)->dwTimerId=H245StartTimer((pObject)->pInstance,pObject,pfnCallback,uTicks);}
  446. #define FsmStopTimer(pObject) \
  447. {H245StopTimer((pObject)->pInstance,(pObject)->dwTimerId); (pObject)->dwTimerId = 0;}
  448. #endif // H245FSM_H