MT_MAC.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /**************************************************************************************************
  2. Filename: MT_MAC.h
  3. Revised: $Date: 2008-03-14 12:54:09 -0700 (Fri, 14 Mar 2008) $
  4. Revision: $Revision: 16592 $
  5. Description: MonitorTest functions for the MAC layer.
  6. Copyright 2004-2007 Texas Instruments Incorporated. All rights reserved.
  7. IMPORTANT: Your use of this Software is limited to those specific rights
  8. granted under the terms of a software license agreement between the user
  9. who downloaded the software, his/her employer (which must be your employer)
  10. and Texas Instruments Incorporated (the "License"). You may not use this
  11. Software unless you agree to abide by the terms of the License. The License
  12. limits your use, and you acknowledge, that the Software may not be modified,
  13. copied or distributed unless embedded on a Texas Instruments microcontroller
  14. or used solely and exclusively in conjunction with a Texas Instruments radio
  15. frequency transceiver, which is integrated into your product. Other than for
  16. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  17. works of, modify, distribute, perform, display or sell this Software and/or
  18. its documentation for any purpose.
  19. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  20. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  21. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  22. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  23. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  24. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  25. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  26. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  27. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  28. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  29. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  30. Should you have any questions regarding your right to use this Software,
  31. contact Texas Instruments Incorporated at www.TI.com.
  32. **************************************************************************************************/
  33. #ifndef MT_MAC_H
  34. #define MT_MAC_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /*********************************************************************
  40. * INCLUDES
  41. */
  42. #include "ZComDef.h"
  43. #include "ZMAC.h"
  44. /*********************************************************************
  45. * MACROS
  46. */
  47. /*********************************************************************
  48. * CONSTANTS
  49. */
  50. #if defined (MT_MAC_CB_FUNC)
  51. //MAC Callback subscription IDs
  52. #define CB_ID_NWK_SYNC_LOSS_IND 0x0001
  53. #define CB_ID_NWK_ASSOCIATE_IND 0x0002
  54. #define CB_ID_NWK_ASSOCIATE_CNF 0x0004
  55. #define CB_ID_NWK_BEACON_NOTIFY_IND 0x0008
  56. #define CB_ID_NWK_DATA_CNF 0x0010
  57. #define CB_ID_NWK_DATA_IND 0x0020
  58. #define CB_ID_NWK_DISASSOCIATE_IND 0x0040
  59. #define CB_ID_NWK_DISASSOCIATE_CNF 0x0080
  60. #define CB_ID_NWK_PURGE_CNF 0x0100
  61. #define CB_ID_NWK_ORPHAN_IND 0x0400
  62. #define CB_ID_NWK_POLL_CNF 0x0800
  63. #define CB_ID_NWK_SCAN_CNF 0x1000
  64. #define CB_ID_NWK_COMM_STATUS_IND 0x2000
  65. #define CB_ID_NWK_START_CNF 0x4000
  66. #define CB_ID_NWK_RX_ENABLE_CNF 0x8000
  67. #endif
  68. /*********************************************************************
  69. * TYPEDEFS
  70. */
  71. /*********************************************************************
  72. * GLOBAL VARIABLES
  73. */
  74. extern uint16 _macCallbackSub;
  75. /*********************************************************************
  76. * EXTERNAL VARIABLES
  77. */
  78. /*********************************************************************
  79. * EXTERNAL FUNCTIONS
  80. */
  81. /*********************************************************************
  82. * LOCAL VARIABLES
  83. */
  84. /*********************************************************************
  85. * LOCAL FUNCTIONS
  86. */
  87. #ifdef MT_MAC_FUNC
  88. /*
  89. * MonitorTest function handling MAC commands
  90. */
  91. extern uint8 MT_MacCommandProcessing( uint8 *pBuf );
  92. #endif /*MAC Command Processing in MT*/
  93. #if defined ( MT_MAC_CB_FUNC )
  94. /*
  95. * Process the callback subscription for nwk_associate_ind
  96. */
  97. extern void nwk_MTCallbackSubNwkAssociateInd( ZMacAssociateInd_t *param );
  98. /*
  99. * Process the callback subscription for nwk_associate_cnf
  100. */
  101. extern void nwk_MTCallbackSubNwkAssociateCnf( ZMacAssociateCnf_t *param );
  102. /*
  103. * Process the callback subscription for nwk_data_cnf
  104. */
  105. extern void nwk_MTCallbackSubNwkDataCnf( ZMacDataCnf_t *param );
  106. /*
  107. * Process the callback subscription for nwk_data_ind
  108. */
  109. extern void nwk_MTCallbackSubNwkDataInd( ZMacDataInd_t *param );
  110. /*
  111. * Process the callback subscription for nwk_disassociate_ind
  112. */
  113. extern void nwk_MTCallbackSubNwkDisassociateInd( ZMacDisassociateInd_t *param );
  114. /*
  115. * Process the callback subscription for nwk_disassociate_cnf
  116. */
  117. extern void nwk_MTCallbackSubNwkDisassociateCnf( ZMacDisassociateCnf_t *param );
  118. /*
  119. * Process the callback subscription for nwk_orphan_ind
  120. */
  121. extern void nwk_MTCallbackSubNwkOrphanInd( ZMacOrphanInd_t *param );
  122. /*
  123. * Process the callback subscription for nwk_poll_cnf
  124. */
  125. extern void nwk_MTCallbackSubNwkPollCnf( byte Status );
  126. /*
  127. * Process the callback subscription for nwk_scan_cnf
  128. */
  129. extern void nwk_MTCallbackSubNwkScanCnf( ZMacScanCnf_t *param );
  130. /*
  131. * Process the callback subscription for nwk_start_cnf
  132. */
  133. extern void nwk_MTCallbackSubNwkStartCnf( uint8 Status );
  134. /*
  135. * Process the callback subscription for nwk_syncloss_ind
  136. */
  137. extern void nwk_MTCallbackSubNwkSyncLossInd( ZMacSyncLossInd_t *param );
  138. /*
  139. * Process the callback subscription for nwk_Rx_Enable_cnf
  140. */
  141. extern void nwk_MTCallbackSubNwkRxEnableCnf ( byte Status );
  142. /*
  143. * Process the callback subscription for nwk_Comm_Status_ind
  144. */
  145. extern void nwk_MTCallbackSubCommStatusInd ( ZMacCommStatusInd_t *param );
  146. /*
  147. * Process the callback subscription for nwk_Purge_cnf
  148. */
  149. extern void nwk_MTCallbackSubNwkPurgeCnf( ZMacPurgeCnf_t *param );
  150. /*
  151. * Process the callback subscription for nwk_Beacon_Notify_ind
  152. */
  153. extern void nwk_MTCallbackSubNwkBeaconNotifyInd ( ZMacBeaconNotifyInd_t *param );
  154. #endif
  155. /*********************************************************************
  156. *********************************************************************/
  157. #ifdef __cplusplus
  158. }
  159. #endif
  160. #endif /* MT_MAC_H */