Skip to content

Commit 3ee31ac

Browse files
committed
SiliconLabsGH-46 Humidity Control Mode CC v1-2
ZPC implementation only Forwarded: SiliconLabs#46 Bug-SiliconLabs: UIC-3066 Bug-Github: SiliconLabs#46
1 parent 3b43b68 commit 3ee31ac

9 files changed

+986
-0
lines changed

applications/zpc/components/zpc_attribute_store/include/attribute_store_defined_attribute_types.h

+15
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,21 @@ DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_CRC16_VERSION,
529529
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_DEVICE_RESET_LOCALLY_VERSION,
530530
((COMMAND_CLASS_DEVICE_RESET_LOCALLY << 8) | 0x01))
531531

532+
/////////////////////////////////////////////////
533+
// Humidity Control Mode Command Class
534+
///< This represents the version of the Humidity Control Mode Command class.
535+
/// zwave_cc_version_t
536+
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_VERSION,
537+
ZWAVE_CC_VERSION_ATTRIBUTE(COMMAND_CLASS_HUMIDITY_CONTROL_MODE))
538+
539+
// Supported mode
540+
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_SUPPORTED_MODES,
541+
((COMMAND_CLASS_HUMIDITY_CONTROL_MODE << 8) | 0x02))
542+
543+
// Current mode
544+
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_CURRENT_MODE,
545+
((COMMAND_CLASS_HUMIDITY_CONTROL_MODE << 8) | 0x03))
546+
532547
/////////////////////////////////////////////////
533548
// Inclusion Controller Command Class
534549
///< This represents the version of the Inclusion Controller Command class.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/******************************************************************************
2+
* # License
3+
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
4+
******************************************************************************
5+
* The licensor of this software is Silicon Laboratories Inc. Your use of this
6+
* software is governed by the terms of Silicon Labs Master Software License
7+
* Agreement (MSLA) available at
8+
* www.silabs.com/about-us/legal/master-software-license-agreement. This
9+
* software is distributed to you in Source Code format and is governed by the
10+
* sections of the MSLA applicable to Source Code.
11+
*
12+
*****************************************************************************/
13+
14+
/**
15+
* @defgroup zpc_attribute_store_command_classes_types Type definitions for attribute storage of Command Classes
16+
* @ingroup zpc_attribute_store
17+
* @brief Type definitions for Command Classes, used for @ref attribute_store storage.
18+
*
19+
*/
20+
21+
/**
22+
* @defgroup zwave_command_class_humidity_control_mode_types Type definitions for attribute storage of the Sound Switch Command Class
23+
* @ingroup zpc_attribute_store_command_classes_types
24+
* @brief Type definitions for the Humidity Control Command Class (Mode, State and Setpoint).
25+
*
26+
* @{
27+
*/
28+
29+
#ifndef ZWAVE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_TYPES_H
30+
#define ZWAVE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_TYPES_H
31+
32+
#include <stdint.h>
33+
34+
//>> Humidity Control Mode CC
35+
///> Humidity Control Mode. uint8_t
36+
typedef uint8_t humidity_control_mode_t;
37+
///> Humidity Control Suppoted Mode Bitmask. uint8_t
38+
typedef uint8_t humidity_control_supported_modes_t;
39+
40+
#ifdef __cplusplus
41+
extern "C" {
42+
#endif
43+
44+
#ifdef __cplusplus
45+
}
46+
#endif
47+
48+
#endif //ZWAVE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_TYPES_H
49+
/** @} end zwave_command_class_humidity_control_mode_types */

applications/zpc/components/zpc_attribute_store/src/zpc_attribute_store_type_registration.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ static const std::vector<attribute_schema_t> attribute_schema = {
193193
{ATTRIBUTE_INDICATOR_INDICATOR_VALUE, "Value", ATTRIBUTE_INDICATOR_PROPERTY_ID, U32_STORAGE_TYPE},
194194
{ATTRIBUTE_INDICATOR_SUPPORTED_PROPERTY_SUPPORTED_BIT_MASK, "Supported Properties bitmask", ATTRIBUTE_INDICATOR_INDICATOR_ID, BYTE_ARRAY_STORAGE_TYPE},
195195
{ATTRIBUTE_COMMAND_CLASS_INDICATOR_TIMEOUT, "Indicator timeout", ATTRIBUTE_INDICATOR_INDICATOR_ID, U32_STORAGE_TYPE},
196+
197+
/////////////////////////////////////////////////////////////////////
198+
// Humidity Control Mode Command Class attributes
199+
/////////////////////////////////////////////////////////////////////
200+
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_VERSION, "Humidity Control Mode Version", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
201+
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_SUPPORTED_MODES, "Humidity Control Mode Supported Modes", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
202+
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_CURRENT_MODE, "Humidity Control Mode Current Mode", ATTRIBUTE_INDICATOR_INDICATOR_ID, U8_STORAGE_TYPE},
203+
196204
/////////////////////////////////////////////////////////////////////
197205
// Meter Command Class attributes
198206
/////////////////////////////////////////////////////////////////////

applications/zpc/components/zwave_command_classes/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ add_library(
2121
src/zwave_command_class_device_reset_locally.cpp
2222
src/zwave_command_class_door_lock_control.cpp
2323
src/zwave_command_class_firmware_update.c
24+
src/zwave_command_class_humidity_control_mode.c
2425
src/zwave_command_class_indicator.c
2526
src/zwave_command_class_indicator_control.cpp
2627
src/zwave_command_class_manufacturer_specific.c

0 commit comments

Comments
 (0)