From 2796546b099e2a0fd783a1940436c95dd9251547 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 17 Dec 2021 19:23:43 -0500 Subject: [PATCH] Use the right types for enums in Accessors method signatures. (#13111) We're using the underlying integer types right now. Use the right enum types. The change to use a "using" declaration for the NumericAttributeTraits is just to make the code more readable when the template arg is long. There are no other changes there. --- examples/all-clusters-app/esp32/main/main.cpp | 8 +- .../door-lock-server/door-lock-server.cpp | 10 +- .../door-lock-server/door-lock-server.h | 4 +- .../common/attributes/Accessors.js | 9 +- .../app/attributes/Accessors-src.zapt | 33 +- .../templates/app/attributes/Accessors.zapt | 5 +- .../zap-generated/attributes/Accessors.cpp | 20429 +++++++++------- .../zap-generated/attributes/Accessors.h | 124 +- 8 files changed, 11454 insertions(+), 9168 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index 9c9126002c0604..82441ca30737aa 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -241,9 +241,10 @@ class EditAttributeListModel : public ListScreen::Model ESP_LOGI(TAG, "name and cluster: '%s' (%s)", name.c_str(), cluster.c_str()); if (name == "State" && cluster == "Lock") { + using namespace chip::app::Clusters; // update the doorlock attribute here - uint8_t attributeValue = value == "Closed" ? EMBER_ZCL_DOOR_LOCK_STATE_LOCKED : EMBER_ZCL_DOOR_LOCK_STATE_UNLOCKED; - chip::app::Clusters::DoorLock::Attributes::LockState::Set(DOOR_LOCK_SERVER_ENDPOINT, attributeValue); + auto attributeValue = value == "Closed" ? DoorLock::DlLockState::kLocked : DoorLock::DlLockState::kUnlocked; + DoorLock::Attributes::LockState::Set(DOOR_LOCK_SERVER_ENDPOINT, attributeValue); } } } @@ -472,7 +473,8 @@ void SetupPretendDevices() AddCluster("Lock"); AddAttribute("State", "Open"); // write the door lock state - chip::app::Clusters::DoorLock::Attributes::LockState::Set(DOOR_LOCK_SERVER_ENDPOINT, EMBER_ZCL_DOOR_LOCK_STATE_UNLOCKED); + chip::app::Clusters::DoorLock::Attributes::LockState::Set(DOOR_LOCK_SERVER_ENDPOINT, + chip::app::Clusters::DoorLock::DlLockState::kUnlocked); AddDevice("Garage 1"); AddEndpoint("Door 1"); AddCluster("Door"); diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index b450b58e0920bb..f2806926e9c537 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -70,7 +70,7 @@ bool DoorLockServer::SetLockState(chip::EndpointId endpointId, DlLockState newLo emberAfDoorLockClusterPrintln("Setting Lock State to '%hhu'", lockState); - bool status = Attributes::LockState::Set(endpointId, lockState); + bool status = (Attributes::LockState::Set(endpointId, newLockState) == EMBER_ZCL_STATUS_SUCCESS); if (!status) { ChipLogError(Zcl, "Unable to set the Lock State to %hhu: internal error", lockState); @@ -79,13 +79,13 @@ bool DoorLockServer::SetLockState(chip::EndpointId endpointId, DlLockState newLo return status; } -bool DoorLockServer::SetActuatorState(chip::EndpointId endpointId, bool newActuatorState) +bool DoorLockServer::SetActuatorEnabled(chip::EndpointId endpointId, bool newActuatorState) { auto actuatorState = static_cast(newActuatorState); emberAfDoorLockClusterPrintln("Setting Actuator State to '%hhu'", actuatorState); - bool status = Attributes::LockState::Set(endpointId, actuatorState); + bool status = (Attributes::ActuatorEnabled::Set(endpointId, newActuatorState) == EMBER_ZCL_STATUS_SUCCESS); if (!status) { ChipLogError(Zcl, "Unable to set the Actuator State to %hhu: internal error", actuatorState); @@ -94,12 +94,12 @@ bool DoorLockServer::SetActuatorState(chip::EndpointId endpointId, bool newActua return false; } -bool DoorLockServer::SetDoorState(chip::EndpointId endpointId, DlLockState newDoorState) +bool DoorLockServer::SetDoorState(chip::EndpointId endpointId, DlDoorState newDoorState) { auto doorState = static_cast(newDoorState); emberAfDoorLockClusterPrintln("Setting Door State to '%hhu'", doorState); - bool status = Attributes::DoorState::Set(endpointId, doorState); + bool status = (Attributes::DoorState::Set(endpointId, newDoorState) == EMBER_ZCL_STATUS_SUCCESS); if (!status) { diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index 2810a4aafd2826..d9af7c8d8eab76 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -39,8 +39,8 @@ class DoorLockServer void InitServer(chip::EndpointId endpointId); bool SetLockState(chip::EndpointId endpointId, chip::app::Clusters::DoorLock::DlLockState newLockState); - bool SetActuatorState(chip::EndpointId endpointId, bool newActuatorState); - bool SetDoorState(chip::EndpointId endpointId, chip::app::Clusters::DoorLock::DlLockState newDoorState); + bool SetActuatorEnabled(chip::EndpointId endpointId, bool newActuatorState); + bool SetDoorState(chip::EndpointId endpointId, chip::app::Clusters::DoorLock::DlDoorState newDoorState); bool SetLanguage(chip::EndpointId endpointId, const char * newLanguage); bool SetAutoRelockTime(chip::EndpointId, uint32_t newAutoRelockTimeSec); diff --git a/src/app/zap-templates/common/attributes/Accessors.js b/src/app/zap-templates/common/attributes/Accessors.js index 14720743e2621a..8b2687895dd63b 100644 --- a/src/app/zap-templates/common/attributes/Accessors.js +++ b/src/app/zap-templates/common/attributes/Accessors.js @@ -18,6 +18,7 @@ const zapPath = '../../../../../third_party/zap/repo/dist/src-electron/'; const ListHelper = require('../../common/ListHelper.js'); const StringHelper = require('../../common/StringHelper.js'); +const appHelper = require('../../templates/app/helper.js'); const cHelper = require(zapPath + 'generator/helper-c.js') const zclHelper = require(zapPath + 'generator/helper-zcl.js') const templateUtil = require(zapPath + 'generator/template-util.js') @@ -59,8 +60,8 @@ async function accessorGetterType(attr) type = "chip::MutableByteSpan"; } else { mayNeedPointer = true; - const options = { 'hash' : {} }; - type = await zclHelper.asUnderlyingZclType.call(this, attr.type, options); + const options = { 'hash' : { forceNotNullable : true, forceNotOptional : true, ns : this.parent.name } }; + type = await appHelper.zapTypeToEncodableClusterObjectType.call(this, attr.type, options); } if (attr.isNullable) { @@ -84,7 +85,9 @@ async function accessorTraitType(type) return `OddSizedInteger<${size}, ${signed}>`; } } - return zclHelper.asUnderlyingZclType.call(this, type, { 'hash' : {} }); + + const options = { 'hash' : { forceNotNullable : true, forceNotOptional : true, ns : this.parent.name } }; + return appHelper.zapTypeToEncodableClusterObjectType.call(this, type, options); } async function typeAsDelimitedMacro(type) diff --git a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt index 4a43ca6adbed87..3cc33eb75d7090 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -58,30 +58,31 @@ EmberAfStatus Get(chip::EndpointId endpoint, {{accessorGetterType this}} value) {{>value}}.reduce_size(length); return status; {{else}} - NumericAttributeTraits<{{accessorTraitType type}}>::StorageType temp; - uint8_t * readable = NumericAttributeTraits<{{accessorTraitType type}}>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, {{>clusterId}}, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); {{#if isNullable}} - if (NumericAttributeTraits<{{accessorTraitType type}}>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits<{{accessorTraitType type}}>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } {{else}} - if (!NumericAttributeTraits<{{accessorTraitType type}}>::CanRepresentValue(/* isNullable = */ {{isNullable}}, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ {{isNullable}}, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits<{{accessorTraitType type}}>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); {{/if}} return status; {{/if}} } -EmberAfStatus Set(chip::EndpointId endpoint, {{asUnderlyingZclType type}} value) +EmberAfStatus Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value) { {{~#if (isString type)}} {{~#*inline "lengthType"}}uint{{#if (isShortString type)}}8{{else}}16{{/if}}_t{{/inline}} @@ -93,13 +94,14 @@ EmberAfStatus Set(chip::EndpointId endpoint, {{asUnderlyingZclType type}} value) memcpy(&zclString[{{>sizingBytes}}], value.data(), value.size()); return emberAfWriteServerAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); {{else}} - if (!NumericAttributeTraits<{{accessorTraitType type}}>::CanRepresentValue(/* isNullable = */ {{isNullable}}, value)) + using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; + if (!Traits::CanRepresentValue(/* isNullable = */ {{isNullable}}, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits<{{accessorTraitType type}}>::StorageType storageValue; - NumericAttributeTraits<{{accessorTraitType type}}>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits<{{accessorTraitType type}}>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); {{/if}} } @@ -111,14 +113,15 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) uint8_t zclString[{{>sizingBytes}}] = { {{#if (isShortString type)}}0xFF{{else}}0xFF, 0xFF{{/if}} }; return emberAfWriteServerAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); {{else}} - NumericAttributeTraits<{{accessorTraitType type}}>::StorageType value; - NumericAttributeTraits<{{accessorTraitType type}}>::SetNull(value); - uint8_t * writable = NumericAttributeTraits<{{accessorTraitType type}}>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); {{/if}} } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable<{{asUnderlyingZclType type}}> & value) +EmberAfStatus Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value) { if (value.IsNull()) { return SetNull(endpoint); diff --git a/src/app/zap-templates/templates/app/attributes/Accessors.zapt b/src/app/zap-templates/templates/app/attributes/Accessors.zapt index 2b5ffea429f67e..a9d96ae336c88a 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors.zapt @@ -9,6 +9,7 @@ #include #include +#include #include namespace chip { @@ -26,10 +27,10 @@ namespace Attributes { {{else if (canHaveSimpleAccessors this)}} namespace {{asUpperCamelCase label}} { EmberAfStatus Get(chip::EndpointId endpoint, {{accessorGetterType this}} value); // {{type}} {{isArray}} -EmberAfStatus Set(chip::EndpointId endpoint, {{asUnderlyingZclType type}} value); +EmberAfStatus Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value); {{#if isNullable}} EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable<{{asUnderlyingZclType type}}> & value); +EmberAfStatus Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value); {{/if}} } // namespace {{asUpperCamelCase label}} diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index b236f6c20361f2..2c1a723e093d3e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -42,26 +42,28 @@ namespace MainsVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -71,26 +73,28 @@ namespace MainsFrequency { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -100,26 +104,28 @@ namespace MainsAlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -129,26 +135,28 @@ namespace MainsVoltageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -158,26 +166,28 @@ namespace MainsVoltageMaxThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -187,26 +197,28 @@ namespace MainsVoltageDwellTrip { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -216,26 +228,28 @@ namespace BatteryVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -245,26 +259,28 @@ namespace BatteryPercentageRemaining { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -304,26 +320,28 @@ namespace BatterySize { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -333,26 +351,28 @@ namespace BatteryAhrRating { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -362,26 +382,28 @@ namespace BatteryQuantity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -391,26 +413,28 @@ namespace BatteryRatedVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -420,26 +444,28 @@ namespace BatteryAlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -449,26 +475,28 @@ namespace BatteryVoltageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -478,26 +506,28 @@ namespace BatteryVoltageThreshold1 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -507,26 +537,28 @@ namespace BatteryVoltageThreshold2 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -536,26 +568,28 @@ namespace BatteryVoltageThreshold3 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -565,26 +599,28 @@ namespace BatteryPercentageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -594,26 +630,28 @@ namespace BatteryPercentageThreshold1 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -623,26 +661,28 @@ namespace BatteryPercentageThreshold2 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -652,26 +692,28 @@ namespace BatteryPercentageThreshold3 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -681,26 +723,28 @@ namespace BatteryAlarmState { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -710,26 +754,28 @@ namespace Battery2Voltage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -739,26 +785,28 @@ namespace Battery2PercentageRemaining { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -798,26 +846,28 @@ namespace Battery2Size { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -827,26 +877,28 @@ namespace Battery2AhrRating { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -856,26 +908,28 @@ namespace Battery2Quantity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -885,26 +939,28 @@ namespace Battery2RatedVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -914,26 +970,28 @@ namespace Battery2AlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -943,26 +1001,28 @@ namespace Battery2VoltageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -972,26 +1032,28 @@ namespace Battery2VoltageThreshold1 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1001,26 +1063,28 @@ namespace Battery2VoltageThreshold2 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1030,26 +1094,28 @@ namespace Battery2VoltageThreshold3 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1059,26 +1125,28 @@ namespace Battery2PercentageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1088,26 +1156,28 @@ namespace Battery2PercentageThreshold1 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1117,26 +1187,28 @@ namespace Battery2PercentageThreshold2 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1146,26 +1218,28 @@ namespace Battery2PercentageThreshold3 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1175,26 +1249,28 @@ namespace Battery2AlarmState { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -1204,26 +1280,28 @@ namespace Battery3Voltage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1233,26 +1311,28 @@ namespace Battery3PercentageRemaining { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1292,26 +1372,28 @@ namespace Battery3Size { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -1321,26 +1403,28 @@ namespace Battery3AhrRating { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -1350,26 +1434,28 @@ namespace Battery3Quantity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1379,26 +1465,28 @@ namespace Battery3RatedVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1408,26 +1496,28 @@ namespace Battery3AlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -1437,26 +1527,28 @@ namespace Battery3VoltageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1466,26 +1558,28 @@ namespace Battery3VoltageThreshold1 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1495,26 +1589,28 @@ namespace Battery3VoltageThreshold2 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1524,26 +1620,28 @@ namespace Battery3VoltageThreshold3 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1553,26 +1651,28 @@ namespace Battery3PercentageMinThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1582,26 +1682,28 @@ namespace Battery3PercentageThreshold1 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1611,26 +1713,28 @@ namespace Battery3PercentageThreshold2 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1640,26 +1744,28 @@ namespace Battery3PercentageThreshold3 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -1669,26 +1775,28 @@ namespace Battery3AlarmState { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -1698,26 +1806,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -1727,26 +1837,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -1762,27 +1874,29 @@ namespace CurrentTemperature { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -1793,27 +1907,29 @@ namespace MinTempExperienced { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -1824,27 +1940,29 @@ namespace MaxTempExperienced { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -1855,27 +1973,29 @@ namespace OverTempTotalDwell { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -1886,27 +2006,29 @@ namespace DeviceTempAlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -1917,27 +2039,29 @@ namespace LowTempThreshold { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -1948,27 +2072,29 @@ namespace HighTempThreshold { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -1979,27 +2105,29 @@ namespace LowTempDwellTripPoint { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -2010,27 +2138,29 @@ namespace HighTempDwellTripPoint { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -2041,27 +2171,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -2072,27 +2204,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2109,26 +2243,28 @@ namespace IdentifyTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Identify::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2138,26 +2274,28 @@ namespace IdentifyType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Identify::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -2167,26 +2305,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Identify::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -2196,26 +2336,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Identify::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2231,26 +2373,28 @@ namespace NameSupport { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Groups::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -2260,26 +2404,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Groups::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -2289,26 +2435,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Groups::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2324,26 +2472,28 @@ namespace SceneCount { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -2353,26 +2503,28 @@ namespace CurrentScene { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -2382,26 +2534,28 @@ namespace CurrentGroup { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2411,26 +2565,28 @@ namespace SceneValid { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -2440,26 +2596,28 @@ namespace NameSupport { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -2469,26 +2627,28 @@ namespace LastConfiguredBy { EmberAfStatus Get(chip::EndpointId endpoint, chip::NodeId * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } @@ -2498,26 +2658,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -2527,26 +2689,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2562,26 +2726,28 @@ namespace OnOff { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -2591,26 +2757,28 @@ namespace GlobalSceneControl { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -2620,26 +2788,28 @@ namespace OnTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2649,26 +2819,28 @@ namespace OffWaitTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2678,26 +2850,28 @@ namespace StartUpOnOff { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -2707,26 +2881,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -2736,26 +2912,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2771,26 +2949,28 @@ namespace SwitchType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -2800,26 +2980,28 @@ namespace SwitchActions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -2829,26 +3011,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -2858,26 +3042,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2893,26 +3079,28 @@ namespace CurrentLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -2922,26 +3110,28 @@ namespace RemainingTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -2951,26 +3141,28 @@ namespace MinLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -2980,26 +3172,28 @@ namespace MaxLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -3009,26 +3203,28 @@ namespace CurrentFrequency { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3038,26 +3234,28 @@ namespace MinFrequency { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3067,26 +3265,28 @@ namespace MaxFrequency { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3096,26 +3296,28 @@ namespace Options { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -3125,26 +3327,28 @@ namespace OnOffTransitionTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3154,41 +3358,44 @@ namespace OnLevel { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -3204,41 +3411,44 @@ namespace OnTransitionTime { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -3254,41 +3464,44 @@ namespace OffTransitionTime { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -3304,41 +3517,44 @@ namespace DefaultMoveRate { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -3354,26 +3570,28 @@ namespace StartUpCurrentLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -3383,26 +3601,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -3412,26 +3632,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3447,26 +3669,28 @@ namespace AlarmCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Alarms::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Alarms::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3476,26 +3700,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Alarms::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Alarms::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -3505,26 +3731,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Alarms::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Alarms::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3540,26 +3768,28 @@ namespace Time { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } @@ -3569,26 +3799,28 @@ namespace TimeStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -3598,26 +3830,28 @@ namespace TimeZone { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } @@ -3627,26 +3861,28 @@ namespace DstStart { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -3656,26 +3892,28 @@ namespace DstEnd { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -3685,26 +3923,28 @@ namespace DstShift { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } @@ -3714,26 +3954,28 @@ namespace StandardTime { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -3743,26 +3985,28 @@ namespace LocalTime { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -3772,26 +4016,28 @@ namespace LastSetTime { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } @@ -3801,26 +4047,28 @@ namespace ValidUntilTime { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } @@ -3830,26 +4078,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -3859,26 +4109,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -3984,26 +4236,28 @@ namespace OutOfService { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -4013,26 +4267,28 @@ namespace Polarity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -4042,26 +4298,28 @@ namespace PresentValue { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -4071,26 +4329,28 @@ namespace Reliability { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -4100,26 +4360,28 @@ namespace StatusFlags { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -4129,26 +4391,28 @@ namespace ApplicationType { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -4158,26 +4422,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4187,26 +4453,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4222,26 +4490,28 @@ namespace TotalProfileNum { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -4251,26 +4521,28 @@ namespace MultipleScheduling { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -4280,26 +4552,28 @@ namespace EnergyFormatting { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -4309,26 +4583,28 @@ namespace EnergyRemote { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -4338,26 +4614,28 @@ namespace ScheduleMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -4367,26 +4645,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4396,26 +4676,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4431,26 +4713,28 @@ namespace StartTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4460,26 +4744,28 @@ namespace FinishTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4489,26 +4775,28 @@ namespace RemainingTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4518,26 +4806,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4547,26 +4837,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4582,26 +4874,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4611,26 +4905,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4646,26 +4942,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Descriptor::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Descriptor::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4675,26 +4973,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Descriptor::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Descriptor::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4710,26 +5010,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Binding::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4739,26 +5041,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Binding::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4774,26 +5078,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AccessControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -4803,26 +5109,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AccessControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4838,26 +5146,28 @@ namespace CheckInInterval { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -4867,26 +5177,28 @@ namespace LongPollInterval { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -4896,26 +5208,28 @@ namespace ShortPollInterval { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4925,26 +5239,28 @@ namespace FastPollTimeout { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -4954,26 +5270,28 @@ namespace CheckInIntervalMin { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -4983,26 +5301,28 @@ namespace LongPollIntervalMin { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -5012,26 +5332,28 @@ namespace FastPollTimeoutMax { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5041,26 +5363,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -5070,26 +5394,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5135,26 +5461,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -5164,26 +5492,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5199,26 +5529,28 @@ namespace InteractionModelVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5258,26 +5590,28 @@ namespace VendorID { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5317,26 +5651,28 @@ namespace ProductID { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5406,26 +5742,28 @@ namespace HardwareVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5465,26 +5803,28 @@ namespace SoftwareVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -5674,26 +6014,28 @@ namespace LocalConfigDisabled { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -5703,26 +6045,28 @@ namespace Reachable { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -5762,26 +6106,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -5791,26 +6137,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5826,27 +6174,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -5857,27 +6207,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -5925,27 +6277,29 @@ namespace UpdatePossible { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -5956,27 +6310,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -5987,27 +6343,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -6023,27 +6381,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -6054,27 +6414,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -6090,26 +6452,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LocalizationTimeFormat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationTimeFormat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -6119,26 +6483,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LocalizationTimeFormat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationTimeFormat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -6154,26 +6520,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LocalizationUnit::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationUnit::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -6183,26 +6551,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LocalizationUnit::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationUnit::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -6218,26 +6588,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -6247,26 +6619,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -6282,26 +6656,28 @@ namespace Status { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -6311,26 +6687,28 @@ namespace Order { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -6370,26 +6748,28 @@ namespace WiredAssessedInputVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6399,26 +6779,28 @@ namespace WiredAssessedInputFrequency { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -6428,26 +6810,28 @@ namespace WiredCurrentType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -6457,26 +6841,28 @@ namespace WiredAssessedCurrent { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6486,26 +6872,28 @@ namespace WiredNominalVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6515,26 +6903,28 @@ namespace WiredMaximumCurrent { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6544,26 +6934,28 @@ namespace WiredPresent { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -6573,26 +6965,28 @@ namespace BatteryVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6602,26 +6996,28 @@ namespace BatteryPercentRemaining { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -6631,26 +7027,28 @@ namespace BatteryTimeRemaining { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6660,26 +7058,28 @@ namespace BatteryChargeLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -6689,26 +7089,28 @@ namespace BatteryReplacementNeeded { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -6718,26 +7120,28 @@ namespace BatteryReplaceability { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -6747,26 +7151,28 @@ namespace BatteryPresent { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -6806,26 +7212,28 @@ namespace BatteryCommonDesignation { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6895,26 +7303,28 @@ namespace BatteryApprovedChemistry { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6924,26 +7334,28 @@ namespace BatteryCapacity { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -6953,26 +7365,28 @@ namespace BatteryQuantity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -6982,26 +7396,28 @@ namespace BatteryChargeState { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -7011,26 +7427,28 @@ namespace BatteryTimeToFullCharge { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -7040,26 +7458,28 @@ namespace BatteryFunctionalWhileCharging { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -7069,26 +7489,28 @@ namespace BatteryChargingCurrent { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -7098,26 +7520,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -7127,26 +7551,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7162,26 +7588,28 @@ namespace Breadcrumb { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -7191,26 +7619,28 @@ namespace RegulatoryConfig { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -7220,26 +7650,28 @@ namespace LocationCapability { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -7249,26 +7681,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -7278,26 +7712,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7313,26 +7749,28 @@ namespace MaxNetworks { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -7342,26 +7780,28 @@ namespace ScanMaxTimeSeconds { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -7371,26 +7811,28 @@ namespace ConnectMaxTimeSeconds { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -7400,26 +7842,28 @@ namespace InterfaceEnabled { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -7427,28 +7871,30 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace LastNetworkingStatus { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatus * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatus value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -7490,26 +7936,28 @@ namespace LastConnectErrorValue { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -7519,26 +7967,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -7548,26 +7998,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7583,26 +8035,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -7612,26 +8066,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7647,26 +8103,28 @@ namespace RebootCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7676,26 +8134,28 @@ namespace UpTime { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -7705,26 +8165,28 @@ namespace TotalOperationalHours { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -7734,26 +8196,28 @@ namespace BootReasons { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -7763,26 +8227,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -7792,26 +8258,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7827,26 +8295,28 @@ namespace CurrentHeapFree { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -7856,26 +8326,28 @@ namespace CurrentHeapUsed { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -7885,26 +8357,28 @@ namespace CurrentHeapHighWatermark { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -7914,26 +8388,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -7943,26 +8419,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -7978,26 +8456,28 @@ namespace Channel { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8007,26 +8487,28 @@ namespace RoutingRole { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -8068,26 +8550,28 @@ namespace PanId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8097,26 +8581,28 @@ namespace ExtendedPanId { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -8158,26 +8644,28 @@ namespace OverrunCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -8187,26 +8675,28 @@ namespace PartitionId { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8216,26 +8706,28 @@ namespace Weighting { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -8245,26 +8737,28 @@ namespace DataVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -8274,26 +8768,28 @@ namespace StableDataVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -8303,26 +8799,28 @@ namespace LeaderRouterId { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -8332,26 +8830,28 @@ namespace DetachedRoleCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8361,26 +8861,28 @@ namespace ChildRoleCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8390,26 +8892,28 @@ namespace RouterRoleCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8419,26 +8923,28 @@ namespace LeaderRoleCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8448,26 +8954,28 @@ namespace AttachAttemptCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8477,26 +8985,28 @@ namespace PartitionIdChangeCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8506,26 +9016,28 @@ namespace BetterPartitionAttachAttemptCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8535,26 +9047,28 @@ namespace ParentChangeCount { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -8564,26 +9078,28 @@ namespace TxTotalCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8593,26 +9109,28 @@ namespace TxUnicastCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8622,26 +9140,28 @@ namespace TxBroadcastCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8651,26 +9171,28 @@ namespace TxAckRequestedCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8680,26 +9202,28 @@ namespace TxAckedCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8709,26 +9233,28 @@ namespace TxNoAckRequestedCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8738,26 +9264,28 @@ namespace TxDataCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8767,26 +9295,28 @@ namespace TxDataPollCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8796,26 +9326,28 @@ namespace TxBeaconCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8825,26 +9357,28 @@ namespace TxBeaconRequestCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8854,26 +9388,28 @@ namespace TxOtherCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8883,26 +9419,28 @@ namespace TxRetryCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8912,26 +9450,28 @@ namespace TxDirectMaxRetryExpiryCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8941,26 +9481,28 @@ namespace TxIndirectMaxRetryExpiryCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8970,26 +9512,28 @@ namespace TxErrCcaCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -8999,26 +9543,28 @@ namespace TxErrAbortCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9028,26 +9574,28 @@ namespace TxErrBusyChannelCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9057,26 +9605,28 @@ namespace RxTotalCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9086,26 +9636,28 @@ namespace RxUnicastCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9115,26 +9667,28 @@ namespace RxBroadcastCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9144,26 +9698,28 @@ namespace RxDataCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9173,26 +9729,28 @@ namespace RxDataPollCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9202,26 +9760,28 @@ namespace RxBeaconCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9231,26 +9791,28 @@ namespace RxBeaconRequestCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9260,26 +9822,28 @@ namespace RxOtherCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9289,26 +9853,28 @@ namespace RxAddressFilteredCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9318,26 +9884,28 @@ namespace RxDestAddrFilteredCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9347,26 +9915,28 @@ namespace RxDuplicatedCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9376,26 +9946,28 @@ namespace RxErrNoFrameCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9405,26 +9977,28 @@ namespace RxErrUnknownNeighborCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9434,26 +10008,28 @@ namespace RxErrInvalidSrcAddrCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9463,26 +10039,28 @@ namespace RxErrSecCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9492,26 +10070,28 @@ namespace RxErrFcsCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9521,26 +10101,28 @@ namespace RxErrOtherCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9550,26 +10132,28 @@ namespace ActiveTimestamp { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -9579,26 +10163,28 @@ namespace PendingTimestamp { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -9608,26 +10194,28 @@ namespace Delay { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9669,26 +10257,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -9698,26 +10288,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -9765,26 +10357,28 @@ namespace SecurityType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -9794,26 +10388,28 @@ namespace WiFiVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -9823,26 +10419,28 @@ namespace ChannelNumber { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -9852,26 +10450,28 @@ namespace Rssi { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -9881,26 +10481,28 @@ namespace BeaconLostCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9910,26 +10512,28 @@ namespace BeaconRxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9939,26 +10543,28 @@ namespace PacketMulticastRxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9968,26 +10574,28 @@ namespace PacketMulticastTxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -9997,26 +10605,28 @@ namespace PacketUnicastRxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -10026,26 +10636,28 @@ namespace PacketUnicastTxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -10055,26 +10667,28 @@ namespace CurrentMaxRate { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10084,26 +10698,28 @@ namespace OverrunCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10113,26 +10729,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -10142,26 +10760,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -10177,27 +10797,29 @@ namespace PHYRate { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -10207,27 +10829,29 @@ namespace FullDuplex { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -10238,27 +10862,29 @@ namespace PacketRxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10268,27 +10894,29 @@ namespace PacketTxCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10298,27 +10926,29 @@ namespace TxErrCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10328,27 +10958,29 @@ namespace CollisionCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10358,27 +10990,29 @@ namespace OverrunCount { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10388,27 +11022,29 @@ namespace CarrierDetect { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -10419,27 +11055,29 @@ namespace TimeSinceReset { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -10449,27 +11087,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -10480,27 +11120,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -10516,26 +11158,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -10545,26 +11189,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -10610,26 +11256,28 @@ namespace VendorID { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -10699,26 +11347,28 @@ namespace HardwareVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -10758,26 +11408,28 @@ namespace SoftwareVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -10968,26 +11620,28 @@ namespace Reachable { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -11027,26 +11681,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11056,26 +11712,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11091,26 +11749,28 @@ namespace NumberOfPositions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -11120,26 +11780,28 @@ namespace CurrentPosition { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -11149,26 +11811,28 @@ namespace MultiPressMax { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -11178,26 +11842,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11207,26 +11873,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11242,27 +11910,29 @@ namespace WindowStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -11272,27 +11942,29 @@ namespace AdminFabricIndex { EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); } @@ -11303,27 +11975,29 @@ namespace AdminVendorId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11333,27 +12007,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11364,27 +12040,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11400,26 +12078,28 @@ namespace SupportedFabrics { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -11429,26 +12109,28 @@ namespace CommissionedFabrics { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -11458,26 +12140,28 @@ namespace CurrentFabricIndex { EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); } @@ -11487,26 +12171,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11516,26 +12202,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11609,26 +12297,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GroupKeyManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GroupKeyManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11638,26 +12328,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GroupKeyManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::GroupKeyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11673,26 +12365,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FixedLabel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11702,26 +12396,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FixedLabel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11737,26 +12433,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UserLabel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11766,26 +12464,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::UserLabel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11801,26 +12501,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11830,26 +12532,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11865,26 +12569,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11894,26 +12600,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11929,26 +12637,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ProxyValid::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -11958,26 +12668,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ProxyValid::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -11993,26 +12705,28 @@ namespace StateValue { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BooleanState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -12022,26 +12736,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BooleanState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -12051,26 +12767,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BooleanState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12086,26 +12804,28 @@ namespace CurrentMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -12115,26 +12835,28 @@ namespace OnMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -12144,26 +12866,28 @@ namespace StartUpMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -12203,26 +12927,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -12232,26 +12958,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12267,26 +12995,28 @@ namespace PhysicalClosedLimit { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12296,26 +13026,28 @@ namespace MotorStepSize { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -12325,26 +13057,28 @@ namespace Status { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -12354,26 +13088,28 @@ namespace ClosedLimit { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12383,26 +13119,28 @@ namespace Mode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -12412,26 +13150,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -12441,26 +13181,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12474,43 +13216,47 @@ namespace Attributes { namespace LockState { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -12524,28 +13270,30 @@ EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable namespace LockType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -12555,26 +13303,28 @@ namespace ActuatorEnabled { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -12582,43 +13332,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace DoorState { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlDoorState value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -12634,26 +13388,28 @@ namespace DoorOpenEvents { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -12663,26 +13419,28 @@ namespace DoorClosedEvents { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -12692,26 +13450,28 @@ namespace OpenPeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12721,26 +13481,28 @@ namespace NumberOfLogRecordsSupported { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12750,26 +13512,28 @@ namespace NumberOfTotalUsersSupported { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12779,26 +13543,28 @@ namespace NumberOfPINUsersSupported { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12808,26 +13574,28 @@ namespace NumberOfRFIDUsersSupported { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12837,26 +13605,28 @@ namespace NumberOfWeekDaySchedulesSupportedPerUser { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12866,26 +13636,28 @@ namespace NumberOfYearDaySchedulesSupportedPerUser { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12895,26 +13667,28 @@ namespace NumberOfHolidaySchedulesSupported { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -12924,26 +13698,28 @@ namespace MaxPINCodeLength { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -12953,26 +13729,28 @@ namespace MinPINCodeLength { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -12982,26 +13760,28 @@ namespace MaxRFIDCodeLength { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -13011,26 +13791,28 @@ namespace MinRFIDCodeLength { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -13040,26 +13822,28 @@ namespace CredentialRulesSupport { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -13069,26 +13853,28 @@ namespace EnableLogging { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13128,26 +13914,28 @@ namespace LEDSettings { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -13157,26 +13945,28 @@ namespace AutoRelockTime { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -13186,26 +13976,28 @@ namespace SoundVolume { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -13213,28 +14005,30 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace OperatingMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlOperatingMode * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlOperatingMode value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -13244,26 +14038,28 @@ namespace SupportedOperatingModes { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13273,26 +14069,28 @@ namespace DefaultConfigurationRegister { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13302,26 +14100,28 @@ namespace EnableLocalProgramming { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13331,26 +14131,28 @@ namespace EnableOneTouchLocking { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13360,26 +14162,28 @@ namespace EnableInsideStatusLED { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13389,26 +14193,28 @@ namespace EnablePrivacyModeButton { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13418,26 +14224,28 @@ namespace LocalProgrammingFeatures { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -13447,26 +14255,28 @@ namespace WrongCodeEntryLimit { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -13476,26 +14286,28 @@ namespace UserCodeTemporaryDisableTime { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -13505,26 +14317,28 @@ namespace SendPINOverTheAir { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13534,26 +14348,28 @@ namespace RequirePINforRemoteOperation { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -13563,26 +14379,28 @@ namespace ExpiringUserTimeout { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -13592,26 +14410,28 @@ namespace AlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13621,26 +14441,28 @@ namespace KeypadOperationEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13650,26 +14472,28 @@ namespace RemoteOperationEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13679,26 +14503,28 @@ namespace ManualOperationEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13708,26 +14534,28 @@ namespace RFIDOperationEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13737,26 +14565,28 @@ namespace KeypadProgrammingEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13766,26 +14596,28 @@ namespace RemoteProgrammingEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13795,26 +14627,28 @@ namespace RFIDProgrammingEventMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -13824,26 +14658,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -13853,26 +14689,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -13888,26 +14726,28 @@ namespace Type { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -13917,26 +14757,28 @@ namespace PhysicalClosedLimitLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -13946,26 +14788,28 @@ namespace PhysicalClosedLimitTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -13975,26 +14819,28 @@ namespace CurrentPositionLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14004,26 +14850,28 @@ namespace CurrentPositionTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14033,26 +14881,28 @@ namespace NumberOfActuationsLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14062,26 +14912,28 @@ namespace NumberOfActuationsTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14091,26 +14943,28 @@ namespace ConfigStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -14120,26 +14974,28 @@ namespace CurrentPositionLiftPercentage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -14149,26 +15005,28 @@ namespace CurrentPositionTiltPercentage { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -14178,26 +15036,28 @@ namespace OperationalStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -14207,26 +15067,28 @@ namespace TargetPositionLiftPercent100ths { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14236,26 +15098,28 @@ namespace TargetPositionTiltPercent100ths { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14265,26 +15129,28 @@ namespace EndProductType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -14294,26 +15160,28 @@ namespace CurrentPositionLiftPercent100ths { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14323,26 +15191,28 @@ namespace CurrentPositionTiltPercent100ths { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14352,26 +15222,28 @@ namespace InstalledOpenLimitLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14381,26 +15253,28 @@ namespace InstalledClosedLimitLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14410,26 +15284,28 @@ namespace InstalledOpenLimitTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14439,26 +15315,28 @@ namespace InstalledClosedLimitTilt { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14468,26 +15346,28 @@ namespace VelocityLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14497,26 +15377,28 @@ namespace AccelerationTimeLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14526,26 +15408,28 @@ namespace DecelerationTimeLift { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14555,26 +15439,28 @@ namespace Mode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -14644,26 +15530,28 @@ namespace SafetyStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -14673,26 +15561,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -14702,26 +15592,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14737,26 +15629,28 @@ namespace BarrierMovingState { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -14766,26 +15660,28 @@ namespace BarrierSafetyStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -14795,26 +15691,28 @@ namespace BarrierCapabilities { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -14824,26 +15722,28 @@ namespace BarrierOpenEvents { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14853,26 +15753,28 @@ namespace BarrierCloseEvents { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14882,26 +15784,28 @@ namespace BarrierCommandOpenEvents { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14911,26 +15815,28 @@ namespace BarrierCommandCloseEvents { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14940,26 +15846,28 @@ namespace BarrierOpenPeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14969,26 +15877,28 @@ namespace BarrierClosePeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -14998,26 +15908,28 @@ namespace BarrierPosition { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -15027,26 +15939,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -15056,26 +15970,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15091,27 +16007,29 @@ namespace MaxPressure { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15122,27 +16040,29 @@ namespace MaxSpeed { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15153,27 +16073,29 @@ namespace MaxFlow { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15184,27 +16106,29 @@ namespace MinConstPressure { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15215,27 +16139,29 @@ namespace MaxConstPressure { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15246,27 +16172,29 @@ namespace MinCompPressure { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15277,27 +16205,29 @@ namespace MaxCompPressure { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15308,27 +16238,29 @@ namespace MinConstSpeed { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15339,27 +16271,29 @@ namespace MaxConstSpeed { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15370,27 +16304,29 @@ namespace MinConstFlow { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15401,27 +16337,29 @@ namespace MaxConstFlow { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15432,27 +16370,29 @@ namespace MinConstTemp { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15463,27 +16403,29 @@ namespace MaxConstTemp { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15494,27 +16436,29 @@ namespace PumpStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -15525,27 +16469,29 @@ namespace EffectiveOperationMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -15555,27 +16501,29 @@ namespace EffectiveControlMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -15585,27 +16533,29 @@ namespace Capacity { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15616,27 +16566,29 @@ namespace Speed { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15647,44 +16599,47 @@ namespace LifetimeRunningHours { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -15700,27 +16655,29 @@ namespace Power { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -15731,44 +16688,47 @@ namespace LifetimeEnergyConsumed { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -15784,27 +16744,29 @@ namespace OperationMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -15814,27 +16776,29 @@ namespace ControlMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -15844,27 +16808,29 @@ namespace AlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -15875,27 +16841,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -15906,27 +16874,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -15943,26 +16913,28 @@ namespace LocalTemperature { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -15972,26 +16944,28 @@ namespace OutdoorTemperature { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16001,26 +16975,28 @@ namespace Occupancy { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -16030,26 +17006,28 @@ namespace AbsMinHeatSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16059,26 +17037,28 @@ namespace AbsMaxHeatSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16088,26 +17068,28 @@ namespace AbsMinCoolSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16117,26 +17099,28 @@ namespace AbsMaxCoolSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16146,26 +17130,28 @@ namespace PiCoolingDemand { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -16175,26 +17161,28 @@ namespace PiHeatingDemand { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -16204,26 +17192,28 @@ namespace HvacSystemTypeConfiguration { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -16233,26 +17223,28 @@ namespace LocalTemperatureCalibration { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -16262,26 +17254,28 @@ namespace OccupiedCoolingSetpoint { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16291,26 +17285,28 @@ namespace OccupiedHeatingSetpoint { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16320,26 +17316,28 @@ namespace UnoccupiedCoolingSetpoint { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16349,26 +17347,28 @@ namespace UnoccupiedHeatingSetpoint { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16378,26 +17378,28 @@ namespace MinHeatSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16407,26 +17409,28 @@ namespace MaxHeatSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16436,26 +17440,28 @@ namespace MinCoolSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16465,26 +17471,28 @@ namespace MaxCoolSetpointLimit { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16494,26 +17502,28 @@ namespace MinSetpointDeadBand { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -16523,26 +17533,28 @@ namespace RemoteSensing { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -16552,26 +17564,28 @@ namespace ControlSequenceOfOperation { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16581,26 +17595,28 @@ namespace SystemMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16610,26 +17626,28 @@ namespace AlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -16639,26 +17657,28 @@ namespace ThermostatRunningMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16668,26 +17688,28 @@ namespace StartOfWeek { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16697,26 +17719,28 @@ namespace NumberOfWeeklyTransitions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -16726,26 +17750,28 @@ namespace NumberOfDailyTransitions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -16755,26 +17781,28 @@ namespace TemperatureSetpointHold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16784,26 +17812,28 @@ namespace TemperatureSetpointHoldDuration { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -16813,26 +17843,28 @@ namespace ThermostatProgrammingOperationMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -16842,26 +17874,28 @@ namespace ThermostatRunningState { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -16871,26 +17905,28 @@ namespace SetpointChangeSource { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16900,26 +17936,28 @@ namespace SetpointChangeAmount { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -16929,26 +17967,28 @@ namespace SetpointChangeSourceTimestamp { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } @@ -16958,26 +17998,28 @@ namespace AcType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -16987,26 +18029,28 @@ namespace AcCapacity { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17016,26 +18060,28 @@ namespace AcRefrigerantType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17045,26 +18091,28 @@ namespace AcCompressor { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17074,26 +18122,28 @@ namespace AcErrorCode { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -17103,26 +18153,28 @@ namespace AcLouverPosition { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17132,26 +18184,28 @@ namespace AcCoilTemperature { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -17161,26 +18215,28 @@ namespace AcCapacityFormat { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17190,26 +18246,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -17219,26 +18277,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17254,26 +18314,28 @@ namespace FanMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17283,26 +18345,28 @@ namespace FanModeSequence { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17312,26 +18376,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -17341,26 +18407,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17376,26 +18444,28 @@ namespace RelativeHumidity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17405,26 +18475,28 @@ namespace DehumidificationCooling { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17434,26 +18506,28 @@ namespace RhDehumidificationSetpoint { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17463,26 +18537,28 @@ namespace RelativeHumidityMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17492,26 +18568,28 @@ namespace DehumidificationLockout { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17521,26 +18599,28 @@ namespace DehumidificationHysteresis { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17550,26 +18630,28 @@ namespace DehumidificationMaxCool { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17579,26 +18661,28 @@ namespace RelativeHumidityDisplay { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17608,26 +18692,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -17637,26 +18723,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17672,27 +18760,29 @@ namespace TemperatureDisplayMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17703,27 +18793,29 @@ namespace KeypadLockout { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17734,27 +18826,29 @@ namespace ScheduleProgrammingVisibility { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -17765,27 +18859,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -17796,27 +18892,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17833,26 +18931,28 @@ namespace CurrentHue { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17862,26 +18962,28 @@ namespace CurrentSaturation { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -17891,26 +18993,28 @@ namespace RemainingTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17920,26 +19024,28 @@ namespace CurrentX { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17949,26 +19055,28 @@ namespace CurrentY { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -17978,26 +19086,28 @@ namespace DriftCompensation { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -18037,26 +19147,28 @@ namespace ColorTemperature { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18066,26 +19178,28 @@ namespace ColorMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -18095,26 +19209,28 @@ namespace ColorControlOptions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -18124,26 +19240,28 @@ namespace NumberOfPrimaries { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18153,26 +19271,28 @@ namespace Primary1X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18182,26 +19302,28 @@ namespace Primary1Y { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18211,26 +19333,28 @@ namespace Primary1Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18240,26 +19364,28 @@ namespace Primary2X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18269,26 +19395,28 @@ namespace Primary2Y { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18298,26 +19426,28 @@ namespace Primary2Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18327,26 +19457,28 @@ namespace Primary3X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18356,26 +19488,28 @@ namespace Primary3Y { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18385,26 +19519,28 @@ namespace Primary3Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18414,26 +19550,28 @@ namespace Primary4X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18443,26 +19581,28 @@ namespace Primary4Y { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18472,26 +19612,28 @@ namespace Primary4Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18501,26 +19643,28 @@ namespace Primary5X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18530,26 +19674,28 @@ namespace Primary5Y { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18559,26 +19705,28 @@ namespace Primary5Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18588,26 +19736,28 @@ namespace Primary6X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18617,26 +19767,28 @@ namespace Primary6Y { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18646,26 +19798,28 @@ namespace Primary6Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18675,26 +19829,28 @@ namespace WhitePointX { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18704,26 +19860,28 @@ namespace WhitePointY { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18733,26 +19891,28 @@ namespace ColorPointRX { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18762,26 +19922,28 @@ namespace ColorPointRY { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18791,26 +19953,28 @@ namespace ColorPointRIntensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18820,26 +19984,28 @@ namespace ColorPointGX { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18849,26 +20015,28 @@ namespace ColorPointGY { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18878,26 +20046,28 @@ namespace ColorPointGIntensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18907,26 +20077,28 @@ namespace ColorPointBX { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18936,26 +20108,28 @@ namespace ColorPointBY { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -18965,26 +20139,28 @@ namespace ColorPointBIntensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -18994,26 +20170,28 @@ namespace EnhancedCurrentHue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19023,26 +20201,28 @@ namespace EnhancedColorMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -19052,26 +20232,28 @@ namespace ColorLoopActive { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19081,26 +20263,28 @@ namespace ColorLoopDirection { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19110,26 +20294,28 @@ namespace ColorLoopTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19139,26 +20325,28 @@ namespace ColorLoopStartEnhancedHue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19168,26 +20356,28 @@ namespace ColorLoopStoredEnhancedHue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19197,26 +20387,28 @@ namespace ColorCapabilities { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -19226,26 +20418,28 @@ namespace ColorTempPhysicalMin { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19255,26 +20449,28 @@ namespace ColorTempPhysicalMax { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19284,26 +20480,28 @@ namespace CoupleColorTempToLevelMinMireds { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19313,26 +20511,28 @@ namespace StartUpColorTemperatureMireds { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19342,26 +20542,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -19371,26 +20573,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19406,26 +20610,28 @@ namespace PhysicalMinLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19435,26 +20641,28 @@ namespace PhysicalMaxLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19464,26 +20672,28 @@ namespace BallastStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -19493,26 +20703,28 @@ namespace MinLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19522,26 +20734,28 @@ namespace MaxLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19551,26 +20765,28 @@ namespace PowerOnLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19580,26 +20796,28 @@ namespace PowerOnFadeTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19609,26 +20827,28 @@ namespace IntrinsicBallastFactor { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19638,26 +20858,28 @@ namespace BallastFactorAdjustment { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19667,26 +20889,28 @@ namespace LampQuality { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -19758,26 +20982,28 @@ namespace LampRatedHours { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -19787,26 +21013,28 @@ namespace LampBurnHours { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -19816,26 +21044,28 @@ namespace LampAlarmMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -19845,26 +21075,28 @@ namespace LampBurnHoursTripPoint { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -19874,26 +21106,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -19903,26 +21137,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -19938,41 +21174,44 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19988,41 +21227,44 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20038,41 +21280,44 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20088,26 +21333,28 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20117,41 +21364,44 @@ namespace LightSensorType { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20167,26 +21417,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -20196,26 +21448,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20231,26 +21485,28 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20260,26 +21516,28 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20289,26 +21547,28 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20318,26 +21578,28 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20347,26 +21609,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -20376,26 +21640,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20411,26 +21677,28 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20440,26 +21708,28 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20469,26 +21739,28 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20498,26 +21770,28 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20527,26 +21801,28 @@ namespace ScaledValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20556,26 +21832,28 @@ namespace MinScaledValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20585,26 +21863,28 @@ namespace MaxScaledValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20614,26 +21894,28 @@ namespace ScaledTolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20643,26 +21925,28 @@ namespace Scale { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -20672,26 +21956,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -20701,26 +21987,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20736,26 +22024,28 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20765,26 +22055,28 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20794,26 +22086,28 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -20823,26 +22117,28 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20852,26 +22148,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -20881,26 +22179,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20916,27 +22216,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20947,27 +22249,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -20978,27 +22282,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21009,27 +22315,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21040,27 +22348,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -21071,27 +22381,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21108,26 +22420,28 @@ namespace Occupancy { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -21137,26 +22451,28 @@ namespace OccupancySensorType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -21166,26 +22482,28 @@ namespace OccupancySensorTypeBitmap { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -21195,26 +22513,28 @@ namespace PirOccupiedToUnoccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21224,26 +22544,28 @@ namespace PirUnoccupiedToOccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21253,26 +22575,28 @@ namespace PirUnoccupiedToOccupiedThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -21282,26 +22606,28 @@ namespace UltrasonicOccupiedToUnoccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21311,26 +22637,28 @@ namespace UltrasonicUnoccupiedToOccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21340,26 +22668,28 @@ namespace UltrasonicUnoccupiedToOccupiedThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -21369,26 +22699,28 @@ namespace PhysicalContactOccupiedToUnoccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21398,26 +22730,28 @@ namespace PhysicalContactUnoccupiedToOccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21427,26 +22761,28 @@ namespace PhysicalContactUnoccupiedToOccupiedThreshold { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -21456,26 +22792,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -21485,26 +22823,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21520,27 +22860,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21551,27 +22893,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21582,27 +22926,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21613,27 +22959,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21644,27 +22992,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -21675,27 +23025,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21712,27 +23064,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21743,27 +23097,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21774,27 +23130,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21805,27 +23163,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21836,27 +23196,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -21867,27 +23229,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -21904,27 +23268,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21935,27 +23301,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21966,27 +23334,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -21997,27 +23367,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22028,27 +23400,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -22059,27 +23433,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -22096,27 +23472,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22127,27 +23505,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22158,27 +23538,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22189,27 +23571,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22220,27 +23604,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -22251,27 +23637,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -22288,27 +23676,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22319,27 +23709,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22350,27 +23742,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22381,27 +23775,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22412,27 +23808,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -22443,27 +23841,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -22480,27 +23880,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22511,27 +23913,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22542,27 +23946,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22573,27 +23979,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22604,27 +24012,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -22635,27 +24045,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -22672,27 +24084,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22703,27 +24117,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22734,27 +24150,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22765,27 +24183,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22796,27 +24216,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -22827,27 +24249,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -22864,27 +24288,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22895,27 +24321,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22926,27 +24354,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22957,27 +24387,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -22988,27 +24420,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -23019,27 +24453,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -23056,27 +24492,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23087,27 +24525,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23118,27 +24558,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23149,27 +24591,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23180,27 +24624,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -23211,27 +24657,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -23248,27 +24696,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23279,27 +24729,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23310,27 +24762,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23341,27 +24795,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23372,27 +24828,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -23403,27 +24861,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -23440,27 +24900,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23471,27 +24933,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23502,27 +24966,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23533,27 +24999,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23564,27 +25032,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -23595,27 +25065,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -23632,27 +25104,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23663,27 +25137,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23694,27 +25170,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23725,27 +25203,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23756,27 +25236,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -23787,27 +25269,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -23824,27 +25308,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23855,27 +25341,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23886,27 +25374,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23917,27 +25407,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -23948,27 +25440,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -23979,27 +25473,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -24016,27 +25512,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24047,27 +25545,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24078,27 +25578,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24109,27 +25611,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24140,27 +25644,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -24171,27 +25677,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -24208,27 +25716,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24239,27 +25749,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24270,27 +25782,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24301,27 +25815,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24332,27 +25848,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -24363,27 +25881,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -24400,27 +25920,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24431,27 +25953,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24462,27 +25986,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24493,27 +26019,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24524,27 +26052,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -24555,27 +26085,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -24592,27 +26124,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24623,27 +26157,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24654,27 +26190,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24685,27 +26223,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24716,27 +26256,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -24747,27 +26289,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -24784,27 +26328,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24815,27 +26361,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24846,27 +26394,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24877,27 +26427,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -24908,27 +26460,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -24939,27 +26493,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -24976,27 +26532,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25007,27 +26565,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25038,27 +26598,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25069,27 +26631,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25100,27 +26664,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -25131,27 +26697,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -25168,27 +26736,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25199,27 +26769,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25230,27 +26802,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25261,27 +26835,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25292,27 +26868,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -25323,27 +26901,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -25360,27 +26940,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25391,27 +26973,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25422,27 +27006,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25453,27 +27039,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25484,27 +27072,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -25515,27 +27105,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -25552,27 +27144,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25583,27 +27177,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25614,27 +27210,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25645,27 +27243,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25676,27 +27276,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -25707,27 +27309,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -25744,27 +27348,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25775,27 +27381,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25806,27 +27414,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25837,27 +27447,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25868,27 +27480,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -25899,27 +27513,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -25936,27 +27552,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25967,27 +27585,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -25998,27 +27618,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26029,27 +27651,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26060,27 +27684,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -26091,27 +27717,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -26128,27 +27756,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26159,27 +27789,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26190,27 +27822,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26221,27 +27855,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26252,27 +27888,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -26283,27 +27921,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -26320,27 +27960,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26351,27 +27993,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26382,27 +28026,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26413,27 +28059,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26444,27 +28092,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -26475,27 +28125,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -26512,27 +28164,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26543,27 +28197,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26574,27 +28230,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26605,27 +28263,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26636,27 +28296,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -26667,27 +28329,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -26704,27 +28368,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26735,27 +28401,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26766,27 +28434,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26797,27 +28467,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26828,27 +28500,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -26859,27 +28533,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -26896,27 +28572,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26927,27 +28605,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26958,27 +28638,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -26989,27 +28671,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -27020,27 +28704,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27051,27 +28737,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27088,27 +28776,29 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -27119,27 +28809,29 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -27150,27 +28842,29 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -27181,27 +28875,29 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -27212,27 +28908,29 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27243,27 +28941,29 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27280,26 +28980,28 @@ namespace ZoneState { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -27309,26 +29011,28 @@ namespace ZoneType { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } @@ -27338,26 +29042,28 @@ namespace ZoneStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -27367,26 +29073,28 @@ namespace IasCieAddress { EmberAfStatus Get(chip::EndpointId endpoint, chip::NodeId * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } @@ -27396,26 +29104,28 @@ namespace ZoneId { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -27425,26 +29135,28 @@ namespace NumberOfZoneSensitivityLevelsSupported { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -27454,26 +29166,28 @@ namespace CurrentZoneSensitivityLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -27483,26 +29197,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27512,26 +29228,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27547,26 +29265,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasAce::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasAce::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27576,26 +29296,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasAce::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasAce::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27611,26 +29333,28 @@ namespace MaxDuration { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasWd::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27640,26 +29364,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasWd::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27669,26 +29395,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasWd::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27734,26 +29462,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27763,26 +29493,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27798,26 +29530,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27827,26 +29561,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Channel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27862,26 +29598,28 @@ namespace CurrentNavigatorTarget { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -27891,26 +29629,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -27920,26 +29660,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -27955,26 +29697,28 @@ namespace PlaybackState { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -27984,26 +29728,28 @@ namespace StartTime { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -28013,26 +29759,28 @@ namespace Duration { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -28042,26 +29790,28 @@ namespace PlaybackSpeed { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -28071,26 +29821,28 @@ namespace SeekRangeEnd { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -28100,26 +29852,28 @@ namespace SeekRangeStart { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -28129,26 +29883,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28158,26 +29914,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28193,26 +29951,28 @@ namespace CurrentMediaInput { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -28222,26 +29982,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28251,26 +30013,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28286,26 +30050,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LowPower::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28315,26 +30081,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LowPower::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28350,26 +30118,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::KeypadInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28379,26 +30149,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::KeypadInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28414,26 +30186,28 @@ namespace SupportedStreamingProtocols { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28443,26 +30217,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28472,26 +30248,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28507,26 +30285,28 @@ namespace CurrentAudioOutput { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -28536,26 +30316,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28565,26 +30347,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28600,26 +30384,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28629,26 +30415,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28694,26 +30482,28 @@ namespace VendorId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28753,26 +30543,28 @@ namespace ProductId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28782,26 +30574,28 @@ namespace ApplicationStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -28841,26 +30635,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28870,26 +30666,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28905,26 +30703,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -28934,26 +30734,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -28969,26 +30771,28 @@ namespace Boolean { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -28998,26 +30802,28 @@ namespace Bitmap8 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -29027,26 +30833,28 @@ namespace Bitmap16 { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -29056,26 +30864,28 @@ namespace Bitmap32 { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -29085,26 +30895,28 @@ namespace Bitmap64 { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } @@ -29114,26 +30926,28 @@ namespace Int8u { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -29143,26 +30957,28 @@ namespace Int16u { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -29172,26 +30988,28 @@ namespace Int24u { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } @@ -29201,26 +31019,28 @@ namespace Int32u { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -29230,26 +31050,28 @@ namespace Int40u { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } @@ -29259,26 +31081,28 @@ namespace Int48u { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } @@ -29288,26 +31112,28 @@ namespace Int56u { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } @@ -29317,26 +31143,28 @@ namespace Int64u { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } @@ -29346,26 +31174,28 @@ namespace Int8s { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -29375,26 +31205,28 @@ namespace Int16s { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -29404,26 +31236,28 @@ namespace Int24s { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } @@ -29433,26 +31267,28 @@ namespace Int32s { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } @@ -29462,26 +31298,28 @@ namespace Int40s { EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } @@ -29491,26 +31329,28 @@ namespace Int48s { EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } @@ -29520,26 +31360,28 @@ namespace Int56s { EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } @@ -29549,26 +31391,28 @@ namespace Int64s { EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } @@ -29578,26 +31422,28 @@ namespace Enum8 { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -29607,26 +31453,28 @@ namespace Enum16 { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } @@ -29636,26 +31484,28 @@ namespace FloatSingle { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -29665,26 +31515,28 @@ namespace FloatDouble { EmberAfStatus Get(chip::EndpointId endpoint, double * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, double value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } @@ -29814,26 +31666,28 @@ namespace EpochUs { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } @@ -29843,26 +31697,28 @@ namespace EpochS { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } @@ -29872,26 +31728,28 @@ namespace VendorId { EmberAfStatus Get(chip::EndpointId endpoint, chip::VendorId * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE); } @@ -29899,28 +31757,30 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace EnumAttr { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } @@ -29930,26 +31790,28 @@ namespace RangeRestrictedInt8u { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -29959,26 +31821,28 @@ namespace RangeRestrictedInt8s { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -29988,26 +31852,28 @@ namespace RangeRestrictedInt16u { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -30017,26 +31883,28 @@ namespace RangeRestrictedInt16s { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -30046,26 +31914,28 @@ namespace TimedWriteBoolean { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -30075,26 +31945,28 @@ namespace Unsupported { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -30104,41 +31976,44 @@ namespace NullableBoolean { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30154,41 +32029,44 @@ namespace NullableBitmap8 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30204,41 +32082,44 @@ namespace NullableBitmap16 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30254,41 +32135,44 @@ namespace NullableBitmap32 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30304,41 +32188,44 @@ namespace NullableBitmap64 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30354,41 +32241,44 @@ namespace NullableInt8u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30404,41 +32294,44 @@ namespace NullableInt16u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30454,41 +32347,44 @@ namespace NullableInt24u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30504,41 +32400,44 @@ namespace NullableInt32u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30554,41 +32453,44 @@ namespace NullableInt40u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30604,41 +32506,44 @@ namespace NullableInt48u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30654,41 +32559,44 @@ namespace NullableInt56u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30704,41 +32612,44 @@ namespace NullableInt64u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30754,41 +32665,44 @@ namespace NullableInt8s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30804,41 +32718,44 @@ namespace NullableInt16s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30854,41 +32771,44 @@ namespace NullableInt24s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30904,41 +32824,44 @@ namespace NullableInt32s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30954,41 +32877,44 @@ namespace NullableInt40s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31004,41 +32930,44 @@ namespace NullableInt48s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31054,41 +32983,44 @@ namespace NullableInt56s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31104,41 +33036,44 @@ namespace NullableInt64s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31154,41 +33089,44 @@ namespace NullableEnum8 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31204,41 +33142,44 @@ namespace NullableEnum16 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31254,41 +33195,44 @@ namespace NullableFloatSingle { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31304,41 +33248,44 @@ namespace NullableFloatDouble { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, double value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31386,7 +33333,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31434,7 +33381,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31448,43 +33395,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31500,41 +33451,44 @@ namespace NullableRangeRestrictedInt8u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31550,41 +33504,44 @@ namespace NullableRangeRestrictedInt8s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31600,41 +33557,44 @@ namespace NullableRangeRestrictedInt16u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31650,41 +33610,44 @@ namespace NullableRangeRestrictedInt16s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) + if (Traits::IsNullValue(temp)) { value.SetNull(); } else { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + value.SetNonNull() = Traits::StorageToWorking(temp); } return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31700,26 +33663,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -31729,26 +33694,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -31764,26 +33731,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Messaging::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Messaging::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -31793,26 +33762,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Messaging::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::Messaging::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -31828,26 +33799,28 @@ namespace BasicIdentification { EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } @@ -31889,26 +33862,28 @@ namespace CompanyId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -31950,26 +33925,28 @@ namespace BrandId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32139,26 +34116,28 @@ namespace ProductTypeId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32168,26 +34147,28 @@ namespace CecedSpecificationVersion { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -32197,26 +34178,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -32226,26 +34209,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32292,26 +34277,28 @@ namespace MeterTypeId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32321,26 +34308,28 @@ namespace DataQualityId { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32567,26 +34556,28 @@ namespace AvailablePower { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } @@ -32596,26 +34587,28 @@ namespace PowerThreshold { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } @@ -32625,26 +34618,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -32654,26 +34649,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32689,26 +34686,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceEventsAndAlert::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceEventsAndAlert::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -32718,26 +34717,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceEventsAndAlert::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceEventsAndAlert::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32753,26 +34754,28 @@ namespace LogMaxSize { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -32782,26 +34785,28 @@ namespace LogQueueMaxSize { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -32811,26 +34816,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -32840,26 +34847,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -32875,26 +34884,28 @@ namespace MeasurementType { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -32904,26 +34915,28 @@ namespace DcVoltage { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -32933,26 +34946,28 @@ namespace DcVoltageMin { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -32962,26 +34977,28 @@ namespace DcVoltageMax { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -32991,26 +35008,28 @@ namespace DcCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33020,26 +35039,28 @@ namespace DcCurrentMin { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33049,26 +35070,28 @@ namespace DcCurrentMax { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33078,26 +35101,28 @@ namespace DcPower { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33107,26 +35132,28 @@ namespace DcPowerMin { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33136,26 +35163,28 @@ namespace DcPowerMax { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33165,26 +35194,28 @@ namespace DcVoltageMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33194,26 +35225,28 @@ namespace DcVoltageDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33223,26 +35256,28 @@ namespace DcCurrentMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33252,26 +35287,28 @@ namespace DcCurrentDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33281,26 +35318,28 @@ namespace DcPowerMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33310,26 +35349,28 @@ namespace DcPowerDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33339,26 +35380,28 @@ namespace AcFrequency { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33368,26 +35411,28 @@ namespace AcFrequencyMin { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33397,26 +35442,28 @@ namespace AcFrequencyMax { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33426,26 +35473,28 @@ namespace NeutralCurrent { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33455,26 +35504,28 @@ namespace TotalActivePower { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } @@ -33484,26 +35535,28 @@ namespace TotalReactivePower { EmberAfStatus Get(chip::EndpointId endpoint, int32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } @@ -33513,26 +35566,28 @@ namespace TotalApparentPower { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -33542,26 +35597,28 @@ namespace Measured1stHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33571,26 +35628,28 @@ namespace Measured3rdHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33600,26 +35659,28 @@ namespace Measured5thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33629,26 +35690,28 @@ namespace Measured7thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33658,26 +35721,28 @@ namespace Measured9thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33687,26 +35752,28 @@ namespace Measured11thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33716,26 +35783,28 @@ namespace MeasuredPhase1stHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33745,26 +35814,28 @@ namespace MeasuredPhase3rdHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33774,26 +35845,28 @@ namespace MeasuredPhase5thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33803,26 +35876,28 @@ namespace MeasuredPhase7thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33832,26 +35907,28 @@ namespace MeasuredPhase9thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33861,26 +35938,28 @@ namespace MeasuredPhase11thHarmonicCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -33890,26 +35969,28 @@ namespace AcFrequencyMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33919,26 +36000,28 @@ namespace AcFrequencyDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -33948,26 +36031,28 @@ namespace PowerMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -33977,26 +36062,28 @@ namespace PowerDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } @@ -34006,26 +36093,28 @@ namespace HarmonicCurrentMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -34035,26 +36124,28 @@ namespace PhaseHarmonicCurrentMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -34064,26 +36155,28 @@ namespace InstantaneousVoltage { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34093,26 +36186,28 @@ namespace InstantaneousLineCurrent { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34122,26 +36217,28 @@ namespace InstantaneousActiveCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34151,26 +36248,28 @@ namespace InstantaneousReactiveCurrent { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34180,26 +36279,28 @@ namespace InstantaneousPower { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34209,26 +36310,28 @@ namespace RmsVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34238,26 +36341,28 @@ namespace RmsVoltageMin { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34267,26 +36372,28 @@ namespace RmsVoltageMax { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34296,26 +36403,28 @@ namespace RmsCurrent { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34325,26 +36434,28 @@ namespace RmsCurrentMin { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34354,26 +36465,28 @@ namespace RmsCurrentMax { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34383,26 +36496,28 @@ namespace ActivePower { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34412,26 +36527,28 @@ namespace ActivePowerMin { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34441,26 +36558,28 @@ namespace ActivePowerMax { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34470,26 +36589,28 @@ namespace ReactivePower { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34499,26 +36620,28 @@ namespace ApparentPower { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34528,26 +36651,28 @@ namespace PowerFactor { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -34557,26 +36682,28 @@ namespace AverageRmsVoltageMeasurementPeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34586,26 +36713,28 @@ namespace AverageRmsUnderVoltageCounter { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34615,26 +36744,28 @@ namespace RmsExtremeOverVoltagePeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34644,26 +36775,28 @@ namespace RmsExtremeUnderVoltagePeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34673,26 +36806,28 @@ namespace RmsVoltageSagPeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34702,26 +36837,28 @@ namespace RmsVoltageSwellPeriod { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34731,26 +36868,28 @@ namespace AcVoltageMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34760,26 +36899,28 @@ namespace AcVoltageDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34789,26 +36930,28 @@ namespace AcCurrentMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34818,26 +36961,28 @@ namespace AcCurrentDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34847,26 +36992,28 @@ namespace AcPowerMultiplier { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34876,26 +37023,28 @@ namespace AcPowerDivisor { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -34905,26 +37054,28 @@ namespace OverloadAlarmsMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } @@ -34934,26 +37085,28 @@ namespace VoltageOverload { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34963,26 +37116,28 @@ namespace CurrentOverload { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -34992,26 +37147,28 @@ namespace AcOverloadAlarmsMask { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } @@ -35021,26 +37178,28 @@ namespace AcVoltageOverload { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35050,26 +37209,28 @@ namespace AcCurrentOverload { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35079,26 +37240,28 @@ namespace AcActivePowerOverload { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35108,26 +37271,28 @@ namespace AcReactivePowerOverload { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35137,26 +37302,28 @@ namespace AverageRmsOverVoltage { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35166,26 +37333,28 @@ namespace AverageRmsUnderVoltage { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35195,26 +37364,28 @@ namespace RmsExtremeOverVoltage { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35224,26 +37395,28 @@ namespace RmsExtremeUnderVoltage { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35253,26 +37426,28 @@ namespace RmsVoltageSag { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35282,26 +37457,28 @@ namespace RmsVoltageSwell { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35311,26 +37488,28 @@ namespace LineCurrentPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35340,26 +37519,28 @@ namespace ActiveCurrentPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35369,26 +37550,28 @@ namespace ReactiveCurrentPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35398,26 +37581,28 @@ namespace RmsVoltagePhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35427,26 +37612,28 @@ namespace RmsVoltageMinPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35456,26 +37643,28 @@ namespace RmsVoltageMaxPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35485,26 +37674,28 @@ namespace RmsCurrentPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35514,26 +37705,28 @@ namespace RmsCurrentMinPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35543,26 +37736,28 @@ namespace RmsCurrentMaxPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35572,26 +37767,28 @@ namespace ActivePowerPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35601,26 +37798,28 @@ namespace ActivePowerMinPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35630,26 +37829,28 @@ namespace ActivePowerMaxPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35659,26 +37860,28 @@ namespace ReactivePowerPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -35688,26 +37891,28 @@ namespace ApparentPowerPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35717,26 +37922,28 @@ namespace PowerFactorPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -35746,26 +37953,28 @@ namespace AverageRmsVoltageMeasurementPeriodPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35775,26 +37984,28 @@ namespace AverageRmsOverVoltageCounterPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35804,26 +38015,28 @@ namespace AverageRmsUnderVoltageCounterPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35833,26 +38046,28 @@ namespace RmsExtremeOverVoltagePeriodPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35862,26 +38077,28 @@ namespace RmsExtremeUnderVoltagePeriodPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35891,26 +38108,28 @@ namespace RmsVoltageSagPeriodPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35920,26 +38139,28 @@ namespace RmsVoltageSwellPeriodPhaseB { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35949,26 +38170,28 @@ namespace LineCurrentPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -35978,26 +38201,28 @@ namespace ActiveCurrentPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -36007,26 +38232,28 @@ namespace ReactiveCurrentPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -36036,26 +38263,28 @@ namespace RmsVoltagePhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36065,26 +38294,28 @@ namespace RmsVoltageMinPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36094,26 +38325,28 @@ namespace RmsVoltageMaxPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36123,26 +38356,28 @@ namespace RmsCurrentPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36152,26 +38387,28 @@ namespace RmsCurrentMinPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36181,26 +38418,28 @@ namespace RmsCurrentMaxPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36210,26 +38449,28 @@ namespace ActivePowerPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -36239,26 +38480,28 @@ namespace ActivePowerMinPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -36268,26 +38511,28 @@ namespace ActivePowerMaxPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -36297,26 +38542,28 @@ namespace ReactivePowerPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } @@ -36326,26 +38573,28 @@ namespace ApparentPowerPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36355,26 +38604,28 @@ namespace PowerFactorPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } @@ -36384,26 +38635,28 @@ namespace AverageRmsVoltageMeasurementPeriodPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36413,26 +38666,28 @@ namespace AverageRmsOverVoltageCounterPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36442,26 +38697,28 @@ namespace AverageRmsUnderVoltageCounterPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36471,26 +38728,28 @@ namespace RmsExtremeOverVoltagePeriodPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36500,26 +38759,28 @@ namespace RmsExtremeUnderVoltagePeriodPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36529,26 +38790,28 @@ namespace RmsVoltageSagPeriodPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36558,26 +38821,28 @@ namespace RmsVoltageSwellPeriodPhaseC { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -36587,26 +38852,28 @@ namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } @@ -36616,26 +38883,28 @@ namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 7689238c2b271c..c754b35ef24ad8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -24,6 +24,7 @@ #pragma once +#include #include #include #include @@ -606,28 +607,28 @@ namespace OnLevel { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace OnLevel namespace OnTransitionTime { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace OnTransitionTime namespace OffTransitionTime { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace OffTransitionTime namespace DefaultMoveRate { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace DefaultMoveRate namespace StartUpCurrentLevel { @@ -1432,8 +1433,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace InterfaceEnabled namespace LastNetworkingStatus { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // NetworkCommissioningStatus -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatus * value); // NetworkCommissioningStatus +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatus value); } // namespace LastNetworkingStatus namespace LastNetworkID { @@ -2398,15 +2400,17 @@ namespace DoorLock { namespace Attributes { namespace LockState { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // DlLockState -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // DlLockState +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); } // namespace LockState namespace LockType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // DlLockType -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value); // DlLockType +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value); } // namespace LockType namespace ActuatorEnabled { @@ -2415,10 +2419,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace ActuatorEnabled namespace DoorState { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // DlDoorState -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // DlDoorState +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlDoorState value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); } // namespace DoorState namespace DoorOpenEvents { @@ -2522,8 +2528,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace SoundVolume namespace OperatingMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // DlOperatingMode -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlOperatingMode * value); // DlOperatingMode +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlOperatingMode value); } // namespace OperatingMode namespace SupportedOperatingModes { @@ -2953,7 +2959,7 @@ namespace LifetimeRunningHours { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LifetimeRunningHours namespace Power { @@ -2965,7 +2971,7 @@ namespace LifetimeEnergyConsumed { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LifetimeEnergyConsumed namespace OperationMode { @@ -3719,21 +3725,21 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MeasuredValue namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MinMeasuredValue namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace MaxMeasuredValue namespace Tolerance { @@ -3745,7 +3751,7 @@ namespace LightSensorType { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LightSensorType namespace FeatureMap { @@ -5615,8 +5621,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorId namespace EnumAttr { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // SimpleEnum -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum * value); // SimpleEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value); } // namespace EnumAttr namespace RangeRestrictedInt8u { @@ -5653,224 +5659,226 @@ namespace NullableBoolean { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean EmberAfStatus Set(chip::EndpointId endpoint, bool value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableBoolean namespace NullableBitmap8 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableBitmap8 namespace NullableBitmap16 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap16 EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableBitmap16 namespace NullableBitmap32 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableBitmap32 namespace NullableBitmap64 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap64 EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableBitmap64 namespace NullableInt8u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt8u namespace NullableInt16u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt16u namespace NullableInt24u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt24u namespace NullableInt32u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt32u namespace NullableInt40u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int40u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt40u namespace NullableInt48u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int48u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt48u namespace NullableInt56u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int56u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt56u namespace NullableInt64u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt64u namespace NullableInt8s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt8s namespace NullableInt16s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt16s namespace NullableInt24s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24s EmberAfStatus Set(chip::EndpointId endpoint, int32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt24s namespace NullableInt32s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32s EmberAfStatus Set(chip::EndpointId endpoint, int32_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt32s namespace NullableInt40s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int40s EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt40s namespace NullableInt48s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int48s EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt48s namespace NullableInt56s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int56s EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt56s namespace NullableInt64s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64s EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableInt64s namespace NullableEnum8 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableEnum8 namespace NullableEnum16 { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum16 EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableEnum16 namespace NullableFloatSingle { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single EmberAfStatus Set(chip::EndpointId endpoint, float value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableFloatSingle namespace NullableFloatDouble { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // double EmberAfStatus Set(chip::EndpointId endpoint, double value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableFloatDouble namespace NullableOctetString { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableOctetString namespace NullableCharString { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableCharString namespace NullableEnumAttr { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // SimpleEnum -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // SimpleEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::TestCluster::SimpleEnum value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); } // namespace NullableEnumAttr namespace NullableRangeRestrictedInt8u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableRangeRestrictedInt8u namespace NullableRangeRestrictedInt8s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableRangeRestrictedInt8s namespace NullableRangeRestrictedInt16u { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableRangeRestrictedInt16u namespace NullableRangeRestrictedInt16s { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace NullableRangeRestrictedInt16s namespace FeatureMap {