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
|
/**
* @file zcl.pump.h
* @brief ZCL Pump Configuration and Control cluster header
* ZCL 7 section 6.2
* ZCL 8 section 6.2
* @copyright Copyright [2009 - 2020] Exegin Technologies Limited. All rights reserved.
*/
#ifndef ZCL_PUMP_H
#define ZCL_PUMP_H
#include "zcl/zcl.h"
/* Pump Configuration and Control cluster interface definition */
/** Pump Configuration and Control Attribute Ids */
enum ZbZclPumpServerAttrT {
ZCL_PUMP_SVR_ATTR_MAX_PRESSURE = 0x0000, /**< MaxPressure */
ZCL_PUMP_SVR_ATTR_MAX_SPEED = 0x0001, /**< MaxSpeed */
ZCL_PUMP_SVR_ATTR_MAX_FLOW = 0x0002, /**< MaxFlow */
ZCL_PUMP_SVR_ATTR_MIN_CONST_PRESSURE = 0x0003, /**< MinConstPressure */
ZCL_PUMP_SVR_ATTR_MAX_CONST_PRESSURE = 0x0004, /**< MaxConstPressure */
ZCL_PUMP_SVR_ATTR_MIN_COMP_PRESSURE = 0x0005, /**< MinCompPressure */
ZCL_PUMP_SVR_ATTR_MAX_COMP_PRESSURE = 0x0006, /**< MaxCompPressure */
ZCL_PUMP_SVR_ATTR_MIN_CONST_SPEED = 0x0007, /**< MinConstSpeed */
ZCL_PUMP_SVR_ATTR_MAX_CONST_SPEED = 0x0008, /**< MaxConstSpeed */
ZCL_PUMP_SVR_ATTR_MIN_CONST_FLOW = 0x0009, /**< MinConstFlow */
ZCL_PUMP_SVR_ATTR_MAX_CONST_FLOW = 0x000a, /**< MaxConstFlow */
ZCL_PUMP_SVR_ATTR_MIN_CONST_TEMP = 0x000b, /**< MinConstTemp */
ZCL_PUMP_SVR_ATTR_MAX_CONST_TEMP = 0x000c, /**< MaxConstTemp */
ZCL_PUMP_SVR_ATTR_PUMP_STATUS = 0x0010, /**< PumpStatus */
ZCL_PUMP_SVR_ATTR_EFF_OP_MODE = 0x0011, /**< EffectiveOperationMode */
ZCL_PUMP_SVR_ATTR_EFF_CTRL_MODE = 0x0012, /**< EffectiveControlMode */
ZCL_PUMP_SVR_ATTR_CAPACITY = 0x0013, /**< Capacity */
ZCL_PUMP_SVR_ATTR_SPEED = 0x0014, /**< Speed */
ZCL_PUMP_SVR_ATTR_RUNNING_HOURS = 0x0015, /**< LifetimeRunningHours */
ZCL_PUMP_SVR_ATTR_POWER = 0x0016, /**< Power */
ZCL_PUMP_SVR_ATTR_ENERGY_CONSUMED = 0x0017, /**< LifetimeEnergyConsumed */
ZCL_PUMP_SVR_ATTR_OP_MODE = 0x0020, /**< OperationMode */
ZCL_PUMP_SVR_ATTR_CTRL_MODE = 0x0021, /**< ControlMode */
ZCL_PUMP_SVR_ATTR_ALARM_MASK = 0x0022 /**< AlarmMask */
};
/** Pump Configuration and Control cluster defines */
#define ZCL_PUMP_OP_MODE_DEFAULT 0x00
#define ZCL_PUMP_PRESSURE_MIN (int16_t)0x8001
#define ZCL_PUMP_PRESSURE_MAX (int16_t)0x7fff
#define ZCL_PUMP_TEMP_MIN (int16_t)0x954d
#define ZCL_PUMP_TEMP_MAX (int16_t)0x7fff
#define ZCL_PUMP_CAPACITY_MIN (int16_t)0x0000
#define ZCL_PUMP_CAPACITY_MAX (int16_t)0x7fff
#define ZCL_PUMP_CAPACITY_UNKNOWN (int16_t)0x8000
/* Pump Configuration and Control cluster function prototypes */
/**
* Instantiate a new instance of the Pump Configuration and 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 * ZbZclPumpClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
/**
* Instantiate a new instance of the Pump Configuration and 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 * ZbZclPumpServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
#endif
|