9#include "matter_bridged_device.h"
19 uint16_t
GetDeviceType()
const override {
return Nrf::MatterBridgedDevice::DeviceType::HumiditySensor; }
20 CHIP_ERROR
HandleRead(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer,
21 uint16_t maxReadLength)
override;
23 uint16_t maxReadLength);
24 CHIP_ERROR
HandleWrite(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer,
27 if (clusterId != chip::app::Clusters::BridgedDeviceBasicInformation::Id) {
28 return CHIP_ERROR_INVALID_ARGUMENT;
31 switch (attributeId) {
32 case chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id:
33 return HandleWriteDeviceBasicInformation(clusterId, attributeId, buffer, size);
35 return CHIP_ERROR_INVALID_ARGUMENT;
40 size_t dataSize)
override;
46 void SetMeasuredValue(int16_t value) { mMeasuredValue = value; }
47 void SetMinMeasuredValue(int16_t value) { mMinMeasuredValue = value; }
48 void SetMaxMeasuredValue(int16_t value) { mMaxMeasuredValue = value; }
50 uint16_t mMeasuredValue = 0;
51 uint16_t mMinMeasuredValue = CONFIG_BRIDGE_HUMIDITY_SENSOR_MIN_MEASURED_VALUE;
52 uint16_t mMaxMeasuredValue = CONFIG_BRIDGE_HUMIDITY_SENSOR_MAX_MEASURED_VALUE;
CHIP_ERROR HandleWrite(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer, size_t size) override
Definition humidity_sensor.h:24
CHIP_ERROR HandleReadRelativeHumidityMeasurement(chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength)
CHIP_ERROR HandleAttributeChange(chip::ClusterId clusterId, chip::AttributeId attributeId, void *data, size_t dataSize) override
uint16_t GetDeviceType() const override
Definition humidity_sensor.h:19
uint16_t GetMaxMeasuredValue()
Definition humidity_sensor.h:17
uint16_t GetMeasuredValue()
Definition humidity_sensor.h:15
static constexpr uint16_t GetRelativeHumidityMeasurementClusterRevision()
Definition humidity_sensor.h:42
uint16_t GetMinMeasuredValue()
Definition humidity_sensor.h:16
CHIP_ERROR HandleRead(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength) override
static constexpr uint32_t GetRelativeHumidityMeasurementFeatureMap()
Definition humidity_sensor.h:43
HumiditySensorDevice(const char *nodeLabel)
Definition humidity_sensor.h:11