ZDConfig.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /**************************************************************************************************
  2. Filename: ZDConfig.h
  3. Revised: $Date: 2008-06-17 08:47:15 -0700 (Tue, 17 Jun 2008) $
  4. Revision: $Revision: 17269 $
  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-2007 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_COMPLEXDESC_RESPONSE
  65. #define ZDO_USERDESC_RESPONSE
  66. #define ZDO_USERDESCSET_RESPONSE
  67. #define ZDO_SERVERDISC_RESPONSE
  68. #define ZDO_ENDDEVICE_ANNCE
  69. #if defined ( MT_ZDO_MGMT )
  70. #define ZDO_MGMT_NWKDISC_REQUEST
  71. #define ZDO_MGMT_LQI_REQUEST
  72. #define ZDO_MGMT_RTG_REQUEST
  73. #define ZDO_MGMT_BIND_REQUEST
  74. #define ZDO_MGMT_LEAVE_REQUEST
  75. #define ZDO_MGMT_JOINDIRECT_REQUEST
  76. #define ZDO_MGMT_PERMIT_JOIN_REQUEST
  77. #define ZDO_MGMT_NWKUPDATE_REQUEST
  78. #define ZDO_MGMT_NWKDISC_RESPONSE
  79. #define ZDO_MGMT_LQI_RESPONSE
  80. #define ZDO_MGMT_RTG_RESPONSE
  81. #define ZDO_MGMT_BIND_RESPONSE
  82. #define ZDO_MGMT_LEAVE_RESPONSE
  83. #define ZDO_MGMT_JOINDIRECT_RESPONSE
  84. #define ZDO_MGMT_PERMIT_JOIN_RESPONSE
  85. #define ZDO_MGMT_NWKUPDATE_NOTIFY
  86. #endif
  87. #else // !MT_ZDO_FUNC
  88. // Normal operation and sample apps only use End Device Bind
  89. // and Match Request.
  90. //#define ZDO_NWKADDR_REQUEST
  91. //#define ZDO_IEEEADDR_REQUEST
  92. #define ZDO_MATCH_REQUEST
  93. //#define ZDO_NODEDESC_REQUEST
  94. //#define ZDO_POWERDESC_REQUEST
  95. //#define ZDO_SIMPLEDESC_REQUEST
  96. //#define ZDO_ACTIVEEP_REQUEST
  97. //#define ZDO_COMPLEXDESC_REQUEST
  98. //#define ZDO_USERDESC_REQUEST
  99. //#define ZDO_USERDESCSET_REQUEST
  100. #define ZDO_ENDDEVICEBIND_REQUEST
  101. //#define ZDO_BIND_UNBIND_REQUEST
  102. //#define ZDO_SERVERDISC_REQUEST
  103. //#define ZDO_BIND_UNBIND_RESPONSE
  104. //#define ZDO_COMPLEXDESC_RESPONSE
  105. //#define ZDO_USERDESC_RESPONSE
  106. //#define ZDO_USERDESCSET_RESPONSE
  107. //#define ZDO_SERVERDISC_RESPONSE
  108. #define ZDO_ENDDEVICE_ANNCE
  109. //#define ZDO_MGMT_NWKDISC_REQUEST
  110. //#define ZDO_MGMT_LQI_REQUEST
  111. //#define ZDO_MGMT_RTG_REQUEST
  112. //#define ZDO_MGMT_BIND_REQUEST
  113. //#define ZDO_MGMT_LEAVE_REQUEST
  114. //#define ZDO_MGMT_JOINDIRECT_REQUEST
  115. //#define ZDO_MGMT_PERMIT_JOIN_REQUEST
  116. //#define ZDO_MGMT_NWKDISC_RESPONSE
  117. //#define ZDO_MGMT_LQI_RESPONSE
  118. //#define ZDO_MGMT_RTG_RESPONSE
  119. //#define ZDO_MGMT_BIND_RESPONSE
  120. //#define ZDO_MGMT_LEAVE_RESPONSE
  121. //#define ZDO_MGMT_JOINDIRECT_RESPONSE
  122. //#define ZDO_MGMT_PERMIT_JOIN_RESPONSE
  123. #if defined ( REFLECTOR )
  124. // Binding needs this request to do a 64 to 16 bit conversion
  125. #if !defined(ZDO_NWKADDR_REQUEST)
  126. #define ZDO_NWKADDR_REQUEST
  127. #endif
  128. #if !defined(ZDO_IEEEADDR_REQUEST)
  129. #define ZDO_IEEEADDR_REQUEST
  130. #endif
  131. #define ZDO_BIND_UNBIND_RESPONSE
  132. #endif
  133. #endif // !MT_ZDO_FUNC
  134. /*********************************************************************
  135. * Constants
  136. */
  137. #define MAX_BUFFER_SIZE 80
  138. #if defined ( ZIGBEE_FRAGMENTATION )
  139. // The application/profile must fill this field out.
  140. #define MAX_TRANSFER_SIZE 160
  141. #else
  142. #define MAX_TRANSFER_SIZE 80
  143. #endif
  144. #define MAX_ENDPOINTS 240
  145. // Node Description Bitfields
  146. #define ZDOLOGICALTYPE_MASK 0x07
  147. #define ZDOAPSFLAGS_MASK 0x07
  148. #define ZDOFREQUENCYBANDS_MASK 0x1F
  149. #define ZDOAPSFLAGS_BITLEN 3
  150. #define SIMPLE_DESC_DATA_SIZE 7
  151. #define NODE_DESC_DATA_SIZE 10
  152. // Simple Description Bitfields
  153. #define ZDOENDPOINT_BITLEN 5
  154. #define ZDOENDPOINT_MASK 0x1F
  155. #define ZDOINTERFACE_MASK 0x07
  156. #define ZDOAPPFLAGS_MASK 0x0F
  157. #define ZDOAPPDEVVER_MASK 0x0F
  158. #define ZDOAPPDEVVER_BITLEN 4
  159. /*********************************************************************
  160. * Attributes
  161. */
  162. extern NodeDescriptorFormat_t ZDO_Config_Node_Descriptor;
  163. extern NodePowerDescriptorFormat_t ZDO_Config_Power_Descriptor;
  164. /*********************************************************************
  165. * Function Prototypes
  166. */
  167. extern void ZDConfig_InitDescriptors( void );
  168. extern void ZDConfig_UpdateNodeDescriptor( void );
  169. extern void ZDConfig_UpdatePowerDescriptor( void );
  170. /*********************************************************************
  171. *********************************************************************/
  172. #ifdef __cplusplus
  173. }
  174. #endif
  175. #endif /* ZDCONFIG_H */