ZDConfig.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /**************************************************************************************************
  2. Filename: ZDConfig.h
  3. Revised: $Date: 2011-05-03 12:32:46 -0700 (Tue, 03 May 2011) $
  4. Revision: $Revision: 25849 $
  5. Description: This file contains the configuration attributes for the Zigbee Device Object.
  6. These are references to Configuration items that MUST be defined in ZDApp.c.
  7. The names mustn't change.
  8. Copyright 2004-2011 Texas Instruments Incorporated. All rights reserved.
  9. IMPORTANT: Your use of this Software is limited to those specific rights
  10. granted under the terms of a software license agreement between the user
  11. who downloaded the software, his/her employer (which must be your employer)
  12. and Texas Instruments Incorporated (the "License"). You may not use this
  13. Software unless you agree to abide by the terms of the License. The License
  14. limits your use, and you acknowledge, that the Software may not be modified,
  15. copied or distributed unless embedded on a Texas Instruments microcontroller
  16. or used solely and exclusively in conjunction with a Texas Instruments radio
  17. frequency transceiver, which is integrated into your product. Other than for
  18. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  19. works of, modify, distribute, perform, display or sell this Software and/or
  20. its documentation for any purpose.
  21. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  22. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  23. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  24. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  25. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  26. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  27. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  28. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  29. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  30. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  31. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  32. Should you have any questions regarding your right to use this Software,
  33. contact Texas Instruments Incorporated at www.TI.com.
  34. **************************************************************************************************/
  35. #ifndef ZDCONFIG_H
  36. #define ZDCONFIG_H
  37. #ifdef __cplusplus
  38. extern "C"
  39. {
  40. #endif
  41. /*********************************************************************
  42. * INCLUDES
  43. */
  44. #include "AF.h"
  45. /*********************************************************************
  46. * Enable Features
  47. */
  48. #if defined ( MT_ZDO_FUNC )
  49. // All of the ZDO functions are enabled for ZTool use.
  50. #define ZDO_NWKADDR_REQUEST
  51. #define ZDO_IEEEADDR_REQUEST
  52. #define ZDO_MATCH_REQUEST
  53. #define ZDO_NODEDESC_REQUEST
  54. #define ZDO_POWERDESC_REQUEST
  55. #define ZDO_SIMPLEDESC_REQUEST
  56. #define ZDO_ACTIVEEP_REQUEST
  57. #define ZDO_COMPLEXDESC_REQUEST
  58. #define ZDO_USERDESC_REQUEST
  59. #define ZDO_USERDESCSET_REQUEST
  60. #define ZDO_ENDDEVICEBIND_REQUEST
  61. #define ZDO_BIND_UNBIND_REQUEST
  62. #define ZDO_SERVERDISC_REQUEST
  63. #define ZDO_NETWORKSTART_REQUEST
  64. #define ZDO_MANUAL_JOIN
  65. #define ZDO_COMPLEXDESC_RESPONSE
  66. #define ZDO_USERDESC_RESPONSE
  67. #define ZDO_USERDESCSET_RESPONSE
  68. #define ZDO_SERVERDISC_RESPONSE
  69. #define ZDO_ENDDEVICE_ANNCE
  70. #if defined ( MT_ZDO_MGMT )
  71. #define ZDO_MGMT_NWKDISC_REQUEST
  72. #define ZDO_MGMT_LQI_REQUEST
  73. #define ZDO_MGMT_RTG_REQUEST
  74. #define ZDO_MGMT_BIND_REQUEST
  75. #define ZDO_MGMT_LEAVE_REQUEST
  76. #define ZDO_MGMT_JOINDIRECT_REQUEST
  77. #define ZDO_MGMT_PERMIT_JOIN_REQUEST
  78. #define ZDO_MGMT_NWKUPDATE_REQUEST
  79. #define ZDO_MGMT_NWKDISC_RESPONSE
  80. #define ZDO_MGMT_LQI_RESPONSE
  81. #define ZDO_MGMT_RTG_RESPONSE
  82. #define ZDO_MGMT_BIND_RESPONSE
  83. #define ZDO_MGMT_LEAVE_RESPONSE
  84. #define ZDO_MGMT_JOINDIRECT_RESPONSE
  85. #define ZDO_MGMT_PERMIT_JOIN_RESPONSE
  86. #define ZDO_MGMT_NWKUPDATE_NOTIFY
  87. #endif
  88. #else // !MT_ZDO_FUNC
  89. // Normal operation and sample apps only use End Device Bind
  90. // and Match Request.
  91. //#define ZDO_NWKADDR_REQUEST
  92. //#define ZDO_IEEEADDR_REQUEST
  93. #define ZDO_MATCH_REQUEST
  94. //#define ZDO_NODEDESC_REQUEST
  95. //#define ZDO_POWERDESC_REQUEST
  96. //#define ZDO_SIMPLEDESC_REQUEST
  97. //#define ZDO_ACTIVEEP_REQUEST
  98. //#define ZDO_COMPLEXDESC_REQUEST
  99. //#define ZDO_USERDESC_REQUEST
  100. //#define ZDO_USERDESCSET_REQUEST
  101. #define ZDO_ENDDEVICEBIND_REQUEST
  102. //#define ZDO_BIND_UNBIND_REQUEST
  103. //#define ZDO_SERVERDISC_REQUEST
  104. //#define ZDO_NETWORKSTART_REQUEST
  105. //#define ZDO_MANUAL_JOIN
  106. //#define ZDO_BIND_UNBIND_RESPONSE
  107. //#define ZDO_COMPLEXDESC_RESPONSE
  108. //#define ZDO_USERDESC_RESPONSE
  109. //#define ZDO_USERDESCSET_RESPONSE
  110. //#define ZDO_SERVERDISC_RESPONSE
  111. #define ZDO_ENDDEVICE_ANNCE
  112. //#define ZDO_MGMT_NWKDISC_REQUEST
  113. //#define ZDO_MGMT_LQI_REQUEST
  114. //#define ZDO_MGMT_RTG_REQUEST
  115. //#define ZDO_MGMT_BIND_REQUEST
  116. //#define ZDO_MGMT_LEAVE_REQUEST
  117. //#define ZDO_MGMT_JOINDIRECT_REQUEST
  118. //#define ZDO_MGMT_PERMIT_JOIN_REQUEST
  119. //#define ZDO_MGMT_NWKDISC_RESPONSE
  120. //#define ZDO_MGMT_LQI_RESPONSE
  121. //#define ZDO_MGMT_RTG_RESPONSE
  122. //#define ZDO_MGMT_BIND_RESPONSE
  123. //#define ZDO_MGMT_LEAVE_RESPONSE
  124. //#define ZDO_MGMT_JOINDIRECT_RESPONSE
  125. //#define ZDO_MGMT_PERMIT_JOIN_RESPONSE
  126. #if defined ( REFLECTOR )
  127. // Binding needs this request to do a 64 to 16 bit conversion
  128. #if !defined(ZDO_NWKADDR_REQUEST)
  129. #define ZDO_NWKADDR_REQUEST
  130. #endif
  131. #if !defined(ZDO_IEEEADDR_REQUEST)
  132. #define ZDO_IEEEADDR_REQUEST
  133. #endif
  134. #define ZDO_BIND_UNBIND_RESPONSE
  135. #endif
  136. #endif // !MT_ZDO_FUNC
  137. /*********************************************************************
  138. * Constants
  139. */
  140. #define MAX_BUFFER_SIZE 80
  141. #if defined ( ZIGBEE_FRAGMENTATION )
  142. // The application/profile must fill this field out.
  143. #define MAX_TRANSFER_SIZE 160
  144. #else
  145. #define MAX_TRANSFER_SIZE 80
  146. #endif
  147. #define MAX_ENDPOINTS 240
  148. // Node Description Bitfields
  149. #define ZDOLOGICALTYPE_MASK 0x07
  150. #define ZDOAPSFLAGS_MASK 0x07
  151. #define ZDOFREQUENCYBANDS_MASK 0x1F
  152. #define ZDOAPSFLAGS_BITLEN 3
  153. #define SIMPLE_DESC_DATA_SIZE 7
  154. #define NODE_DESC_DATA_SIZE 10
  155. // Simple Description Bitfields
  156. #define ZDOENDPOINT_BITLEN 5
  157. #define ZDOENDPOINT_MASK 0x1F
  158. #define ZDOINTERFACE_MASK 0x07
  159. #define ZDOAPPFLAGS_MASK 0x0F
  160. #define ZDOAPPDEVVER_MASK 0x0F
  161. #define ZDOAPPDEVVER_BITLEN 4
  162. /*********************************************************************
  163. * Attributes
  164. */
  165. extern NodeDescriptorFormat_t ZDO_Config_Node_Descriptor;
  166. extern NodePowerDescriptorFormat_t ZDO_Config_Power_Descriptor;
  167. /*********************************************************************
  168. * Function Prototypes
  169. */
  170. extern void ZDConfig_InitDescriptors( void );
  171. extern void ZDConfig_UpdateNodeDescriptor( void );
  172. extern void ZDConfig_UpdatePowerDescriptor( void );
  173. /*********************************************************************
  174. *********************************************************************/
  175. #ifdef __cplusplus
  176. }
  177. #endif
  178. #endif /* ZDCONFIG_H */