zcl_closures.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /**************************************************************************************************
  2. Filename: zcl_closures.h
  3. Revised: $Date: 2006-09-08 15:51:21 -0700 (Fri, 08 Sep 2006) $
  4. Revision: $Revision: 11934 $
  5. Description: This file contains the ZCL Closures definitions.
  6. Copyright 2006-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 ZCL_CLOSURES_H
  34. #define ZCL_CLOSURES_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /*********************************************************************
  40. * INCLUDES
  41. */
  42. #include "zcl.h"
  43. /*********************************************************************
  44. * CONSTANTS
  45. */
  46. /**********************************************/
  47. /*** Shade Configuration Cluster Attributes ***/
  48. /**********************************************/
  49. // Shade information attributes set
  50. #define ATTRID_CLOSURES_PHYSICAL_CLOSED_LIMIT 0x0000
  51. #define ATTRID_CLOSURES_MOTOR_STEP_SIZE 0x0001
  52. #define ATTRID_CLOSURES_STATUS 0x0002
  53. /*** Status attribute bit values ***/
  54. #define CLOSURES_STATUS_SHADE_IS_OPERATIONAL 0x01
  55. #define CLOSURES_STATUS_SHADE_IS_ADJUSTING 0x02
  56. #define CLOSURES_STATUS_SHADE_DIRECTION 0x04
  57. #define CLOSURES_STATUS_SHADE_MOTOR_FORWARD_DIRECTION 0x08
  58. // Shade settings attributes set
  59. #define ATTRID_CLOSURES_CLOSED_LIMIT 0x0010
  60. #define ATTRID_CLOSURES_MODE 0x0012
  61. /*** Mode attribute values ***/
  62. #define CLOSURES_MODE_NORMAL_MODE 0x00
  63. #define CLOSURES_MODE_CONFIGURE_MODE 0x01
  64. // cluster has no specific commands
  65. /**********************************************/
  66. /*** Logical Cluster ID - for mapping only ***/
  67. /*** These are not to be used over-the-air ***/
  68. /**********************************************/
  69. #define ZCL_CLOSURES_LOGICAL_CLUSTER_ID_SHADE_CONFIG 0x0010
  70. /*********************************************************************
  71. * TYPEDEFS
  72. */
  73. // This callback is just a place holder
  74. //
  75. typedef void (*zclClosures_PlaceHolder_t)( void );
  76. // Register Callbacks table entry - enter function pointers for callbacks that
  77. // the application would like to receive
  78. typedef struct
  79. {
  80. zclClosures_PlaceHolder_t pfnPlaceHolder; // Place Holder
  81. // NULL
  82. } zclClosures_AppCallbacks_t;
  83. /*
  84. * Register for callbacks from this cluster library
  85. */
  86. extern ZStatus_t zclClosures_RegisterCmdCallbacks( uint8 endpoint, zclClosures_AppCallbacks_t *callbacks );
  87. /*********************************************************************
  88. * VARIABLES
  89. */
  90. /*********************************************************************
  91. * FUNCTIONS
  92. */
  93. /*********************************************************************
  94. * FUNCTION MACROS
  95. */
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif /* ZCL_CLOSURES_H */