zcl_ccserver.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /**************************************************************************************************
  2. Filename: zcl_ccserver.h
  3. Revised: $Date: 2011-04-13 10:12:34 -0700 (Wed, 13 Apr 2011) $
  4. Revision: $Revision: 25678 $
  5. Description: This file contains the Zigbee Cluster Library - Commissioning
  6. Cluster Server Application.
  7. Copyright 2011 Texas Instruments Incorporated. All rights reserved.
  8. IMPORTANT: Your use of this Software is limited to those specific rights
  9. granted under the terms of a software license agreement between the user
  10. who downloaded the software, his/her employer (which must be your employer)
  11. and Texas Instruments Incorporated (the "License"). You may not use this
  12. Software unless you agree to abide by the terms of the License. The License
  13. limits your use, and you acknowledge, that the Software may not be modified,
  14. copied or distributed unless embedded on a Texas Instruments microcontroller
  15. or used solely and exclusively in conjunction with a Texas Instruments radio
  16. frequency transceiver, which is integrated into your product. Other than for
  17. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  18. works of, modify, distribute, perform, display or sell this Software and/or
  19. its documentation for any purpose.
  20. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  21. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  22. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  23. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  24. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  25. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  26. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  27. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  28. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  29. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  30. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  31. Should you have any questions regarding your right to use this Software,
  32. contact Texas Instruments Incorporated at www.TI.com.
  33. **************************************************************************************************/
  34. #ifndef ZCL_CCSERVER_H
  35. #define ZCL_CCSERVER_H
  36. #ifdef __cplusplus
  37. extern "C"
  38. {
  39. #endif
  40. /*********************************************************************
  41. * INCLUDES
  42. */
  43. #include "zcl.h"
  44. /*********************************************************************
  45. * CONSTANTS
  46. */
  47. #define CCSERVER_ENDPOINT 12
  48. #define CCSERVER_MAX_ATTRIBUTES 15
  49. // Events for the sample app
  50. #define CCSERVER_LEAVE_TIMER_EVT 0x0001
  51. #define CCSERVER_RESTART_TIMER_EVT 0x0002
  52. #define CCSERVER_RESET_TIMER_EVT 0x0004
  53. #define CCSERVER_MAX_NWK_STARTUP_PARAMS 1
  54. /*********************************************************************
  55. * MACROS
  56. */
  57. /*********************************************************************
  58. * TYPEDEFS
  59. */
  60. /*********************************************************************
  61. * VARIABLES
  62. */
  63. extern SimpleDescriptionFormat_t zclCCServer_SimpleDesc;
  64. extern CONST zclAttrRec_t zclCCServer_Attrs[];
  65. // Commissning cluster Start Up Parameter Attributes
  66. extern uint16 zclCCServer_ShortAddress;
  67. extern uint8 zclCCServer_ExtendedPanId[Z_EXTADDR_LEN];
  68. extern uint16 zclCCServer_PanId;
  69. extern uint32 zclCCServer_ChannelMask;
  70. extern uint8 zclCCServer_ProtocolVersion;
  71. extern uint8 zclCCServer_StackProfile;
  72. extern uint8 zclCCServer_StartUpControl;
  73. extern uint8 zclCCServer_TrustCenterAddr[Z_EXTADDR_LEN];
  74. extern bool zclCCServer_UseInsecureJoin;
  75. extern uint8 zclCCServer_NetworkKeySeqNum;
  76. extern uint8 zclCCServer_NetworkKeyType;
  77. extern uint16 zclCCServer_NwkManagerAddr;
  78. /*********************************************************************
  79. * FUNCTIONS
  80. */
  81. /*
  82. * Initialization for the task
  83. */
  84. extern void zclCCServer_Init( uint8 task_id );
  85. /*
  86. * Event Process for the task
  87. */
  88. extern uint16 zclCCServer_event_loop( uint8 task_id, uint16 events );
  89. /*
  90. * Reset the local device to ZBA Default
  91. */
  92. extern void zclCCServer_ResetToZBADefault( void );
  93. /*********************************************************************
  94. *********************************************************************/
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif /* ZCL_CCSERVER_H */