1 /* packet-zbee-zcl-hvac.c
2 * Dissector routines for the ZigBee ZCL HVAC clusters
3 * By Aditya Jain <aditya.jain@samsung.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/packet.h>
17 #include <wsutil/array.h>
19 #include "packet-zbee.h"
20 #include "packet-zbee-aps.h"
21 #include "packet-zbee-zcl.h"
23 /* ########################################################################## */
24 /* #### (0x0200) PUMP CONFIGURATION AND CONTROL CLUSTER ##################### */
25 /* ########################################################################## */
27 /*************************/
29 /*************************/
31 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_NUM_ETT 3
34 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_PRESSURE 0x0000 /* Maximum Pressure */
35 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_SPEED 0x0001 /* Maximum Speed */
36 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_FLOW 0x0002 /* Maximum Flow */
37 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_PRESSURE 0x0003 /* Minimum Constant Pressure */
38 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_PRESSURE 0x0004 /* Maximum Constant Pressure */
39 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_COMP_PRESSURE 0x0005 /* Minimum Compensated Pressure */
40 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_POWER_MAX_COMP_PRESSURE 0x0006 /* Maximum Compensated Pressure */
41 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_SPEED 0x0007 /* Minimum Constant Speed */
42 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_SPEED 0x0008 /* Maximum Constant Speed */
43 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_FLOW 0x0009 /* Minimum Constant Flow */
44 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_FLOW 0x000a /* Maximum Constant Flow */
45 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_TEMP 0x000b /* Minimum Constant Temperature */
46 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_TEMP 0x000c /* Maximum Constant Temperature */
47 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_PUMP_STATUS 0x0010 /* Pump Status */
48 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_EFFECTIVE_OPR_MODE 0x0011 /* Effective Operation Mode */
49 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_EFFECTIVE_CTRL_MODE 0x0012 /* Effective Control Mode */
50 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_CAPACITY 0x0013 /* Capacity */
51 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_SPEED 0x0014 /* Speed */
52 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_LIFETIME_RUNNING_HOURS 0x0015 /* Lifetime Running Hours */
53 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_POWER 0x0016 /* Power */
54 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_LIFETIME_ENERGY_CONS 0x0017 /* Lifetime Energy Consumed */
55 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_OPR_MODE 0x0020 /* Operation Mode */
56 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_CTRL_MODE 0x0021 /* Control Mode */
57 #define ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_ALARM_MASK 0x0022 /* Alarm Mask */
59 /*Server commands received - none*/
61 /*Server commands generated - none*/
63 /*Pump Status Mask Values*/
64 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_DEVICE_FAULT 0x0001 /* Device Fault */
65 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_SUPPLY_FAULT 0x0002 /* Supply Fault */
66 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_SPEED_LOW 0x0004 /* Speed Low */
67 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_SPEED_HIGH 0x0008 /* Speed High */
68 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_LOCAL_OVERRIDE 0x0010 /* Local Override */
69 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_RUNNING 0x0020 /* Running */
70 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_REMOTE_PRESSURE 0x0040 /* Remote Pressure */
71 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_REMOTE_FLOW 0x0080 /* Remote Flow */
72 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_REMOTE_TEMP 0x0100 /* Remote Temperature */
75 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_VOLTAGE_TOO_LOW 0x0001 /* Supply voltage too low */
76 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_VOLTAGE_TOO_HIGH 0x0002 /* Supply voltage too high */
77 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PWR_MISSING_PHASE 0x0004 /* Power missing phase */
78 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PRESSURE_TOO_LOW 0x0008 /* System pressure too low */
79 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PRESSURE_TOO_HIGH 0x0010 /* System pressure too high */
80 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_DRY_RUNNING 0x0020 /* Dry running */
81 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_MTR_TEMP_TOO_HIGH 0x0040 /* Motor temperature too high */
82 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PUMP_MTR_FATAL_FAILURE 0x0080 /* Pump motor has fatal failure */
83 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_ELEC_TEMP_TOO_HIGH 0x0100 /* Electronic temperature too high */
84 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PUMP_BLOCK 0x0200 /* Pump blocked */
85 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_SENSOR_FAILURE 0x0400 /* Sensor failure */
86 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_ELEC_NON_FATAL_FAILURE 0x0800 /* Electronic non-fatal failure */
87 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_ELEC_FATAL_FAILURE 0x1000 /* Electronic fatal failure */
88 #define ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_GENERAL_FAULT 0x2000 /* General fault */
90 /*************************/
91 /* Function Declarations */
92 /*************************/
94 void proto_register_zbee_zcl_pump_config_control(void);
95 void proto_reg_handoff_zbee_zcl_pump_config_control(void);
97 /* Command Dissector Helpers */
98 static void dissect_zcl_pump_config_control_attr_data (proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
);
100 /* Private functions prototype */
102 /*************************/
103 /* Global Variables */
104 /*************************/
105 /* Initialize the protocol and registered fields */
106 static int proto_zbee_zcl_pump_config_control
;
108 static int hf_zbee_zcl_pump_config_control_attr_id
;
109 static int hf_zbee_zcl_pump_config_control_attr_eff_opr_mode
;
110 static int hf_zbee_zcl_pump_config_control_attr_opr_mode
;
111 static int hf_zbee_zcl_pump_config_control_attr_eff_ctrl_mode
;
112 static int hf_zbee_zcl_pump_config_control_attr_ctrl_mode
;
113 static int hf_zbee_zcl_pump_config_control_status
;
114 static int hf_zbee_zcl_pump_config_control_status_device_fault
;
115 static int hf_zbee_zcl_pump_config_control_status_supply_fault
;
116 static int hf_zbee_zcl_pump_config_control_status_speed_low
;
117 static int hf_zbee_zcl_pump_config_control_status_speed_high
;
118 static int hf_zbee_zcl_pump_config_control_status_local_override
;
119 static int hf_zbee_zcl_pump_config_control_status_running
;
120 static int hf_zbee_zcl_pump_config_control_status_rem_pressure
;
121 static int hf_zbee_zcl_pump_config_control_status_rem_flow
;
122 static int hf_zbee_zcl_pump_config_control_status_rem_temp
;
123 static int hf_zbee_zcl_pump_config_control_alarm
;
124 static int hf_zbee_zcl_pump_config_control_alarm_volt_too_low
;
125 static int hf_zbee_zcl_pump_config_control_alarm_volt_too_high
;
126 static int hf_zbee_zcl_pump_config_control_alarm_pwr_missing_phase
;
127 static int hf_zbee_zcl_pump_config_control_alarm_press_too_low
;
128 static int hf_zbee_zcl_pump_config_control_alarm_press_too_high
;
129 static int hf_zbee_zcl_pump_config_control_alarm_dry_running
;
130 static int hf_zbee_zcl_pump_config_control_alarm_mtr_temp_too_high
;
131 static int hf_zbee_zcl_pump_config_control_alarm_pump_mtr_fatal_fail
;
132 static int hf_zbee_zcl_pump_config_control_alarm_elec_temp_too_high
;
133 static int hf_zbee_zcl_pump_config_control_alarm_pump_block
;
134 static int hf_zbee_zcl_pump_config_control_alarm_sensor_fail
;
135 static int hf_zbee_zcl_pump_config_control_alarm_elec_non_fatal_fail
;
136 static int hf_zbee_zcl_pump_config_control_alarm_fatal_fail
;
137 static int hf_zbee_zcl_pump_config_control_alarm_gen_fault
;
139 /* Initialize the subtree pointers */
140 static int ett_zbee_zcl_pump_config_control
;
141 static int ett_zbee_zcl_pump_config_control_status
;
142 static int ett_zbee_zcl_pump_config_control_alarm
;
145 static const value_string zbee_zcl_pump_config_control_attr_names
[] = {
146 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_PRESSURE
, "Maximum Pressure" },
147 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_SPEED
, "Maximum Speed" },
148 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_FLOW
, "Maximum Flow" },
149 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_PRESSURE
, "Minimum Constant Pressure" },
150 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_PRESSURE
, "Maximum Constant Pressure" },
151 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_COMP_PRESSURE
, "Minimum Compensated Pressure" },
152 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_POWER_MAX_COMP_PRESSURE
, "Maximum Compensated Pressure" },
153 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_SPEED
, "Minimum Constant Speed" },
154 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_SPEED
, "Maximum Constant Speed" },
155 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_FLOW
, "Minimum Constant Flow" },
156 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_FLOW
, "Maximum Constant Flow" },
157 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_TEMP
, "Minimum Constant Temperature" },
158 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_TEMP
, "Maximum Constant Temperature" },
159 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_PUMP_STATUS
, "Pump Status" },
160 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_EFFECTIVE_OPR_MODE
, "Effective Operation Mode" },
161 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_EFFECTIVE_CTRL_MODE
, "Effective Control Mode" },
162 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_CAPACITY
, "Capacity" },
163 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_SPEED
, "Speed" },
164 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_LIFETIME_RUNNING_HOURS
, "Lifetime Running Hours" },
165 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_POWER
, "Power" },
166 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_LIFETIME_ENERGY_CONS
, "Lifetime Energy Consumed" },
167 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_OPR_MODE
, "Operation Mode" },
168 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_CTRL_MODE
, "Control Mode" },
169 { ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_ALARM_MASK
, "Alarm Mask" },
173 /*Operation Mode Values*/
174 static const value_string zbee_zcl_pump_config_control_operation_mode_names
[] = {
182 /*Control Mode Values*/
183 static const value_string zbee_zcl_pump_config_control_control_mode_names
[] = {
184 {0, "Constant Speed"},
185 {1, "Constant Pressure"},
186 {2, "Proportional Pressure"},
187 {3, "Constant Flow"},
189 {5, "Constant Temperature"},
195 /*************************/
196 /* Function Bodies */
197 /*************************/
200 *ZigBee ZCL Pump Configuration and Control cluster dissector for wireshark.
202 *@param tvb pointer to buffer containing raw packet.
203 *@param pinfo pointer to packet information fields
204 *@param tree pointer to data tree Wireshark uses to display packet.
208 dissect_zbee_zcl_pump_config_control(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
)
210 return tvb_captured_length(tvb
);
211 } /*dissect_zbee_zcl_pump_config_control*/
215 *This function is called by ZCL foundation dissector in order to decode
217 *@param tree pointer to data tree Wireshark uses to display packet.
218 *@param tvb pointer to buffer containing raw packet.
219 *@param offset pointer to buffer offset
220 *@param attr_id attribute identifier
221 *@param data_type attribute data type
222 *@param client_attr ZCL client
225 dissect_zcl_pump_config_control_attr_data(proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
)
227 static int * const pump_status
[] = {
228 &hf_zbee_zcl_pump_config_control_status_device_fault
,
229 &hf_zbee_zcl_pump_config_control_status_supply_fault
,
230 &hf_zbee_zcl_pump_config_control_status_speed_low
,
231 &hf_zbee_zcl_pump_config_control_status_speed_high
,
232 &hf_zbee_zcl_pump_config_control_status_local_override
,
233 &hf_zbee_zcl_pump_config_control_status_running
,
234 &hf_zbee_zcl_pump_config_control_status_rem_pressure
,
235 &hf_zbee_zcl_pump_config_control_status_rem_flow
,
236 &hf_zbee_zcl_pump_config_control_status_rem_temp
,
240 static int * const alarm_mask
[] = {
241 &hf_zbee_zcl_pump_config_control_alarm_volt_too_low
,
242 &hf_zbee_zcl_pump_config_control_alarm_volt_too_high
,
243 &hf_zbee_zcl_pump_config_control_alarm_pwr_missing_phase
,
244 &hf_zbee_zcl_pump_config_control_alarm_press_too_low
,
245 &hf_zbee_zcl_pump_config_control_alarm_press_too_high
,
246 &hf_zbee_zcl_pump_config_control_alarm_dry_running
,
247 &hf_zbee_zcl_pump_config_control_alarm_mtr_temp_too_high
,
248 &hf_zbee_zcl_pump_config_control_alarm_pump_mtr_fatal_fail
,
249 &hf_zbee_zcl_pump_config_control_alarm_elec_temp_too_high
,
250 &hf_zbee_zcl_pump_config_control_alarm_pump_block
,
251 &hf_zbee_zcl_pump_config_control_alarm_sensor_fail
,
252 &hf_zbee_zcl_pump_config_control_alarm_elec_non_fatal_fail
,
253 &hf_zbee_zcl_pump_config_control_alarm_fatal_fail
,
254 &hf_zbee_zcl_pump_config_control_alarm_gen_fault
,
258 /* Dissect attribute data type and data */
261 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_EFFECTIVE_OPR_MODE
:
262 proto_tree_add_item(tree
, hf_zbee_zcl_pump_config_control_attr_eff_opr_mode
, tvb
, *offset
, 1, ENC_NA
);
266 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_OPR_MODE
:
267 proto_tree_add_item(tree
, hf_zbee_zcl_pump_config_control_attr_opr_mode
, tvb
, *offset
, 1, ENC_NA
);
271 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_EFFECTIVE_CTRL_MODE
:
272 proto_tree_add_item(tree
, hf_zbee_zcl_pump_config_control_attr_eff_ctrl_mode
, tvb
, *offset
, 1, ENC_NA
);
276 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_CTRL_MODE
:
277 proto_tree_add_item(tree
, hf_zbee_zcl_pump_config_control_attr_ctrl_mode
, tvb
, *offset
, 1, ENC_NA
);
281 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_PUMP_STATUS
:
282 proto_tree_add_bitmask(tree
, tvb
, *offset
, hf_zbee_zcl_pump_config_control_status
, ett_zbee_zcl_pump_config_control_status
, pump_status
, ENC_LITTLE_ENDIAN
);
286 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_ALARM_MASK
:
287 proto_tree_add_bitmask(tree
, tvb
, *offset
, hf_zbee_zcl_pump_config_control_alarm
, ett_zbee_zcl_pump_config_control_alarm
, alarm_mask
, ENC_LITTLE_ENDIAN
);
291 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_PRESSURE
:
292 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_SPEED
:
293 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_FLOW
:
294 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_PRESSURE
:
295 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_PRESSURE
:
296 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_COMP_PRESSURE
:
297 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_POWER_MAX_COMP_PRESSURE
:
298 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_SPEED
:
299 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_SPEED
:
300 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_FLOW
:
301 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_FLOW
:
302 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MIN_CONST_TEMP
:
303 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_MAX_CONST_TEMP
:
304 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_CAPACITY
:
305 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_SPEED
:
306 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_LIFETIME_RUNNING_HOURS
:
307 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_POWER
:
308 case ZBEE_ZCL_ATTR_ID_PUMP_CONFIG_CONTROL_LIFETIME_ENERGY_CONS
:
310 dissect_zcl_attr_data(tvb
, tree
, offset
, data_type
, client_attr
);
314 } /*dissect_zcl_pump_config_control_attr_data*/
318 *ZigBee ZCL Pump Configuration and Control cluster protocol registration routine.
322 proto_register_zbee_zcl_pump_config_control(void)
324 /* Setup list of header fields */
325 static hf_register_info hf
[] = {
327 { &hf_zbee_zcl_pump_config_control_attr_id
,
328 { "Attribute", "zbee_zcl_hvac.pump_config_control.attr_id", FT_UINT16
, BASE_HEX
, VALS(zbee_zcl_pump_config_control_attr_names
),
329 0x00, NULL
, HFILL
} },
331 { &hf_zbee_zcl_pump_config_control_attr_eff_opr_mode
,
332 { "Effective Operation Mode", "zbee_zcl_hvac.pump_config_control.attr.effective_opr_mode", FT_UINT8
, BASE_DEC
, VALS(zbee_zcl_pump_config_control_operation_mode_names
),
333 0x00, NULL
, HFILL
} },
335 { &hf_zbee_zcl_pump_config_control_attr_opr_mode
,
336 { "Operation Mode", "zbee_zcl_hvac.pump_config_control.attr.opr_mode", FT_UINT8
, BASE_DEC
, VALS(zbee_zcl_pump_config_control_operation_mode_names
),
337 0x00, NULL
, HFILL
} },
339 { &hf_zbee_zcl_pump_config_control_attr_eff_ctrl_mode
,
340 { "Effective Control Mode", "zbee_zcl_hvac.pump_config_control.attr.ctrl_mode", FT_UINT8
, BASE_DEC
, VALS(zbee_zcl_pump_config_control_control_mode_names
),
341 0x00, NULL
, HFILL
} },
343 { &hf_zbee_zcl_pump_config_control_attr_ctrl_mode
,
344 { "Control Mode", "zbee_zcl_hvac.pump_config_control.attr.ctrl_mode", FT_UINT8
, BASE_DEC
, VALS(zbee_zcl_pump_config_control_control_mode_names
),
345 0x00, NULL
, HFILL
} },
347 /* start Pump Status fields */
348 { &hf_zbee_zcl_pump_config_control_status
,
349 { "Pump Status", "zbee_zcl_hvac.pump_config_control.attr.status", FT_UINT16
, BASE_HEX
, NULL
,
350 0x00, NULL
, HFILL
} },
352 { &hf_zbee_zcl_pump_config_control_status_device_fault
,
353 { "Device Fault", "zbee_zcl_hvac.pump_config_control.attr.status.device_fault", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
354 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_DEVICE_FAULT
, NULL
, HFILL
} },
356 { &hf_zbee_zcl_pump_config_control_status_supply_fault
,
357 { "Supply Fault", "zbee_zcl_hvac.pump_config_control.attr.status.supply_fault", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
358 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_SUPPLY_FAULT
, NULL
, HFILL
} },
360 { &hf_zbee_zcl_pump_config_control_status_speed_low
,
361 { "Speed Low", "zbee_zcl_hvac.pump_config_control.attr.status.speed_low", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
362 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_SPEED_LOW
, NULL
, HFILL
} },
364 { &hf_zbee_zcl_pump_config_control_status_speed_high
,
365 { "Speed High", "zbee_zcl_hvac.pump_config_control.attr.status.speed_high", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
366 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_SPEED_HIGH
, NULL
, HFILL
} },
368 { &hf_zbee_zcl_pump_config_control_status_local_override
,
369 { "Local Override", "zbee_zcl_hvac.pump_config_control.attr.status.local_override", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
370 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_LOCAL_OVERRIDE
, NULL
, HFILL
} },
372 { &hf_zbee_zcl_pump_config_control_status_running
,
373 { "Running", "zbee_zcl_hvac.pump_config_control.attr.status.running", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
374 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_RUNNING
, NULL
, HFILL
} },
376 { &hf_zbee_zcl_pump_config_control_status_rem_pressure
,
377 { "Remote Pressure", "zbee_zcl_hvac.pump_config_control.attr.status.rem_pressure", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
378 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_REMOTE_PRESSURE
, NULL
, HFILL
} },
380 { &hf_zbee_zcl_pump_config_control_status_rem_flow
,
381 { "Remote Flow", "zbee_zcl_hvac.pump_config_control.attr.status.rem_flow", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
382 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_REMOTE_FLOW
, NULL
, HFILL
} },
384 { &hf_zbee_zcl_pump_config_control_status_rem_temp
,
385 { "Remote Temperature", "zbee_zcl_hvac.pump_config_control.attr.status.rem_temp", FT_BOOLEAN
, 16, TFS(&tfs_no_yes
),
386 ZBEE_ZCL_PUMP_CONFIG_CONTROL_STATUS_REMOTE_TEMP
, NULL
, HFILL
} },
387 /* end Pump Status fields */
389 /*start Alarm Mask fields*/
390 { &hf_zbee_zcl_pump_config_control_alarm
,
391 { "Alarm Mask", "zbee_zcl_hvac.pump_config_control.attr.alarm", FT_UINT16
, BASE_HEX
, NULL
,
392 0x00, NULL
, HFILL
} },
394 { &hf_zbee_zcl_pump_config_control_alarm_volt_too_low
,
395 { "Supply voltage too low", "zbee_zcl_hvac.pump_config_control.attr.alarm.volt_too_low", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
396 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_VOLTAGE_TOO_LOW
, NULL
, HFILL
} },
398 { &hf_zbee_zcl_pump_config_control_alarm_volt_too_high
,
399 { "Supply voltage too high", "zbee_zcl_hvac.pump_config_control.attr.alarm.volt_too_high", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
400 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_VOLTAGE_TOO_HIGH
, NULL
, HFILL
} },
402 { &hf_zbee_zcl_pump_config_control_alarm_pwr_missing_phase
,
403 { "Power missing phase", "zbee_zcl_hvac.pump_config_control.attr.alarm.pwr_missing_phase", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
404 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PWR_MISSING_PHASE
, NULL
, HFILL
} },
406 { &hf_zbee_zcl_pump_config_control_alarm_press_too_low
,
407 { "System pressure too low", "zbee_zcl_hvac.pump_config_control.attr.alarm.press_too_low", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
408 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PRESSURE_TOO_LOW
, NULL
, HFILL
} },
410 { &hf_zbee_zcl_pump_config_control_alarm_press_too_high
,
411 { "System pressure too high", "zbee_zcl_hvac.pump_config_control.attr.alarm.press_too_high", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
412 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PRESSURE_TOO_HIGH
, NULL
, HFILL
} },
414 { &hf_zbee_zcl_pump_config_control_alarm_dry_running
,
415 { "Dry running", "zbee_zcl_hvac.pump_config_control.attr.alarm.dry_running", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
416 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_DRY_RUNNING
, NULL
, HFILL
} },
418 { &hf_zbee_zcl_pump_config_control_alarm_mtr_temp_too_high
,
419 { "Motor temperature too high", "zbee_zcl_hvac.pump_config_control.attr.alarm.mtr_temp_too_high", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
420 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_MTR_TEMP_TOO_HIGH
, NULL
, HFILL
} },
422 { &hf_zbee_zcl_pump_config_control_alarm_pump_mtr_fatal_fail
,
423 { "Pump motor has fatal failure", "zbee_zcl_hvac.pump_config_control.attr.alarm.mtr_fatal_fail", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
424 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PUMP_MTR_FATAL_FAILURE
, NULL
, HFILL
} },
426 { &hf_zbee_zcl_pump_config_control_alarm_elec_temp_too_high
,
427 { "Electronic temperature too high", "zbee_zcl_hvac.pump_config_control.attr.alarm.elec_temp_too_high", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
428 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_ELEC_TEMP_TOO_HIGH
, NULL
, HFILL
} },
430 { &hf_zbee_zcl_pump_config_control_alarm_pump_block
,
431 { "Pump blocked", "zbee_zcl_hvac.pump_config_control.attr.alarm.pump_block", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
432 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_PUMP_BLOCK
, NULL
, HFILL
} },
434 { &hf_zbee_zcl_pump_config_control_alarm_sensor_fail
,
435 { "Sensor failure", "zbee_zcl_hvac.pump_config_control.attr.alarm.sensor_fail", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
436 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_SENSOR_FAILURE
, NULL
, HFILL
} },
438 { &hf_zbee_zcl_pump_config_control_alarm_elec_non_fatal_fail
,
439 { "Electronic non-fatal failure", "zbee_zcl_hvac.pump_config_control.attr.alarm.elec_non_fatal_fail", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
440 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_ELEC_NON_FATAL_FAILURE
, NULL
, HFILL
} },
442 { &hf_zbee_zcl_pump_config_control_alarm_fatal_fail
,
443 { "Electronic fatal failure", "zbee_zcl_hvac.pump_config_control.attr.alarm.elec_fatal_fail", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
444 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_ELEC_FATAL_FAILURE
, NULL
, HFILL
} },
446 { &hf_zbee_zcl_pump_config_control_alarm_gen_fault
,
447 { "General fault", "zbee_zcl_hvac.pump_config_control.attr.alarm.gen_fault", FT_BOOLEAN
, 16, TFS(&tfs_disabled_enabled
),
448 ZBEE_ZCL_PUMP_CONFIG_CONTROL_ALARM_GENERAL_FAULT
, NULL
, HFILL
} }
449 /* end Alarm Mask fields */
452 /* ZCL Pump Configuration and Control subtrees */
453 static int *ett
[ZBEE_ZCL_PUMP_CONFIG_CONTROL_NUM_ETT
];
455 ett
[0] = &ett_zbee_zcl_pump_config_control
;
456 ett
[1] = &ett_zbee_zcl_pump_config_control_status
;
457 ett
[2] = &ett_zbee_zcl_pump_config_control_alarm
;
459 /* Register the ZigBee ZCL Pump Configuration and Control cluster protocol name and description */
460 proto_zbee_zcl_pump_config_control
= proto_register_protocol("ZigBee ZCL Pump Configuration and Control", "ZCL Pump Configuration and Control", ZBEE_PROTOABBREV_ZCL_PUMP_CONFIG_CTRL
);
461 proto_register_field_array(proto_zbee_zcl_pump_config_control
, hf
, array_length(hf
));
462 proto_register_subtree_array(ett
, array_length(ett
));
464 /* Register the ZigBee ZCL Pump Configuration and Control dissector. */
465 register_dissector(ZBEE_PROTOABBREV_ZCL_PUMP_CONFIG_CTRL
, dissect_zbee_zcl_pump_config_control
, proto_zbee_zcl_pump_config_control
);
466 } /*proto_register_zbee_zcl_pump_config_control*/
469 *Hands off the ZCL Pump Configuration and Control dissector.
473 proto_reg_handoff_zbee_zcl_pump_config_control(void)
475 zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_PUMP_CONFIG_CTRL
,
476 proto_zbee_zcl_pump_config_control
,
477 ett_zbee_zcl_pump_config_control
,
478 ZBEE_ZCL_CID_PUMP_CONFIG_CONTROL
,
480 hf_zbee_zcl_pump_config_control_attr_id
,
481 hf_zbee_zcl_pump_config_control_attr_id
,
483 (zbee_zcl_fn_attr_data
)dissect_zcl_pump_config_control_attr_data
485 } /*proto_reg_handoff_zbee_zcl_pump_config_control*/
488 /* ########################################################################## */
489 /* #### (0x0202) FAN CONTROL CLUSTER ######################################## */
490 /* ########################################################################## */
492 /*************************/
494 /*************************/
496 #define ZBEE_ZCL_FAN_CONTROL_NUM_ETT 1
499 #define ZBEE_ZCL_ATTR_ID_FAN_CONTROL_FAN_MODE 0x0000 /* Fan Mode */
500 #define ZBEE_ZCL_ATTR_ID_FAN_CONTROL_FAN_MODE_SEQUENCE 0x0001 /* Fan Mode Sequence */
502 /*Server commands received - none*/
504 /*Server commands generated - none*/
506 /*************************/
507 /* Function Declarations */
508 /*************************/
510 void proto_register_zbee_zcl_fan_control(void);
511 void proto_reg_handoff_zbee_zcl_fan_control(void);
513 /* Command Dissector Helpers */
514 static void dissect_zcl_fan_control_attr_data (proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
);
516 /* Private functions prototype */
518 /*************************/
519 /* Global Variables */
520 /*************************/
521 /* Initialize the protocol and registered fields */
522 static int proto_zbee_zcl_fan_control
;
524 static int hf_zbee_zcl_fan_control_attr_id
;
525 static int hf_zbee_zcl_fan_control_attr_fan_mode
;
526 static int hf_zbee_zcl_fan_control_attr_fan_mode_seq
;
528 /* Initialize the subtree pointers */
529 static int ett_zbee_zcl_fan_control
;
532 static const value_string zbee_zcl_fan_control_attr_names
[] = {
533 { ZBEE_ZCL_ATTR_ID_FAN_CONTROL_FAN_MODE
, "Fan Mode" },
534 { ZBEE_ZCL_ATTR_ID_FAN_CONTROL_FAN_MODE_SEQUENCE
, "Fan Mode Sequence" },
538 /*Fan Mode Sequence Values*/
539 static const value_string zbee_zcl_fan_control_fan_mode_seq_names
[] = {
540 { 0x00, "Low/Med/High" },
541 { 0x01, "Low/High" },
542 { 0x02, "Low/Med/High/Auto" },
543 { 0x03, "Low/High/Auto" },
549 static const value_string zbee_zcl_fan_control_fan_mode_names
[] = {
560 /*************************/
561 /* Function Bodies */
562 /*************************/
565 *ZigBee ZCL Fan Control cluster dissector for wireshark.
567 *@param tvb pointer to buffer containing raw packet.
568 *@param pinfo pointer to packet information fields
569 *@param tree pointer to data tree Wireshark uses to display packet.
573 dissect_zbee_zcl_fan_control(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
)
575 return tvb_captured_length(tvb
);
576 } /*dissect_zbee_zcl_fan_control*/
580 *This function is called by ZCL foundation dissector in order to decode
582 *@param tree pointer to data tree Wireshark uses to display packet.
583 *@param tvb pointer to buffer containing raw packet.
584 *@param offset pointer to buffer offset
585 *@param attr_id attribute identifier
586 *@param data_type attribute data type
587 *@param client_attr ZCL client
590 dissect_zcl_fan_control_attr_data(proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
)
592 /* Dissect attribute data type and data */
595 case ZBEE_ZCL_ATTR_ID_FAN_CONTROL_FAN_MODE
:
596 proto_tree_add_item(tree
, hf_zbee_zcl_fan_control_attr_fan_mode
, tvb
, *offset
, 1, ENC_NA
);
600 case ZBEE_ZCL_ATTR_ID_FAN_CONTROL_FAN_MODE_SEQUENCE
:
601 proto_tree_add_item(tree
, hf_zbee_zcl_fan_control_attr_fan_mode_seq
, tvb
, *offset
, 1, ENC_NA
);
606 dissect_zcl_attr_data(tvb
, tree
, offset
, data_type
, client_attr
);
610 } /*dissect_zcl_fan_control_attr_data*/
614 *ZigBee ZCL Fan Control cluster protocol registration routine.
618 proto_register_zbee_zcl_fan_control(void)
620 /* Setup list of header fields */
621 static hf_register_info hf
[] = {
623 { &hf_zbee_zcl_fan_control_attr_id
,
624 { "Attribute", "zbee_zcl_hvac.fan_control.attr_id", FT_UINT16
, BASE_HEX
, VALS(zbee_zcl_fan_control_attr_names
),
625 0x00, NULL
, HFILL
} },
627 { &hf_zbee_zcl_fan_control_attr_fan_mode
,
628 { "Fan Mode", "zbee_zcl_hvac.fan_control.attr.fan_mode", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_fan_control_fan_mode_names
),
629 0x00, NULL
, HFILL
} },
631 { &hf_zbee_zcl_fan_control_attr_fan_mode_seq
,
632 { "Fan Mode Sequence", "zbee_zcl_hvac.fan_control.attr.fan_mode_seq", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_fan_control_fan_mode_seq_names
),
633 0x00, NULL
, HFILL
} }
636 /* ZCL Fan Control subtrees */
637 static int *ett
[ZBEE_ZCL_FAN_CONTROL_NUM_ETT
];
639 ett
[0] = &ett_zbee_zcl_fan_control
;
641 /* Register the ZigBee ZCL Fan Control cluster protocol name and description */
642 proto_zbee_zcl_fan_control
= proto_register_protocol("ZigBee ZCL Fan Control", "ZCL Fan Control", ZBEE_PROTOABBREV_ZCL_FAN_CONTROL
);
643 proto_register_field_array(proto_zbee_zcl_fan_control
, hf
, array_length(hf
));
644 proto_register_subtree_array(ett
, array_length(ett
));
646 /* Register the ZigBee ZCL Fan Control dissector. */
647 register_dissector(ZBEE_PROTOABBREV_ZCL_FAN_CONTROL
, dissect_zbee_zcl_fan_control
, proto_zbee_zcl_fan_control
);
648 } /*proto_register_zbee_zcl_fan_control*/
651 *Hands off the ZCL Fan Control dissector.
655 proto_reg_handoff_zbee_zcl_fan_control(void)
657 zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_FAN_CONTROL
,
658 proto_zbee_zcl_fan_control
,
659 ett_zbee_zcl_fan_control
,
660 ZBEE_ZCL_CID_FAN_CONTROL
,
662 hf_zbee_zcl_fan_control_attr_id
,
663 hf_zbee_zcl_fan_control_attr_id
,
665 (zbee_zcl_fn_attr_data
)dissect_zcl_fan_control_attr_data
667 } /*proto_reg_handoff_zbee_zcl_fan_control*/
670 /* ########################################################################## */
671 /* #### (0x0203) DEHUMIDIFICATION CONTROL CLUSTER ########################### */
672 /* ########################################################################## */
674 /*************************/
676 /*************************/
678 #define ZBEE_ZCL_DEHUMIDIFICATION_CONTROL_NUM_ETT 1
681 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY 0x0000 /* Relative Humidity */
682 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_COOLING 0x0001 /* Dehumidification Cooling */
683 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RH_DEHUM_SETPOINT 0x0010 /* Relative Humidity Dehumidification Setpoint */
684 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MODE 0x0011 /* Relative Humidity Mode */
685 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_LOCKOUT 0x0012 /* Dehumidification Lockout */
686 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_HYSTERESIS 0x0013 /* Dehumidification Hysteresis */
687 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_MAX_COOL 0x0014 /* Dehumidification Max Cool */
688 #define ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_DISPLAY 0x0015 /* Relative Humidity Display */
690 /*Server commands received - none*/
692 /*Server commands generated - none*/
694 /*************************/
695 /* Function Declarations */
696 /*************************/
698 void proto_register_zbee_zcl_dehumidification_control(void);
699 void proto_reg_handoff_zbee_zcl_dehumidification_control(void);
701 /* Command Dissector Helpers */
702 static void dissect_zcl_dehumidification_control_attr_data (proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
);
704 /* Private functions prototype */
706 /*************************/
707 /* Global Variables */
708 /*************************/
709 /* Initialize the protocol and registered fields */
710 static int proto_zbee_zcl_dehumidification_control
;
712 static int hf_zbee_zcl_dehumidification_control_attr_id
;
713 static int hf_zbee_zcl_dehumidification_control_attr_rel_hum_mode
;
714 static int hf_zbee_zcl_dehumidification_control_attr_dehum_lockout
;
715 static int hf_zbee_zcl_dehumidification_control_attr_rel_hum_display
;
717 /* Initialize the subtree pointers */
718 static int ett_zbee_zcl_dehumidification_control
;
721 static const value_string zbee_zcl_dehumidification_control_attr_names
[] = {
722 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY
, "Relative Humidity" },
723 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_COOLING
, "Dehumidification Cooling" },
724 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RH_DEHUM_SETPOINT
, "Relative Humidity Dehumidification Setpoint" },
725 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MODE
, "Relative Humidity Mode" },
726 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_LOCKOUT
, "Dehumidification Lockout" },
727 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_HYSTERESIS
, "Dehumidification Hysteresis" },
728 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_MAX_COOL
, "Dehumidification Max Cool" },
729 { ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_DISPLAY
, "Relative Humidity Display" },
733 /*Relative Humidity Mode Values*/
734 static const value_string zbee_zcl_dehumidification_control_rel_hum_mode_names
[] = {
735 { 0x00, "Relative Humidity measured locally" },
736 { 0x01, "Relative Humidity updated over network" },
740 /*Dehumidification Lockout Values*/
741 static const value_string zbee_zcl_dehumidification_control_dehum_lockout_names
[] = {
742 { 0x00, "Dehumidification is not allowed" },
743 { 0x01, "Dehumidification is allowed" },
747 /*Relative Humidity Display Values*/
748 static const value_string zbee_zcl_dehumidification_control_rel_hum_display_names
[] = {
749 { 0x00, "Relative Humidity is not displayed" },
750 { 0x01, "Relative Humidity is displayed" },
754 /*************************/
755 /* Function Bodies */
756 /*************************/
759 *ZigBee ZCL Dehumidification Control cluster dissector for wireshark.
761 *@param tvb pointer to buffer containing raw packet.
762 *@param pinfo pointer to packet information fields
763 *@param tree pointer to data tree Wireshark uses to display packet.
767 dissect_zbee_zcl_dehumidification_control(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
)
769 return tvb_captured_length(tvb
);
770 } /*dissect_zbee_zcl_dehumidification_control*/
774 *This function is called by ZCL foundation dissector in order to decode
776 *@param tree pointer to data tree Wireshark uses to display packet.
777 *@param tvb pointer to buffer containing raw packet.
778 *@param offset pointer to buffer offset
779 *@param attr_id attribute identifier
780 *@param data_type attribute data type
781 *@param client_attr ZCL client
784 dissect_zcl_dehumidification_control_attr_data(proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
)
786 /* Dissect attribute data type and data */
789 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_MODE
:
790 proto_tree_add_item(tree
, hf_zbee_zcl_dehumidification_control_attr_rel_hum_mode
, tvb
, *offset
, 1, ENC_NA
);
794 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_LOCKOUT
:
795 proto_tree_add_item(tree
, hf_zbee_zcl_dehumidification_control_attr_dehum_lockout
, tvb
, *offset
, 1, ENC_NA
);
799 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY_DISPLAY
:
800 proto_tree_add_item(tree
, hf_zbee_zcl_dehumidification_control_attr_rel_hum_display
, tvb
, *offset
, 1, ENC_NA
);
804 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RELATIVE_HUMIDITY
:
805 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_COOLING
:
806 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_RH_DEHUM_SETPOINT
:
807 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_HYSTERESIS
:
808 case ZBEE_ZCL_ATTR_ID_DEHUMIDIFICATION_CONTROL_DEHUM_MAX_COOL
:
810 dissect_zcl_attr_data(tvb
, tree
, offset
, data_type
, client_attr
);
814 } /*dissect_zcl_dehumidification_control_attr_data*/
818 *ZigBee ZCL Dehumidification Control cluster protocol registration routine.
822 proto_register_zbee_zcl_dehumidification_control(void)
824 /* Setup list of header fields */
825 static hf_register_info hf
[] = {
827 { &hf_zbee_zcl_dehumidification_control_attr_id
,
828 { "Attribute", "zbee_zcl_hvac.dehumidification_control.attr_id", FT_UINT16
, BASE_HEX
, VALS(zbee_zcl_dehumidification_control_attr_names
),
829 0x00, NULL
, HFILL
} },
831 { &hf_zbee_zcl_dehumidification_control_attr_rel_hum_mode
,
832 { "Relative Humidity Mode", "zbee_zcl_hvac.dehumidification_control.attr.rel_humidity_mode", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_dehumidification_control_rel_hum_mode_names
),
833 0x00, NULL
, HFILL
} },
835 { &hf_zbee_zcl_dehumidification_control_attr_dehum_lockout
,
836 { "Dehumidification Lockout", "zbee_zcl_hvac.dehumidification_control.attr.dehumidification_lockout", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_dehumidification_control_dehum_lockout_names
),
837 0x00, NULL
, HFILL
} },
839 { &hf_zbee_zcl_dehumidification_control_attr_rel_hum_display
,
840 { "Relative Humidity Display", "zbee_zcl_hvac.dehumidification_control.attr.rel_humidity_display", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_dehumidification_control_rel_hum_display_names
),
841 0x00, NULL
, HFILL
} }
844 /* ZCL Dehumidification Control subtrees */
845 static int *ett
[ZBEE_ZCL_DEHUMIDIFICATION_CONTROL_NUM_ETT
];
847 ett
[0] = &ett_zbee_zcl_dehumidification_control
;
849 /* Register the ZigBee ZCL Dehumidification Control cluster protocol name and description */
850 proto_zbee_zcl_dehumidification_control
= proto_register_protocol("ZigBee ZCL Dehumidification Control", "ZCL Dehumidification Control", ZBEE_PROTOABBREV_ZCL_DEHUMIDIFICATION_CONTROL
);
851 proto_register_field_array(proto_zbee_zcl_dehumidification_control
, hf
, array_length(hf
));
852 proto_register_subtree_array(ett
, array_length(ett
));
854 /* Register the ZigBee ZCL Dehumidification Control dissector. */
855 register_dissector(ZBEE_PROTOABBREV_ZCL_DEHUMIDIFICATION_CONTROL
, dissect_zbee_zcl_dehumidification_control
, proto_zbee_zcl_dehumidification_control
);
856 } /*proto_register_zbee_zcl_dehumidification_control*/
859 *Hands off the ZCL Dehumidification Control dissector.
863 proto_reg_handoff_zbee_zcl_dehumidification_control(void)
865 zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_DEHUMIDIFICATION_CONTROL
,
866 proto_zbee_zcl_dehumidification_control
,
867 ett_zbee_zcl_dehumidification_control
,
868 ZBEE_ZCL_CID_DEHUMIDIFICATION_CONTROL
,
870 hf_zbee_zcl_dehumidification_control_attr_id
,
871 hf_zbee_zcl_dehumidification_control_attr_id
,
873 (zbee_zcl_fn_attr_data
)dissect_zcl_dehumidification_control_attr_data
875 } /*proto_reg_handoff_zbee_zcl_dehumidification_control*/
878 /* ########################################################################## */
879 /* #### (0x0204) THERMOSTAT USER INTERFACE CONFIGURATION CLUSTER ############ */
880 /* ########################################################################## */
882 /*************************/
884 /*************************/
886 #define ZBEE_ZCL_THERMOSTAT_UI_CONFIG_NUM_ETT 1
889 #define ZBEE_ZCL_ATTR_ID_THERMOSTAT_UI_CONFIG_TEMP_DISP_MODE 0x0000 /* Temperature Display Mode */
890 #define ZBEE_ZCL_ATTR_ID_THERMOSTAT_UI_CONFIG_KEYPAD_LOCKOUT 0x0001 /* Keypad Lockout */
892 /*Server commands received - none*/
894 /*Server commands generated - none*/
896 /*************************/
897 /* Function Declarations */
898 /*************************/
900 void proto_register_zbee_zcl_thermostat_ui_config(void);
901 void proto_reg_handoff_zbee_zcl_thermostat_ui_config(void);
903 /* Command Dissector Helpers */
904 static void dissect_zcl_thermostat_ui_config_attr_data (proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
);
906 /* Private functions prototype */
908 /*************************/
909 /* Global Variables */
910 /*************************/
911 /* Initialize the protocol and registered fields */
912 static int proto_zbee_zcl_thermostat_ui_config
;
914 static int hf_zbee_zcl_thermostat_ui_config_attr_id
;
915 static int hf_zbee_zcl_thermostat_ui_config_attr_temp_disp_mode
;
916 static int hf_zbee_zcl_thermostat_ui_config_attr_keypad_lockout
;
918 /* Initialize the subtree pointers */
919 static int ett_zbee_zcl_thermostat_ui_config
;
922 static const value_string zbee_zcl_thermostat_ui_config_attr_names
[] = {
923 { ZBEE_ZCL_ATTR_ID_THERMOSTAT_UI_CONFIG_TEMP_DISP_MODE
, "Temperature Display Mode" },
924 { ZBEE_ZCL_ATTR_ID_THERMOSTAT_UI_CONFIG_KEYPAD_LOCKOUT
, "Keypad Lockout" },
928 /*Temp Display Mode Values*/
929 static const value_string zbee_zcl_thermostat_ui_config_temp_disp_mode_names
[] = {
930 { 0x00, "Temperature in degree Celsius" },
931 { 0x01, "Temperature in degree Fahrenheit" },
935 /*Keypad Lockout Values*/
936 static const value_string zbee_zcl_thermostat_ui_config_keypad_lockout_names
[] = {
937 { 0x00, "No lockout" },
938 { 0x01, "Level 1 lockout" },
939 { 0x02, "Level 2 lockout" },
940 { 0x03, "Level 3 lockout" },
941 { 0x04, "Level 4 lockout" },
942 { 0x05, "Level 5 lockout" },
946 /*************************/
947 /* Function Bodies */
948 /*************************/
951 *ZigBee ZCL Thermostat User Interface Configuration cluster dissector for wireshark.
953 *@param tvb pointer to buffer containing raw packet.
954 *@param pinfo pointer to packet information fields
955 *@param tree pointer to data tree Wireshark uses to display packet.
959 dissect_zbee_zcl_thermostat_ui_config(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
)
961 return tvb_captured_length(tvb
);
962 } /*dissect_zbee_zcl_thermostat_ui_config*/
966 *This function is called by ZCL foundation dissector in order to decode
968 *@param tree pointer to data tree Wireshark uses to display packet.
969 *@param tvb pointer to buffer containing raw packet.
970 *@param offset pointer to buffer offset
971 *@param attr_id attribute identifier
972 *@param data_type attribute data type
973 *@param client_attr ZCL client
976 dissect_zcl_thermostat_ui_config_attr_data(proto_tree
*tree
, tvbuff_t
*tvb
, unsigned *offset
, uint16_t attr_id
, unsigned data_type
, bool client_attr
)
978 /* Dissect attribute data type and data */
981 case ZBEE_ZCL_ATTR_ID_THERMOSTAT_UI_CONFIG_TEMP_DISP_MODE
:
982 proto_tree_add_item(tree
, hf_zbee_zcl_thermostat_ui_config_attr_temp_disp_mode
, tvb
, *offset
, 1, ENC_NA
);
986 case ZBEE_ZCL_ATTR_ID_THERMOSTAT_UI_CONFIG_KEYPAD_LOCKOUT
:
987 proto_tree_add_item(tree
, hf_zbee_zcl_thermostat_ui_config_attr_keypad_lockout
, tvb
, *offset
, 1, ENC_NA
);
992 dissect_zcl_attr_data(tvb
, tree
, offset
, data_type
, client_attr
);
996 } /*dissect_zcl_thermostat_ui_config_attr_data*/
1000 *ZigBee ZCL Thermostat User Interface Configuration cluster protocol registration routine.
1004 proto_register_zbee_zcl_thermostat_ui_config(void)
1006 /* Setup list of header fields */
1007 static hf_register_info hf
[] = {
1009 { &hf_zbee_zcl_thermostat_ui_config_attr_id
,
1010 { "Attribute", "zbee_zcl_hvac.thermostat_ui_config.attr_id", FT_UINT16
, BASE_HEX
, VALS(zbee_zcl_thermostat_ui_config_attr_names
),
1011 0x00, NULL
, HFILL
} },
1013 { &hf_zbee_zcl_thermostat_ui_config_attr_temp_disp_mode
,
1014 { "Temperature Display Mode", "zbee_zcl_hvac.thermostat_ui_config.attr.temp_disp_mode", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_thermostat_ui_config_temp_disp_mode_names
),
1015 0x00, NULL
, HFILL
} },
1017 { &hf_zbee_zcl_thermostat_ui_config_attr_keypad_lockout
,
1018 { "Keypad Lockout", "zbee_zcl_hvac.thermostat_ui_config.attr.keypad_lockout", FT_UINT8
, BASE_HEX
, VALS(zbee_zcl_thermostat_ui_config_keypad_lockout_names
),
1019 0x00, NULL
, HFILL
} }
1022 /* ZCL Thermostat User Interface Configuration subtrees */
1023 static int *ett
[ZBEE_ZCL_THERMOSTAT_UI_CONFIG_NUM_ETT
];
1024 ett
[0] = &ett_zbee_zcl_thermostat_ui_config
;
1026 /* Register the ZigBee ZCL Thermostat User Interface Configuration cluster protocol name and description */
1027 proto_zbee_zcl_thermostat_ui_config
= proto_register_protocol("ZigBee ZCL Thermostat User Interface Configuration", "ZCL Thermostat User Interface Configuration", ZBEE_PROTOABBREV_ZCL_THERMOSTAT_UI_CONFIG
);
1028 proto_register_field_array(proto_zbee_zcl_thermostat_ui_config
, hf
, array_length(hf
));
1029 proto_register_subtree_array(ett
, array_length(ett
));
1031 /* Register the ZigBee ZCL Thermostat User Interface Configuration dissector. */
1032 register_dissector(ZBEE_PROTOABBREV_ZCL_THERMOSTAT_UI_CONFIG
, dissect_zbee_zcl_thermostat_ui_config
, proto_zbee_zcl_thermostat_ui_config
);
1033 } /*proto_register_zbee_zcl_thermostat_ui_config*/
1036 *Hands off the ZCL Thermostat User Interface Configuration dissector.
1040 proto_reg_handoff_zbee_zcl_thermostat_ui_config(void)
1042 zbee_zcl_init_cluster( ZBEE_PROTOABBREV_ZCL_THERMOSTAT_UI_CONFIG
,
1043 proto_zbee_zcl_thermostat_ui_config
,
1044 ett_zbee_zcl_thermostat_ui_config
,
1045 ZBEE_ZCL_CID_THERMOSTAT_UI_CONFIG
,
1047 hf_zbee_zcl_thermostat_ui_config_attr_id
,
1048 hf_zbee_zcl_thermostat_ui_config_attr_id
,
1050 (zbee_zcl_fn_attr_data
)dissect_zcl_thermostat_ui_config_attr_data
1052 } /*proto_reg_handoff_zbee_zcl_thermostat_ui_config*/
1055 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1060 * indent-tabs-mode: nil
1063 * vi: set shiftwidth=4 tabstop=8 expandtab:
1064 * :indentSize=4:tabSize=8:noTabs=true: