9#include "matter_bridged_device.h"
15 uint16_t
GetDeviceType()
const override {
return Nrf::MatterBridgedDevice::DeviceType::OnOffLightSwitch; }
16 CHIP_ERROR
HandleRead(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer,
17 uint16_t maxReadLength)
override;
18 CHIP_ERROR
HandleReadOnOff(chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength);
19 CHIP_ERROR
HandleReadBinding(chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength);
20 CHIP_ERROR
HandleWrite(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer,
23 if (clusterId != chip::app::Clusters::BridgedDeviceBasicInformation::Id) {
24 return CHIP_ERROR_INVALID_ARGUMENT;
27 switch (attributeId) {
28 case chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id:
29 return HandleWriteDeviceBasicInformation(clusterId, attributeId, buffer, size);
31 return CHIP_ERROR_INVALID_ARGUMENT;
36 size_t dataSize)
override
38 return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
OnOffLightSwitchDevice(const char *nodeLabel)
static constexpr uint32_t GetBindingFeatureMap()
Definition: onoff_light_switch.h:44
CHIP_ERROR HandleReadBinding(chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength)
static constexpr uint16_t GetOnOffClusterRevision()
Definition: onoff_light_switch.h:41
CHIP_ERROR HandleAttributeChange(chip::ClusterId clusterId, chip::AttributeId attributeId, void *data, size_t dataSize) override
Definition: onoff_light_switch.h:35
uint16_t GetDeviceType() const override
Definition: onoff_light_switch.h:15
static constexpr uint16_t GetBindingClusterRevision()
Definition: onoff_light_switch.h:43
CHIP_ERROR HandleRead(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength) override
static constexpr uint32_t GetOnOffFeatureMap()
Definition: onoff_light_switch.h:42
CHIP_ERROR HandleWrite(chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t *buffer, size_t size) override
Definition: onoff_light_switch.h:20
CHIP_ERROR HandleReadOnOff(chip::AttributeId attributeId, uint8_t *buffer, uint16_t maxReadLength)
Definition: onoff_light_switch.h:11