Skip to content

Commit

Permalink
SiliconLabsGH-27: Humidity Control Mode CC v1-2
Browse files Browse the repository at this point in the history
ZPC implementation only

Forwarded: SiliconLabs#27
Bug-SiliconLabs: UIC-3066
Bug-Github: SiliconLabs#27
  • Loading branch information
silabs-borisl committed Feb 16, 2024
1 parent 3b43b68 commit 6b53f76
Show file tree
Hide file tree
Showing 9 changed files with 986 additions and 0 deletions.
Expand Up @@ -529,6 +529,21 @@ DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_CRC16_VERSION,
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_DEVICE_RESET_LOCALLY_VERSION,
((COMMAND_CLASS_DEVICE_RESET_LOCALLY << 8) | 0x01))

/////////////////////////////////////////////////
// Humidity Control Mode Command Class
///< This represents the version of the Humidity Control Mode Command class.
/// zwave_cc_version_t
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_VERSION,
ZWAVE_CC_VERSION_ATTRIBUTE(COMMAND_CLASS_HUMIDITY_CONTROL_MODE))

// Supported mode
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_SUPPORTED_MODES,
((COMMAND_CLASS_HUMIDITY_CONTROL_MODE << 8) | 0x02))

// Current mode
DEFINE_ATTRIBUTE(ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_CURRENT_MODE,
((COMMAND_CLASS_HUMIDITY_CONTROL_MODE << 8) | 0x03))

/////////////////////////////////////////////////
// Inclusion Controller Command Class
///< This represents the version of the Inclusion Controller Command class.
Expand Down
@@ -0,0 +1,49 @@
/******************************************************************************
* # License
* <b>Copyright 2023 Silicon Laboratories Inc. www.silabs.com</b>
******************************************************************************
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
*****************************************************************************/

/**
* @defgroup zpc_attribute_store_command_classes_types Type definitions for attribute storage of Command Classes
* @ingroup zpc_attribute_store
* @brief Type definitions for Command Classes, used for @ref attribute_store storage.
*
*/

/**
* @defgroup zwave_command_class_humidity_control_mode_types Type definitions for attribute storage of the Sound Switch Command Class
* @ingroup zpc_attribute_store_command_classes_types
* @brief Type definitions for the Humidity Control Command Class (Mode, State and Setpoint).
*
* @{
*/

#ifndef ZWAVE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_TYPES_H
#define ZWAVE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_TYPES_H

#include <stdint.h>

//>> Humidity Control Mode CC
///> Humidity Control Mode. uint8_t
typedef uint8_t humidity_control_mode_t;
///> Humidity Control Suppoted Mode Bitmask. uint8_t
typedef uint8_t humidity_control_supported_modes_t;

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

#endif //ZWAVE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_TYPES_H
/** @} end zwave_command_class_humidity_control_mode_types */
Expand Up @@ -193,6 +193,14 @@ static const std::vector<attribute_schema_t> attribute_schema = {
{ATTRIBUTE_INDICATOR_INDICATOR_VALUE, "Value", ATTRIBUTE_INDICATOR_PROPERTY_ID, U32_STORAGE_TYPE},
{ATTRIBUTE_INDICATOR_SUPPORTED_PROPERTY_SUPPORTED_BIT_MASK, "Supported Properties bitmask", ATTRIBUTE_INDICATOR_INDICATOR_ID, BYTE_ARRAY_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_INDICATOR_TIMEOUT, "Indicator timeout", ATTRIBUTE_INDICATOR_INDICATOR_ID, U32_STORAGE_TYPE},

/////////////////////////////////////////////////////////////////////
// Humidity Control Mode Command Class attributes
/////////////////////////////////////////////////////////////////////
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_VERSION, "Humidity Control Mode Version", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_SUPPORTED_MODES, "Humidity Control Mode Supported Modes", ATTRIBUTE_ENDPOINT_ID, U8_STORAGE_TYPE},
{ATTRIBUTE_COMMAND_CLASS_HUMIDITY_CONTROL_MODE_CURRENT_MODE, "Humidity Control Mode Current Mode", ATTRIBUTE_INDICATOR_INDICATOR_ID, U8_STORAGE_TYPE},

/////////////////////////////////////////////////////////////////////
// Meter Command Class attributes
/////////////////////////////////////////////////////////////////////
Expand Down
Expand Up @@ -21,6 +21,7 @@ add_library(
src/zwave_command_class_device_reset_locally.cpp
src/zwave_command_class_door_lock_control.cpp
src/zwave_command_class_firmware_update.c
src/zwave_command_class_humidity_control_mode.c
src/zwave_command_class_indicator.c
src/zwave_command_class_indicator_control.cpp
src/zwave_command_class_manufacturer_specific.c
Expand Down

0 comments on commit 6b53f76

Please sign in to comment.