]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - z-stack-apps/z-stack-example-apps.git/blob - IAS Sample Applications/CIE-FD-WD-ZHA1.2.2a/SampleCIE/Source/zcl_sampleCIE.h
Initial IAS Sample Apps release
[z-stack-apps/z-stack-example-apps.git] / IAS Sample Applications / CIE-FD-WD-ZHA1.2.2a / SampleCIE / Source / zcl_sampleCIE.h
1 /******************************************************************************\r
2 \r
3 @file zcl_sampleCIE.h\r
4 \r
5 @brief Z-Stack Home 1.2.2a Sample Application\r
6 \r
7 @date 2017-02-15 18:24:32\r
8 \r
9 Group: CMCU LPC\r
10 Target Devices: CC2530/CC2531/CC2538\r
11 \r
12 ******************************************************************************\r
13 \r
14 Copyright (c) 2017, Texas Instruments Incorporated\r
15 All rights reserved.\r
16 \r
17 Redistribution and use in source and binary forms, with or without\r
18 modification, are permitted provided that the following conditions\r
19 are met:\r
20 \r
21 *  Redistributions of source code must retain the above copyright\r
22     notice, this list of conditions and the following disclaimer.\r
23 \r
24 *  Redistributions in binary form must reproduce the above copyright\r
25     notice, this list of conditions and the following disclaimer in the\r
26     documentation and/or other materials provided with the distribution.\r
27 \r
28 *  Neither the name of Texas Instruments Incorporated nor the names of\r
29     its contributors may be used to endorse or promote products derived\r
30     from this software without specific prior written permission.\r
31 \r
32 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
33 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
34 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
35 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
36 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
37 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
38 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
39 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
40 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
41 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
42 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
43 \r
44 *****************************************************************************/\r
45 \r
46 #ifndef ZCL_SAMPLECIE_H\r
47 #define ZCL_SAMPLECIE_H\r
48 \r
49 #ifdef __cplusplus\r
50 extern "C"\r
51 {\r
52 #endif\r
53 \r
54 /*********************************************************************\r
55  * INCLUDES\r
56  */\r
57 #include "zcl.h"\r
58 #include "zcl_ss.h"\r
59 \r
60 /*********************************************************************\r
61  * CONSTANTS\r
62  */\r
63 #define SAMPLECIE_ENDPOINT            22\r
64 \r
65 #define SAMPLECIE_MAX_ATTRIBUTES      10\r
66 \r
67 #define SAMPLECIE_ALARM_MAX_DURATION    0x00F0\r
68   \r
69 #define SS_IAS_WD_ALARM_DEFAULT_DURATION    0x0014  \r
70 #define ZCL_SS_MAX_WDS 50\r
71 \r
72 #define SQUAWKBLINKS 4\r
73 \r
74 // Application Events\r
75 #define SAMPLECIE_IDENTIFY_TIMEOUT_EVT               0x0001\r
76 #define SAMPLECIE_EZMODE_TIMEOUT_EVT           0x0002\r
77 #define SAMPLECIE_EZMODE_NEXTSTATE_EVT         0x0004\r
78 #define SAMPLECIE_MAIN_SCREEN_EVT              0x0008\r
79 #define RESET_EVT                              0x0010\r
80 \r
81 // Application Display Modes\r
82 #define CIE_MAINMODE         0x00\r
83 \r
84 /*********************************************************************\r
85  * MACROS\r
86  */\r
87 /*********************************************************************\r
88  * TYPEDEFS\r
89  */\r
90  typedef struct zclSS_WDItem\r
91   {\r
92     struct zclSS_WDItem *next;\r
93     uint16 nwkAddr;\r
94     uint8 endPoint;\r
95   }zclSS_WDItem_t;\r
96   \r
97   \r
98 /*********************************************************************\r
99  * VARIABLES\r
100  */\r
101 extern SimpleDescriptionFormat_t zclSampleCIE_SimpleDesc;\r
102 \r
103 extern CONST zclAttrRec_t zclSampleCIE_Attrs[];\r
104 \r
105 extern uint16 zclSampleCIE_IdentifyTime;\r
106 \r
107 extern uint8 zclSampleCIE_DeviceEnable;\r
108 \r
109 /*********************************************************************\r
110  * FUNCTIONS\r
111  */\r
112 \r
113  /*\r
114   * Initialization for the task\r
115   */\r
116 extern void zclSampleCIE_Init( byte task_id );\r
117 \r
118 /*\r
119  *  Event Process for the task\r
120  */\r
121 extern UINT16 zclSampleCIE_event_loop( byte task_id, UINT16 events );\r
122 \r
123 \r
124 /*********************************************************************\r
125 *********************************************************************/\r
126 \r
127 #ifdef __cplusplus\r
128 }\r
129 #endif\r
130 \r
131 #endif /* ZCL_SAMPLECIE_H */\r