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 803cda80946dc8..4a43ca6adbed87 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -20,13 +20,11 @@ namespace Clusters { {{#zcl_clusters}} {{#zcl_attributes_server}} -{{#if (hasSpecificAttributes)}} {{#first}} namespace {{asUpperCamelCase parent.label}} { namespace Attributes { {{/first}} -{{#if clusterRef}} {{#if_is_struct type}} {{else if (canHaveSimpleAccessors this)}} namespace {{asUpperCamelCase label}} { @@ -133,13 +131,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable<{{asUnder } // namespace {{asUpperCamelCase label}} {{/if_is_struct}} -{{/if}} {{#last}} } // namespace Attributes } // {{asUpperCamelCase parent.label}} {{/last}} -{{/if}} {{/zcl_attributes_server}} {{/zcl_clusters}} 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 35ed74d7107065..91704ad7829f3c 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 @@ -1694,6 +1694,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) } // namespace Battery3AlarmState +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace PowerConfiguration @@ -1979,6 +2037,68 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) } // namespace HighTempDwellTripPoint +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DeviceTemperatureConfiguration::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace DeviceTemperatureConfiguration @@ -2043,6 +2163,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace IdentifyType +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace Identify @@ -2078,6 +2256,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace NameSupport +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace Groups @@ -2258,48 +2494,106 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) } // namespace LastConfiguredBy -} // namespace Attributes -} // namespace Scenes - -namespace OnOff { -namespace Attributes { - -namespace OnOff { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace OnOff +} // namespace FeatureMap -namespace GlobalSceneControl { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Scenes + +namespace OnOff { +namespace Attributes { + +namespace OnOff { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace OnOff + +namespace GlobalSceneControl { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) { @@ -2409,6 +2703,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace StartUpOnOff +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace OnOff @@ -2473,6 +2825,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace SwitchActions +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace OnOffSwitchConfiguration @@ -2969,6 +3379,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace StartUpCurrentLevel +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace LevelControl @@ -3004,19 +3472,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace AlarmCount -} // namespace Attributes -} // namespace Alarms - -namespace Time { -namespace Attributes { - -namespace Time { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(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)) { @@ -3034,39 +3496,103 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Alarms::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Time +} // namespace FeatureMap -namespace TimeStatus { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Time::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); -} - -} // namespace TimeStatus + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Alarms::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Alarms + +namespace Time { +namespace Attributes { + +namespace Time { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +} // namespace Time + +namespace TimeStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace TimeStatus namespace TimeZone { @@ -3300,6 +3826,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) } // namespace ValidUntilTime +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Time::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace Time @@ -3570,6 +4154,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) } // namespace ApplicationType +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace BinaryInputBasic @@ -3721,6 +4363,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace ScheduleMode +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerProfile::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace PowerProfile @@ -3814,31 +4514,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace RemainingTime -} // namespace Attributes -} // namespace ApplianceControl - -namespace Descriptor { -namespace Attributes { - -} // namespace Attributes -} // namespace Descriptor - -namespace AccessControl { -namespace Attributes { - -} // namespace Attributes -} // namespace AccessControl - -namespace PollControl { -namespace Attributes { - -namespace CheckInInterval { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(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)) { @@ -3856,76 +4538,82 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CheckInInterval +} // namespace FeatureMap -namespace LongPollInterval { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LongPollInterval +} // namespace ClusterRevision -namespace ShortPollInterval { +} // namespace Attributes +} // namespace ApplianceControl -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace PulseWidthModulation { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ShortPollInterval +} // namespace FeatureMap -namespace FastPollTimeout { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(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)) { @@ -3943,18 +4631,24 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FastPollTimeout +} // namespace ClusterRevision -namespace CheckInIntervalMin { +} // namespace Attributes +} // namespace PulseWidthModulation + +namespace Descriptor { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(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)) { @@ -3972,18 +4666,53 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Descriptor::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CheckInIntervalMin +} // namespace FeatureMap -namespace LongPollIntervalMin { +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Descriptor::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Descriptor + +namespace Binding { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(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)) { @@ -4001,18 +4730,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace LongPollIntervalMin +} // namespace FeatureMap -namespace FastPollTimeoutMax { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(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)) { @@ -4030,60 +4759,53 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FastPollTimeoutMax +} // namespace ClusterRevision } // namespace Attributes -} // namespace PollControl +} // namespace Binding -namespace BridgedActions { +namespace AccessControl { namespace Attributes { -namespace SetupUrl { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[512 + 2]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AccessControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfLongStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 512, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[2], 512); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 512, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[512 + 2]; - emberAfCopyInt16u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace SetupUrl - -} // namespace Attributes -} // namespace BridgedActions - -namespace Basic { -namespace Attributes { +} // namespace FeatureMap -namespace InteractionModelVersion { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(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)) { @@ -4101,107 +4823,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace InteractionModelVersion +} // namespace ClusterRevision -namespace VendorName { +} // namespace Attributes +} // namespace AccessControl -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +namespace PollControl { +namespace Attributes { + +namespace CheckInInterval { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace VendorName +} // namespace CheckInInterval -namespace VendorID { +namespace LongPollInterval { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace VendorID +} // namespace LongPollInterval -namespace ProductName { +namespace ShortPollInterval { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ProductName +} // namespace ShortPollInterval -namespace ProductID { +namespace FastPollTimeout { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(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)) { @@ -4219,78 +4945,134 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ProductID +} // namespace FastPollTimeout -namespace NodeLabel { +namespace CheckInIntervalMin { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); +} // namespace CheckInIntervalMin + +namespace LongPollIntervalMin { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace NodeLabel +} // namespace LongPollIntervalMin -namespace Location { +namespace FastPollTimeoutMax { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[2 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PollControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} - VerifyOrReturnError(value.size() == 2, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 2); - value.reduce_size(length); +} // namespace FastPollTimeoutMax + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(2 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 2, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[2 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Location +} // namespace FeatureMap -namespace HardwareVersion { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(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)) { @@ -4308,48 +5090,54 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PollControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace HardwareVersion +} // namespace ClusterRevision -namespace HardwareVersionString { +} // namespace Attributes +} // namespace PollControl + +namespace BridgedActions { +namespace Attributes { + +namespace SetupUrl { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + uint8_t zclString[512 + 2]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + size_t length = emberAfLongStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); + VerifyOrReturnError(value.size() == 512, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[2], 512); value.reduce_size(length); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 512, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[512 + 2]; + emberAfCopyInt16u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace HardwareVersionString +} // namespace SetupUrl -namespace SoftwareVersion { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(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)) { @@ -4367,72 +5155,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace SoftwareVersion +} // namespace FeatureMap -namespace SoftwareVersionString { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedActions::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SoftwareVersionString +} // namespace ClusterRevision -namespace ManufacturingDate { +} // namespace Attributes +} // namespace BridgedActions -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +namespace Basic { +namespace Attributes { + +namespace InteractionModelVersion { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[16 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ManufacturingDate +} // namespace InteractionModelVersion -namespace PartNumber { +namespace VendorName { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { @@ -4460,69 +5252,38 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace PartNumber +} // namespace VendorName -namespace ProductURL { +namespace VendorID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[256 + 2]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfLongStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 256, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[2], 256); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 256, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[256 + 2]; - emberAfCopyInt16u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace ProductURL - -namespace ProductLabel { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ProductLabel +} // namespace VendorID -namespace SerialNumber { +namespace ProductName { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { @@ -4550,67 +5311,38 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace SerialNumber - -namespace LocalConfigDisabled { - -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, bool value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); -} - -} // namespace LocalConfigDisabled +} // namespace ProductName -namespace Reachable { +namespace ProductID { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Reachable +} // namespace ProductID -namespace UniqueID { +namespace NodeLabel { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { @@ -4638,21 +5370,14 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace UniqueID - -} // namespace Attributes -} // namespace Basic - -namespace OtaSoftwareUpdateRequestor { -namespace Attributes { +} // namespace NodeLabel -namespace DefaultOtaProvider { +namespace Location { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - uint8_t zclString[16 + 1]; - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, zclString, sizeof(zclString)); + uint8_t zclString[2 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); size_t length = emberAfStringLength(zclString); if (length == NumericAttributeTraits::kNullValue) @@ -4660,131 +5385,117 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); + VerifyOrReturnError(value.size() == 2, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 2); value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; + static_assert(2 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 2, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[2 + 1]; emberAfCopyInt8u(zclString, 0, static_cast(value.size())); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, zclString, - ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace DefaultOtaProvider +} // namespace Location -namespace UpdatePossible { +namespace HardwareVersion { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, - ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace UpdatePossible - -} // namespace Attributes -} // namespace OtaSoftwareUpdateRequestor - -namespace PowerSourceConfiguration { -namespace Attributes { - -} // namespace Attributes -} // namespace PowerSourceConfiguration - -namespace PowerSource { -namespace Attributes { +} // namespace HardwareVersion -namespace Status { +namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace Status +} // namespace HardwareVersionString -namespace Order { +namespace SoftwareVersion { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Order +} // namespace SoftwareVersion -namespace Description { +namespace SoftwareVersionString { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - uint8_t zclString[60 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); size_t length = emberAfStringLength(zclString); if (length == NumericAttributeTraits::kNullValue) @@ -4792,204 +5503,209 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 60, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 60); + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); value.reduce_size(length); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 60, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[60 + 1]; + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; emberAfCopyInt8u(zclString, 0, static_cast(value.size())); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace Description +} // namespace SoftwareVersionString -namespace WiredAssessedInputVoltage { +namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace WiredAssessedInputVoltage +} // namespace ManufacturingDate -namespace WiredAssessedInputFrequency { +namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace WiredAssessedInputFrequency +} // namespace PartNumber -namespace WiredCurrentType { +namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[256 + 2]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfLongStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 256, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[2], 256); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 256, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[256 + 2]; + emberAfCopyInt16u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace WiredCurrentType +} // namespace ProductURL -namespace WiredAssessedCurrent { +namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace WiredAssessedCurrent +} // namespace ProductLabel -namespace WiredNominalVoltage { +namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace WiredNominalVoltage +} // namespace SerialNumber -namespace WiredMaximumCurrent { +namespace LocalConfigDisabled { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace WiredMaximumCurrent +} // namespace LocalConfigDisabled -namespace WiredPresent { +namespace Reachable { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(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)) { @@ -5007,18 +5723,48 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace WiredPresent +} // namespace Reachable -namespace BatteryVoltage { +namespace UniqueID { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace UniqueID + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(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)) { @@ -5036,47 +5782,54 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryVoltage +} // namespace FeatureMap -namespace BatteryPercentRemaining { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Basic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BatteryPercentRemaining +} // namespace ClusterRevision -namespace BatteryTimeRemaining { +} // namespace Attributes +} // namespace Basic + +namespace OtaSoftwareUpdateProvider { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -5094,105 +5847,88 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryTimeRemaining +} // namespace FeatureMap -namespace BatteryChargeLevel { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BatteryChargeLevel - -namespace BatteryReplacementNeeded { +} // namespace ClusterRevision -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, bool value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); -} +} // namespace Attributes +} // namespace OtaSoftwareUpdateProvider -} // namespace BatteryReplacementNeeded +namespace OtaSoftwareUpdateRequestor { +namespace Attributes { -namespace BatteryReplaceability { +namespace DefaultOtaProvider { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t zclString[16 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, zclString, + ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -} // namespace BatteryReplaceability +} // namespace DefaultOtaProvider -namespace BatteryPresent { +namespace UpdatePossible { EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -5210,48 +5946,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); -} - -} // namespace BatteryPresent - -namespace BatteryReplacementDescription { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) -{ - uint8_t zclString[60 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 60, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 60); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 60, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[60 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace BatteryReplacementDescription +} // namespace UpdatePossible -namespace BatteryCommonDesignation { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -5269,78 +5977,56 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryCommonDesignation +} // namespace FeatureMap -namespace BatteryANSIDesignation { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[20 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 20, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 20); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 20, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[20 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace BatteryANSIDesignation - -namespace BatteryIECDesignation { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - uint8_t zclString[20 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 20, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 20); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 20, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[20 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BatteryIECDesignation +} // namespace ClusterRevision -namespace BatteryApprovedChemistry { +} // namespace Attributes +} // namespace OtaSoftwareUpdateRequestor + +namespace LocalizationConfiguration { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -5358,105 +6044,119 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryApprovedChemistry +} // namespace FeatureMap -namespace BatteryCapacity { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BatteryCapacity +} // namespace ClusterRevision -namespace BatteryQuantity { +} // namespace Attributes +} // namespace LocalizationConfiguration -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace LocalizationTimeFormat { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationTimeFormat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryQuantity +} // namespace FeatureMap -namespace BatteryChargeState { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationTimeFormat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BatteryChargeState +} // namespace ClusterRevision -namespace BatteryTimeToFullCharge { +} // namespace Attributes +} // namespace LocalizationTimeFormat + +namespace LocalizationUnit { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(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)) { @@ -5474,47 +6174,53 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationUnit::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryTimeToFullCharge +} // namespace FeatureMap -namespace BatteryFunctionalWhileCharging { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LocalizationUnit::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BatteryFunctionalWhileCharging +} // namespace ClusterRevision -namespace BatteryChargingCurrent { +} // namespace Attributes +} // namespace LocalizationUnit + +namespace PowerSourceConfiguration { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(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)) { @@ -5532,53 +6238,53 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BatteryChargingCurrent - -} // namespace Attributes -} // namespace PowerSource +} // namespace FeatureMap -namespace GeneralCommissioning { -namespace Attributes { - -namespace Breadcrumb { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Breadcrumb +} // namespace ClusterRevision -namespace RegulatoryConfig { +} // namespace Attributes +} // namespace PowerSourceConfiguration + +namespace PowerSource { +namespace Attributes { + +namespace Status { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(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)) { @@ -5596,18 +6302,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace RegulatoryConfig +} // namespace Status -namespace LocationCapability { +namespace Order { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(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)) { @@ -5625,82 +6331,48 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace LocationCapability - -} // namespace Attributes -} // namespace GeneralCommissioning - -namespace GeneralDiagnostics { -namespace Attributes { +} // namespace Order -namespace RebootCount { +namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); + uint8_t zclString[60 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RebootCount - -namespace UpTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); + VerifyOrReturnError(value.size() == 60, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 60); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 60, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[60 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace UpTime +} // namespace Description -namespace TotalOperationalHours { +namespace WiredAssessedInputVoltage { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(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)) { @@ -5718,27 +6390,56 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace TotalOperationalHours +} // namespace WiredAssessedInputVoltage -namespace BootReasons { +namespace WiredAssessedInputFrequency { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace WiredAssessedInputFrequency + +namespace WiredCurrentType { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { @@ -5747,146 +6448,163 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace BootReasons - -} // namespace Attributes -} // namespace GeneralDiagnostics - -namespace SoftwareDiagnostics { -namespace Attributes { +} // namespace WiredCurrentType -namespace CurrentHeapFree { +namespace WiredAssessedCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CurrentHeapFree +} // namespace WiredAssessedCurrent -namespace CurrentHeapUsed { +namespace WiredNominalVoltage { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CurrentHeapUsed +} // namespace WiredNominalVoltage -namespace CurrentHeapHighWatermark { +namespace WiredMaximumCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CurrentHeapHighWatermark +} // namespace WiredMaximumCurrent -} // namespace Attributes -} // namespace SoftwareDiagnostics +namespace WiredPresent { -namespace ThreadNetworkDiagnostics { -namespace Attributes { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} -namespace Channel { +} // namespace WiredPresent -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace BatteryVoltage { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Channel +} // namespace BatteryVoltage -namespace RoutingRole { +namespace BatteryPercentRemaining { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -5904,108 +6622,162 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RoutingRole +} // namespace BatteryPercentRemaining -namespace NetworkName { +namespace BatteryTimeRemaining { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[16 + 1]; - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, - ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace NetworkName +} // namespace BatteryTimeRemaining -namespace PanId { +namespace BatteryChargeLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace PanId +} // namespace BatteryChargeLevel -namespace ExtendedPanId { +namespace BatteryReplacementNeeded { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace ExtendedPanId +} // namespace BatteryReplacementNeeded -namespace MeshLocalPrefix { +namespace BatteryReplaceability { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - uint8_t zclString[17 + 1]; - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace BatteryReplaceability + +namespace BatteryPresent { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace BatteryPresent + +namespace BatteryReplacementDescription { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[60 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); size_t length = emberAfStringLength(zclString); if (length == NumericAttributeTraits::kNullValue) @@ -6013,60 +6785,119 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 17, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 17); + VerifyOrReturnError(value.size() == 60, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 60); value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(17 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 17, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[17 + 1]; + static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 60, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[60 + 1]; emberAfCopyInt8u(zclString, 0, static_cast(value.size())); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, - ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace MeshLocalPrefix +} // namespace BatteryReplacementDescription -namespace OverrunCount { +namespace BatteryCommonDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace OverrunCount +} // namespace BatteryCommonDesignation -namespace PartitionId { +namespace BatteryANSIDesignation { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[20 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 20, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 20); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 20, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[20 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace BatteryANSIDesignation + +namespace BatteryIECDesignation { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[20 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 20, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 20); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 20, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[20 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace BatteryIECDesignation + +namespace BatteryApprovedChemistry { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6084,47 +6915,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PartitionId +} // namespace BatteryApprovedChemistry -namespace Weighting { +namespace BatteryCapacity { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Weighting +} // namespace BatteryCapacity -namespace DataVersion { +namespace BatteryQuantity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6142,18 +6973,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace DataVersion +} // namespace BatteryQuantity -namespace StableDataVersion { +namespace BatteryChargeState { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6171,134 +7002,134 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace StableDataVersion +} // namespace BatteryChargeState -namespace LeaderRouterId { +namespace BatteryTimeToFullCharge { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace LeaderRouterId +} // namespace BatteryTimeToFullCharge -namespace DetachedRoleCount { +namespace BatteryFunctionalWhileCharging { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace DetachedRoleCount +} // namespace BatteryFunctionalWhileCharging -namespace ChildRoleCount { +namespace BatteryChargingCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace ChildRoleCount +} // namespace BatteryChargingCurrent -namespace RouterRoleCount { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace RouterRoleCount +} // namespace FeatureMap -namespace LeaderRoleCount { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6316,105 +7147,140 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LeaderRoleCount +} // namespace ClusterRevision -namespace AttachAttemptCount { +} // namespace Attributes +} // namespace PowerSource -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace GeneralCommissioning { +namespace Attributes { + +namespace Breadcrumb { + +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace AttachAttemptCount +} // namespace Breadcrumb -namespace PartitionIdChangeCount { +namespace RegulatoryConfig { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace PartitionIdChangeCount +} // namespace RegulatoryConfig -namespace BetterPartitionAttachAttemptCount { +namespace LocationCapability { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace BetterPartitionAttachAttemptCount +} // namespace LocationCapability -namespace ParentChangeCount { +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6432,18 +7298,24 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ParentChangeCount +} // namespace ClusterRevision -namespace TxTotalCount { +} // namespace Attributes +} // namespace GeneralCommissioning + +namespace NetworkCommissioning { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6461,47 +7333,53 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace TxTotalCount +} // namespace FeatureMap -namespace TxUnicastCount { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace TxUnicastCount +} // namespace ClusterRevision -namespace TxBroadcastCount { +} // namespace Attributes +} // namespace NetworkCommissioning + +namespace DiagnosticLogs { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6519,105 +7397,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace TxBroadcastCount +} // namespace FeatureMap -namespace TxAckRequestedCount { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace TxAckRequestedCount +} // namespace ClusterRevision -namespace TxAckedCount { +} // namespace Attributes +} // namespace DiagnosticLogs -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +namespace GeneralDiagnostics { +namespace Attributes { + +namespace RebootCount { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace TxAckedCount +} // namespace RebootCount -namespace TxNoAckRequestedCount { +namespace UpTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace TxNoAckRequestedCount +} // namespace UpTime -namespace TxDataCount { +namespace TotalOperationalHours { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6635,47 +7519,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace TxDataCount +} // namespace TotalOperationalHours -namespace TxDataPollCount { +namespace BootReasons { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace TxDataPollCount +} // namespace BootReasons -namespace TxBeaconCount { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6693,134 +7577,140 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace TxBeaconCount +} // namespace FeatureMap -namespace TxBeaconRequestCount { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace TxBeaconRequestCount +} // namespace ClusterRevision -namespace TxOtherCount { +} // namespace Attributes +} // namespace GeneralDiagnostics -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +namespace SoftwareDiagnostics { +namespace Attributes { + +namespace CurrentHeapFree { + +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace TxOtherCount +} // namespace CurrentHeapFree -namespace TxRetryCount { +namespace CurrentHeapUsed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace TxRetryCount +} // namespace CurrentHeapUsed -namespace TxDirectMaxRetryExpiryCount { +namespace CurrentHeapHighWatermark { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace TxDirectMaxRetryExpiryCount + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); +} -namespace TxIndirectMaxRetryExpiryCount { +} // namespace CurrentHeapHighWatermark + +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -6838,244 +7728,256 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace TxIndirectMaxRetryExpiryCount +} // namespace FeatureMap -namespace TxErrCcaCount { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace TxErrCcaCount +} // namespace ClusterRevision -namespace TxErrAbortCount { +} // namespace Attributes +} // namespace SoftwareDiagnostics -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +namespace ThreadNetworkDiagnostics { +namespace Attributes { + +namespace Channel { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace TxErrAbortCount +} // namespace Channel -namespace TxErrBusyChannelCount { +namespace RoutingRole { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace TxErrBusyChannelCount +} // namespace RoutingRole -namespace RxTotalCount { +namespace NetworkName { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + uint8_t zclString[16 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, + ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -} // namespace RxTotalCount +} // namespace NetworkName -namespace RxUnicastCount { +namespace PanId { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxUnicastCount +} // namespace PanId -namespace RxBroadcastCount { +namespace ExtendedPanId { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace RxBroadcastCount +} // namespace ExtendedPanId -namespace RxDataCount { +namespace MeshLocalPrefix { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + uint8_t zclString[17 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 17, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 17); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + static_assert(17 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 17, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[17 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, + ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -} // namespace RxDataCount +} // namespace MeshLocalPrefix -namespace RxDataPollCount { +namespace OverrunCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace RxDataPollCount +} // namespace OverrunCount -namespace RxBeaconCount { +namespace PartitionId { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { @@ -7102,386 +8004,386 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace RxBeaconCount +} // namespace PartitionId -namespace RxBeaconRequestCount { +namespace Weighting { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RxBeaconRequestCount +} // namespace Weighting -namespace RxOtherCount { +namespace DataVersion { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RxOtherCount +} // namespace DataVersion -namespace RxAddressFilteredCount { +namespace StableDataVersion { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RxAddressFilteredCount +} // namespace StableDataVersion -namespace RxDestAddrFilteredCount { +namespace LeaderRouterId { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RxDestAddrFilteredCount +} // namespace LeaderRouterId -namespace RxDuplicatedCount { +namespace DetachedRoleCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxDuplicatedCount +} // namespace DetachedRoleCount -namespace RxErrNoFrameCount { +namespace ChildRoleCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxErrNoFrameCount +} // namespace ChildRoleCount -namespace RxErrUnknownNeighborCount { +namespace RouterRoleCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxErrUnknownNeighborCount +} // namespace RouterRoleCount -namespace RxErrInvalidSrcAddrCount { +namespace LeaderRoleCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxErrInvalidSrcAddrCount +} // namespace LeaderRoleCount -namespace RxErrSecCount { +namespace AttachAttemptCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxErrSecCount +} // namespace AttachAttemptCount -namespace RxErrFcsCount { +namespace PartitionIdChangeCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxErrFcsCount +} // namespace PartitionIdChangeCount -namespace RxErrOtherCount { +namespace BetterPartitionAttachAttemptCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RxErrOtherCount +} // namespace BetterPartitionAttachAttemptCount -namespace ActiveTimestamp { +namespace ParentChangeCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ActiveTimestamp +} // namespace ParentChangeCount -namespace PendingTimestamp { +namespace TxTotalCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PendingTimestamp +} // namespace TxTotalCount -namespace Delay { +namespace TxUnicastCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { @@ -7508,201 +8410,160 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Delay +} // namespace TxUnicastCount -namespace ChannelMask { +namespace TxBroadcastCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[4 + 1]; - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 4, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 4); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(4 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 4, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[4 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, - ZCL_OCTET_STRING_ATTRIBUTE_TYPE); -} - -} // namespace ChannelMask - -} // namespace Attributes -} // namespace ThreadNetworkDiagnostics - -namespace WiFiNetworkDiagnostics { -namespace Attributes { - -namespace Bssid { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - uint8_t zclString[6 + 1]; - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 6, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 6); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(6 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 6, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[6 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, zclString, - ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Bssid +} // namespace TxBroadcastCount -namespace SecurityType { +namespace TxAckRequestedCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace SecurityType +} // namespace TxAckRequestedCount -namespace WiFiVersion { +namespace TxAckedCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace WiFiVersion +} // namespace TxAckedCount -namespace ChannelNumber { +namespace TxNoAckRequestedCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace ChannelNumber +} // namespace TxNoAckRequestedCount -namespace Rssi { +namespace TxDataCount { -EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Rssi +} // namespace TxDataCount -namespace BeaconLostCount { +namespace TxDataPollCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -7720,18 +8581,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace BeaconLostCount +} // namespace TxDataPollCount -namespace BeaconRxCount { +namespace TxBeaconCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -7749,18 +8610,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace BeaconRxCount +} // namespace TxBeaconCount -namespace PacketMulticastRxCount { +namespace TxBeaconRequestCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -7778,18 +8639,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PacketMulticastRxCount +} // namespace TxBeaconRequestCount -namespace PacketMulticastTxCount { +namespace TxOtherCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -7807,18 +8668,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PacketMulticastTxCount +} // namespace TxOtherCount -namespace PacketUnicastRxCount { +namespace TxRetryCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -7836,18 +8697,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PacketUnicastRxCount +} // namespace TxRetryCount -namespace PacketUnicastTxCount { +namespace TxDirectMaxRetryExpiryCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(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)) { @@ -7865,538 +8726,511 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PacketUnicastTxCount +} // namespace TxDirectMaxRetryExpiryCount -namespace CurrentMaxRate { +namespace TxIndirectMaxRetryExpiryCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CurrentMaxRate +} // namespace TxIndirectMaxRetryExpiryCount -namespace OverrunCount { +namespace TxErrCcaCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace OverrunCount - -} // namespace Attributes -} // namespace WiFiNetworkDiagnostics - -namespace EthernetNetworkDiagnostics { -namespace Attributes { +} // namespace TxErrCcaCount -namespace PHYRate { +namespace TxErrAbortCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PHYRate +} // namespace TxErrAbortCount -namespace FullDuplex { +namespace TxErrBusyChannelCount { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, - ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace FullDuplex +} // namespace TxErrBusyChannelCount -namespace PacketRxCount { +namespace RxTotalCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PacketRxCount +} // namespace RxTotalCount -namespace PacketTxCount { +namespace RxUnicastCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PacketTxCount +} // namespace RxUnicastCount -namespace TxErrCount { +namespace RxBroadcastCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace TxErrCount +} // namespace RxBroadcastCount -namespace CollisionCount { +namespace RxDataCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CollisionCount +} // namespace RxDataCount -namespace OverrunCount { +namespace RxDataPollCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace OverrunCount +} // namespace RxDataPollCount -namespace CarrierDetect { +namespace RxBeaconCount { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, - ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CarrierDetect +} // namespace RxBeaconCount -namespace TimeSinceReset { +namespace RxBeaconRequestCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace TimeSinceReset - -} // namespace Attributes -} // namespace EthernetNetworkDiagnostics - -namespace BridgedDeviceBasic { -namespace Attributes { +} // namespace RxBeaconRequestCount -namespace VendorName { +namespace RxOtherCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace VendorName +} // namespace RxOtherCount -namespace VendorID { +namespace RxAddressFilteredCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace VendorID +} // namespace RxAddressFilteredCount -namespace ProductName { +namespace RxDestAddrFilteredCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace ProductName +} // namespace RxDestAddrFilteredCount -namespace NodeLabel { +namespace RxDuplicatedCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace NodeLabel - -namespace HardwareVersion { + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +} // namespace RxDuplicatedCount + +namespace RxErrNoFrameCount { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace HardwareVersion +} // namespace RxErrNoFrameCount -namespace HardwareVersionString { +namespace RxErrUnknownNeighborCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace HardwareVersionString +} // namespace RxErrUnknownNeighborCount -namespace SoftwareVersion { +namespace RxErrInvalidSrcAddrCount { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(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)) { @@ -8414,227 +9248,192 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace SoftwareVersion +} // namespace RxErrInvalidSrcAddrCount -namespace SoftwareVersionString { +namespace RxErrSecCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace SoftwareVersionString +} // namespace RxErrSecCount -namespace ManufacturingDate { +namespace RxErrFcsCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[16 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace ManufacturingDate +} // namespace RxErrFcsCount -namespace PartNumber { +namespace RxErrOtherCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace PartNumber +} // namespace RxErrOtherCount -namespace ProductURL { +namespace ActiveTimestamp { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - uint8_t zclString[256 + 2]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfLongStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 256, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[2], 256); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 256, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[256 + 2]; - emberAfCopyInt16u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, - ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ProductURL +} // namespace ActiveTimestamp -namespace ProductLabel { +namespace PendingTimestamp { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - uint8_t zclString[64 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 64); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[64 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace ProductLabel - -namespace SerialNumber { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) -{ - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace SerialNumber +} // namespace PendingTimestamp -namespace Reachable { +namespace Delay { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace Reachable +} // namespace Delay -namespace UniqueID { +namespace ChannelMask { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + uint8_t zclString[4 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); size_t length = emberAfStringLength(zclString); if (length == NumericAttributeTraits::kNullValue) @@ -8642,130 +9441,127 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); + VerifyOrReturnError(value.size() == 4, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 4); value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; + static_assert(4 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 4, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[4 + 1]; emberAfCopyInt8u(zclString, 0, static_cast(value.size())); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, zclString, + ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -} // namespace UniqueID - -} // namespace Attributes -} // namespace BridgedDeviceBasic - -namespace Switch { -namespace Attributes { +} // namespace ChannelMask -namespace NumberOfPositions { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace NumberOfPositions +} // namespace FeatureMap -namespace CurrentPosition { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CurrentPosition +} // namespace ClusterRevision -namespace MultiPressMax { +} // namespace Attributes +} // namespace ThreadNetworkDiagnostics -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace WiFiNetworkDiagnostics { +namespace Attributes { + +namespace Bssid { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Switch::Id, Id, readable, sizeof(temp)); + uint8_t zclString[6 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 6, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 6); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(6 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 6, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[6 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, zclString, + ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -} // namespace MultiPressMax - -} // namespace Attributes -} // namespace Switch - -namespace AdministratorCommissioning { -namespace Attributes { +} // namespace Bssid -namespace WindowStatus { +namespace SecurityType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -8783,50 +9579,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace WindowStatus +} // namespace SecurityType -namespace AdminFabricIndex { +namespace WiFiVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, - ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace AdminFabricIndex +} // namespace WiFiVersion -namespace AdminVendorId { +namespace ChannelNumber { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -8844,380 +9637,308 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AdminVendorId - -} // namespace Attributes -} // namespace AdministratorCommissioning - -namespace OperationalCredentials { -namespace Attributes { +} // namespace ChannelNumber -namespace SupportedFabrics { +namespace Rssi { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -} // namespace SupportedFabrics +} // namespace Rssi -namespace CommissionedFabrics { +namespace BeaconLostCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CommissionedFabrics +} // namespace BeaconLostCount -namespace CurrentFabricIndex { +namespace BeaconRxCount { -EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CurrentFabricIndex - -} // namespace Attributes -} // namespace OperationalCredentials - -namespace GroupKeyManagement { -namespace Attributes { - -} // namespace Attributes -} // namespace GroupKeyManagement - -namespace FixedLabel { -namespace Attributes { - -} // namespace Attributes -} // namespace FixedLabel - -namespace UserLabel { -namespace Attributes { - -} // namespace Attributes -} // namespace UserLabel - -namespace BooleanState { -namespace Attributes { +} // namespace BeaconRxCount -namespace StateValue { +namespace PacketMulticastRxCount { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BooleanState::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace StateValue - -} // namespace Attributes -} // namespace BooleanState - -namespace ModeSelect { -namespace Attributes { +} // namespace PacketMulticastRxCount -namespace CurrentMode { +namespace PacketMulticastTxCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CurrentMode +} // namespace PacketMulticastTxCount -namespace OnMode { +namespace PacketUnicastRxCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace OnMode +} // namespace PacketUnicastRxCount -namespace StartUpMode { +namespace PacketUnicastTxCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace StartUpMode +} // namespace PacketUnicastTxCount -namespace Description { +namespace CurrentMaxRate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace Description - -} // namespace Attributes -} // namespace ModeSelect +} // namespace CurrentMaxRate -namespace ShadeConfiguration { -namespace Attributes { +namespace OverrunCount { -namespace PhysicalClosedLimit { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace PhysicalClosedLimit - -namespace MotorStepSize { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace MotorStepSize +} // namespace OverrunCount -namespace Status { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Status +} // namespace FeatureMap -namespace ClosedLimit { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(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)) { @@ -9235,18 +9956,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ClosedLimit +} // namespace ClusterRevision -namespace Mode { +} // namespace Attributes +} // namespace WiFiNetworkDiagnostics + +namespace EthernetNetworkDiagnostics { +namespace Attributes { + +namespace PHYRate { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -9264,327 +9992,292 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace Mode - -} // namespace Attributes -} // namespace ShadeConfiguration - -namespace DoorLock { -namespace Attributes { +} // namespace PHYRate -namespace LockState { +namespace FullDuplex { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::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); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace LockState +} // namespace FullDuplex -namespace LockType { +namespace PacketRxCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace LockType +} // namespace PacketRxCount -namespace ActuatorEnabled { +namespace PacketTxCount { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ActuatorEnabled +} // namespace PacketTxCount -namespace DoorState { +namespace TxErrCount { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace DoorState +} // namespace TxErrCount -namespace DoorOpenEvents { +namespace CollisionCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace DoorOpenEvents +} // namespace CollisionCount -namespace DoorClosedEvents { +namespace OverrunCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace DoorClosedEvents +} // namespace OverrunCount -namespace OpenPeriod { +namespace CarrierDetect { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace OpenPeriod +} // namespace CarrierDetect -namespace NumberOfLogRecordsSupported { +namespace TimeSinceReset { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace NumberOfLogRecordsSupported +} // namespace TimeSinceReset -namespace NumberOfTotalUsersSupported { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace NumberOfTotalUsersSupported +} // namespace FeatureMap -namespace NumberOfPINUsersSupported { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -9602,47 +10295,53 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace NumberOfPINUsersSupported +} // namespace ClusterRevision -namespace NumberOfRFIDUsersSupported { +} // namespace Attributes +} // namespace EthernetNetworkDiagnostics -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace TimeSynchronization { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace NumberOfRFIDUsersSupported +} // namespace FeatureMap -namespace NumberOfWeekDaySchedulesSupportedPerUser { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(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)) { @@ -9660,47 +10359,54 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace NumberOfWeekDaySchedulesSupportedPerUser +} // namespace ClusterRevision -namespace NumberOfYearDaySchedulesSupportedPerUser { +} // namespace Attributes +} // namespace TimeSynchronization -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace BridgedDeviceBasic { +namespace Attributes { + +namespace VendorName { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace NumberOfYearDaySchedulesSupportedPerUser +} // namespace VendorName -namespace NumberOfHolidaySchedulesSupported { +namespace VendorID { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(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)) { @@ -9718,191 +10424,195 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace NumberOfHolidaySchedulesSupported +} // namespace VendorID -namespace MaxPINCodeLength { +namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace MaxPINCodeLength +} // namespace ProductName -namespace MinPINCodeLength { +namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace MinPINCodeLength +} // namespace NodeLabel -namespace MaxRFIDCodeLength { +namespace HardwareVersion { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxRFIDCodeLength +} // namespace HardwareVersion -namespace MinRFIDCodeLength { +namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace MinRFIDCodeLength +} // namespace HardwareVersionString -namespace CredentialRulesSupport { +namespace SoftwareVersion { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace CredentialRulesSupport +} // namespace SoftwareVersion -namespace EnableLogging { +namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace EnableLogging +} // namespace SoftwareVersionString -namespace Language { +namespace ManufacturingDate { EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - uint8_t zclString[3 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); size_t length = emberAfStringLength(zclString); if (length == NumericAttributeTraits::kNullValue) @@ -9910,88 +10620,4651 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - VerifyOrReturnError(value.size() == 3, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 3); + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); value.reduce_size(length); return status; } EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - static_assert(3 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 3, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[3 + 1]; + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; emberAfCopyInt8u(zclString, 0, static_cast(value.size())); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace Language +} // namespace ManufacturingDate -namespace LEDSettings { +namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace LEDSettings +} // namespace PartNumber -namespace AutoRelockTime { +namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t zclString[256 + 2]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfLongStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 256, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[2], 256); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 256, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[256 + 2]; + emberAfCopyInt16u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, + ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace ProductURL + +namespace ProductLabel { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[64 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 64, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 64); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[64 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace ProductLabel + +namespace SerialNumber { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace SerialNumber + +namespace Reachable { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace Reachable + +namespace UniqueID { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace UniqueID + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BridgedDeviceBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BridgedDeviceBasic + +namespace Switch { +namespace Attributes { + +namespace NumberOfPositions { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfPositions + +namespace CurrentPosition { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPosition + +namespace MultiPressMax { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MultiPressMax + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Switch + +namespace AdministratorCommissioning { +namespace Attributes { + +namespace WindowStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace WindowStatus + +namespace AdminFabricIndex { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, + ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); +} + +} // namespace AdminFabricIndex + +namespace AdminVendorId { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace AdminVendorId + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace AdministratorCommissioning + +namespace OperationalCredentials { +namespace Attributes { + +namespace SupportedFabrics { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace SupportedFabrics + +namespace CommissionedFabrics { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CommissionedFabrics + +namespace CurrentFabricIndex { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::FabricIndex * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::FabricIndex value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE); +} + +} // namespace CurrentFabricIndex + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OperationalCredentials + +namespace GroupKeyManagement { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GroupKeyManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GroupKeyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace GroupKeyManagement + +namespace FixedLabel { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace FixedLabel + +namespace UserLabel { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace UserLabel + +namespace ProxyConfiguration { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ProxyConfiguration + +namespace ProxyDiscovery { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ProxyDiscovery + +namespace ProxyValid { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ProxyValid + +namespace BooleanState { +namespace Attributes { + +namespace StateValue { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace StateValue + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BooleanState + +namespace ModeSelect { +namespace Attributes { + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace OnMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace StartUpMode + +namespace Description { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Description + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ModeSelect + +namespace ShadeConfiguration { +namespace Attributes { + +namespace PhysicalClosedLimit { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalClosedLimit + +namespace MotorStepSize { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MotorStepSize + +namespace Status { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace Status + +namespace ClosedLimit { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClosedLimit + +namespace Mode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace Mode + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ShadeConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ShadeConfiguration + +namespace DoorLock { +namespace Attributes { + +namespace LockState { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::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); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace LockState + +namespace LockType { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace LockType + +namespace ActuatorEnabled { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace ActuatorEnabled + +namespace DoorState { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::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); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace DoorState + +namespace DoorOpenEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace DoorOpenEvents + +namespace DoorClosedEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace DoorClosedEvents + +namespace OpenPeriod { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace OpenPeriod + +namespace NumberOfLogRecordsSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfLogRecordsSupported + +namespace NumberOfTotalUsersSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfTotalUsersSupported + +namespace NumberOfPINUsersSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfPINUsersSupported + +namespace NumberOfRFIDUsersSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfRFIDUsersSupported + +namespace NumberOfWeekDaySchedulesSupportedPerUser { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfWeekDaySchedulesSupportedPerUser + +namespace NumberOfYearDaySchedulesSupportedPerUser { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfYearDaySchedulesSupportedPerUser + +namespace NumberOfHolidaySchedulesSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfHolidaySchedulesSupported + +namespace MaxPINCodeLength { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MaxPINCodeLength + +namespace MinPINCodeLength { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MinPINCodeLength + +namespace MaxRFIDCodeLength { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MaxRFIDCodeLength + +namespace MinRFIDCodeLength { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace MinRFIDCodeLength + +namespace CredentialRulesSupport { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace CredentialRulesSupport + +namespace EnableLogging { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace EnableLogging + +namespace Language { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[3 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 3, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 3); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(3 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 3, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[3 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace Language + +namespace LEDSettings { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace LEDSettings + +namespace AutoRelockTime { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace AutoRelockTime + +namespace SoundVolume { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace SoundVolume + +namespace OperatingMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace OperatingMode + +namespace SupportedOperatingModes { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace SupportedOperatingModes + +namespace DefaultConfigurationRegister { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace DefaultConfigurationRegister + +namespace EnableLocalProgramming { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace EnableLocalProgramming + +namespace EnableOneTouchLocking { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace EnableOneTouchLocking + +namespace EnableInsideStatusLED { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace EnableInsideStatusLED + +namespace EnablePrivacyModeButton { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace EnablePrivacyModeButton + +namespace LocalProgrammingFeatures { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace LocalProgrammingFeatures + +namespace WrongCodeEntryLimit { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace WrongCodeEntryLimit + +namespace UserCodeTemporaryDisableTime { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace UserCodeTemporaryDisableTime + +namespace SendPINOverTheAir { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace SendPINOverTheAir + +namespace RequirePINforRemoteOperation { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace RequirePINforRemoteOperation + +namespace ExpiringUserTimeout { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ExpiringUserTimeout + +namespace AlarmMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace AlarmMask + +namespace KeypadOperationEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace KeypadOperationEventMask + +namespace RemoteOperationEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace RemoteOperationEventMask + +namespace ManualOperationEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace ManualOperationEventMask + +namespace RFIDOperationEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace RFIDOperationEventMask + +namespace KeypadProgrammingEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace KeypadProgrammingEventMask + +namespace RemoteProgrammingEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace RemoteProgrammingEventMask + +namespace RFIDProgrammingEventMask { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace RFIDProgrammingEventMask + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DoorLock + +namespace WindowCovering { +namespace Attributes { + +namespace Type { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace Type + +namespace PhysicalClosedLimitLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalClosedLimitLift + +namespace PhysicalClosedLimitTilt { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalClosedLimitTilt + +namespace CurrentPositionLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPositionLift + +namespace CurrentPositionTilt { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPositionTilt + +namespace NumberOfActuationsLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfActuationsLift + +namespace NumberOfActuationsTilt { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfActuationsTilt + +namespace ConfigStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace ConfigStatus + +namespace CurrentPositionLiftPercentage { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPositionLiftPercentage + +namespace CurrentPositionTiltPercentage { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPositionTiltPercentage + +namespace OperationalStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace OperationalStatus + +namespace TargetPositionLiftPercent100ths { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace TargetPositionLiftPercent100ths + +namespace TargetPositionTiltPercent100ths { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace TargetPositionTiltPercent100ths + +namespace EndProductType { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace EndProductType + +namespace CurrentPositionLiftPercent100ths { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPositionLiftPercent100ths + +namespace CurrentPositionTiltPercent100ths { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentPositionTiltPercent100ths + +namespace InstalledOpenLimitLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace InstalledOpenLimitLift + +namespace InstalledClosedLimitLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace InstalledClosedLimitLift + +namespace InstalledOpenLimitTilt { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace InstalledOpenLimitTilt + +namespace InstalledClosedLimitTilt { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace InstalledClosedLimitTilt + +namespace VelocityLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace VelocityLift + +namespace AccelerationTimeLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace AccelerationTimeLift + +namespace DecelerationTimeLift { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace DecelerationTimeLift + +namespace Mode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace Mode + +namespace IntermediateSetpointsLift { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +{ + uint8_t zclString[254 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 254); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[254 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +} // namespace IntermediateSetpointsLift + +namespace IntermediateSetpointsTilt { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +{ + uint8_t zclString[254 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 254); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[254 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +} // namespace IntermediateSetpointsTilt + +namespace SafetyStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace SafetyStatus + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace WindowCovering + +namespace BarrierControl { +namespace Attributes { + +namespace BarrierMovingState { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace BarrierMovingState + +namespace BarrierSafetyStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace BarrierSafetyStatus + +namespace BarrierCapabilities { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace BarrierCapabilities + +namespace BarrierOpenEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierOpenEvents + +namespace BarrierCloseEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierCloseEvents + +namespace BarrierCommandOpenEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierCommandOpenEvents + +namespace BarrierCommandCloseEvents { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierCommandCloseEvents + +namespace BarrierOpenPeriod { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierOpenPeriod + +namespace BarrierClosePeriod { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierClosePeriod + +namespace BarrierPosition { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace BarrierPosition + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BarrierControl + +namespace PumpConfigurationAndControl { +namespace Attributes { + +namespace MaxPressure { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MaxPressure + +namespace MaxSpeed { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MaxSpeed + +namespace MaxFlow { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MaxFlow + +namespace MinConstPressure { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MinConstPressure + +namespace MaxConstPressure { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MaxConstPressure + +namespace MinCompPressure { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MinCompPressure + +namespace MaxCompPressure { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MaxCompPressure + +namespace MinConstSpeed { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MinConstSpeed + +namespace MaxConstSpeed { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MaxConstSpeed + +namespace MinConstFlow { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MinConstFlow + +namespace MaxConstFlow { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace MaxConstFlow + +namespace MinConstTemp { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MinConstTemp + +namespace MaxConstTemp { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MaxConstTemp + +namespace PumpStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace AutoRelockTime +} // namespace PumpStatus -namespace SoundVolume { +namespace EffectiveOperationMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -10009,18 +15282,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace SoundVolume +} // namespace EffectiveOperationMode -namespace OperatingMode { +namespace EffectiveControlMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -10038,47 +15312,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace OperatingMode +} // namespace EffectiveControlMode -namespace SupportedOperatingModes { +namespace Capacity { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace SupportedOperatingModes +} // namespace Capacity -namespace DefaultConfigurationRegister { +namespace Speed { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -10096,192 +15373,373 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace DefaultConfigurationRegister +} // namespace Speed + +namespace LifetimeRunningHours { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits>::StorageType temp; + uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits>::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits>::StorageType storageValue; + NumericAttributeTraits>::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits>::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); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT24U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace LifetimeRunningHours + +namespace Power { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits>::StorageType temp; + uint8_t * readable = NumericAttributeTraits>::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits>::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits>::StorageType storageValue; + NumericAttributeTraits>::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT24U_ATTRIBUTE_TYPE); +} + +} // namespace Power + +namespace LifetimeEnergyConsumed { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (NumericAttributeTraits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::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); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace LifetimeEnergyConsumed + +namespace OperationMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace OperationMode -namespace EnableLocalProgramming { +namespace ControlMode { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace EnableLocalProgramming +} // namespace ControlMode -namespace EnableOneTouchLocking { +namespace AlarmMask { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace EnableOneTouchLocking +} // namespace AlarmMask -namespace EnableInsideStatusLED { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace EnableInsideStatusLED +} // namespace FeatureMap -namespace EnablePrivacyModeButton { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace EnablePrivacyModeButton +} // namespace ClusterRevision -namespace LocalProgrammingFeatures { +} // namespace Attributes +} // namespace PumpConfigurationAndControl -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace Thermostat { +namespace Attributes { + +namespace LocalTemperature { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace LocalProgrammingFeatures +} // namespace LocalTemperature -namespace WrongCodeEntryLimit { +namespace OutdoorTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace WrongCodeEntryLimit +} // namespace OutdoorTemperature -namespace UserCodeTemporaryDisableTime { +namespace Occupancy { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(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)) { @@ -10299,546 +15757,540 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace UserCodeTemporaryDisableTime +} // namespace Occupancy -namespace SendPINOverTheAir { +namespace AbsMinHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace SendPINOverTheAir +} // namespace AbsMinHeatSetpointLimit -namespace RequirePINforRemoteOperation { +namespace AbsMaxHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace RequirePINforRemoteOperation +} // namespace AbsMaxHeatSetpointLimit -namespace ExpiringUserTimeout { +namespace AbsMinCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace ExpiringUserTimeout +} // namespace AbsMinCoolSetpointLimit -namespace AlarmMask { +namespace AbsMaxCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace AlarmMask +} // namespace AbsMaxCoolSetpointLimit -namespace KeypadOperationEventMask { +namespace PiCoolingDemand { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace KeypadOperationEventMask +} // namespace PiCoolingDemand -namespace RemoteOperationEventMask { +namespace PiHeatingDemand { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RemoteOperationEventMask +} // namespace PiHeatingDemand -namespace ManualOperationEventMask { +namespace HvacSystemTypeConfiguration { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ManualOperationEventMask +} // namespace HvacSystemTypeConfiguration -namespace RFIDOperationEventMask { +namespace LocalTemperatureCalibration { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -} // namespace RFIDOperationEventMask +} // namespace LocalTemperatureCalibration -namespace KeypadProgrammingEventMask { +namespace OccupiedCoolingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace KeypadProgrammingEventMask +} // namespace OccupiedCoolingSetpoint -namespace RemoteProgrammingEventMask { +namespace OccupiedHeatingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace RemoteProgrammingEventMask +} // namespace OccupiedHeatingSetpoint -namespace RFIDProgrammingEventMask { +namespace UnoccupiedCoolingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace RFIDProgrammingEventMask - -} // namespace Attributes -} // namespace DoorLock - -namespace WindowCovering { -namespace Attributes { +} // namespace UnoccupiedCoolingSetpoint -namespace Type { +namespace UnoccupiedHeatingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Type +} // namespace UnoccupiedHeatingSetpoint -namespace PhysicalClosedLimitLift { +namespace MinHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace PhysicalClosedLimitLift +} // namespace MinHeatSetpointLimit -namespace PhysicalClosedLimitTilt { +namespace MaxHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace PhysicalClosedLimitTilt +} // namespace MaxHeatSetpointLimit -namespace CurrentPositionLift { +namespace MinCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionLift +} // namespace MinCoolSetpointLimit -namespace CurrentPositionTilt { +namespace MaxCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionTilt +} // namespace MaxCoolSetpointLimit -namespace NumberOfActuationsLift { +namespace MinSetpointDeadBand { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -} // namespace NumberOfActuationsLift +} // namespace MinSetpointDeadBand -namespace NumberOfActuationsTilt { +namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace NumberOfActuationsTilt +} // namespace RemoteSensing -namespace ConfigStatus { +namespace ControlSequenceOfOperation { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -10856,18 +16308,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace ConfigStatus +} // namespace ControlSequenceOfOperation -namespace CurrentPositionLiftPercentage { +namespace SystemMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -10885,18 +16337,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionLiftPercentage +} // namespace SystemMode -namespace CurrentPositionTiltPercentage { +namespace AlarmMask { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -10914,18 +16366,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionTiltPercentage +} // namespace AlarmMask -namespace OperationalStatus { +namespace ThermostatRunningMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -10943,76 +16395,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace OperationalStatus +} // namespace ThermostatRunningMode -namespace TargetPositionLiftPercent100ths { +namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace TargetPositionLiftPercent100ths +} // namespace StartOfWeek -namespace TargetPositionTiltPercent100ths { +namespace NumberOfWeeklyTransitions { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace TargetPositionTiltPercent100ths +} // namespace NumberOfWeeklyTransitions -namespace EndProductType { +namespace NumberOfDailyTransitions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -11030,47 +16482,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace EndProductType +} // namespace NumberOfDailyTransitions -namespace CurrentPositionLiftPercent100ths { +namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionLiftPercent100ths +} // namespace TemperatureSetpointHold -namespace CurrentPositionTiltPercent100ths { +namespace TemperatureSetpointHoldDuration { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -11088,47 +16540,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CurrentPositionTiltPercent100ths +} // namespace TemperatureSetpointHoldDuration -namespace InstalledOpenLimitLift { +namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace InstalledOpenLimitLift +} // namespace ThermostatProgrammingOperationMode -namespace InstalledClosedLimitLift { +namespace HvacRelayState { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -11146,134 +16598,134 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace InstalledClosedLimitLift +} // namespace HvacRelayState -namespace InstalledOpenLimitTilt { +namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace InstalledOpenLimitTilt +} // namespace SetpointChangeSource -namespace InstalledClosedLimitTilt { +namespace SetpointChangeAmount { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace InstalledClosedLimitTilt +} // namespace SetpointChangeAmount -namespace VelocityLift { +namespace SetpointChangeSourceTimestamp { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } -} // namespace VelocityLift +} // namespace SetpointChangeSourceTimestamp -namespace AccelerationTimeLift { +namespace AcType { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace AccelerationTimeLift +} // namespace AcType -namespace DecelerationTimeLift { +namespace AcCapacity { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -11291,18 +16743,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace DecelerationTimeLift +} // namespace AcCapacity -namespace Mode { +namespace AcRefrigerantType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(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)) { @@ -11320,113 +16772,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); -} - -} // namespace Mode - -namespace IntermediateSetpointsLift { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) -{ - uint8_t zclString[254 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - - VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 254); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) -{ - static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[254 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace IntermediateSetpointsLift +} // namespace AcRefrigerantType -namespace IntermediateSetpointsTilt { +namespace AcCompressor { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - uint8_t zclString[254 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 254); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[254 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace IntermediateSetpointsTilt +} // namespace AcCompressor -namespace SafetyStatus { +namespace AcErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace SafetyStatus - -} // namespace Attributes -} // namespace WindowCovering - -namespace BarrierControl { -namespace Attributes { +} // namespace AcErrorCode -namespace BarrierMovingState { +namespace AcLouverPosition { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(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)) { @@ -11444,47 +16859,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace BarrierMovingState +} // namespace AcLouverPosition -namespace BarrierSafetyStatus { +namespace AcCoilTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace BarrierSafetyStatus +} // namespace AcCoilTemperature -namespace BarrierCapabilities { +namespace AcCapacityFormat { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(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)) { @@ -11502,47 +16917,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace BarrierCapabilities +} // namespace AcCapacityFormat -namespace BarrierOpenEvents { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BarrierOpenEvents +} // namespace FeatureMap -namespace BarrierCloseEvents { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(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)) { @@ -11560,105 +16975,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BarrierCloseEvents +} // namespace ClusterRevision -namespace BarrierCommandOpenEvents { +} // namespace Attributes +} // namespace Thermostat -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace FanControl { +namespace Attributes { + +namespace FanMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace BarrierCommandOpenEvents +} // namespace FanMode -namespace BarrierCommandCloseEvents { +namespace FanModeSequence { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace BarrierCommandCloseEvents +} // namespace FanModeSequence -namespace BarrierOpenPeriod { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace BarrierOpenPeriod +} // namespace FeatureMap -namespace BarrierClosePeriod { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(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)) { @@ -11676,18 +17097,24 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace BarrierClosePeriod +} // namespace ClusterRevision -namespace BarrierPosition { +} // namespace Attributes +} // namespace FanControl + +namespace DehumidificationControl { +namespace Attributes { + +namespace RelativeHumidity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, readable, sizeof(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)) { @@ -11705,273 +17132,250 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace BarrierPosition - -} // namespace Attributes -} // namespace BarrierControl - -namespace PumpConfigurationAndControl { -namespace Attributes { +} // namespace RelativeHumidity -namespace MaxPressure { +namespace DehumidificationCooling { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MaxPressure +} // namespace DehumidificationCooling -namespace MaxSpeed { +namespace RhDehumidificationSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MaxSpeed +} // namespace RhDehumidificationSetpoint -namespace MaxFlow { +namespace RelativeHumidityMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MaxFlow +} // namespace RelativeHumidityMode -namespace MinConstPressure { +namespace DehumidificationLockout { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MinConstPressure +} // namespace DehumidificationLockout -namespace MaxConstPressure { +namespace DehumidificationHysteresis { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MaxConstPressure +} // namespace DehumidificationHysteresis -namespace MinCompPressure { +namespace DehumidificationMaxCool { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MinCompPressure +} // namespace DehumidificationMaxCool -namespace MaxCompPressure { +namespace RelativeHumidityDisplay { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MaxCompPressure +} // namespace RelativeHumidityDisplay -namespace MinConstSpeed { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MinConstSpeed +} // namespace FeatureMap -namespace MaxConstSpeed { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -11989,144 +17393,149 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxConstSpeed +} // namespace ClusterRevision -namespace MinConstFlow { +} // namespace Attributes +} // namespace DehumidificationControl -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { + +namespace TemperatureDisplayMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MinConstFlow +} // namespace TemperatureDisplayMode -namespace MaxConstFlow { +namespace KeypadLockout { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MaxConstFlow +} // namespace KeypadLockout -namespace MinConstTemp { +namespace ScheduleProgrammingVisibility { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MinConstTemp +} // namespace ScheduleProgrammingVisibility -namespace MaxConstTemp { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxConstTemp +} // namespace FeatureMap -namespace PumpStatus { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -12144,20 +17553,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_BITMAP16_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PumpStatus +} // namespace ClusterRevision -namespace EffectiveOperationMode { +} // namespace Attributes +} // namespace ThermostatUserInterfaceConfiguration + +namespace ColorControl { +namespace Attributes { + +namespace CurrentHue { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -12175,19 +17589,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace EffectiveOperationMode +} // namespace CurrentHue -namespace EffectiveControlMode { +namespace CurrentSaturation { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -12205,50 +17618,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace EffectiveControlMode +} // namespace CurrentSaturation -namespace Capacity { +namespace RemainingTime { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Capacity +} // namespace RemainingTime -namespace Speed { +namespace CurrentX { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -12266,157 +17676,164 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Speed +} // namespace CurrentX -namespace LifetimeRunningHours { +namespace CurrentY { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits>::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT24U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace CurrentY + +namespace DriftCompensation { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits>::StorageType value; - NumericAttributeTraits>::SetNull(value); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT24U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; } - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (value.IsNull()) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace LifetimeRunningHours +} // namespace DriftCompensation -namespace Power { +namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t zclString[254 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 254); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT24U_ATTRIBUTE_TYPE); + static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[254 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace Power +} // namespace CompensationText -namespace LifetimeEnergyConsumed { +namespace ColorTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace ColorTemperature + +namespace ColorMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_INT32U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; } - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (value.IsNull()) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace LifetimeEnergyConsumed +} // namespace ColorMode -namespace OperationMode { +namespace ColorControlOptions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -12434,19 +17851,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace OperationMode +} // namespace ColorControlOptions -namespace ControlMode { +namespace NumberOfPrimaries { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -12464,19 +17880,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ControlMode +} // namespace NumberOfPrimaries -namespace AlarmMask { +namespace Primary1X { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -12494,228 +17909,221 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, - ZCL_BITMAP16_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AlarmMask - -} // namespace Attributes -} // namespace PumpConfigurationAndControl - -namespace Thermostat { -namespace Attributes { +} // namespace Primary1X -namespace LocalTemperature { +namespace Primary1Y { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LocalTemperature +} // namespace Primary1Y -namespace OutdoorTemperature { +namespace Primary1Intensity { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace OutdoorTemperature +} // namespace Primary1Intensity -namespace Occupancy { +namespace Primary2X { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Occupancy +} // namespace Primary2X -namespace AbsMinHeatSetpointLimit { +namespace Primary2Y { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AbsMinHeatSetpointLimit +} // namespace Primary2Y -namespace AbsMaxHeatSetpointLimit { +namespace Primary2Intensity { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace AbsMaxHeatSetpointLimit +} // namespace Primary2Intensity -namespace AbsMinCoolSetpointLimit { +namespace Primary3X { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AbsMinCoolSetpointLimit +} // namespace Primary3X -namespace AbsMaxCoolSetpointLimit { +namespace Primary3Y { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AbsMaxCoolSetpointLimit +} // namespace Primary3Y -namespace PiCoolingDemand { +namespace Primary3Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -12733,47 +18141,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace PiCoolingDemand +} // namespace Primary3Intensity -namespace PiHeatingDemand { +namespace Primary4X { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PiHeatingDemand +} // namespace Primary4X -namespace HvacSystemTypeConfiguration { +namespace Primary4Y { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace Primary4Y + +namespace Primary4Intensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -12791,308 +18228,308 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace HvacSystemTypeConfiguration +} // namespace Primary4Intensity -namespace LocalTemperatureCalibration { +namespace Primary5X { -EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LocalTemperatureCalibration +} // namespace Primary5X -namespace OccupiedCoolingSetpoint { +namespace Primary5Y { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace OccupiedCoolingSetpoint +} // namespace Primary5Y -namespace OccupiedHeatingSetpoint { +namespace Primary5Intensity { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace OccupiedHeatingSetpoint +} // namespace Primary5Intensity -namespace UnoccupiedCoolingSetpoint { +namespace Primary6X { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace UnoccupiedCoolingSetpoint +} // namespace Primary6X -namespace UnoccupiedHeatingSetpoint { +namespace Primary6Y { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace UnoccupiedHeatingSetpoint +} // namespace Primary6Y -namespace MinHeatSetpointLimit { +namespace Primary6Intensity { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MinHeatSetpointLimit +} // namespace Primary6Intensity -namespace MaxHeatSetpointLimit { +namespace WhitePointX { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxHeatSetpointLimit +} // namespace WhitePointX -namespace MinCoolSetpointLimit { +namespace WhitePointY { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinCoolSetpointLimit +} // namespace WhitePointY -namespace MaxCoolSetpointLimit { +namespace ColorPointRX { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxCoolSetpointLimit +} // namespace ColorPointRX -namespace MinSetpointDeadBand { +namespace ColorPointRY { -EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinSetpointDeadBand +} // namespace ColorPointRY -namespace RemoteSensing { +namespace ColorPointRIntensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13110,76 +18547,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RemoteSensing +} // namespace ColorPointRIntensity -namespace ControlSequenceOfOperation { +namespace ColorPointGX { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ControlSequenceOfOperation +} // namespace ColorPointGX -namespace SystemMode { +namespace ColorPointGY { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SystemMode +} // namespace ColorPointGY -namespace AlarmMask { +namespace ColorPointGIntensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13197,76 +18634,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace AlarmMask +} // namespace ColorPointGIntensity -namespace ThermostatRunningMode { +namespace ColorPointBX { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ThermostatRunningMode +} // namespace ColorPointBX -namespace StartOfWeek { +namespace ColorPointBY { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace StartOfWeek +} // namespace ColorPointBY -namespace NumberOfWeeklyTransitions { +namespace ColorPointBIntensity { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13284,47 +18721,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace NumberOfWeeklyTransitions +} // namespace ColorPointBIntensity -namespace NumberOfDailyTransitions { +namespace EnhancedCurrentHue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace NumberOfDailyTransitions +} // namespace EnhancedCurrentHue -namespace TemperatureSetpointHold { +namespace EnhancedColorMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13342,47 +18779,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace TemperatureSetpointHold +} // namespace EnhancedColorMode -namespace TemperatureSetpointHoldDuration { +namespace ColorLoopActive { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace TemperatureSetpointHoldDuration +} // namespace ColorLoopActive -namespace ThermostatProgrammingOperationMode { +namespace ColorLoopDirection { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13400,18 +18837,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ThermostatProgrammingOperationMode +} // namespace ColorLoopDirection -namespace HvacRelayState { +namespace ColorLoopTime { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13429,134 +18866,134 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace HvacRelayState +} // namespace ColorLoopTime -namespace SetpointChangeSource { +namespace ColorLoopStartEnhancedHue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SetpointChangeSource +} // namespace ColorLoopStartEnhancedHue -namespace SetpointChangeAmount { +namespace ColorLoopStoredEnhancedHue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SetpointChangeAmount +} // namespace ColorLoopStoredEnhancedHue -namespace SetpointChangeSourceTimestamp { +namespace ColorCapabilities { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace SetpointChangeSourceTimestamp +} // namespace ColorCapabilities -namespace AcType { +namespace ColorTempPhysicalMin { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AcType +} // namespace ColorTempPhysicalMin -namespace AcCapacity { +namespace ColorTempPhysicalMax { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13574,76 +19011,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AcCapacity +} // namespace ColorTempPhysicalMax -namespace AcRefrigerantType { +namespace CoupleColorTempToLevelMinMireds { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AcRefrigerantType +} // namespace CoupleColorTempToLevelMinMireds -namespace AcCompressor { +namespace StartUpColorTemperatureMireds { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AcCompressor +} // namespace StartUpColorTemperatureMireds -namespace AcErrorCode { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13661,76 +19098,82 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace AcErrorCode +} // namespace FeatureMap -namespace AcLouverPosition { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace AcLouverPosition +} // namespace ClusterRevision -namespace AcCoilTemperature { +} // namespace Attributes +} // namespace ColorControl -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +namespace BallastConfiguration { +namespace Attributes { + +namespace PhysicalMinLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace AcCoilTemperature +} // namespace PhysicalMinLevel -namespace AcCapacityFormat { +namespace PhysicalMaxLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(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)) { @@ -13748,24 +19191,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace AcCapacityFormat - -} // namespace Attributes -} // namespace Thermostat - -namespace FanControl { -namespace Attributes { +} // namespace PhysicalMaxLevel -namespace FanMode { +namespace BallastStatus { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(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)) { @@ -13783,18 +19220,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace FanMode +} // namespace BallastStatus -namespace FanModeSequence { +namespace MinLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FanControl::Id, Id, readable, sizeof(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)) { @@ -13812,24 +19249,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace FanModeSequence - -} // namespace Attributes -} // namespace FanControl - -namespace DehumidificationControl { -namespace Attributes { +} // namespace MinLevel -namespace RelativeHumidity { +namespace MaxLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(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)) { @@ -13847,18 +19278,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RelativeHumidity +} // namespace MaxLevel -namespace DehumidificationCooling { +namespace PowerOnLevel { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(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)) { @@ -13876,47 +19307,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace DehumidificationCooling +} // namespace PowerOnLevel -namespace RhDehumidificationSetpoint { +namespace PowerOnFadeTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RhDehumidificationSetpoint +} // namespace PowerOnFadeTime -namespace RelativeHumidityMode { +namespace IntrinsicBallastFactor { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(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)) { @@ -13934,18 +19365,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace RelativeHumidityMode +} // namespace IntrinsicBallastFactor -namespace DehumidificationLockout { +namespace BallastFactorAdjustment { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(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)) { @@ -13963,18 +19394,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace DehumidificationLockout +} // namespace BallastFactorAdjustment -namespace DehumidificationHysteresis { +namespace LampQuality { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(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)) { @@ -13992,145 +19423,138 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace DehumidificationHysteresis +} // namespace LampQuality -namespace DehumidificationMaxCool { +namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); + uint8_t zclString[16 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace DehumidificationMaxCool +} // namespace LampType -namespace RelativeHumidityDisplay { +namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, readable, sizeof(temp)); + uint8_t zclString[16 + 1]; + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DehumidificationControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace RelativeHumidityDisplay - -} // namespace Attributes -} // namespace DehumidificationControl - -namespace ThermostatUserInterfaceConfiguration { -namespace Attributes { +} // namespace LampManufacturer -namespace TemperatureDisplayMode { +namespace LampRatedHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits>::StorageType temp; + uint8_t * readable = NumericAttributeTraits>::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 (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits>::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits>::StorageType storageValue; + NumericAttributeTraits>::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -} // namespace TemperatureDisplayMode +} // namespace LampRatedHours -namespace KeypadLockout { +namespace LampBurnHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits>::StorageType temp; + uint8_t * readable = NumericAttributeTraits>::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 (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits>::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits>::StorageType storageValue; + NumericAttributeTraits>::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -} // namespace KeypadLockout +} // namespace LampBurnHours -namespace ScheduleProgrammingVisibility { +namespace LampAlarmMode { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -14148,83 +19572,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ScheduleProgrammingVisibility - -} // namespace Attributes -} // namespace ThermostatUserInterfaceConfiguration - -namespace ColorControl { -namespace Attributes { +} // namespace LampAlarmMode -namespace CurrentHue { +namespace LampBurnHoursTripPoint { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits>::StorageType temp; + uint8_t * readable = NumericAttributeTraits>::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 (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits>::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits>::StorageType storageValue; + NumericAttributeTraits>::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -} // namespace CurrentHue +} // namespace LampBurnHoursTripPoint -namespace CurrentSaturation { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CurrentSaturation +} // namespace FeatureMap -namespace RemainingTime { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14242,135 +19659,174 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace RemainingTime +} // namespace ClusterRevision -namespace CurrentX { +} // namespace Attributes +} // namespace BallastConfiguration -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace IlluminanceMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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 (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CurrentX +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} -namespace CurrentY { +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) + return Set(endpoint, value.Value()); +} + +} // namespace MeasuredValue + +namespace MinMeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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 (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CurrentY +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} -namespace DriftCompensation { +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) + return Set(endpoint, value.Value()); +} + +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace DriftCompensation - -namespace CompensationText { +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) { - uint8_t zclString[254 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - VerifyOrReturnError(value.size() == 254, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 254); - value.reduce_size(length); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 254, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[254 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + return Set(endpoint, value.Value()); } -} // namespace CompensationText +} // namespace MaxMeasuredValue -namespace ColorTemperature { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14388,105 +19844,97 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorTemperature +} // namespace Tolerance -namespace ColorMode { +namespace LightSensorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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 (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace ColorMode - -namespace ColorControlOptions { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace ColorControlOptions +} // namespace LightSensorType -namespace NumberOfPrimaries { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace NumberOfPrimaries +} // namespace FeatureMap -namespace Primary1X { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14504,105 +19952,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Primary1X +} // namespace ClusterRevision -namespace Primary1Y { +} // namespace Attributes +} // namespace IlluminanceMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace TemperatureMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary1Y +} // namespace MeasuredValue -namespace Primary1Intensity { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary1Intensity +} // namespace MinMeasuredValue -namespace Primary2X { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary2X +} // namespace MaxMeasuredValue -namespace Primary2Y { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14620,47 +20074,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Primary2Y +} // namespace Tolerance -namespace Primary2Intensity { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Primary2Intensity +} // namespace FeatureMap -namespace Primary3X { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14678,105 +20132,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Primary3X +} // namespace ClusterRevision -namespace Primary3Y { +} // namespace Attributes +} // namespace TemperatureMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace PressureMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary3Y +} // namespace MeasuredValue -namespace Primary3Intensity { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary3Intensity +} // namespace MinMeasuredValue -namespace Primary4X { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary4X +} // namespace MaxMeasuredValue -namespace Primary4Y { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14794,134 +20254,105 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace Primary4Y - -namespace Primary4Intensity { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Primary4Intensity +} // namespace Tolerance -namespace Primary5X { +namespace ScaledValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary5X +} // namespace ScaledValue -namespace Primary5Y { +namespace MinScaledValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary5Y +} // namespace MinScaledValue -namespace Primary5Intensity { +namespace MaxScaledValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace Primary5Intensity +} // namespace MaxScaledValue -namespace Primary6X { +namespace ScaledTolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -14939,76 +20370,76 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Primary6X +} // namespace ScaledTolerance -namespace Primary6Y { +namespace Scale { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -} // namespace Primary6Y +} // namespace Scale -namespace Primary6Intensity { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Primary6Intensity +} // namespace FeatureMap -namespace WhitePointX { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15026,76 +20457,111 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace WhitePointX +} // namespace ClusterRevision -namespace WhitePointY { +} // namespace Attributes +} // namespace PressureMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace FlowMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace WhitePointY +} // namespace MeasuredValue -namespace ColorPointRX { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -} // namespace ColorPointRX +} // namespace MinMeasuredValue -namespace ColorPointRY { +namespace MaxMeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); +} + +} // namespace MaxMeasuredValue + +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15113,47 +20579,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorPointRY +} // namespace Tolerance -namespace ColorPointRIntensity { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ColorPointRIntensity +} // namespace FeatureMap -namespace ColorPointGX { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15171,18 +20637,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorPointGX +} // namespace ClusterRevision -namespace ColorPointGY { +} // namespace Attributes +} // namespace FlowMeasurement + +namespace RelativeHumidityMeasurement { +namespace Attributes { + +namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -15200,47 +20673,51 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorPointGY +} // namespace MeasuredValue -namespace ColorPointGIntensity { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorPointGIntensity +} // namespace MinMeasuredValue -namespace ColorPointBX { +namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -15258,18 +20735,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorPointBX +} // namespace MaxMeasuredValue -namespace ColorPointBY { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -15287,47 +20766,51 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorPointBY +} // namespace Tolerance -namespace ColorPointBIntensity { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ColorPointBIntensity +} // namespace FeatureMap -namespace EnhancedCurrentHue { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -15345,18 +20828,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace EnhancedCurrentHue +} // namespace ClusterRevision -namespace EnhancedColorMode { +} // namespace Attributes +} // namespace RelativeHumidityMeasurement + +namespace OccupancySensing { +namespace Attributes { + +namespace Occupancy { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15374,18 +20864,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace EnhancedColorMode +} // namespace Occupancy -namespace ColorLoopActive { +namespace OccupancySensorType { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15403,18 +20893,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace ColorLoopActive +} // namespace OccupancySensorType -namespace ColorLoopDirection { +namespace OccupancySensorTypeBitmap { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15432,18 +20922,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ColorLoopDirection +} // namespace OccupancySensorTypeBitmap -namespace ColorLoopTime { +namespace PirOccupiedToUnoccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15461,18 +20951,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorLoopTime +} // namespace PirOccupiedToUnoccupiedDelay -namespace ColorLoopStartEnhancedHue { +namespace PirUnoccupiedToOccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15490,18 +20980,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorLoopStartEnhancedHue +} // namespace PirUnoccupiedToOccupiedDelay -namespace ColorLoopStoredEnhancedHue { +namespace PirUnoccupiedToOccupiedThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace PirUnoccupiedToOccupiedThreshold + +namespace UltrasonicOccupiedToUnoccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15519,18 +21038,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorLoopStoredEnhancedHue +} // namespace UltrasonicOccupiedToUnoccupiedDelay -namespace ColorCapabilities { +namespace UltrasonicUnoccupiedToOccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15548,18 +21067,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorCapabilities +} // namespace UltrasonicUnoccupiedToOccupiedDelay -namespace ColorTempPhysicalMin { +namespace UltrasonicUnoccupiedToOccupiedThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace UltrasonicUnoccupiedToOccupiedThreshold + +namespace PhysicalContactOccupiedToUnoccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15577,47 +21125,105 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ColorTempPhysicalMin +} // namespace PhysicalContactOccupiedToUnoccupiedDelay -namespace ColorTempPhysicalMax { +namespace PhysicalContactUnoccupiedToOccupiedDelay { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalContactUnoccupiedToOccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedThreshold { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace PhysicalContactUnoccupiedToOccupiedThreshold + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ColorTempPhysicalMax +} // namespace FeatureMap -namespace CoupleColorTempToLevelMinMireds { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(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)) { @@ -15635,1087 +21241,1140 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CoupleColorTempToLevelMinMireds +} // namespace ClusterRevision -namespace StartUpColorTemperatureMireds { +} // namespace Attributes +} // namespace OccupancySensing -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace CarbonMonoxideConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ColorControl::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace StartUpColorTemperatureMireds - -} // namespace Attributes -} // namespace ColorControl - -namespace BallastConfiguration { -namespace Attributes { +} // namespace MeasuredValue -namespace PhysicalMinLevel { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace PhysicalMinLevel +} // namespace MinMeasuredValue -namespace PhysicalMaxLevel { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace PhysicalMaxLevel +} // namespace MaxMeasuredValue -namespace BallastStatus { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace BallastStatus +} // namespace Tolerance -namespace MinLevel { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MinLevel +} // namespace FeatureMap -namespace MaxLevel { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxLevel +} // namespace ClusterRevision -namespace PowerOnLevel { +} // namespace Attributes +} // namespace CarbonMonoxideConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace CarbonDioxideConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace PowerOnLevel +} // namespace MeasuredValue -namespace PowerOnFadeTime { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace PowerOnFadeTime +} // namespace MinMeasuredValue -namespace IntrinsicBallastFactor { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace IntrinsicBallastFactor +} // namespace MaxMeasuredValue -namespace BallastFactorAdjustment { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace BallastFactorAdjustment +} // namespace Tolerance -namespace LampQuality { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace LampQuality +} // namespace FeatureMap -namespace LampType { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[16 + 1]; + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); + emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LampType +} // namespace ClusterRevision -namespace LampManufacturer { +} // namespace Attributes +} // namespace CarbonDioxideConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +namespace EthyleneConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - uint8_t zclString[16 + 1]; + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); + emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[16 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace LampManufacturer +} // namespace MeasuredValue -namespace LampRatedHours { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace LampRatedHours +} // namespace MinMeasuredValue -namespace LampBurnHours { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace LampBurnHours +} // namespace MaxMeasuredValue -namespace LampAlarmMode { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace LampAlarmMode +} // namespace Tolerance -namespace LampBurnHoursTripPoint { +namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits>::StorageType temp; - uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits>::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits>::StorageType storageValue; - NumericAttributeTraits>::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace LampBurnHoursTripPoint - -} // namespace Attributes -} // namespace BallastConfiguration - -namespace IlluminanceMeasurement { -namespace Attributes { +} // namespace FeatureMap -namespace MeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::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); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace EthyleneConcentrationMeasurement -} // namespace MeasuredValue +namespace EthyleneOxideConcentrationMeasurement { +namespace Attributes { -namespace MinMeasuredValue { +namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace MeasuredValue + +namespace MinMeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; } - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (value.IsNull()) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MinMeasuredValue namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::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); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MaxMeasuredValue namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance -namespace LightSensorType { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (NumericAttributeTraits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType value; - NumericAttributeTraits::SetNull(value); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); - return emberAfWriteServerAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; } - -EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (value.IsNull()) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace LightSensorType +} // namespace ClusterRevision } // namespace Attributes -} // namespace IlluminanceMeasurement +} // namespace EthyleneOxideConcentrationMeasurement -namespace TemperatureMeasurement { +namespace HydrogenConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MeasuredValue namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MinMeasuredValue namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MaxMeasuredValue namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance -} // namespace Attributes -} // namespace TemperatureMeasurement - -namespace PressureMeasurement { -namespace Attributes { - -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ClusterRevision -namespace MaxMeasuredValue { +} // namespace Attributes +} // namespace HydrogenConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +namespace HydrogenSulphideConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace MeasuredValue -namespace Tolerance { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace MinMeasuredValue -namespace ScaledValue { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace ScaledValue +} // namespace MaxMeasuredValue -namespace MinScaledValue { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MinScaledValue +} // namespace Tolerance -namespace MaxScaledValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxScaledValue +} // namespace FeatureMap -namespace ScaledTolerance { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -16733,238 +22392,181 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ScaledTolerance - -namespace Scale { - -EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Scale +} // namespace ClusterRevision } // namespace Attributes -} // namespace PressureMeasurement +} // namespace HydrogenSulphideConcentrationMeasurement -namespace FlowMeasurement { +namespace NitricOxideConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MeasuredValue namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace MinMeasuredValue namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MaxMeasuredValue - -namespace Tolerance { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace FlowMeasurement - -namespace RelativeHumidityMeasurement { -namespace Attributes { +} // namespace MaxMeasuredValue -namespace MeasuredValue { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace Tolerance -namespace MinMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace FeatureMap -namespace MaxMeasuredValue { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -16982,172 +22584,181 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace ClusterRevision -namespace Tolerance { +} // namespace Attributes +} // namespace NitricOxideConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +namespace NitrogenDioxideConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace RelativeHumidityMeasurement - -namespace OccupancySensing { -namespace Attributes { +} // namespace MeasuredValue -namespace Occupancy { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Occupancy +} // namespace MinMeasuredValue -namespace OccupancySensorType { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace OccupancySensorType +} // namespace MaxMeasuredValue -namespace OccupancySensorTypeBitmap { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace OccupancySensorTypeBitmap +} // namespace Tolerance -namespace PirOccupiedToUnoccupiedDelay { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace PirOccupiedToUnoccupiedDelay +} // namespace FeatureMap -namespace PirUnoccupiedToOccupiedDelay { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -17165,163 +22776,181 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PirUnoccupiedToOccupiedDelay +} // namespace ClusterRevision -namespace PirUnoccupiedToOccupiedThreshold { +} // namespace Attributes +} // namespace NitrogenDioxideConcentrationMeasurement -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +namespace OxygenConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { + +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace PirUnoccupiedToOccupiedThreshold +} // namespace MeasuredValue -namespace UltrasonicOccupiedToUnoccupiedDelay { +namespace MinMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace UltrasonicOccupiedToUnoccupiedDelay +} // namespace MinMeasuredValue -namespace UltrasonicUnoccupiedToOccupiedDelay { +namespace MaxMeasuredValue { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace UltrasonicUnoccupiedToOccupiedDelay +} // namespace MaxMeasuredValue -namespace UltrasonicUnoccupiedToOccupiedThreshold { +namespace Tolerance { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, float * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace UltrasonicUnoccupiedToOccupiedThreshold +} // namespace Tolerance -namespace PhysicalContactOccupiedToUnoccupiedDelay { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace PhysicalContactOccupiedToUnoccupiedDelay +} // namespace FeatureMap -namespace PhysicalContactUnoccupiedToOccupiedDelay { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -17339,44 +22968,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace PhysicalContactUnoccupiedToOccupiedDelay - -namespace PhysicalContactUnoccupiedToOccupiedThreshold { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PhysicalContactUnoccupiedToOccupiedThreshold +} // namespace ClusterRevision } // namespace Attributes -} // namespace OccupancySensing +} // namespace OxygenConcentrationMeasurement -namespace CarbonMonoxideConcentrationMeasurement { +namespace OzoneConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -17386,7 +22987,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17404,7 +23005,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17417,7 +23018,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17435,7 +23036,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17448,7 +23049,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17466,7 +23067,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17479,7 +23080,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17497,16 +23098,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace CarbonMonoxideConcentrationMeasurement +} // namespace OzoneConcentrationMeasurement -namespace CarbonDioxideConcentrationMeasurement { +namespace SulfurDioxideConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -17516,7 +23179,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17534,7 +23197,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17547,7 +23210,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17565,7 +23228,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17578,7 +23241,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17596,7 +23259,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17609,7 +23272,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17627,16 +23290,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace CarbonDioxideConcentrationMeasurement +} // namespace SulfurDioxideConcentrationMeasurement -namespace EthyleneConcentrationMeasurement { +namespace DissolvedOxygenConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -17646,7 +23371,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17664,7 +23389,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17677,7 +23402,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17695,7 +23420,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17708,7 +23433,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17726,7 +23451,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -17739,7 +23464,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17757,88 +23482,88 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance -} // namespace Attributes -} // namespace EthyleneConcentrationMeasurement - -namespace EthyleneOxideConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ClusterRevision -namespace MaxMeasuredValue { +} // namespace Attributes +} // namespace DissolvedOxygenConcentrationMeasurement + +namespace BromateConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17856,20 +23581,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace MeasuredValue -namespace Tolerance { +namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17887,26 +23612,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::EthyleneOxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace EthyleneOxideConcentrationMeasurement - -namespace HydrogenConcentrationMeasurement { -namespace Attributes { +} // namespace MinMeasuredValue -namespace MeasuredValue { +namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17924,20 +23643,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace MaxMeasuredValue -namespace MinMeasuredValue { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -17955,78 +23674,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace Tolerance -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace FeatureMap -namespace Tolerance { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace ClusterRevision } // namespace Attributes -} // namespace HydrogenConcentrationMeasurement +} // namespace BromateConcentrationMeasurement -namespace HydrogenSulphideConcentrationMeasurement { +namespace ChloraminesConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18036,7 +23755,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18054,7 +23773,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18067,7 +23786,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18085,7 +23804,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18098,7 +23817,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18116,7 +23835,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18129,7 +23848,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18147,16 +23866,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HydrogenSulphideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace HydrogenSulphideConcentrationMeasurement +} // namespace ChloraminesConcentrationMeasurement -namespace NitricOxideConcentrationMeasurement { +namespace ChlorineConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18166,7 +23947,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18184,7 +23965,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18197,7 +23978,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18215,7 +23996,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18228,7 +24009,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18246,7 +24027,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18259,7 +24040,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18277,16 +24058,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitricOxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace NitricOxideConcentrationMeasurement +} // namespace ChlorineConcentrationMeasurement -namespace NitrogenDioxideConcentrationMeasurement { +namespace FecalColiformAndEColiConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18294,9 +24137,9 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18314,7 +24157,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18325,9 +24168,9 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18345,7 +24188,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18356,9 +24199,9 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18376,7 +24219,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18387,9 +24230,9 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18407,16 +24250,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace NitrogenDioxideConcentrationMeasurement +} // namespace FecalColiformAndEColiConcentrationMeasurement -namespace OxygenConcentrationMeasurement { +namespace FluorideConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18426,7 +24331,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18444,7 +24349,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18457,7 +24362,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18475,7 +24380,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18488,7 +24393,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18506,7 +24411,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18519,7 +24424,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18537,16 +24442,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace OxygenConcentrationMeasurement +} // namespace FluorideConcentrationMeasurement -namespace OzoneConcentrationMeasurement { +namespace HaloaceticAcidsConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18556,7 +24523,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18574,7 +24541,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18587,7 +24554,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18605,7 +24572,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18618,7 +24585,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18636,7 +24603,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18649,7 +24616,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18667,16 +24634,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace OzoneConcentrationMeasurement +} // namespace HaloaceticAcidsConcentrationMeasurement -namespace SulfurDioxideConcentrationMeasurement { +namespace TotalTrihalomethanesConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18684,9 +24713,9 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18704,7 +24733,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18715,9 +24744,9 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18735,7 +24764,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18746,9 +24775,9 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18766,7 +24795,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18777,9 +24806,9 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18797,16 +24826,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfurDioxideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace SulfurDioxideConcentrationMeasurement +} // namespace TotalTrihalomethanesConcentrationMeasurement -namespace DissolvedOxygenConcentrationMeasurement { +namespace TotalColiformBacteriaConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18814,9 +24905,9 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18834,7 +24925,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18843,11 +24934,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18865,7 +24956,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18876,9 +24967,9 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18896,7 +24987,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18907,9 +24998,9 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -18927,16 +25018,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::DissolvedOxygenConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace DissolvedOxygenConcentrationMeasurement +} // namespace TotalColiformBacteriaConcentrationMeasurement -namespace BromateConcentrationMeasurement { +namespace TurbidityConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -18946,7 +25099,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18964,7 +25117,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -18977,7 +25130,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -18995,7 +25148,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19008,7 +25161,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19026,7 +25179,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19039,7 +25192,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19057,88 +25210,88 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromateConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance -} // namespace Attributes -} // namespace BromateConcentrationMeasurement - -namespace ChloraminesConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ClusterRevision -namespace MaxMeasuredValue { +} // namespace Attributes +} // namespace TurbidityConcentrationMeasurement + +namespace CopperConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19156,20 +25309,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace MeasuredValue -namespace Tolerance { +namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19187,26 +25340,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloraminesConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace ChloraminesConcentrationMeasurement - -namespace ChlorineConcentrationMeasurement { -namespace Attributes { +} // namespace MinMeasuredValue -namespace MeasuredValue { +namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19224,20 +25371,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace MaxMeasuredValue -namespace MinMeasuredValue { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19255,78 +25402,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace Tolerance -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace FeatureMap -namespace Tolerance { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorineConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace ClusterRevision } // namespace Attributes -} // namespace ChlorineConcentrationMeasurement +} // namespace CopperConcentrationMeasurement -namespace FecalColiformAndEColiConcentrationMeasurement { +namespace LeadConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -19334,9 +25481,9 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19354,7 +25501,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19365,9 +25512,9 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19385,7 +25532,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19396,9 +25543,9 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19416,7 +25563,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19427,9 +25574,9 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19447,16 +25594,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FecalColiformAndEColiConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace FecalColiformAndEColiConcentrationMeasurement +} // namespace LeadConcentrationMeasurement -namespace FluorideConcentrationMeasurement { +namespace ManganeseConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -19466,7 +25675,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19484,7 +25693,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19497,7 +25706,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19515,7 +25724,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19528,7 +25737,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19546,7 +25755,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19559,7 +25768,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19577,16 +25786,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::FluorideConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace FluorideConcentrationMeasurement +} // namespace ManganeseConcentrationMeasurement -namespace HaloaceticAcidsConcentrationMeasurement { +namespace SulfateConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -19596,7 +25867,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19614,7 +25885,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19627,7 +25898,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19645,7 +25916,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19658,7 +25929,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19676,7 +25947,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19689,7 +25960,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -19707,16 +25978,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::HaloaceticAcidsConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace HaloaceticAcidsConcentrationMeasurement +} // namespace SulfateConcentrationMeasurement -namespace TotalTrihalomethanesConcentrationMeasurement { +namespace BromodichloromethaneConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -19725,7 +26058,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) @@ -19744,7 +26077,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19756,7 +26089,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) @@ -19775,7 +26108,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19787,7 +26120,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) @@ -19806,7 +26139,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19818,7 +26151,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) @@ -19837,16 +26170,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalTrihalomethanesConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace TotalTrihalomethanesConcentrationMeasurement +} // namespace BromodichloromethaneConcentrationMeasurement -namespace TotalColiformBacteriaConcentrationMeasurement { +namespace BromoformConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -19854,9 +26249,9 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19874,7 +26269,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19885,9 +26280,9 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19905,7 +26300,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19916,9 +26311,9 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19936,7 +26331,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -19947,9 +26342,9 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -19967,16 +26362,78 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TotalColiformBacteriaConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes -} // namespace TotalColiformBacteriaConcentrationMeasurement +} // namespace BromoformConcentrationMeasurement -namespace TurbidityConcentrationMeasurement { +namespace ChlorodibromomethaneConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -19984,9 +26441,9 @@ namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -20004,7 +26461,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -20015,9 +26472,9 @@ namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -20035,7 +26492,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -20046,9 +26503,9 @@ namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -20066,7 +26523,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -20077,9 +26534,9 @@ namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t * readable = NumericAttributeTraits::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)) { @@ -20088,25 +26545,87 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, float value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, + ZCL_SINGLE_ATTRIBUTE_TYPE); +} + +} // namespace Tolerance + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TurbidityConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace ClusterRevision } // namespace Attributes -} // namespace TurbidityConcentrationMeasurement +} // namespace ChlorodibromomethaneConcentrationMeasurement -namespace CopperConcentrationMeasurement { +namespace ChloroformConcentrationMeasurement { namespace Attributes { namespace MeasuredValue { @@ -20116,7 +26635,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20134,7 +26653,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -20147,7 +26666,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20165,7 +26684,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -20178,7 +26697,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20196,7 +26715,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } @@ -20209,7 +26728,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, float * value) NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20227,88 +26746,88 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::CopperConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } } // namespace Tolerance -} // namespace Attributes -} // namespace CopperConcentrationMeasurement - -namespace LeadConcentrationMeasurement { -namespace Attributes { - -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ClusterRevision -namespace MaxMeasuredValue { +} // namespace Attributes +} // namespace ChloroformConcentrationMeasurement + +namespace SodiumConcentrationMeasurement { +namespace Attributes { + +namespace MeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20326,20 +26845,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace MeasuredValue -namespace Tolerance { +namespace MinMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20357,26 +26876,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::LeadConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace LeadConcentrationMeasurement - -namespace ManganeseConcentrationMeasurement { -namespace Attributes { +} // namespace MinMeasuredValue -namespace MeasuredValue { +namespace MaxMeasuredValue { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20394,20 +26907,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace MaxMeasuredValue -namespace MinMeasuredValue { +namespace Tolerance { EmberAfStatus Get(chip::EndpointId endpoint, float * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -20425,1076 +26938,1083 @@ EmberAfStatus Set(chip::EndpointId endpoint, float value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, + return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace Tolerance -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace FeatureMap -namespace Tolerance { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ManganeseConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace ClusterRevision } // namespace Attributes -} // namespace ManganeseConcentrationMeasurement +} // namespace SodiumConcentrationMeasurement -namespace SulfateConcentrationMeasurement { +namespace IasZone { namespace Attributes { -namespace MeasuredValue { +namespace ZoneState { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ZoneState + +namespace ZoneType { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace ZoneType -namespace MinMeasuredValue { +namespace ZoneStatus { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ZoneStatus -namespace MaxMeasuredValue { +namespace IasCieAddress { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::NodeId * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace IasCieAddress -namespace Tolerance { +namespace ZoneId { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SulfateConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace SulfateConcentrationMeasurement - -namespace BromodichloromethaneConcentrationMeasurement { -namespace Attributes { +} // namespace ZoneId -namespace MeasuredValue { +namespace NumberOfZoneSensitivityLevelsSupported { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace NumberOfZoneSensitivityLevelsSupported -namespace MinMeasuredValue { +namespace CurrentZoneSensitivityLevel { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace CurrentZoneSensitivityLevel -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace FeatureMap -namespace Tolerance { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromodichloromethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace ClusterRevision } // namespace Attributes -} // namespace BromodichloromethaneConcentrationMeasurement +} // namespace IasZone -namespace BromoformConcentrationMeasurement { +namespace IasAce { namespace Attributes { -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasAce::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasAce::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ClusterRevision -namespace MaxMeasuredValue { +} // namespace Attributes +} // namespace IasAce -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +namespace IasWd { +namespace Attributes { + +namespace MaxDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace MaxDuration -namespace Tolerance { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::BromoformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace BromoformConcentrationMeasurement - -namespace ChlorodibromomethaneConcentrationMeasurement { -namespace Attributes { +} // namespace FeatureMap -namespace MeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace ClusterRevision -namespace MinMeasuredValue { +} // namespace Attributes +} // namespace IasWd -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +namespace WakeOnLan { +namespace Attributes { + +namespace WakeOnLanMacAddress { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace WakeOnLanMacAddress -namespace MaxMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace FeatureMap -namespace Tolerance { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, - readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChlorodibromomethaneConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Tolerance +} // namespace ClusterRevision } // namespace Attributes -} // namespace ChlorodibromomethaneConcentrationMeasurement +} // namespace WakeOnLan -namespace ChloroformConcentrationMeasurement { +namespace TvChannel { namespace Attributes { -namespace MeasuredValue { +namespace TvChannelLineup { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +} // namespace TvChannelLineup + +namespace CurrentTvChannel { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace CurrentTvChannel -namespace MinMeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace FeatureMap -namespace MaxMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace ClusterRevision -namespace Tolerance { +} // namespace Attributes +} // namespace TvChannel -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +namespace TargetNavigator { +namespace Attributes { + +namespace CurrentNavigatorTarget { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ChloroformConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace ChloroformConcentrationMeasurement - -namespace SodiumConcentrationMeasurement { -namespace Attributes { +} // namespace CurrentNavigatorTarget -namespace MeasuredValue { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace MeasuredValue +} // namespace FeatureMap -namespace MinMeasuredValue { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MinMeasuredValue +} // namespace ClusterRevision -namespace MaxMeasuredValue { +} // namespace Attributes +} // namespace TargetNavigator -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +namespace MediaPlayback { +namespace Attributes { + +namespace PlaybackState { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MaxMeasuredValue +} // namespace PlaybackState -namespace Tolerance { +namespace StartTime { -EmberAfStatus Get(chip::EndpointId endpoint, float * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = - emberAfReadServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, float value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::SodiumConcentrationMeasurement::Id, Id, writable, - ZCL_SINGLE_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace Tolerance - -} // namespace Attributes -} // namespace SodiumConcentrationMeasurement - -namespace IasZone { -namespace Attributes { +} // namespace StartTime -namespace ZoneState { +namespace Duration { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ZoneState +} // namespace Duration -namespace ZoneType { +namespace PositionUpdatedAt { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ZoneType +} // namespace PositionUpdatedAt -namespace ZoneStatus { +namespace Position { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ZoneStatus +} // namespace Position -namespace IasCieAddress { +namespace PlaybackSpeed { -EmberAfStatus Get(chip::EndpointId endpoint, chip::NodeId * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace IasCieAddress +} // namespace PlaybackSpeed -namespace ZoneId { +namespace SeekRangeEnd { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace ZoneId +} // namespace SeekRangeEnd -namespace NumberOfZoneSensitivityLevelsSupported { +namespace SeekRangeStart { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -} // namespace NumberOfZoneSensitivityLevelsSupported +} // namespace SeekRangeStart -namespace CurrentZoneSensitivityLevel { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasZone::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasZone::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CurrentZoneSensitivityLevel - -} // namespace Attributes -} // namespace IasZone - -namespace IasWd { -namespace Attributes { +} // namespace FeatureMap -namespace MaxDuration { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::IasWd::Id, Id, readable, sizeof(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)) { @@ -21512,399 +28032,402 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::IasWd::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace MaxDuration +} // namespace ClusterRevision } // namespace Attributes -} // namespace IasWd +} // namespace MediaPlayback -namespace WakeOnLan { +namespace MediaInput { namespace Attributes { -namespace WakeOnLanMacAddress { +namespace CurrentMediaInput { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace WakeOnLanMacAddress - -} // namespace Attributes -} // namespace WakeOnLan - -namespace TvChannel { -namespace Attributes { +} // namespace CurrentMediaInput -namespace TvChannelLineup { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace TvChannelLineup +} // namespace FeatureMap -namespace CurrentTvChannel { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::TvChannel::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CurrentTvChannel +} // namespace ClusterRevision } // namespace Attributes -} // namespace TvChannel +} // namespace MediaInput -namespace TargetNavigator { +namespace LowPower { namespace Attributes { -namespace CurrentNavigatorTarget { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CurrentNavigatorTarget - -} // namespace Attributes -} // namespace TargetNavigator - -namespace MediaPlayback { -namespace Attributes { +} // namespace FeatureMap -namespace PlaybackState { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace PlaybackState +} // namespace ClusterRevision -namespace StartTime { +} // namespace Attributes +} // namespace LowPower -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +namespace KeypadInput { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace StartTime +} // namespace FeatureMap -namespace Duration { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Duration +} // namespace ClusterRevision -namespace PositionUpdatedAt { +} // namespace Attributes +} // namespace KeypadInput -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +namespace ContentLauncher { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace PositionUpdatedAt +} // namespace FeatureMap -namespace Position { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Position +} // namespace ClusterRevision -namespace PlaybackSpeed { +} // namespace Attributes +} // namespace ContentLauncher -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +namespace AudioOutput { +namespace Attributes { + +namespace CurrentAudioOutput { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace PlaybackSpeed +} // namespace CurrentAudioOutput -namespace SeekRangeEnd { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace SeekRangeEnd +} // namespace FeatureMap -namespace SeekRangeStart { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, readable, sizeof(temp)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SeekRangeStart +} // namespace ClusterRevision } // namespace Attributes -} // namespace MediaPlayback +} // namespace AudioOutput -namespace MediaInput { +namespace ApplicationLauncher { namespace Attributes { -namespace CurrentMediaInput { +namespace CatalogVendorId { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::MediaInput::Id, Id, readable, sizeof(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)) { @@ -21922,30 +28445,18 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace CurrentMediaInput - -} // namespace Attributes -} // namespace MediaInput - -namespace ContentLauncher { -namespace Attributes { - -} // namespace Attributes -} // namespace ContentLauncher - -namespace AudioOutput { -namespace Attributes { +} // namespace CatalogVendorId -namespace CurrentAudioOutput { +namespace ApplicationId { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, readable, sizeof(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)) { @@ -21963,74 +28474,68 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace CurrentAudioOutput - -} // namespace Attributes -} // namespace AudioOutput - -namespace ApplicationLauncher { -namespace Attributes { +} // namespace ApplicationId -namespace CatalogVendorId { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace CatalogVendorId +} // namespace FeatureMap -namespace ApplicationId { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ApplicationId +} // namespace ClusterRevision } // namespace Attributes } // namespace ApplicationLauncher @@ -22109,25 +28614,171 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace ApplicationName + +namespace ProductId { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ProductId + +namespace ApplicationId { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +{ + uint8_t zclString[32 + 1]; + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 32); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +{ + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[32 + 1]; + emberAfCopyInt8u(zclString, 0, static_cast(value.size())); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); +} + +} // namespace ApplicationId + +namespace CatalogVendorId { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace CatalogVendorId + +namespace ApplicationStatus { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ApplicationStatus + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ApplicationName +} // namespace FeatureMap -namespace ProductId { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { @@ -22154,45 +28805,50 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ProductId +} // namespace ClusterRevision -namespace ApplicationId { +} // namespace Attributes +} // namespace ApplicationBasic -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +namespace AccountLogin { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - VerifyOrReturnError(value.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(value.data(), &zclString[1], 32); - value.reduce_size(length); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - emberAfCopyInt8u(zclString, 0, static_cast(value.size())); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ApplicationId +} // namespace FeatureMap -namespace CatalogVendorId { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, readable, sizeof(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)) { @@ -22210,42 +28866,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) NumericAttributeTraits::StorageType storageValue; NumericAttributeTraits::WorkingToStorage(value, storageValue); uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace CatalogVendorId - -namespace ApplicationStatus { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::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)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = NumericAttributeTraits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteServerAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ApplicationStatus +} // namespace ClusterRevision } // namespace Attributes -} // namespace ApplicationBasic +} // namespace AccountLogin namespace TestCluster { namespace Attributes { @@ -24981,9 +31608,131 @@ EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable } // namespace NullableRangeRestrictedInt16s +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace TestCluster +namespace Messaging { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Messaging::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::Messaging::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace Messaging + namespace ApplianceIdentification { namespace Attributes { @@ -25306,55 +32055,113 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ProductTypeId + +namespace CecedSpecificationVersion { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CecedSpecificationVersion + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace ProductTypeId +} // namespace FeatureMap -namespace CecedSpecificationVersion { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - NumericAttributeTraits::StorageType temp; - uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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 (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - *value = NumericAttributeTraits::StorageToWorking(temp); + *value = NumericAttributeTraits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - NumericAttributeTraits::StorageType storageValue; - NumericAttributeTraits::WorkingToStorage(value, storageValue); - uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace CecedSpecificationVersion +} // namespace ClusterRevision } // namespace Attributes } // namespace ApplianceIdentification @@ -25726,9 +32533,131 @@ EmberAfStatus Set(chip::EndpointId endpoint, int32_t value) } // namespace PowerThreshold +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace MeterIdentification +namespace ApplianceEventsAndAlert { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceEventsAndAlert::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceEventsAndAlert::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ApplianceEventsAndAlert + namespace ApplianceStatistics { namespace Attributes { @@ -25790,6 +32719,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace LogQueueMaxSize +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ApplianceStatistics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace ApplianceStatistics @@ -29508,6 +36495,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace RmsVoltageSwellPeriodPhaseC +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::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)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + } // namespace Attributes } // namespace ElectricalMeasurement