Welcome to mirror list, hosted at ThFree Co, Russian Federation.

zcl.fan.h « general « zcl « include « stack « zigbee « STM32_WPAN « ST « Middlewares - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9d9bb85bd5218969c24e005322042822fb490a9c (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
/**
 * @file zcl.fan.h
 * @heading Fan Control
 * @brief ZCL Fan Control cluster header
 * ZCL 7 section 6.4
 * ZCL 8 section 6.4
 * @copyright Copyright [2009 - 2020] Exegin Technologies Limited. All rights reserved.
 */

#ifndef ZCL_FAN_H
#define ZCL_FAN_H

/* @PICS.ZCL.Fan
 *
 * FAN.S | Server | True
 * FAN.C | Client | True
 *
 * Server Attributes
 * FAN.S.A0000 | FanMode | True
 * FAN.S.A0001 | FanModeSequence | True
 * FAN.S.Afffd | ClusterRevision | True
 * FAN.S.Afffe | AttributeReportingStatus | False
 *
 * Client Attributes
 * FAN.C.Afffd | ClusterRevision | True
 * FAN.C.Afffe | AttributeReportingStatus | False
 */

#include "zcl/zcl.h"

/** Fan Control Server Attribute IDs */
enum ZbZclFanSvrAttrT {
    ZCL_FAN_ATTR_MODE = 0x0000, /**< FanMode */
    ZCL_FAN_ATTR_SEQUENCE = 0x00001, /**< FanModeSequence */
};

/** Fan Mode Attribute Values */
enum ZbZclFanModeT {
    ZCL_FAN_MODE_OFF = 0x00, /**< Off */
    ZCL_FAN_MODE_LOW = 0x01, /**< Low */
    ZCL_FAN_MODE_MED = 0x02, /**< Medium */
    ZCL_FAN_MODE_HI = 0x03, /**< High */
    ZCL_FAN_MODE_ON = 0x04, /**< On */
    ZCL_FAN_MODE_AUTO = 0x05, /**< Auto (the fan speed is self-regulated) */
    ZCL_FAN_MODE_SMART = 0x06 /**< Smart (when the heated/cooled space is occupied, the fan is always on) */
};

/** Fan Sequence Operation Attribute Values */
enum ZbZclFanSeqT {
    ZCL_FAN_SEQ_LMH = 0x00, /**< Low/Med/High */
    ZCL_FAN_SEQ_LH = 0x01, /**< Low/High */
    ZCL_FAN_SEQ_LMHA = 0x02, /**< Low/Med/High/Auto */
    ZCL_FAN_SEQ_LHA = 0x03, /**< Low/High/Auto */
    ZCL_FAN_SEQ_OA = 0x04 /**< On/Auto */
};

/* Fan Control Client */
/**
 * Create a new instance of the Fan Control 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 * ZbZclFanClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);

/* Fan Control Server */
/**
 * Create a new instance of the Fan Control Server 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 * ZbZclFanServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);

#endif