diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index aafc18d68d7591..689b2e6f9a217e 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -102,6 +102,16 @@ class ComplexArgumentParser return CHIP_NO_ERROR; } + template + static CHIP_ERROR Setup(const char * label, chip::BitMask & request, Json::Value & value) + { + T requestValue; + ReturnErrorOnFailure(ComplexArgumentParser::Setup(label, requestValue, value)); + + request = chip::BitMask(requestValue); + return CHIP_NO_ERROR; + } + template static CHIP_ERROR Setup(const char * label, chip::Optional & request, Json::Value & value) { diff --git a/examples/chip-tool/commands/common/Command.h b/examples/chip-tool/commands/common/Command.h index 099170b25598b7..b9a1c2bc1cb972 100644 --- a/examples/chip-tool/commands/common/Command.h +++ b/examples/chip-tool/commands/common/Command.h @@ -199,6 +199,15 @@ class Command return AddArgument(name, min, max, reinterpret_cast(out), desc, flags); } + template + size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::BitMask * out, const char * desc = "", + uint8_t flags = 0) + { + // This is a terrible hack that relies on BitMask only having the one + // mValue member. + return AddArgument(name, min, max, reinterpret_cast(out), desc, flags); + } + template size_t AddArgument(const char * name, chip::Optional * value, const char * desc = "") { diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index c6b05762d495e5..2cb5475fcdf4f9 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -467,7 +467,7 @@ void AppTask::UpdateClusterState(void) void AppTask::UpdateCluster(intptr_t context) { EmberStatus status; - BitFlags pumpStatus; + BitMask pumpStatus; ChipLogProgress(NotSpecified, "Update Cluster State"); diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index a9d357eea42e6c..0cada84b7b046c 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -294,8 +294,8 @@ void WindowApp::DispatchEvent(const WindowApp::Event & event) void WindowApp::DispatchEventAttributeChange(chip::EndpointId endpoint, chip::AttributeId attribute) { Cover * cover = GetCover(endpoint); - chip::BitFlags mode; - chip::BitFlags configStatus; + chip::BitMask mode; + chip::BitMask configStatus; if (nullptr == cover) { @@ -426,7 +426,7 @@ void WindowApp::Cover::Init(chip::EndpointId endpoint) TypeSet(endpoint, Type::kTiltBlindLiftAndTilt); // Attribute: Id 7 ConfigStatus - chip::BitFlags configStatus = ConfigStatusGet(endpoint); + chip::BitMask configStatus = ConfigStatusGet(endpoint); configStatus.Set(ConfigStatus::kLiftEncoderControlled); configStatus.Set(ConfigStatus::kTiltEncoderControlled); configStatus.Set(ConfigStatus::kOnlineReserved); @@ -438,7 +438,7 @@ void WindowApp::Cover::Init(chip::EndpointId endpoint) EndProductTypeSet(endpoint, EndProductType::kInteriorBlind); // Attribute: Id 24 Mode - chip::BitFlags mode; + chip::BitMask mode; mode.Clear(Mode::kMotorDirectionReversed); mode.Clear(Mode::kMaintenanceMode); mode.Clear(Mode::kCalibrationMode); diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 1fb048f055562d..2f69c839e6c1c8 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -2395,7 +2395,7 @@ void DoorLockServer::sendGetWeekDayScheduleResponse(chip::app::CommandHandler * response.status = status; if (DlStatus::kSuccess == status) { - response.daysMask = Optional>(daysMask); + response.daysMask = Optional>(daysMask); response.startHour = Optional(startHour); response.startMinute = Optional(startMinute); response.endHour = Optional(endHour); diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index 01eb2782dd02cb..1e4e4fb69d881d 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -22,7 +22,6 @@ #include #include #include -//#include #include #include #include @@ -73,7 +72,7 @@ static void updateAttributeLinks(EndpointId endpoint) { PumpControlMode controlMode; PumpOperationMode operationMode; - BitFlags pumpStatus; + BitMask pumpStatus; bool isControlModeAvailable = true; bool isPumpStatusAvailable = true; diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index bbb33c71b653d0..251118cc542a7c 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -165,7 +165,7 @@ Type TypeGet(chip::EndpointId endpoint) return value; } -void ConfigStatusPrint(const chip::BitFlags & configStatus) +void ConfigStatusPrint(const chip::BitMask & configStatus) { emberAfWindowCoveringClusterPrint("ConfigStatus 0x%02X Operational=%u OnlineReserved=%u", configStatus.Raw(), configStatus.Has(ConfigStatus::kOperational), @@ -177,14 +177,14 @@ void ConfigStatusPrint(const chip::BitFlags & configStatus) configStatus.Has(ConfigStatus::kTiltPositionAware), configStatus.Has(ConfigStatus::kTiltEncoderControlled)); } -void ConfigStatusSet(chip::EndpointId endpoint, const chip::BitFlags & configStatus) +void ConfigStatusSet(chip::EndpointId endpoint, const chip::BitMask & configStatus) { Attributes::ConfigStatus::Set(endpoint, configStatus); } -chip::BitFlags ConfigStatusGet(chip::EndpointId endpoint) +chip::BitMask ConfigStatusGet(chip::EndpointId endpoint) { - chip::BitFlags configStatus; + chip::BitMask configStatus; Attributes::ConfigStatus::Get(endpoint, &configStatus); return configStatus; @@ -192,7 +192,7 @@ chip::BitFlags ConfigStatusGet(chip::EndpointId endpoint) void ConfigStatusUpdateFeatures(chip::EndpointId endpoint) { - chip::BitFlags configStatus = ConfigStatusGet(endpoint); + chip::BitMask configStatus = ConfigStatusGet(endpoint); configStatus.Set(ConfigStatus::kLiftPositionAware, HasFeaturePaLift(endpoint)); configStatus.Set(ConfigStatus::kTiltPositionAware, HasFeaturePaTilt(endpoint)); @@ -255,19 +255,19 @@ EndProductType EndProductTypeGet(chip::EndpointId endpoint) return value; } -void ModePrint(const chip::BitFlags & mode) +void ModePrint(const chip::BitMask & mode) { emberAfWindowCoveringClusterPrint("Mode 0x%02X MotorDirReversed=%u LedFeedback=%u Maintenance=%u Calibration=%u", mode.Raw(), mode.Has(Mode::kMotorDirectionReversed), mode.Has(Mode::kLedFeedback), mode.Has(Mode::kMaintenanceMode), mode.Has(Mode::kCalibrationMode)); } -void ModeSet(chip::EndpointId endpoint, chip::BitFlags & newMode) +void ModeSet(chip::EndpointId endpoint, chip::BitMask & newMode) { - chip::BitFlags newStatus; + chip::BitMask newStatus; - chip::BitFlags oldStatus = ConfigStatusGet(endpoint); - chip::BitFlags oldMode = ModeGet(endpoint); + chip::BitMask oldStatus = ConfigStatusGet(endpoint); + chip::BitMask oldMode = ModeGet(endpoint); newStatus = oldStatus; @@ -288,9 +288,9 @@ void ModeSet(chip::EndpointId endpoint, chip::BitFlags & newMode) ConfigStatusSet(endpoint, newStatus); } -chip::BitFlags ModeGet(chip::EndpointId endpoint) +chip::BitMask ModeGet(chip::EndpointId endpoint) { - chip::BitFlags mode; + chip::BitMask mode; Attributes::Mode::Get(endpoint, &mode); return mode; @@ -591,8 +591,8 @@ void PostAttributeChange(chip::EndpointId endpoint, chip::AttributeId attributeI { // all-cluster-app: simulation for the CI testing // otherwise it is defined for manufacturer specific implementation */ - BitFlags mode; - BitFlags configStatus; + BitMask mode; + BitMask configStatus; NPercent100ths current, target; OperationalStatus prevOpStatus = OperationalStatusGet(endpoint); OperationalStatus opStatus = prevOpStatus; @@ -659,8 +659,8 @@ void PostAttributeChange(chip::EndpointId endpoint, chip::AttributeId attributeI EmberAfStatus GetMotionLockStatus(chip::EndpointId endpoint) { - BitFlags mode = ModeGet(endpoint); - BitFlags configStatus = ConfigStatusGet(endpoint); + BitMask mode = ModeGet(endpoint); + BitMask configStatus = ConfigStatusGet(endpoint); // Is the device locked? if (!configStatus.Has(ConfigStatus::kOperational)) diff --git a/src/app/clusters/window-covering-server/window-covering-server.h b/src/app/clusters/window-covering-server/window-covering-server.h index 15282f2411ed6e..a0703a05917c64 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.h +++ b/src/app/clusters/window-covering-server/window-covering-server.h @@ -99,9 +99,9 @@ bool HasFeaturePaTilt(chip::EndpointId endpoint); void TypeSet(chip::EndpointId endpoint, Type type); Type TypeGet(chip::EndpointId endpoint); -void ConfigStatusPrint(const chip::BitFlags & configStatus); -void ConfigStatusSet(chip::EndpointId endpoint, const chip::BitFlags & status); -chip::BitFlags ConfigStatusGet(chip::EndpointId endpoint); +void ConfigStatusPrint(const chip::BitMask & configStatus); +void ConfigStatusSet(chip::EndpointId endpoint, const chip::BitMask & status); +chip::BitMask ConfigStatusGet(chip::EndpointId endpoint); void ConfigStatusUpdateFeatures(chip::EndpointId endpoint); void OperationalStatusSet(chip::EndpointId endpoint, const OperationalStatus & status); @@ -115,9 +115,9 @@ Percent100ths ComputePercent100thsStep(OperationalState direction, Percent100ths void EndProductTypeSet(chip::EndpointId endpoint, EndProductType type); EndProductType EndProductTypeGet(chip::EndpointId endpoint); -void ModePrint(const chip::BitFlags & mode); -void ModeSet(chip::EndpointId endpoint, chip::BitFlags & mode); -chip::BitFlags ModeGet(chip::EndpointId endpoint); +void ModePrint(const chip::BitMask & mode); +void ModeSet(chip::EndpointId endpoint, chip::BitMask & mode); +chip::BitMask ModeGet(chip::EndpointId endpoint); void SafetyStatusSet(chip::EndpointId endpoint, SafetyStatus & status); const SafetyStatus SafetyStatusGet(chip::EndpointId endpoint); diff --git a/src/app/data-model/BasicTypes.h b/src/app/data-model/BasicTypes.h index f2a732153dd946..6bc1c967d18423 100644 --- a/src/app/data-model/BasicTypes.h +++ b/src/app/data-model/BasicTypes.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include @@ -43,6 +44,12 @@ struct IsBasicType> static constexpr bool value = true; }; +template +struct IsBasicType> +{ + static constexpr bool value = true; +}; + template <> struct IsBasicType { diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h index 327a076fbeeaa3..dd824ccfc3ad7a 100644 --- a/src/app/tests/suites/include/ConstraintsChecker.h +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -219,6 +219,18 @@ class ConstraintsChecker return true; } + template + bool CheckConstraintMinValue(const char * itemName, chip::BitMask current, U expected) + { + if (current.Raw() < expected) + { + Exit(std::string(itemName) + " value < minValue: " + std::to_string(current.Raw()) + " < " + std::to_string(expected)); + return false; + } + + return true; + } + template bool CheckConstraintMinValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) { @@ -270,6 +282,18 @@ class ConstraintsChecker return true; } + template + bool CheckConstraintMaxValue(const char * itemName, chip::BitMask current, U expected) + { + if (current.Raw() > expected) + { + Exit(std::string(itemName) + " value > maxValue: " + std::to_string(current.Raw()) + " > " + std::to_string(expected)); + return false; + } + + return true; + } + template bool CheckConstraintMaxValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) { @@ -345,6 +369,18 @@ class ConstraintsChecker return true; } + template + bool CheckConstraintNotValue(const char * itemName, chip::BitMask current, chip::BitMask expected) + { + if (current == expected) + { + Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current.Raw())); + return false; + } + + return true; + } + template bool CheckConstraintNotValue(const char * itemName, chip::BitFlags current, U expected) { @@ -358,6 +394,19 @@ class ConstraintsChecker return true; } + template + bool CheckConstraintNotValue(const char * itemName, chip::BitMask current, U expected) + { + if (current.Raw() == expected) + { + + Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current.Raw())); + return false; + } + + return true; + } + template bool CheckConstraintNotValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) { diff --git a/src/app/tests/suites/include/ValueChecker.h b/src/app/tests/suites/include/ValueChecker.h index 9ea70c8b67bf20..d629626f4cd11d 100644 --- a/src/app/tests/suites/include/ValueChecker.h +++ b/src/app/tests/suites/include/ValueChecker.h @@ -94,6 +94,12 @@ class ValueChecker return CheckValue(itemName, current.Raw(), expected); } + template + bool CheckValue(const char * itemName, chip::BitMask current, U expected) + { + return CheckValue(itemName, current.Raw(), expected); + } + // Allow an expected value that is a nullable wrapped around the actual // value (e.g. a SaveAs from reading a different attribute that has a value // space that includes null). In that case we check that: @@ -114,6 +120,12 @@ class ValueChecker return CheckValue(itemName, current.Raw(), expected.Raw()); } + template + bool CheckValue(const char * itemName, chip::BitMask current, chip::BitMask expected) + { + return CheckValue(itemName, current.Raw(), expected.Raw()); + } + template bool CheckValuePresent(const char * itemName, const chip::Optional & value) { diff --git a/src/app/util/attribute-storage-null-handling.h b/src/app/util/attribute-storage-null-handling.h index 000fa8cb40483d..e1167e6d57a1e7 100644 --- a/src/app/util/attribute-storage-null-handling.h +++ b/src/app/util/attribute-storage-null-handling.h @@ -18,6 +18,8 @@ #pragma once #include +#include +#include #include #include @@ -171,6 +173,15 @@ struct NumericAttributeTraits> static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return reinterpret_cast(&value); } }; +template +struct NumericAttributeTraits> : public NumericAttributeTraits> +{ + using StorageType = T; + using WorkingType = BitMask; + + static constexpr WorkingType StorageToWorking(StorageType storageValue) { return WorkingType(storageValue); } +}; + template <> struct NumericAttributeTraits { diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 131996ae762e50..3ba302d78804ce 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 5977c77c3377f4..e9d53e430d33d2 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -491,7 +491,7 @@ async function zapTypeToClusterObjectType(type, isDecodable, options) if (s) { return 'uint' + s[1] + '_t'; } - return 'chip::BitFlags<' + ns + type + '>'; + return 'chip::BitMask<' + ns + type + '>'; } if (types.isStruct) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 69ac0e6ee30555..8355363d58f035 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -21141,7 +21141,7 @@ CHIPTestClusterNullableBitmap8AttributeCallback::~CHIPTestClusterNullableBitmap8 } void CHIPTestClusterNullableBitmap8AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21208,7 +21208,7 @@ CHIPTestClusterNullableBitmap16AttributeCallback::~CHIPTestClusterNullableBitmap } void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21275,7 +21275,7 @@ CHIPTestClusterNullableBitmap32AttributeCallback::~CHIPTestClusterNullableBitmap } void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21342,7 +21342,7 @@ CHIPTestClusterNullableBitmap64AttributeCallback::~CHIPTestClusterNullableBitmap } void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 0a7f9506355e47..47cdbfab4e3917 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -8590,7 +8590,7 @@ class CHIPTestClusterNullableBitmap8AttributeCallback static void CallbackFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -8622,7 +8622,7 @@ class CHIPTestClusterNullableBitmap16AttributeCallback static void CallbackFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -8654,7 +8654,7 @@ class CHIPTestClusterNullableBitmap32AttributeCallback static void CallbackFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -8686,7 +8686,7 @@ class CHIPTestClusterNullableBitmap64AttributeCallback static void CallbackFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 2a13d577034c66..3f880072235add 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -3719,7 +3719,7 @@ } void CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; @@ -3743,7 +3743,7 @@ } void CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; @@ -3767,7 +3767,7 @@ } void CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; @@ -3791,7 +3791,7 @@ } void CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; @@ -8167,7 +8167,7 @@ } void CHIPPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; @@ -9107,7 +9107,7 @@ } void CHIPTestClusterBitmap8AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; @@ -9131,7 +9131,7 @@ } void CHIPTestClusterBitmap16AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; @@ -9155,7 +9155,7 @@ } void CHIPTestClusterBitmap32AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; @@ -9179,7 +9179,7 @@ } void CHIPTestClusterBitmap64AttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedLongLong:value.Raw()]; @@ -9703,7 +9703,7 @@ } void CHIPTestClusterNullableBitmap8AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -9731,7 +9731,7 @@ } void CHIPTestClusterNullableBitmap16AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -9759,7 +9759,7 @@ } void CHIPTestClusterNullableBitmap32AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -9787,7 +9787,7 @@ } void CHIPTestClusterNullableBitmap64AttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable> & value) + void * context, const chip::app::DataModel::Nullable> & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -11229,7 +11229,7 @@ } void CHIPWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; @@ -11253,7 +11253,7 @@ } void CHIPWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) + void * context, chip::BitMask value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 5442e0bbf6dd0e..698e0baf71ac5e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -745,14 +745,14 @@ typedef void (*DiagnosticLogsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*DoorLockCredentialRulesSupportAttributeCallback)( - void *, chip::BitFlags); +typedef void (*DoorLockCredentialRulesSupportAttributeCallback)(void *, + chip::BitMask); typedef void (*DoorLockSupportedOperatingModesAttributeCallback)( - void *, chip::BitFlags); + void *, chip::BitMask); typedef void (*DoorLockDefaultConfigurationRegisterAttributeCallback)( - void *, chip::BitFlags); + void *, chip::BitMask); typedef void (*DoorLockLocalProgrammingFeaturesAttributeCallback)( - void *, chip::BitFlags); + void *, chip::BitMask); typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, @@ -987,7 +987,7 @@ typedef void (*PressureMeasurementAcceptedCommandListListAttributeCallback)( typedef void (*PressureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlPumpStatusAttributeCallback)( - void *, chip::BitFlags); + void *, chip::BitMask); typedef void (*PumpConfigurationAndControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlAcceptedCommandListListAttributeCallback)( @@ -1037,10 +1037,10 @@ typedef void (*TemperatureMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*TestClusterBitmap8AttributeCallback)(void *, chip::BitFlags); -typedef void (*TestClusterBitmap16AttributeCallback)(void *, chip::BitFlags); -typedef void (*TestClusterBitmap32AttributeCallback)(void *, chip::BitFlags); -typedef void (*TestClusterBitmap64AttributeCallback)(void *, chip::BitFlags); +typedef void (*TestClusterBitmap8AttributeCallback)(void *, chip::BitMask); +typedef void (*TestClusterBitmap16AttributeCallback)(void *, chip::BitMask); +typedef void (*TestClusterBitmap32AttributeCallback)(void *, chip::BitMask); +typedef void (*TestClusterBitmap64AttributeCallback)(void *, chip::BitMask); typedef void (*TestClusterListInt8uListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context, @@ -1061,13 +1061,13 @@ typedef void (*TestClusterListFabricScopedListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TestClusterNullableBitmap8AttributeCallback)( - void *, const chip::app::DataModel::Nullable> &); + void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableBitmap16AttributeCallback)( - void *, const chip::app::DataModel::Nullable> &); + void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableBitmap32AttributeCallback)( - void *, const chip::app::DataModel::Nullable> &); + void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableBitmap64AttributeCallback)( - void *, const chip::app::DataModel::Nullable> &); + void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableStructStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); typedef void (*TestClusterGeneratedCommandListListAttributeCallback)( @@ -1147,8 +1147,8 @@ typedef void (*WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringConfigStatusAttributeCallback)(void *, - chip::BitFlags); -typedef void (*WindowCoveringModeAttributeCallback)(void *, chip::BitFlags); + chip::BitMask); +typedef void (*WindowCoveringModeAttributeCallback)(void *, chip::BitMask); typedef void (*WindowCoveringGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringAcceptedCommandListListAttributeCallback)( @@ -3956,7 +3956,7 @@ class CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge CHIPActionBlock action, bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge @@ -3984,7 +3984,7 @@ class CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge CHIPActionBlock action, bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge @@ -4012,7 +4012,7 @@ class CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge CHIPActionBlock action, bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge @@ -4040,7 +4040,7 @@ class CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge CHIPActionBlock action, bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge @@ -7159,7 +7159,7 @@ class CHIPPumpConfigurationAndControlPumpStatusAttributeCallbackBridge CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge @@ -7845,7 +7845,7 @@ class CHIPTestClusterBitmap8AttributeCallbackBridge : public CHIPCallbackBridge< bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap8AttributeCallbackBridge @@ -7871,7 +7871,7 @@ class CHIPTestClusterBitmap16AttributeCallbackBridge : public CHIPCallbackBridge bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap16AttributeCallbackBridge @@ -7897,7 +7897,7 @@ class CHIPTestClusterBitmap32AttributeCallbackBridge : public CHIPCallbackBridge bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap32AttributeCallbackBridge @@ -7923,7 +7923,7 @@ class CHIPTestClusterBitmap64AttributeCallbackBridge : public CHIPCallbackBridge bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap64AttributeCallbackBridge @@ -8154,7 +8154,7 @@ class CHIPTestClusterNullableBitmap8AttributeCallbackBridge : public CHIPCallbac static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); }; class CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge @@ -8184,7 +8184,7 @@ class CHIPTestClusterNullableBitmap16AttributeCallbackBridge static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); }; class CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge @@ -8214,7 +8214,7 @@ class CHIPTestClusterNullableBitmap32AttributeCallbackBridge static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); }; class CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge @@ -8244,7 +8244,7 @@ class CHIPTestClusterNullableBitmap64AttributeCallbackBridge static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); }; class CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge @@ -9292,7 +9292,7 @@ class CHIPWindowCoveringConfigStatusAttributeCallbackBridge : public CHIPCallbac bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge @@ -9319,7 +9319,7 @@ class CHIPWindowCoveringModeAttributeCallbackBridge : public CHIPCallbackBridge< bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, chip::BitFlags value); + static void OnSuccessFn(void * context, chip::BitMask value); }; class CHIPWindowCoveringModeAttributeCallbackSubscriptionBridge : public CHIPWindowCoveringModeAttributeCallbackBridge diff --git a/src/lib/core/CHIPTLV.h b/src/lib/core/CHIPTLV.h index f507294435d4a8..8a96f45ce1069f 100644 --- a/src/lib/core/CHIPTLV.h +++ b/src/lib/core/CHIPTLV.h @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -531,6 +532,21 @@ class DLL_EXPORT TLVReader return CHIP_NO_ERROR; } + /** + * Get the value of the current element as a BitMask value, if it's an integer + * value that fits in the BitMask type. + * + * @param[out] v Receives the value associated with current TLV element. + */ + template + CHIP_ERROR Get(BitMask & v) + { + std::underlying_type_t val; + ReturnErrorOnFailure(Get(val)); + v.SetRaw(val); + return CHIP_NO_ERROR; + } + /** * Get the value of the current byte or UTF8 string element. * @@ -1433,6 +1449,16 @@ class DLL_EXPORT TLVWriter return Put(tag, data.Raw()); } + /** + * + * Encodes an unsigned integer with bits corresponding to the flags set when data is a BitMask + */ + template + CHIP_ERROR Put(Tag tag, BitMask data) + { + return Put(tag, data.Raw()); + } + /** * Encodes a TLV boolean value. * diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index e96066221d5b47..81a9e0e255c12b 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -61,6 +61,7 @@ static_library("support") { "Base64.cpp", "Base64.h", "BitFlags.h", + "BitMask.h", "BufferReader.cpp", "BufferReader.h", "BufferWriter.cpp", diff --git a/src/lib/support/BitMask.h b/src/lib/support/BitMask.h new file mode 100644 index 00000000000000..313f113ad80154 --- /dev/null +++ b/src/lib/support/BitMask.h @@ -0,0 +1,144 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +namespace chip { + +/** + * Stores bit masks and flags in a more typesafe manner. + * + * Extends BitFlags for boolean flags and also adds support for bit-mask set options. + * + */ +template > +class BitMask : public BitFlags +{ +public: + using IntegerType = typename BitFlags::IntegerType; + + BitMask() : BitFlags() {} + BitMask(const BitFlags & other) : BitFlags(other) {} + BitMask(BitFlags && other) : BitFlags(std::move(other)) {} + BitMask(const BitMask &) = default; + + explicit BitMask(FlagsEnum value) : BitFlags(value) {} + explicit BitMask(IntegerType value) : BitFlags(value) {} + + template + BitMask(FlagsEnum flag, Args &&... args) : BitFlags(flag, std::forward(args)...) + {} + + template + BitMask(IntegerType value, Args &&... args) : BitFlags(value, std::forward(args)...) + {} + + BitMask & operator=(const BitMask &) = default; + + BitMask & operator=(const BitFlags & other) + { + BitFlags::SetRaw(other.Raw()); + return *this; + } + + BitMask & operator=(FlagsEnum value) + { + BitFlags::SetRaw(static_cast(value)); + return *this; + } + + /** + * Set a field within the bit mask integer. + * + * Fields are assumed to be contiguous bits within the underlying integer, for example: + * A mask of 0x70 == 0b01110000 means that a 3 bit value is encoded at bits [4;6]. + * + * Calling SetField(0x70, n) is equivalent to "(value & ~0x70) | (n << 4)" + * + * @param mask The mask, code assumes a continous bit mask + * @param value The value, NOT shifted, MUST fit within the number of bits of the mask + */ + constexpr BitMask & SetField(FlagsEnum mask, IntegerType value) + { + IntegerType bitMask = static_cast(mask); + IntegerType shift = GetShiftToFirstSetBit(bitMask); + + // NOTE: value should be fully contained within the shift mask. + // + // assert((value & (mask >> shift)) == value); + + // Clear bits overlayed by the mask + IntegerType updated = static_cast(BitFlags::Raw() & ~bitMask); + + // Set the right bits + updated |= static_cast(bitMask & (value << shift)); + + BitFlags::SetRaw(updated); + + return *this; + } + + /** + * Gets an underlying field that is contained within a bit subset of the integer. + * Examples: + * GetField(0x70) == GetField(0b01110000) == ((n & 0x70) >> 4) == ((n >> 4) 0x07) + * GetField(0xC0) == GetField(0b11000000) == ((n & 0xC0) >> 6) == ((n >> 6) 0x03) + * + * @param mask The bit mask to be used, assumed to be a contigous bit mask + */ + IntegerType GetField(FlagsEnum mask) const + { + IntegerType bitMask = static_cast(mask); + IntegerType shift = GetShiftToFirstSetBit(bitMask); + + // Forward the right bits + return static_cast(((BitFlags::Raw() & bitMask) >> shift)); + } + +protected: + /// Get the shift amount to reach the first non-zero bit in a bitmask + /// + /// Examples: + /// GetShiftToFirstSetBit(0b0000001) == 0 + /// GetShiftToFirstSetBit(0b0011100) == 2 + /// GetShiftToFirstSetBit(0b0110000) == 4 + /// + /// Note: This does NOT validate if the given mask is a valid mask. So: + /// GetShiftToFirstSetBit(0b0100010) == 1 + /// GetShiftToFirstSetBit(0b010110100) == 2 + static constexpr IntegerType GetShiftToFirstSetBit(IntegerType bitMask) + { + IntegerType count = 0; + IntegerType mask = 0x01; + + if (bitMask == 0) + { + return sizeof(bitMask); // generally invalid value + } + + while ((mask & bitMask) == 0) + { + mask = static_cast(mask << 1); + count++; + } + return count; + } +}; + +} // namespace chip diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index db44ef0d1640ae..25e6e96ad8c9df 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -22,6 +22,7 @@ chip_test_suite("tests") { output_name = "libSupportTests" test_sources = [ + "TestBitMask.cpp", "TestBufferReader.cpp", "TestBufferWriter.cpp", "TestBytesCircularBuffer.cpp", diff --git a/src/lib/support/tests/TestBitMask.cpp b/src/lib/support/tests/TestBitMask.cpp new file mode 100644 index 00000000000000..1745f9295cc126 --- /dev/null +++ b/src/lib/support/tests/TestBitMask.cpp @@ -0,0 +1,119 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include + +#include +#include +#include +#include + +using namespace chip; + +namespace { + +enum class TestEnum : uint16_t +{ + kZero = 0x0000, // not a valid mask or bit flag, here anyway + + kBit_0 = 0x0001, + kBits_1_2 = 0x0006, + kBits_4_7 = 0x00F0, + kBits_High4 = 0xF000, + kBits_High8 = 0xFF00, +}; + +void TestBitMaskOperations(nlTestSuite * inSuite, void * inContext) +{ + BitMask mask; + + NL_TEST_ASSERT(inSuite, mask.Raw() == 0); + + mask.SetField(TestEnum::kBits_1_2, 2); + NL_TEST_ASSERT(inSuite, mask.Raw() == 0x0004); + + mask.SetRaw(0); + mask.SetField(TestEnum::kBits_4_7, 0x0B); + NL_TEST_ASSERT(inSuite, mask.Raw() == 0x00B0); + + mask.SetRaw(0); + + for (uint16_t i = 0; i < 0x10; i++) + { + mask.SetField(TestEnum::kBits_High4, i); + NL_TEST_ASSERT(inSuite, mask.Raw() == (i << 12)); + } + + mask.SetField(TestEnum::kBits_High8, 0x23); + NL_TEST_ASSERT(inSuite, mask.Raw() == 0x2300); + + mask.SetField(TestEnum::kBits_High4, 0xA); + NL_TEST_ASSERT(inSuite, mask.Raw() == 0xA300); +} + +void TestBitFieldLogic(nlTestSuite * inSuite, void * inContext) +{ + BitMask mask; + + // some general logic that still applies for bit fields just in case + NL_TEST_ASSERT(inSuite, !mask.HasAny(TestEnum::kBits_High4)); + NL_TEST_ASSERT(inSuite, !mask.HasAny(TestEnum::kBits_High8)); + + // setting something non-zero in the upper 4 bits sets "something" in both + // upper and 4 and 8 bits + mask.SetField(TestEnum::kBits_High4, 0x01); + NL_TEST_ASSERT(inSuite, mask.HasAny(TestEnum::kBits_High4)); + NL_TEST_ASSERT(inSuite, mask.HasAny(TestEnum::kBits_High8)); + + // sets something visible in high 8 bits, but not high 4 bits + mask.SetField(TestEnum::kBits_High8, 0x01); + NL_TEST_ASSERT(inSuite, !mask.HasAny(TestEnum::kBits_High4)); + NL_TEST_ASSERT(inSuite, mask.HasAny(TestEnum::kBits_High8)); +} + +void TestBitMaskInvalid(nlTestSuite * inSuite, void * inContext) +{ + BitMask mask; + + // This generally tests for no infinite loops. Nothing to set here + mask.SetField(TestEnum::kZero, 0x01); + NL_TEST_ASSERT(inSuite, mask.Raw() == 0); + + mask.SetRaw(0x1234); + mask.SetField(TestEnum::kZero, 0x01); + NL_TEST_ASSERT(inSuite, mask.Raw() == 0x1234); +} + +const nlTest sTests[] = { + NL_TEST_DEF("BitMask operations", TestBitMaskOperations), // + NL_TEST_DEF("BitFields logic", TestBitFieldLogic), // + NL_TEST_DEF("Invalid operations", TestBitMaskInvalid), // + NL_TEST_SENTINEL() // +}; + +} // namespace + +int TestBitMask() +{ + nlTestSuite theSuite = { "BitMask tests", &sTests[0], nullptr, nullptr }; + + // Run test suit againt one context. + nlTestRunner(&theSuite, nullptr); + return nlTestRunnerStats(&theSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestBitMask) 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 4f3cb8801c0179..8997ba86d35fe2 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 @@ -14860,9 +14860,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CredentialRulesSupport { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); @@ -14874,9 +14874,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -15076,9 +15076,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlOp namespace SupportedOperatingModes { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); @@ -15090,9 +15090,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -15107,9 +15107,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); @@ -15121,9 +15121,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -15262,9 +15262,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace LocalProgrammingFeatures { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); @@ -15276,9 +15276,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -15777,9 +15777,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace ConfigStatus { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); @@ -15791,9 +15791,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16312,9 +16312,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace Mode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::WindowCovering::Id, Id, readable, sizeof(temp)); @@ -16326,9 +16326,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17548,9 +17548,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace PumpStatus { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = @@ -17563,9 +17563,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33342,9 +33342,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace Bitmap8 { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -33356,9 +33356,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33373,9 +33373,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -33387,9 +33387,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33404,9 +33404,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -33418,9 +33418,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33435,9 +33435,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -33449,9 +33449,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -34632,9 +34632,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NullableBitmap8 { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable> & value) + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -34649,9 +34649,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -34664,7 +34664,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags>; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); @@ -34672,7 +34672,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) } EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value) + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { @@ -34687,9 +34687,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, namespace NullableBitmap16 { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable> & value) + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -34704,9 +34704,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -34719,7 +34719,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags>; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); @@ -34727,7 +34727,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) } EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value) + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { @@ -34742,9 +34742,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, namespace NullableBitmap32 { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable> & value) + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -34759,9 +34759,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -34774,7 +34774,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags>; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); @@ -34782,7 +34782,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) } EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value) + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { @@ -34797,9 +34797,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, namespace NullableBitmap64 { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable> & value) + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -34814,9 +34814,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -34829,7 +34829,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags>; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); @@ -34837,7 +34837,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) } EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value) + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 13a112b0832938..089500dd37f026 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2631,8 +2631,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); namespace CredentialRulesSupport { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // DlCredentialRuleMask -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // DlCredentialRuleMask +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace CredentialRulesSupport namespace NumberOfCredentialsSupportedPerUser { @@ -2667,15 +2667,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlOp namespace SupportedOperatingModes { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // DlSupportedOperatingModes -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // DlSupportedOperatingModes +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace SupportedOperatingModes namespace DefaultConfigurationRegister { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // DlDefaultConfigurationRegister -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // DlDefaultConfigurationRegister +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace DefaultConfigurationRegister namespace EnableLocalProgramming { @@ -2700,8 +2700,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); namespace LocalProgrammingFeatures { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // DlLocalProgrammingFeatures -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // DlLocalProgrammingFeatures +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace LocalProgrammingFeatures namespace WrongCodeEntryLimit { @@ -2786,8 +2786,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace ConfigStatus { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // ConfigStatus -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // ConfigStatus +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ConfigStatus namespace CurrentPositionLiftPercentage { @@ -2863,8 +2863,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace InstalledClosedLimitTilt namespace Mode { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value); // Mode -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // Mode +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace Mode namespace SafetyStatus { @@ -3047,8 +3047,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace PumpStatus { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // PumpStatus -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // PumpStatus +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace PumpStatus namespace EffectiveOperationMode { @@ -5749,26 +5749,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); namespace Bitmap8 { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // Bitmap8MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // Bitmap8MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace Bitmap8 namespace Bitmap16 { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // Bitmap16MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // Bitmap16MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace Bitmap16 namespace Bitmap32 { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // Bitmap32MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // Bitmap32MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace Bitmap32 namespace Bitmap64 { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitFlags * value); // Bitmap64MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + chip::BitMask * value); // Bitmap64MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace Bitmap64 namespace Int8u { @@ -5960,41 +5960,38 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NullableBitmap8 { EmberAfStatus Get(chip::EndpointId endpoint, - DataModel::Nullable> & value); // Bitmap8MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); + DataModel::Nullable> & value); // Bitmap8MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap8 namespace NullableBitmap16 { -EmberAfStatus -Get(chip::EndpointId endpoint, - DataModel::Nullable> & value); // Bitmap16MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap16MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap16 namespace NullableBitmap32 { -EmberAfStatus -Get(chip::EndpointId endpoint, - DataModel::Nullable> & value); // Bitmap32MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap32MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap32 namespace NullableBitmap64 { -EmberAfStatus -Get(chip::EndpointId endpoint, - DataModel::Nullable> & value); // Bitmap64MaskMap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap64MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable> & value); + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap64 namespace NullableInt8u { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index c4b75284e6c6d0..0c5473986c7954 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include namespace chip { @@ -2558,11 +2558,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::BitFlags mode = static_cast>(0); - chip::GroupId groupIdFrom = static_cast(0); - uint8_t sceneIdFrom = static_cast(0); - chip::GroupId groupIdTo = static_cast(0); - uint8_t sceneIdTo = static_cast(0); + chip::BitMask mode = static_cast>(0); + chip::GroupId groupIdFrom = static_cast(0); + uint8_t sceneIdFrom = static_cast(0); + chip::GroupId groupIdTo = static_cast(0); + uint8_t sceneIdTo = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2577,11 +2577,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::BitFlags mode = static_cast>(0); - chip::GroupId groupIdFrom = static_cast(0); - uint8_t sceneIdFrom = static_cast(0); - chip::GroupId groupIdTo = static_cast(0); - uint8_t sceneIdTo = static_cast(0); + chip::BitMask mode = static_cast>(0); + chip::GroupId groupIdFrom = static_cast(0); + uint8_t sceneIdFrom = static_cast(0); + chip::GroupId groupIdTo = static_cast(0); + uint8_t sceneIdTo = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CopyScene @@ -2953,9 +2953,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::BitFlags onOffControl = static_cast>(0); - uint16_t onTime = static_cast(0); - uint16_t offWaitTime = static_cast(0); + chip::BitMask onOffControl = static_cast>(0); + uint16_t onTime = static_cast(0); + uint16_t offWaitTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2970,9 +2970,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::BitFlags onOffControl = static_cast>(0); - uint16_t onTime = static_cast(0); - uint16_t offWaitTime = static_cast(0); + chip::BitMask onOffControl = static_cast>(0); + uint16_t onTime = static_cast(0); + uint16_t offWaitTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OnWithTimedOff @@ -5602,8 +5602,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } ApplianceStatus applianceStatus = static_cast(0); - chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = - static_cast>(0); + chip::BitMask remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5620,8 +5620,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } ApplianceStatus applianceStatus = static_cast(0); - chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = - static_cast>(0); + chip::BitMask remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5670,8 +5670,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } ApplianceStatus applianceStatus = static_cast(0); - chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = - static_cast>(0); + chip::BitMask remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5688,8 +5688,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } ApplianceStatus applianceStatus = static_cast(0); - chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = - static_cast>(0); + chip::BitMask remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -10051,7 +10051,7 @@ enum class Fields struct Type { public: - chip::BitFlags security = static_cast>(0); + chip::BitMask security = static_cast>(0); chip::ByteSpan ssid; chip::ByteSpan bssid; uint16_t channel = static_cast(0); @@ -16251,13 +16251,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - chip::BitFlags daysMask = static_cast>(0); - uint8_t startHour = static_cast(0); - uint8_t startMinute = static_cast(0); - uint8_t endHour = static_cast(0); - uint8_t endMinute = static_cast(0); + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + chip::BitMask daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -16272,13 +16272,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex = static_cast(0); - uint16_t userIndex = static_cast(0); - chip::BitFlags daysMask = static_cast>(0); - uint8_t startHour = static_cast(0); - uint8_t startMinute = static_cast(0); - uint8_t endHour = static_cast(0); - uint8_t endMinute = static_cast(0); + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + chip::BitMask daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetWeekDaySchedule @@ -16340,7 +16340,7 @@ struct Type uint8_t weekDayIndex = static_cast(0); uint16_t userIndex = static_cast(0); DlStatus status = static_cast(0); - Optional> daysMask; + Optional> daysMask; Optional startHour; Optional startMinute; Optional endHour; @@ -16362,7 +16362,7 @@ struct DecodableType uint8_t weekDayIndex = static_cast(0); uint16_t userIndex = static_cast(0); DlStatus status = static_cast(0); - Optional> daysMask; + Optional> daysMask; Optional startHour; Optional startMinute; Optional endHour; @@ -17286,9 +17286,9 @@ struct TypeInfo namespace CredentialRulesSupport { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CredentialRulesSupport::Id; } @@ -17371,9 +17371,9 @@ struct TypeInfo namespace SupportedOperatingModes { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedOperatingModes::Id; } @@ -17383,9 +17383,9 @@ struct TypeInfo namespace DefaultConfigurationRegister { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::DefaultConfigurationRegister::Id; } @@ -17443,9 +17443,9 @@ struct TypeInfo namespace LocalProgrammingFeatures { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LocalProgrammingFeatures::Id; } @@ -17572,7 +17572,7 @@ struct TypeInfo Attributes::MaxRFIDCodeLength::TypeInfo::DecodableType maxRFIDCodeLength = static_cast(0); Attributes::MinRFIDCodeLength::TypeInfo::DecodableType minRFIDCodeLength = static_cast(0); Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport = - static_cast>(0); + static_cast>(0); Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::DecodableType numberOfCredentialsSupportedPerUser = static_cast(0); Attributes::Language::TypeInfo::DecodableType language; @@ -17582,15 +17582,15 @@ struct TypeInfo Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = static_cast(0); Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes = - static_cast>(0); + static_cast>(0); Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister = - static_cast>(0); + static_cast>(0); Attributes::EnableLocalProgramming::TypeInfo::DecodableType enableLocalProgramming = static_cast(0); Attributes::EnableOneTouchLocking::TypeInfo::DecodableType enableOneTouchLocking = static_cast(0); Attributes::EnableInsideStatusLED::TypeInfo::DecodableType enableInsideStatusLED = static_cast(0); Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType enablePrivacyModeButton = static_cast(0); Attributes::LocalProgrammingFeatures::TypeInfo::DecodableType localProgrammingFeatures = - static_cast>(0); + static_cast>(0); Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType wrongCodeEntryLimit = static_cast(0); Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType userCodeTemporaryDisableTime = static_cast(0); Attributes::SendPINOverTheAir::TypeInfo::DecodableType sendPINOverTheAir = static_cast(0); @@ -18169,9 +18169,9 @@ struct TypeInfo namespace ConfigStatus { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ConfigStatus::Id; } @@ -18325,9 +18325,9 @@ struct TypeInfo namespace Mode { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Mode::Id; } @@ -18393,7 +18393,7 @@ struct TypeInfo Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift = static_cast(0); Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt = static_cast(0); Attributes::ConfigStatus::TypeInfo::DecodableType configStatus = - static_cast>(0); + static_cast>(0); Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableType currentPositionLiftPercentage; Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableType currentPositionTiltPercentage; Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus = static_cast(0); @@ -18407,7 +18407,7 @@ struct TypeInfo Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift = static_cast(0); Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt = static_cast(0); Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt = static_cast(0); - Attributes::Mode::TypeInfo::DecodableType mode = static_cast>(0); + Attributes::Mode::TypeInfo::DecodableType mode = static_cast>(0); Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -18841,9 +18841,9 @@ struct TypeInfo namespace PumpStatus { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::PumpStatus::Id; } @@ -19011,7 +19011,7 @@ struct TypeInfo Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = - static_cast>(0); + static_cast>(0); Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = static_cast(0); Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = @@ -19623,9 +19623,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitFlags dayOfWeekForSequence = static_cast>(0); - chip::BitFlags modeForSequence = static_cast>(0); + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); DataModel::List transitions; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19641,9 +19641,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitFlags dayOfWeekForSequence = static_cast>(0); - chip::BitFlags modeForSequence = static_cast>(0); + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -19664,9 +19664,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitFlags dayOfWeekForSequence = static_cast>(0); - chip::BitFlags modeForSequence = static_cast>(0); + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); DataModel::List transitions; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19682,9 +19682,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitFlags dayOfWeekForSequence = static_cast>(0); - chip::BitFlags modeForSequence = static_cast>(0); + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -19703,8 +19703,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitFlags daysToReturn = static_cast>(0); - chip::BitFlags modeToReturn = static_cast>(0); + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19719,8 +19719,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitFlags daysToReturn = static_cast>(0); - chip::BitFlags modeToReturn = static_cast>(0); + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklySchedule @@ -21650,13 +21650,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - chip::BitFlags updateFlags = static_cast>(0); - ColorLoopAction action = static_cast(0); - ColorLoopDirection direction = static_cast(0); - uint16_t time = static_cast(0); - uint16_t startHue = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::BitMask updateFlags = static_cast>(0); + ColorLoopAction action = static_cast(0); + ColorLoopDirection direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21671,13 +21671,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - chip::BitFlags updateFlags = static_cast>(0); - ColorLoopAction action = static_cast(0); - ColorLoopDirection direction = static_cast(0); - uint16_t time = static_cast(0); - uint16_t startHue = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::BitMask updateFlags = static_cast>(0); + ColorLoopAction action = static_cast(0); + ColorLoopDirection direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ColorLoopSet @@ -26832,10 +26832,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ZoneStatusChangeNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - chip::BitFlags zoneStatus = static_cast>(0); - uint8_t extendedStatus = static_cast(0); - uint8_t zoneId = static_cast(0); - uint16_t delay = static_cast(0); + chip::BitMask zoneStatus = static_cast>(0); + uint8_t extendedStatus = static_cast(0); + uint8_t zoneId = static_cast(0); + uint16_t delay = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -26850,10 +26850,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ZoneStatusChangeNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - chip::BitFlags zoneStatus = static_cast>(0); - uint8_t extendedStatus = static_cast(0); - uint8_t zoneId = static_cast(0); - uint16_t delay = static_cast(0); + chip::BitMask zoneStatus = static_cast>(0); + uint8_t extendedStatus = static_cast(0); + uint8_t zoneId = static_cast(0); + uint16_t delay = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ZoneStatusChangeNotification @@ -27167,8 +27167,8 @@ enum class Fields struct Type { public: - uint8_t zoneId = static_cast(0); - chip::BitFlags zoneStatus = static_cast>(0); + uint8_t zoneId = static_cast(0); + chip::BitMask zoneStatus = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -28067,10 +28067,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StartWarning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags warningInfo = static_cast>(0); - uint16_t warningDuration = static_cast(0); - uint8_t strobeDutyCycle = static_cast(0); - uint8_t strobeLevel = static_cast(0); + chip::BitMask warningInfo = static_cast>(0); + uint16_t warningDuration = static_cast(0); + uint8_t strobeDutyCycle = static_cast(0); + uint8_t strobeLevel = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28085,10 +28085,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StartWarning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags warningInfo = static_cast>(0); - uint16_t warningDuration = static_cast(0); - uint8_t strobeDutyCycle = static_cast(0); - uint8_t strobeLevel = static_cast(0); + chip::BitMask warningInfo = static_cast>(0); + uint16_t warningDuration = static_cast(0); + uint8_t strobeDutyCycle = static_cast(0); + uint8_t strobeLevel = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StartWarning @@ -28105,7 +28105,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Squawk::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags squawkInfo = static_cast>(0); + chip::BitMask squawkInfo = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28120,7 +28120,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Squawk::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags squawkInfo = static_cast>(0); + chip::BitMask squawkInfo = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Squawk @@ -31116,9 +31116,9 @@ struct Type SimpleEnum c = static_cast(0); chip::ByteSpan d; chip::CharSpan e; - chip::BitFlags f = static_cast>(0); - float g = static_cast(0); - double h = static_cast(0); + chip::BitMask f = static_cast>(0); + float g = static_cast(0); + double h = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -32803,9 +32803,9 @@ struct TypeInfo namespace Bitmap8 { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap8::Id; } @@ -32815,9 +32815,9 @@ struct TypeInfo namespace Bitmap16 { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap16::Id; } @@ -32827,9 +32827,9 @@ struct TypeInfo namespace Bitmap32 { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap32::Id; } @@ -32839,9 +32839,9 @@ struct TypeInfo namespace Bitmap64 { struct TypeInfo { - using Type = chip::BitFlags; - using DecodableType = chip::BitFlags; - using DecodableArgType = chip::BitFlags; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap64::Id; } @@ -33389,10 +33389,10 @@ struct TypeInfo namespace NullableBitmap8 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; using DecodableArgType = - const chip::app::DataModel::Nullable> &; + const chip::app::DataModel::Nullable> &; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap8::Id; } @@ -33402,10 +33402,10 @@ struct TypeInfo namespace NullableBitmap16 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; using DecodableArgType = - const chip::app::DataModel::Nullable> &; + const chip::app::DataModel::Nullable> &; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap16::Id; } @@ -33415,10 +33415,10 @@ struct TypeInfo namespace NullableBitmap32 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; using DecodableArgType = - const chip::app::DataModel::Nullable> &; + const chip::app::DataModel::Nullable> &; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap32::Id; } @@ -33428,10 +33428,10 @@ struct TypeInfo namespace NullableBitmap64 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; using DecodableArgType = - const chip::app::DataModel::Nullable> &; + const chip::app::DataModel::Nullable> &; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap64::Id; } @@ -33818,13 +33818,13 @@ struct TypeInfo Attributes::Boolean::TypeInfo::DecodableType boolean = static_cast(0); Attributes::Bitmap8::TypeInfo::DecodableType bitmap8 = - static_cast>(0); + static_cast>(0); Attributes::Bitmap16::TypeInfo::DecodableType bitmap16 = - static_cast>(0); + static_cast>(0); Attributes::Bitmap32::TypeInfo::DecodableType bitmap32 = - static_cast>(0); + static_cast>(0); Attributes::Bitmap64::TypeInfo::DecodableType bitmap64 = - static_cast>(0); + static_cast>(0); Attributes::Int8u::TypeInfo::DecodableType int8u = static_cast(0); Attributes::Int16u::TypeInfo::DecodableType int16u = static_cast(0); Attributes::Int24u::TypeInfo::DecodableType int24u = static_cast(0); @@ -34056,13 +34056,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DisplayMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId = static_cast(0); - chip::BitFlags messageControl = static_cast>(0); - uint32_t startTime = static_cast(0); - uint16_t durationInMinutes = static_cast(0); + uint32_t messageId = static_cast(0); + chip::BitMask messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl = - static_cast>(0); + chip::BitMask optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34077,13 +34077,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::DisplayMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId = static_cast(0); - chip::BitFlags messageControl = static_cast>(0); - uint32_t startTime = static_cast(0); - uint16_t durationInMinutes = static_cast(0); + uint32_t messageId = static_cast(0); + chip::BitMask messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl = - static_cast>(0); + chip::BitMask optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisplayMessage @@ -34129,8 +34129,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CancelMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId = static_cast(0); - chip::BitFlags messageControl = static_cast>(0); + uint32_t messageId = static_cast(0); + chip::BitMask messageControl = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34145,8 +34145,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CancelMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId = static_cast(0); - chip::BitFlags messageControl = static_cast>(0); + uint32_t messageId = static_cast(0); + chip::BitMask messageControl = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CancelMessage @@ -34209,13 +34209,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DisplayProtectedMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId = static_cast(0); - chip::BitFlags messageControl = static_cast>(0); - uint32_t startTime = static_cast(0); - uint16_t durationInMinutes = static_cast(0); + uint32_t messageId = static_cast(0); + chip::BitMask messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl = - static_cast>(0); + chip::BitMask optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34230,13 +34230,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::DisplayProtectedMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId = static_cast(0); - chip::BitFlags messageControl = static_cast>(0); - uint32_t startTime = static_cast(0); - uint16_t durationInMinutes = static_cast(0); + uint32_t messageId = static_cast(0); + chip::BitMask messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl = - static_cast>(0); + chip::BitMask optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisplayProtectedMessage @@ -34857,8 +34857,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetAlertsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount = static_cast>(0); - DataModel::List> alertStructures; + chip::BitMask alertsCount = static_cast>(0); + DataModel::List> alertStructures; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34873,8 +34873,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetAlertsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount = static_cast>(0); - DataModel::DecodableList> alertStructures; + chip::BitMask alertsCount = static_cast>(0); + DataModel::DecodableList> alertStructures; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetAlertsResponse @@ -34892,8 +34892,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AlertsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount = static_cast>(0); - DataModel::List> alertStructures; + chip::BitMask alertsCount = static_cast>(0); + DataModel::List> alertStructures; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34908,8 +34908,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AlertsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount = static_cast>(0); - DataModel::DecodableList> alertStructures; + chip::BitMask alertsCount = static_cast>(0); + DataModel::DecodableList> alertStructures; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AlertsNotification diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a55db4536fe19f..680e20f7a8660e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8358,7 +8358,7 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute } private: - chip::BitFlags mValue; + chip::BitMask mValue; }; class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute @@ -8774,7 +8774,7 @@ class WriteWindowCoveringMode : public WriteAttribute } private: - chip::BitFlags mValue; + chip::BitMask mValue; }; /*----------------------------------------------------------------------------*\ @@ -15695,7 +15695,7 @@ class WriteTestClusterBitmap8 : public WriteAttribute } private: - chip::BitFlags mValue; + chip::BitMask mValue; }; class WriteTestClusterBitmap16 : public WriteAttribute @@ -15721,7 +15721,7 @@ class WriteTestClusterBitmap16 : public WriteAttribute } private: - chip::BitFlags mValue; + chip::BitMask mValue; }; class WriteTestClusterBitmap32 : public WriteAttribute @@ -15747,7 +15747,7 @@ class WriteTestClusterBitmap32 : public WriteAttribute } private: - chip::BitFlags mValue; + chip::BitMask mValue; }; class WriteTestClusterBitmap64 : public WriteAttribute @@ -15773,7 +15773,7 @@ class WriteTestClusterBitmap64 : public WriteAttribute } private: - chip::BitFlags mValue; + chip::BitMask mValue; }; class WriteTestClusterInt8u : public WriteAttribute @@ -16972,7 +16972,7 @@ class WriteTestClusterNullableBitmap8 : public WriteAttribute } private: - chip::app::DataModel::Nullable> mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableBitmap16 : public WriteAttribute @@ -16999,7 +16999,7 @@ class WriteTestClusterNullableBitmap16 : public WriteAttribute } private: - chip::app::DataModel::Nullable> mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableBitmap32 : public WriteAttribute @@ -17026,7 +17026,7 @@ class WriteTestClusterNullableBitmap32 : public WriteAttribute } private: - chip::app::DataModel::Nullable> mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableBitmap64 : public WriteAttribute @@ -17053,7 +17053,7 @@ class WriteTestClusterNullableBitmap64 : public WriteAttribute } private: - chip::app::DataModel::Nullable> mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableInt8u : public WriteAttribute diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 6ada81f09cb420..c2ae86dcf733a3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5569,7 +5569,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("MinRFIDCodeLength", 1, value); } case DoorLock::Attributes::CredentialRulesSupport::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CredentialRulesSupport", 1, value); } @@ -5604,12 +5604,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("OperatingMode", 1, value); } case DoorLock::Attributes::SupportedOperatingModes::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedOperatingModes", 1, value); } case DoorLock::Attributes::DefaultConfigurationRegister::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("DefaultConfigurationRegister", 1, value); } @@ -5634,7 +5634,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("EnablePrivacyModeButton", 1, value); } case DoorLock::Attributes::LocalProgrammingFeatures::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("LocalProgrammingFeatures", 1, value); } @@ -8078,7 +8078,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("MaxConstTemp", 1, value); } case PumpConfigurationAndControl::Attributes::PumpStatus::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PumpStatus", 1, value); } @@ -8466,22 +8466,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("boolean", 1, value); } case TestCluster::Attributes::Bitmap8::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap8", 1, value); } case TestCluster::Attributes::Bitmap16::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap16", 1, value); } case TestCluster::Attributes::Bitmap32::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap32", 1, value); } case TestCluster::Attributes::Bitmap64::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap64", 1, value); } @@ -8709,22 +8709,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("nullable_boolean", 1, value); } case TestCluster::Attributes::NullableBitmap8::Id: { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap8", 1, value); } case TestCluster::Attributes::NullableBitmap16::Id: { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap16", 1, value); } case TestCluster::Attributes::NullableBitmap32::Id: { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap32", 1, value); } case TestCluster::Attributes::NullableBitmap64::Id: { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap64", 1, value); } @@ -9859,7 +9859,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("NumberOfActuationsTilt", 1, value); } case WindowCovering::Attributes::ConfigStatus::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ConfigStatus", 1, value); } @@ -9924,7 +9924,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("InstalledClosedLimitTilt", 1, value); } case WindowCovering::Attributes::Mode::Id: { - chip::BitFlags value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Mode", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0fe04513f1b7f3..5d1391e71e837c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -10472,7 +10472,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10495,7 +10495,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10518,7 +10518,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4); + value.updateFlags = static_cast>(4); value.action = static_cast(0); value.direction = static_cast(0); value.time = 30U; @@ -10541,7 +10541,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(8); + value.updateFlags = static_cast>(8); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10564,7 +10564,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; @@ -10599,7 +10599,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10634,7 +10634,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2); value.action = static_cast(0); value.direction = static_cast(1); value.time = 0U; @@ -10657,7 +10657,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; @@ -10692,7 +10692,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10755,7 +10755,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10778,7 +10778,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(2); value.direction = static_cast(0); value.time = 0U; @@ -10813,7 +10813,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -10848,7 +10848,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2); value.action = static_cast(0); value.direction = static_cast(1); value.time = 0U; @@ -10871,7 +10871,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(2); value.direction = static_cast(0); value.time = 0U; @@ -10906,7 +10906,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -11159,7 +11159,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15); + value.updateFlags = static_cast>(15); value.action = static_cast(0); value.direction = static_cast(0); value.time = 30U; @@ -11206,7 +11206,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; @@ -11235,7 +11235,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2); value.action = static_cast(0); value.direction = static_cast(1); value.time = 0U; @@ -11258,7 +11258,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -11511,7 +11511,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15); + value.updateFlags = static_cast>(15); value.action = static_cast(0); value.direction = static_cast(0); value.time = 30U; @@ -11552,7 +11552,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; @@ -11587,7 +11587,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4); + value.updateFlags = static_cast>(4); value.action = static_cast(0); value.direction = static_cast(0); value.time = 60U; @@ -11610,7 +11610,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; @@ -27083,7 +27083,7 @@ class Test_TC_PCC_2_1Suite : public TestCommand } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map16")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -35421,7 +35421,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); @@ -35451,7 +35451,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); @@ -35699,8 +35699,8 @@ class Test_TC_WNCV_2_1Suite : public TestCommand LogStep(6, "1f: write a value into the RW mandatory attribute:: Mode"); VerifyOrDo(!ShouldSkip("A_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0); + chip::BitMask value; + value = static_cast>(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -35947,8 +35947,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::BitFlags configStatusValA; - chip::BitFlags configStatusValB; + chip::BitMask configStatusValA; + chip::BitMask configStatusValB; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -35972,7 +35972,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 4)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -35984,7 +35984,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -35996,7 +35996,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -36012,7 +36012,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -36021,7 +36021,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -36036,7 +36036,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -36052,7 +36052,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -36061,7 +36061,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); @@ -36096,8 +36096,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand LogStep(1, "1a: TH set the Mode Attribute bit0 of the DUT"); VerifyOrDo(!ShouldSkip("WNCV_REVERSAL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(1); + chip::BitMask value; + value = static_cast>(1); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36111,8 +36111,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand LogStep(3, "1c: TH clear the Mode Attribute bit0 of the DUT"); VerifyOrDo(!ShouldSkip("WNCV_REVERSAL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0); + chip::BitMask value; + value = static_cast>(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36126,8 +36126,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand LogStep(5, "2a: TH set the Mode Attribute bit1 of the DUT"); VerifyOrDo(!ShouldSkip("WNCV_CALIBRATION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(2); + chip::BitMask value; + value = static_cast>(2); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36151,8 +36151,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand LogStep(8, "2d: TH clear the Mode Attribute bit1 of the DUT"); VerifyOrDo(!ShouldSkip("WNCV_CALIBRATION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0); + chip::BitMask value; + value = static_cast>(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36182,8 +36182,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand LogStep(12, "3a: TH set the Mode Attribute bit2 of the DUT"); VerifyOrDo(!ShouldSkip("WNCV_MAINTENANCE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(4); + chip::BitMask value; + value = static_cast>(4); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -36207,8 +36207,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand LogStep(15, "3d: TH clear the Mode Attribute bit2 of the DUT"); VerifyOrDo(!ShouldSkip("WNCV_MAINTENANCE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0); + chip::BitMask value; + value = static_cast>(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -41188,7 +41188,7 @@ class TestClusterSuite : public TestCommand chip::Optional mTimeout; chip::app::DataModel::Nullable booValueNull; - chip::app::DataModel::Nullable> nullableValue254; + chip::app::DataModel::Nullable> nullableValue254; chip::app::DataModel::Nullable nullableEnumAttr254; uint8_t * nullableOctetStrTestValueBuffer = nullptr; chip::app::DataModel::Nullable nullableOctetStrTestValue; @@ -41269,7 +41269,7 @@ class TestClusterSuite : public TestCommand case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap8", value, 0)); } @@ -41280,7 +41280,7 @@ class TestClusterSuite : public TestCommand case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap8", value, 255)); } @@ -41291,7 +41291,7 @@ class TestClusterSuite : public TestCommand case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap8", value, 0)); } @@ -41299,7 +41299,7 @@ class TestClusterSuite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap16", value, 0U)); } @@ -41310,7 +41310,7 @@ class TestClusterSuite : public TestCommand case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap16", value, 65535U)); } @@ -41321,7 +41321,7 @@ class TestClusterSuite : public TestCommand case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap16", value, 0U)); } @@ -41329,7 +41329,7 @@ class TestClusterSuite : public TestCommand case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); } @@ -41340,7 +41340,7 @@ class TestClusterSuite : public TestCommand case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap32", value, 4294967295UL)); } @@ -41351,7 +41351,7 @@ class TestClusterSuite : public TestCommand case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); } @@ -41359,7 +41359,7 @@ class TestClusterSuite : public TestCommand case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap64", value, 0ULL)); } @@ -41370,7 +41370,7 @@ class TestClusterSuite : public TestCommand case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap64", value, 18446744073709551615ULL)); } @@ -41381,7 +41381,7 @@ class TestClusterSuite : public TestCommand case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap64", value, 0ULL)); } @@ -42590,7 +42590,7 @@ class TestClusterSuite : public TestCommand case 187: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254)); @@ -42602,7 +42602,7 @@ class TestClusterSuite : public TestCommand case 189: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254)); @@ -42616,7 +42616,7 @@ class TestClusterSuite : public TestCommand case 191: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNull("nullableBitmap8", value)); } @@ -42624,7 +42624,7 @@ class TestClusterSuite : public TestCommand case 192: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintNotValue("value", value, nullableValue254)); } @@ -42635,7 +42635,7 @@ class TestClusterSuite : public TestCommand case 194: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap16", value)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", value.Value(), 65534U)); @@ -42647,7 +42647,7 @@ class TestClusterSuite : public TestCommand case 196: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap16", value)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", value.Value(), 65534U)); @@ -42659,7 +42659,7 @@ class TestClusterSuite : public TestCommand case 198: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNull("nullableBitmap16", value)); } @@ -42670,7 +42670,7 @@ class TestClusterSuite : public TestCommand case 200: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap32", value)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", value.Value(), 4294967294UL)); @@ -42682,7 +42682,7 @@ class TestClusterSuite : public TestCommand case 202: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap32", value)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", value.Value(), 4294967294UL)); @@ -42694,7 +42694,7 @@ class TestClusterSuite : public TestCommand case 204: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNull("nullableBitmap32", value)); } @@ -42705,7 +42705,7 @@ class TestClusterSuite : public TestCommand case 206: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap64", value)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", value.Value(), 18446744073709551614ULL)); @@ -42717,7 +42717,7 @@ class TestClusterSuite : public TestCommand case 208: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap64", value)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", value.Value(), 18446744073709551614ULL)); @@ -42729,7 +42729,7 @@ class TestClusterSuite : public TestCommand case 210: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNull("nullableBitmap64", value)); } @@ -44610,8 +44610,8 @@ class TestClusterSuite : public TestCommand case 12: { LogStep(12, "Write attribute BITMAP8 Max Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(255); + chip::BitMask value; + value = static_cast>(255); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44623,8 +44623,8 @@ class TestClusterSuite : public TestCommand case 14: { LogStep(14, "Write attribute BITMAP8 Min Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0); + chip::BitMask value; + value = static_cast>(0); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44641,8 +44641,8 @@ class TestClusterSuite : public TestCommand case 17: { LogStep(17, "Write attribute BITMAP16 Max Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(65535U); + chip::BitMask value; + value = static_cast>(65535U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44654,8 +44654,8 @@ class TestClusterSuite : public TestCommand case 19: { LogStep(19, "Write attribute BITMAP16 Min Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0U); + chip::BitMask value; + value = static_cast>(0U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44672,8 +44672,8 @@ class TestClusterSuite : public TestCommand case 22: { LogStep(22, "Write attribute BITMAP32 Max Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(4294967295UL); + chip::BitMask value; + value = static_cast>(4294967295UL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44685,8 +44685,8 @@ class TestClusterSuite : public TestCommand case 24: { LogStep(24, "Write attribute BITMAP32 Min Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0UL); + chip::BitMask value; + value = static_cast>(0UL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44703,8 +44703,8 @@ class TestClusterSuite : public TestCommand case 27: { LogStep(27, "Write attribute BITMAP64 Max Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(18446744073709551615ULL); + chip::BitMask value; + value = static_cast>(18446744073709551615ULL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value, chip::NullOptional, chip::NullOptional); } @@ -44716,8 +44716,8 @@ class TestClusterSuite : public TestCommand case 29: { LogStep(29, "Write attribute BITMAP64 Min Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(0ULL); + chip::BitMask value; + value = static_cast>(0ULL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value, chip::NullOptional, chip::NullOptional); } @@ -45588,7 +45588,7 @@ class TestClusterSuite : public TestCommand value.arg1.c = static_cast(2); value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1); + value.arg1.f = static_cast>(1); value.arg1.g = 0.0f; value.arg1.h = 0; @@ -45607,7 +45607,7 @@ class TestClusterSuite : public TestCommand value.arg1.c = static_cast(2); value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1); + value.arg1.f = static_cast>(1); value.arg1.g = 0.0f; value.arg1.h = 0; @@ -45629,7 +45629,7 @@ class TestClusterSuite : public TestCommand value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -45651,7 +45651,7 @@ class TestClusterSuite : public TestCommand value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -45673,7 +45673,7 @@ class TestClusterSuite : public TestCommand value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -45687,7 +45687,7 @@ class TestClusterSuite : public TestCommand listHolder_1->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[0].f = static_cast>(1); + listHolder_1->mList[0].f = static_cast>(1); listHolder_1->mList[0].g = 0.0f; listHolder_1->mList[0].h = 0; @@ -45697,7 +45697,7 @@ class TestClusterSuite : public TestCommand listHolder_1->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[1].f = static_cast>(1); + listHolder_1->mList[1].f = static_cast>(1); listHolder_1->mList[1].g = 0.0f; listHolder_1->mList[1].h = 0; @@ -45752,7 +45752,7 @@ class TestClusterSuite : public TestCommand value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -45766,7 +45766,7 @@ class TestClusterSuite : public TestCommand listHolder_1->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[0].f = static_cast>(1); + listHolder_1->mList[0].f = static_cast>(1); listHolder_1->mList[0].g = 0.0f; listHolder_1->mList[0].h = 0; @@ -45776,7 +45776,7 @@ class TestClusterSuite : public TestCommand listHolder_1->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[1].f = static_cast>(1); + listHolder_1->mList[1].f = static_cast>(1); listHolder_1->mList[1].g = 0.0f; listHolder_1->mList[1].h = 0; @@ -45828,7 +45828,7 @@ class TestClusterSuite : public TestCommand value.arg1.c = static_cast(2); value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1); + value.arg1.f = static_cast>(1); value.arg1.g = 0.1f; value.arg1.h = 0.1; @@ -45936,7 +45936,7 @@ class TestClusterSuite : public TestCommand listHolder_0->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); listHolder_0->mList[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - listHolder_0->mList[0].f = static_cast>(1); + listHolder_0->mList[0].f = static_cast>(1); listHolder_0->mList[0].g = 0.0f; listHolder_0->mList[0].h = 0; @@ -45946,7 +45946,7 @@ class TestClusterSuite : public TestCommand listHolder_0->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); listHolder_0->mList[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - listHolder_0->mList[1].f = static_cast>(1); + listHolder_0->mList[1].f = static_cast>(1); listHolder_0->mList[1].g = 0.0f; listHolder_0->mList[1].h = 0; @@ -45973,7 +45973,7 @@ class TestClusterSuite : public TestCommand listHolder_0->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); listHolder_0->mList[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - listHolder_0->mList[0].f = static_cast>(1); + listHolder_0->mList[0].f = static_cast>(1); listHolder_0->mList[0].g = 0.0f; listHolder_0->mList[0].h = 0; @@ -45983,7 +45983,7 @@ class TestClusterSuite : public TestCommand listHolder_0->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); listHolder_0->mList[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - listHolder_0->mList[1].f = static_cast>(1); + listHolder_0->mList[1].f = static_cast>(1); listHolder_0->mList[1].g = 0.0f; listHolder_0->mList[1].h = 0; @@ -46014,7 +46014,7 @@ class TestClusterSuite : public TestCommand listHolder_0->mList[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); listHolder_0->mList[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - listHolder_0->mList[0].c.f = static_cast>(1); + listHolder_0->mList[0].c.f = static_cast>(1); listHolder_0->mList[0].c.g = 0.0f; listHolder_0->mList[0].c.h = 0; @@ -46028,7 +46028,7 @@ class TestClusterSuite : public TestCommand listHolder_2->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[0].f = static_cast>(1); + listHolder_2->mList[0].f = static_cast>(1); listHolder_2->mList[0].g = 0.0f; listHolder_2->mList[0].h = 0; @@ -46038,7 +46038,7 @@ class TestClusterSuite : public TestCommand listHolder_2->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[1].f = static_cast>(1); + listHolder_2->mList[1].f = static_cast>(1); listHolder_2->mList[1].g = 0.0f; listHolder_2->mList[1].h = 0; @@ -46102,7 +46102,7 @@ class TestClusterSuite : public TestCommand listHolder_0->mList[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); listHolder_0->mList[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - listHolder_0->mList[0].c.f = static_cast>(1); + listHolder_0->mList[0].c.f = static_cast>(1); listHolder_0->mList[0].c.g = 0.0f; listHolder_0->mList[0].c.h = 0; @@ -46116,7 +46116,7 @@ class TestClusterSuite : public TestCommand listHolder_2->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[0].f = static_cast>(1); + listHolder_2->mList[0].f = static_cast>(1); listHolder_2->mList[0].g = 0.0f; listHolder_2->mList[0].h = 0; @@ -46126,7 +46126,7 @@ class TestClusterSuite : public TestCommand listHolder_2->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[1].f = static_cast>(1); + listHolder_2->mList[1].f = static_cast>(1); listHolder_2->mList[1].g = 0.0f; listHolder_2->mList[1].h = 0; @@ -46350,9 +46350,9 @@ class TestClusterSuite : public TestCommand case 186: { LogStep(186, "Write attribute NULLABLE_BITMAP8 Max Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(254); + value.Value() = static_cast>(254); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46364,9 +46364,9 @@ class TestClusterSuite : public TestCommand case 188: { LogStep(188, "Write attribute NULLABLE_BITMAP8 Invalid Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(255); + value.Value() = static_cast>(255); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46378,7 +46378,7 @@ class TestClusterSuite : public TestCommand case 190: { LogStep(190, "Write attribute NULLABLE_BITMAP8 null Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id, value, chip::NullOptional, chip::NullOptional); @@ -46396,9 +46396,9 @@ class TestClusterSuite : public TestCommand case 193: { LogStep(193, "Write attribute NULLABLE_BITMAP16 Max Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(65534U); + value.Value() = static_cast>(65534U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46410,9 +46410,9 @@ class TestClusterSuite : public TestCommand case 195: { LogStep(195, "Write attribute NULLABLE_BITMAP16 Invalid Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(65535U); + value.Value() = static_cast>(65535U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46424,7 +46424,7 @@ class TestClusterSuite : public TestCommand case 197: { LogStep(197, "Write attribute NULLABLE_BITMAP16 null Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap16::Id, value, chip::NullOptional, chip::NullOptional); @@ -46437,9 +46437,9 @@ class TestClusterSuite : public TestCommand case 199: { LogStep(199, "Write attribute NULLABLE_BITMAP32 Max Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(4294967294UL); + value.Value() = static_cast>(4294967294UL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46451,9 +46451,9 @@ class TestClusterSuite : public TestCommand case 201: { LogStep(201, "Write attribute NULLABLE_BITMAP32 Invalid Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(4294967295UL); + value.Value() = static_cast>(4294967295UL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46465,7 +46465,7 @@ class TestClusterSuite : public TestCommand case 203: { LogStep(203, "Write attribute NULLABLE_BITMAP32 null Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap32::Id, value, chip::NullOptional, chip::NullOptional); @@ -46478,9 +46478,9 @@ class TestClusterSuite : public TestCommand case 205: { LogStep(205, "Write attribute NULLABLE_BITMAP64 Max Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(18446744073709551614ULL); + value.Value() = static_cast>(18446744073709551614ULL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46492,9 +46492,9 @@ class TestClusterSuite : public TestCommand case 207: { LogStep(207, "Write attribute NULLABLE_BITMAP64 Invalid Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(18446744073709551615ULL); + value.Value() = static_cast>(18446744073709551615ULL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46506,7 +46506,7 @@ class TestClusterSuite : public TestCommand case 209: { LogStep(209, "Write attribute NULLABLE_BITMAP64 null Value"); ListFreer listFreer; - chip::app::DataModel::Nullable> value; + chip::app::DataModel::Nullable> value; value.SetNull(); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap64::Id, value, chip::NullOptional, chip::NullOptional); @@ -48428,7 +48428,7 @@ class TestClusterSuite : public TestCommand value.c = static_cast(2); value.d = chip::ByteSpan(chip::Uint8::from_const_char("abcgarbage: not in length on purpose"), 3); value.e = chip::Span("garbage: not in length on purpose", 0); - value.f = static_cast>(17); + value.f = static_cast>(17); value.g = 1.5f; value.h = 3.14159265358979; @@ -50201,10 +50201,10 @@ class TestSaveAsSuite : public TestCommand uint8_t TestAddArgumentDefaultValue; bool readAttributeBooleanDefaultValue; - chip::BitFlags readAttributeBitmap8DefaultValue; - chip::BitFlags readAttributeBitmap16DefaultValue; - chip::BitFlags readAttributeBitmap32DefaultValue; - chip::BitFlags readAttributeBitmap64DefaultValue; + chip::BitMask readAttributeBitmap8DefaultValue; + chip::BitMask readAttributeBitmap16DefaultValue; + chip::BitMask readAttributeBitmap32DefaultValue; + chip::BitMask readAttributeBitmap64DefaultValue; uint8_t readAttributeInt8uDefaultValue; uint16_t readAttributeInt16uDefaultValue; uint32_t readAttributeInt32uDefaultValue; @@ -50304,7 +50304,7 @@ class TestSaveAsSuite : public TestCommand case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap8", value, 0)); @@ -50317,7 +50317,7 @@ class TestSaveAsSuite : public TestCommand case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap8DefaultValue)); } @@ -50328,7 +50328,7 @@ class TestSaveAsSuite : public TestCommand case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap8", value, readAttributeBitmap8DefaultValue)); } @@ -50336,7 +50336,7 @@ class TestSaveAsSuite : public TestCommand case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap16", value, 0U)); @@ -50349,7 +50349,7 @@ class TestSaveAsSuite : public TestCommand case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap16DefaultValue)); } @@ -50360,7 +50360,7 @@ class TestSaveAsSuite : public TestCommand case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap16", value, readAttributeBitmap16DefaultValue)); } @@ -50368,7 +50368,7 @@ class TestSaveAsSuite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap32", value, 0UL)); @@ -50381,7 +50381,7 @@ class TestSaveAsSuite : public TestCommand case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap32DefaultValue)); } @@ -50392,7 +50392,7 @@ class TestSaveAsSuite : public TestCommand case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap32", value, readAttributeBitmap32DefaultValue)); } @@ -50400,7 +50400,7 @@ class TestSaveAsSuite : public TestCommand case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap64", value, 0ULL)); @@ -50413,7 +50413,7 @@ class TestSaveAsSuite : public TestCommand case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintNotValue("value", value, readAttributeBitmap64DefaultValue)); } @@ -50424,7 +50424,7 @@ class TestSaveAsSuite : public TestCommand case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::BitFlags value; + chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("bitmap64", value, readAttributeBitmap64DefaultValue)); } @@ -51076,8 +51076,8 @@ class TestSaveAsSuite : public TestCommand case 10: { LogStep(10, "Write attribute BITMAP8 Not Default Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(1); + chip::BitMask value; + value = static_cast>(1); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -51089,7 +51089,7 @@ class TestSaveAsSuite : public TestCommand case 12: { LogStep(12, "Write attribute BITMAP8 Default Value"); ListFreer listFreer; - chip::BitFlags value; + chip::BitMask value; value = readAttributeBitmap8DefaultValue; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); @@ -51107,8 +51107,8 @@ class TestSaveAsSuite : public TestCommand case 15: { LogStep(15, "Write attribute BITMAP16 Not Default Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(1U); + chip::BitMask value; + value = static_cast>(1U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value, chip::NullOptional, chip::NullOptional); } @@ -51120,7 +51120,7 @@ class TestSaveAsSuite : public TestCommand case 17: { LogStep(17, "Write attribute BITMAP16 Default Value"); ListFreer listFreer; - chip::BitFlags value; + chip::BitMask value; value = readAttributeBitmap16DefaultValue; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap16::Id, value, chip::NullOptional, chip::NullOptional); @@ -51138,8 +51138,8 @@ class TestSaveAsSuite : public TestCommand case 20: { LogStep(20, "Write attribute BITMAP32 Not Default Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(1UL); + chip::BitMask value; + value = static_cast>(1UL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value, chip::NullOptional, chip::NullOptional); } @@ -51151,7 +51151,7 @@ class TestSaveAsSuite : public TestCommand case 22: { LogStep(22, "Write attribute BITMAP32 Default Value"); ListFreer listFreer; - chip::BitFlags value; + chip::BitMask value; value = readAttributeBitmap32DefaultValue; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap32::Id, value, chip::NullOptional, chip::NullOptional); @@ -51169,8 +51169,8 @@ class TestSaveAsSuite : public TestCommand case 25: { LogStep(25, "Write attribute BITMAP64 Not Default Value"); ListFreer listFreer; - chip::BitFlags value; - value = static_cast>(1ULL); + chip::BitMask value; + value = static_cast>(1ULL); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value, chip::NullOptional, chip::NullOptional); } @@ -51182,7 +51182,7 @@ class TestSaveAsSuite : public TestCommand case 27: { LogStep(27, "Write attribute BITMAP64 Default Value"); ListFreer listFreer; - chip::BitFlags value; + chip::BitMask value; value = readAttributeBitmap64DefaultValue; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap64::Id, value, chip::NullOptional, chip::NullOptional); @@ -60810,7 +60810,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 0; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60826,7 +60826,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60842,7 +60842,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 0U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60858,7 +60858,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60874,7 +60874,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 2U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60890,7 +60890,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(0); + value.daysMask = static_cast>(0); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60906,7 +60906,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(3); + value.daysMask = static_cast>(3); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60922,7 +60922,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(73); + value.daysMask = static_cast>(73); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -60938,7 +60938,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 24; value.startMinute = 16; value.endHour = 18; @@ -60954,7 +60954,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 60; value.endHour = 18; @@ -60970,7 +60970,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 24; @@ -60986,7 +60986,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -61002,7 +61002,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 19; value.startMinute = 16; value.endHour = 18; @@ -61018,7 +61018,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 50; value.endHour = 15; @@ -61349,7 +61349,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 15; value.startMinute = 16; value.endHour = 18; @@ -61626,7 +61626,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 2; value.userIndex = 1U; - value.daysMask = static_cast>(2); + value.daysMask = static_cast>(2); value.startHour = 0; value.startMinute = 0; value.endHour = 23; @@ -61786,7 +61786,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(2); + value.daysMask = static_cast>(2); value.startHour = 0; value.startMinute = 0; value.endHour = 23; @@ -61884,7 +61884,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 0; value.startMinute = 0; value.endHour = 23; @@ -61935,7 +61935,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 4; value.userIndex = 2U; - value.daysMask = static_cast>(64); + value.daysMask = static_cast>(64); value.startHour = 23; value.startMinute = 0; value.endHour = 23; @@ -62101,7 +62101,7 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(1); + value.daysMask = static_cast>(1); value.startHour = 0; value.startMinute = 0; value.endHour = 23; @@ -63133,7 +63133,7 @@ class Test_TC_DL_2_8Suite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 1; value.userIndex = 1U; - value.daysMask = static_cast>(2); + value.daysMask = static_cast>(2); value.startHour = 15; value.startMinute = 45; value.endHour = 16; @@ -63160,7 +63160,7 @@ class Test_TC_DL_2_8Suite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = 0; value.userIndex = 1U; - value.daysMask = static_cast>(7); + value.daysMask = static_cast>(7); value.startHour = 15; value.startMinute = 45; value.endHour = 16;