9#include "matter_bridged_device.h"
19 uint16_t
GetDeviceType()
const override {
return Nrf::MatterBridgedDevice::DeviceType::TemperatureSensor; }
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 int16_t mMeasuredValue = 0;
51 int16_t mMinMeasuredValue = CONFIG_BRIDGE_TEMPERATURE_SENSOR_MIN_MEASURED_VALUE;
52 int16_t mMaxMeasuredValue = CONFIG_BRIDGE_TEMPERATURE_SENSOR_MAX_MEASURED_VALUE;
uint16_t GetDeviceType() const override
Definition temperature_sensor.h:19
CHIP_ERROR HandleReadTemperatureMeasurement(chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength)
TemperatureSensorDevice(const char *nodeLabel)
CHIP_ERROR HandleWrite(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer, size_t size) override
Definition temperature_sensor.h:24
CHIP_ERROR HandleAttributeChange(chip::ClusterId clusterId, chip::AttributeId attributeId, void *data, size_t dataSize) override
CHIP_ERROR HandleRead(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength) override
static constexpr uint32_t GetTemperatureMeasurementFeatureMap()
Definition temperature_sensor.h:43
int16_t GetMaxMeasuredValue()
Definition temperature_sensor.h:17
int16_t GetMeasuredValue()
Definition temperature_sensor.h:15
int16_t GetMinMeasuredValue()
Definition temperature_sensor.h:16
static constexpr uint16_t GetTemperatureMeasurementClusterRevision()
Definition temperature_sensor.h:42
Definition temperature_sensor.h:11