blob: db5a1313015bccb1da027d63b41aa041a1de15f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/**
* @file zcl.onoff.swconfig.h
* @heading On/Off Switch Configuration
* @brief ZCL OnOff Switch Configuration cluster header
* ZCL 7 section 3.9
* ZCL 8 section 3.9
* @copyright Copyright [2019 - 2020] Exegin Technologies Limited. All rights reserved.
*/
#ifndef ZCL_ONOFF_SWCONFIG_H
#define ZCL_ONOFF_SWCONFIG_H
/* NOTE: The following PICS statement is for internal Exegin use only, and is not a product of the Zigbee Alliance. */
/* @PICS.ZCL.SwConfig
* OOSC.S | Server | True
* OOSC.C | Client | True
*
* Server Attributes
* OOSC.S.A0000 | SwitchType | True
* OOSC.S.A0010 | SwitchActions | True
* OOSC.S.Afffd | ClusterRevision | True
* OOSC.S.Afffe | AttributeReportingStatus | False
*
* Client Attributes
* OOSC.S.Afffd | ClusterRevision | True
* OOSC.S.Afffe | AttributeReportingStatus | False
*/
#include "zcl/zcl.h"
/*--------------------------------------------------------------------------
* DESCRIPTION
* Interface definition for the ZCL OnOff Switch Configuration cluster.
*
* This cluster is dependent on the OnOff client cluster, as the switch
* actions attribute specifies the commands of the OnOff cluster to be
* generated when the switch moves between it's two states.
*--------------------------------------------------------------------------
*/
/** Onoff Switch Configuration cluster attribute IDs */
enum ZbZclOnOffSwConfigSvrAttrId {
ZCL_ONOFF_SWCONFIG_ATTR_TYPE = 0x0000, /**< SwitchType */
ZCL_ONOFF_SWCONFIG_ATTR_ACTIONS = 0x0010 /**< SwitchActions */
};
/* Switch Info values */
enum {
ZCL_ONOFF_SWCONFIG_TOGGLE = 0x00,
ZCL_ONOFF_SWCONFIG_MOMENTARY = 0x01,
ZCL_ONOFF_SWCONFIG_MULTIFUNCTION = 0x02
};
/* Switch Settings values */
enum {
ZCL_ONOFF_SWCONFIG_ON_OFF = 0x00,
ZCL_ONOFF_SWCONFIG_OFF_ON = 0x01,
ZCL_ONOFF_SWCONFIG_TOGGLE_TOGGLE = 0x02
};
/*---------------------------------------------------------------
* OnOff Switch Configuration Server Cluster
*---------------------------------------------------------------
*/
/**
* Create a new instance of the OnOff Switch Configuration Server cluster
* @param zb Zigbee stack instance
* @param endpoint Endpoint on which to create cluster
* @param switch_type Type of switch associated with this cluster server
* @return Cluster pointer, or NULL if there is an error
*/
struct ZbZclClusterT * ZbZclOnOffSwConfigServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t switch_type);
/*---------------------------------------------------------------
* OnOff Switch Configuration Client Cluster
*---------------------------------------------------------------
*/
/**
* Create a new instance of the OnOff Switch Configuration Client cluster
* @param zb Zigbee stack instance
* @param endpoint Endpoint on which to create cluster
* @return Cluster pointer, or NULL if there is an error
*/
struct ZbZclClusterT * ZbZclOnOffSwConfigClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
#endif /* __ZCL_ONOFF_SWCONFIG_H */
|