Implement ZCL Global control
[platform/core/connectivity/zigbee-manager.git] / common / include / zigbee_zcl_alarm_type.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Contact: Suresh Kumar N (suresh.n@samsung.com)
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef __ZIGBEE_ZCL_ALARM_TYPE_H__
20 #define __ZIGBEE_ZCL_ALARM_TYPE_H__
21
22 #include <zigbee_types.h>
23
24 /* --------------------------------------------------------------------------------------
25  * For Request
26  * -------------------------------------------------------------------------------------*/
27
28 /**
29  * @brief Definition for ZCL Alarm get alarm count structure.
30  * @since_tizen 3.0
31  */
32 typedef struct {
33         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
34         char endpoint; /**< Endpoint */
35 } ZigbeeZclAlarmGetAlarmCount_t;
36
37 /**
38  * @brief Definition for ZCL Alarm reset alarm structure.
39  * @since_tizen 3.0
40  */
41 typedef struct {
42         short node_id; /**< Node ID */
43         char endpoint; /**< Endpoint */
44         char alarm_code; /**< Alarm code */
45         short cluster_id; /**< Cluster ID */
46 } ZigbeeZclAlarmResetAlarm_t;
47
48 /**
49  * @brief Definition for ZCL Alarm reset all alarm structure.
50  * @since_tizen 3.0
51  */
52 typedef struct {
53         short node_id; /**< Node ID */
54         char endpoint; /**< Endpoint */
55 } ZigbeeZclAlarmResetAllAlarm_t;
56
57 /**
58  * @brief Definition for ZCL Alarm alarm structure.
59  * @since_tizen 3.0
60  */
61 typedef struct {
62         unsigned char eui64[ZIGBEE_EUI64_SIZE]; /**< EUI64 (an IEEE address) */
63         char endpoint; /**< Endpoint */
64         char alarm_code; /**< Alarm code */
65         short cluster_id; /**< Cluster ID */
66 } ZigbeeZclAlarmAlarm_t;
67
68 /**
69  * @brief Definition for ZCL Alarm reset all alarm logs structure.
70  * @since_tizen 3.0
71  */
72 typedef struct {
73         short node_id; /**< Node ID */
74         char endpoint; /**< Endpoint */
75 } ZigbeeZclAlarmResetAlarmLogs_t;
76
77 /**
78  * @brief Definition for ZCL Alarm get alarm structure.
79  * @since_tizen 3.0
80  */
81 typedef struct {
82         short node_id; /**< Node ID */
83         char endpoint; /**< Endpoint */
84 } ZigbeeZclAlarmGetAlarm_t;
85
86 /* --------------------------------------------------------------------------------------
87  * For Responses
88  * -------------------------------------------------------------------------------------*/
89
90 /**
91  * @brief Definition for ZCL Alarm get alarm count response structure.
92  * @since_tizen 3.0
93  */
94 typedef struct {
95         int result; /**< Result */
96         unsigned char status; /**< Status */
97 } ZigbeeZclAlarmGetAlarmCountResp_t;
98
99 /* --------------------------------------------------------------------------------------
100  * For Notifications
101  * -------------------------------------------------------------------------------------*/
102 /**
103  * @brief Definition for ZCL Alarm notification structure.
104  * @since_tizen 3.0
105  */
106 typedef struct {
107         short node_id; /**< Node ID */
108         char endpoint; /**< Endpoint */
109         char status; /**< Status */
110         char alarm_code; /**< Alarm code */
111         short clusterid; /**< Cluster ID */
112         int timestamp; /**< Time stamp */
113 } ZigbeeZclAlarmGetAlarmRsp_t;
114
115 #endif /* __ZIGBEE_ZCL_ALARM_TYPE_H__ */