diff --git a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt index f9b0f4bef764c5..a5e757b227f581 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt @@ -5,6 +5,8 @@ {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_parser_impl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_parser_impl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/chip-tool/templates/ComplexArgumentParser.zapt b/examples/chip-tool/templates/ComplexArgumentParser.zapt index 7364b243188333..58cc5046dd5178 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser.zapt @@ -8,6 +8,8 @@ {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_parser_decl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_parser_decl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt index 167021f49577d2..0f41ff2e16b96a 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt @@ -7,6 +7,8 @@ using namespace chip::app::Clusters; {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_logger_impl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_logger_impl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/chip-tool/templates/logging/DataModelLogger.zapt b/examples/chip-tool/templates/logging/DataModelLogger.zapt index befe9d4210ce07..97818566b43af5 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger.zapt @@ -6,6 +6,8 @@ {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_logger_decl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_logger_decl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index 44e6a4ff3b1827..beda9d3a6981f1 100644 --- a/examples/platform/silabs/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -166,22 +166,6 @@ bool BaseApplication::sIsFactoryResetTriggered = false; LEDWidget * BaseApplication::sAppActionLed = nullptr; BaseApplicationDelegate BaseApplication::sAppDelegate = BaseApplicationDelegate(); -#ifdef DIC_ENABLE -namespace { -void AppSpecificConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg) -{ - SILABS_LOG("AppSpecificConnectivityEventCallback: call back for IPV4"); - if ((event->Type == DeviceEventType::kInternetConnectivityChange) && - (event->InternetConnectivityChange.IPv4 == kConnectivity_Established)) - { - SILABS_LOG("Got IPv4 Address! Starting DIC module\n"); - if (DIC_OK != dic_init(dic::control::subscribeCB)) - SILABS_LOG("Failed to initialize DIC module\n"); - } -} -} // namespace -#endif // DIC_ENABLE - void BaseApplicationDelegate::OnCommissioningSessionStarted() { isComissioningStarted = true; @@ -203,7 +187,7 @@ void BaseApplicationDelegate::OnCommissioningWindowClosed() ChipLogError(DeviceLayer, "Failed to enable the TA Deep Sleep"); } } -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER && SLI_SI917qq +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER && SLI_SI917 } void BaseApplicationDelegate::OnFabricCommitted(const FabricTable & fabricTable, FabricIndex fabricIndex) @@ -297,10 +281,6 @@ CHIP_ERROR BaseApplication::Init() SILABS_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); SILABS_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); -#ifdef DIC_ENABLE - chip::DeviceLayer::PlatformMgr().AddEventHandler(AppSpecificConnectivityEventCallback, reinterpret_cast(nullptr)); -#endif // DIC_ENABLE - ConfigurationMgr().LogDeviceConfig(); OutputQrCode(true /*refreshLCD at init*/); @@ -730,14 +710,25 @@ SilabsLCD & BaseApplication::GetLCD(void) return slLCD; } -void BaseApplication::UpdateLCDStatusScreen(void) +void BaseApplication::UpdateLCDStatusScreen(bool withChipStackLock) { SilabsLCD::DisplayStatus_t status; bool enabled, attached; - chip::DeviceLayer::PlatformMgr().LockChipStack(); + if (withChipStackLock) + { + chip::DeviceLayer::PlatformMgr().LockChipStack(); + } #ifdef SL_WIFI enabled = ConnectivityMgr().IsWiFiStationEnabled(); attached = ConnectivityMgr().IsWiFiStationConnected(); + chip::DeviceLayer::NetworkCommissioning::Network network; + memset(reinterpret_cast(&network), 0, sizeof(network)); + chip::DeviceLayer::NetworkCommissioning::GetConnectedNetwork(network); + if (network.networkIDLen) + { + chip::Platform::CopyString(status.networkName, sizeof(status.networkName), + reinterpret_cast(network.networkID)); + } #endif /* SL_WIFI */ #if CHIP_ENABLE_OPENTHREAD enabled = ConnectivityMgr().IsThreadEnabled(); @@ -751,7 +742,10 @@ void BaseApplication::UpdateLCDStatusScreen(void) ? SilabsLCD::ICDMode_e::SIT : SilabsLCD::ICDMode_e::LIT; #endif - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + if (withChipStackLock) + { + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + } slLCD.SetStatus(status); } #endif @@ -822,10 +816,33 @@ void BaseApplication::DoProvisioningReset() void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t) { - if (event->Type == DeviceEventType::kServiceProvisioningChange) + switch (event->Type) { + case DeviceEventType::kServiceProvisioningChange: // Note: This is only called on Attach, we need to add a method to detect Thread Network Detach BaseApplication::sIsProvisioned = event->ServiceProvisioningChange.IsServiceProvisioned; + break; + case DeviceEventType::kInternetConnectivityChange: +#ifdef DIC_ENABLE + VerifyOrReturn(event->InternetConnectivityChange.IPv4 == kConnectivity_Established); + if (DIC_OK != dic_init(dic::control::subscribeCB)) + { + SILABS_LOG("Failed to initialize DIC module\n"); + } +#endif // DIC_ENABLE + break; + case DeviceEventType::kWiFiConnectivityChange: +#ifdef DISPLAY_ENABLED + SilabsLCD::Screen_e screen; + AppTask::GetLCD().GetScreen(screen); + // Update the LCD screen with SSID and connected state + VerifyOrReturn(screen == SilabsLCD::Screen_e::StatusScreen); + BaseApplication::UpdateLCDStatusScreen(false); + AppTask::GetLCD().SetScreen(screen); +#endif // DISPLAY_ENABLED + break; + default: + break; } } diff --git a/examples/platform/silabs/BaseApplication.h b/examples/platform/silabs/BaseApplication.h index 161f1cdc9eb2fd..9052e9355aab90 100644 --- a/examples/platform/silabs/BaseApplication.h +++ b/examples/platform/silabs/BaseApplication.h @@ -132,7 +132,7 @@ class BaseApplication */ static SilabsLCD & GetLCD(void); - static void UpdateLCDStatusScreen(void); + static void UpdateLCDStatusScreen(bool withChipStackLock = true); #endif /** diff --git a/examples/platform/silabs/display/lcd.cpp b/examples/platform/silabs/display/lcd.cpp index 80cd5a1774bbad..434dedf4f21b76 100644 --- a/examples/platform/silabs/display/lcd.cpp +++ b/examples/platform/silabs/display/lcd.cpp @@ -203,6 +203,11 @@ void SilabsLCD::SetCustomUI(customUICB cb) customUI = cb; } +void SilabsLCD::GetScreen(Screen_e & screen) +{ + screen = static_cast(mCurrentScreen); +} + void SilabsLCD::SetScreen(Screen_e screen) { if (screen >= InvalidScreen) @@ -226,6 +231,7 @@ void SilabsLCD::SetScreen(Screen_e screen) default: break; } + mCurrentScreen = screen; } void SilabsLCD::CycleScreens(void) diff --git a/examples/platform/silabs/display/lcd.h b/examples/platform/silabs/display/lcd.h index 703e72ab6ea61f..b62664c9b47346 100644 --- a/examples/platform/silabs/display/lcd.h +++ b/examples/platform/silabs/display/lcd.h @@ -26,8 +26,7 @@ #endif // QR_CODE_ENABLED #include "demo-ui.h" - -#define MAX_STR_LEN 48 +#include class SilabsLCD { @@ -52,11 +51,11 @@ class SilabsLCD typedef struct dStatus { - uint8_t nbFabric = 0; - bool connected = false; - char networkName[50] = { "TODO" }; - bool advertising = false; - ICDMode_e icdMode = NotICD; + uint8_t nbFabric = 0; + bool connected = false; + char networkName[chip::DeviceLayer::Internal::kMaxWiFiSSIDLength] = { 0 }; + bool advertising = false; + ICDMode_e icdMode = NotICD; } DisplayStatus_t; typedef void (*customUICB)(GLIB_Context_t * context); @@ -68,6 +67,7 @@ class SilabsLCD void WriteDemoUI(bool state); void SetCustomUI(customUICB cb); + void GetScreen(Screen_e & screen); void SetScreen(Screen_e screen); void CycleScreens(void); void SetStatus(DisplayStatus_t & status); diff --git a/scripts/py_matter_idl/matter_idl/backwards_compatibility.py b/scripts/py_matter_idl/matter_idl/backwards_compatibility.py index e431b6227575c7..f7db4edf934310 100644 --- a/scripts/py_matter_idl/matter_idl/backwards_compatibility.py +++ b/scripts/py_matter_idl/matter_idl/backwards_compatibility.py @@ -54,9 +54,9 @@ def attribute_name(attribute: Attribute) -> str: def not_stable(maturity: ApiMaturity): """Determine if the given api maturity allows binary/api changes or not.""" - # TODO: internal and deprecated not currently widely used, - # so we enforce stability on them for now. - return maturity == ApiMaturity.PROVISIONAL + # NOTE: deprecated are not to be used, so we expect no changes. They were + # probably "stable" at some point + return (maturity == ApiMaturity.PROVISIONAL) or (maturity == ApiMaturity.INTERNAL) class CompatibilityChecker: diff --git a/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py b/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py index e2657dd2e5d93d..43a273fa1fff3f 100755 --- a/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py +++ b/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py @@ -188,6 +188,13 @@ def test_provisional_cluster(self): "provisional server cluster A = 16 { enum X : ENUM8 { A = 1; B = 3; } info event A = 2 { int16u x = 1;} }", Compatibility.ALL_OK) + def test_internal_cluster(self): + self.ValidateUpdate( + "Internal cluster changes are ok.", + "internal server cluster A = 16 { enum X : ENUM8 { A = 1; B = 2; } info event A = 1 { int8u x = 1;} }", + "internal server cluster A = 16 { enum X : ENUM8 { A = 1; B = 3; } info event A = 2 { int16u x = 1;} }", + Compatibility.ALL_OK) + def test_clusters_enum_code(self): self.ValidateUpdate( "Adding an enum is ok. Also validates code formatting", diff --git a/src/app/cluster-building-blocks/QuieterReporting.h b/src/app/cluster-building-blocks/QuieterReporting.h index bf6b4fe36346d2..e64d56cd2b1c72 100644 --- a/src/app/cluster-building-blocks/QuieterReporting.h +++ b/src/app/cluster-building-blocks/QuieterReporting.h @@ -112,6 +112,8 @@ class QuieterReportingAttribute { public: explicit QuieterReportingAttribute(const Nullable & initialValue) : mValue(initialValue), mLastDirtyValue(initialValue) {} + // constructor that works with arrays of QuieterReportingAttribute + explicit QuieterReportingAttribute() : mValue(DataModel::NullNullable), mLastDirtyValue(DataModel::NullNullable) {} struct SufficientChangePredicateCandidate { diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 55c8cd9e7a77de..c4de9f9d9461ef 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -30,6 +30,7 @@ #endif using namespace chip; +using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::ColorControl; using chip::Protocols::InteractionModel::Status; @@ -204,22 +205,24 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl // The color control cluster should have a maximum of 9 scenable attributes ReturnErrorOnFailure(attributeValueList.ComputeSize(&attributeCount)); VerifyOrReturnError(attributeCount <= kColorControlScenableAttributesCount, CHIP_ERROR_BUFFER_TOO_SMALL); + + uint16_t epIndex = ColorControlServer::Instance().getEndpointIndex(endpoint); // Retrieve the buffers for different modes #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV ColorControlServer::ColorHueTransitionState * colorHueTransitionState = - ColorControlServer::Instance().getColorHueTransitionState(endpoint); + ColorControlServer::Instance().getColorHueTransitionStateByIndex(epIndex); ColorControlServer::Color16uTransitionState * colorSaturationTransitionState = - ColorControlServer::Instance().getSaturationTransitionState(endpoint); + ColorControlServer::Instance().getSaturationTransitionStateByIndex(epIndex); #endif #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY ColorControlServer::Color16uTransitionState * colorXTransitionState = - ColorControlServer::Instance().getXTransitionState(endpoint); + ColorControlServer::Instance().getXTransitionStateByIndex(epIndex); ColorControlServer::Color16uTransitionState * colorYTransitionState = - ColorControlServer::Instance().getYTransitionState(endpoint); + ColorControlServer::Instance().getYTransitionStateByIndex(epIndex); #endif #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP ColorControlServer::Color16uTransitionState * colorTempTransitionState = - ColorControlServer::Instance().getTempTransitionState(endpoint); + ColorControlServer::Instance().getTempTransitionStateByIndex(epIndex); #endif // Initialize action attributes to default values in case they are not in the scene @@ -456,6 +459,11 @@ ColorControlServer & ColorControlServer::Instance() return instance; } +uint16_t ColorControlServer::getEndpointIndex(EndpointId endpoint) +{ + return emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); +} + #ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT chip::scenes::SceneHandler * ColorControlServer::GetSceneHandler() { @@ -513,8 +521,9 @@ bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, c // Init both transition states on stop command to prevent that. if (status == Status::Success) { - ColorHueTransitionState * hueState = getColorHueTransitionState(endpoint); - Color16uTransitionState * saturationState = getSaturationTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + ColorHueTransitionState * hueState = getColorHueTransitionStateByIndex(epIndex); + Color16uTransitionState * saturationState = getSaturationTransitionStateByIndex(epIndex); initHueTransitionState(endpoint, hueState, false /*isEnhancedHue don't care*/); initSaturationTransitionState(endpoint, saturationState); } @@ -702,8 +711,7 @@ uint16_t ColorControlServer::computeTransitionTimeFromStateAndRate(ColorControlS */ EmberEventControl * ColorControlServer::getEventControl(EndpointId endpoint) { - uint16_t index = - emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); + uint16_t index = getEndpointIndex(endpoint); EmberEventControl * event = nullptr; if (index < ArraySize(eventControls)) @@ -825,15 +833,13 @@ bool ColorControlServer::computeNewColor16uValue(ColorControlServer::Color16uTra #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV /** - * @brief Returns ColorHueTransititionState associated to an endpoint + * @brief Returns ColorHueTransititionState associated to an endpoint index * * @param[in] endpoint * @return ColorControlServer::ColorHueTransitionState* */ -ColorControlServer::ColorHueTransitionState * ColorControlServer::getColorHueTransitionState(EndpointId endpoint) +ColorControlServer::ColorHueTransitionState * ColorControlServer::getColorHueTransitionStateByIndex(uint16_t index) { - uint16_t index = - emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); ColorHueTransitionState * state = nullptr; if (index < ArraySize(colorHueTransitionStates)) @@ -844,15 +850,24 @@ ColorControlServer::ColorHueTransitionState * ColorControlServer::getColorHueTra } /** - * @brief Returns Color16uTransitionState for saturation associated to an endpoint + * @brief Returns ColorHueTransititionState associated to an endpoint + * + * @param[in] endpoint + * @return ColorControlServer::ColorHueTransitionState* + */ +ColorControlServer::ColorHueTransitionState * ColorControlServer::getColorHueTransitionState(EndpointId endpoint) +{ + return getColorHueTransitionStateByIndex(getEndpointIndex(endpoint)); +} + +/** + * @brief Returns the saturation Color16uTransitionState associated to an endpoint index * * @param[in] endpoint * @return ColorControlServer::Color16uTransitionState* */ -ColorControlServer::Color16uTransitionState * ColorControlServer::getSaturationTransitionState(EndpointId endpoint) +ColorControlServer::Color16uTransitionState * ColorControlServer::getSaturationTransitionStateByIndex(uint16_t index) { - uint16_t index = - emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); Color16uTransitionState * state = nullptr; if (index < ArraySize(colorSatTransitionStates)) @@ -862,6 +877,17 @@ ColorControlServer::Color16uTransitionState * ColorControlServer::getSaturationT return state; } +/** + * @brief Returns the saturation Color16uTransitionState associated to an endpoint + * + * @param[in] endpoint + * @return ColorControlServer::Color16uTransitionState* + */ +ColorControlServer::Color16uTransitionState * ColorControlServer::getSaturationTransitionState(EndpointId endpoint) +{ + return getSaturationTransitionStateByIndex(getEndpointIndex(endpoint)); +} + /** * @brief Returns current saturation for a specified endpoint * @@ -1033,9 +1059,10 @@ void ColorControlServer::startColorLoop(EndpointId endpoint, uint8_t startFromSt colorHueTransitionState->stepsRemaining = static_cast(time * TRANSITION_STEPS_PER_1S); colorHueTransitionState->stepsTotal = static_cast(time * TRANSITION_STEPS_PER_1S); colorHueTransitionState->timeRemaining = MAX_INT16U_VALUE; + colorHueTransitionState->transitionTime = MAX_INT16U_VALUE; colorHueTransitionState->endpoint = endpoint; - Attributes::RemainingTime::Set(endpoint, MAX_INT16U_VALUE); + SetQuietReportRemainingTime(endpoint, MAX_INT16U_VALUE); scheduleTimerCallbackMs(configureHSVEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); } @@ -1079,13 +1106,14 @@ void ColorControlServer::initSaturationTransitionState(chip::EndpointId endpoint void ColorControlServer::SetHSVRemainingTime(chip::EndpointId endpoint) { - ColorHueTransitionState * hueTransitionState = getColorHueTransitionState(endpoint); - Color16uTransitionState * saturationTransitionState = getSaturationTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + ColorHueTransitionState * hueTransitionState = getColorHueTransitionStateByIndex(epIndex); + Color16uTransitionState * saturationTransitionState = getSaturationTransitionStateByIndex(epIndex); // When the hue transition is loop, RemainingTime stays at MAX_INT16 if (hueTransitionState->repeat == false) { - Attributes::RemainingTime::Set(endpoint, max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining)); + SetQuietReportRemainingTime(endpoint, max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining)); } } @@ -1277,6 +1305,7 @@ Status ColorControlServer::moveToSaturation(uint8_t saturation, uint16_t transit colorSaturationTransitionState->stepsRemaining = max(transitionTime, 1); colorSaturationTransitionState->stepsTotal = colorSaturationTransitionState->stepsRemaining; colorSaturationTransitionState->timeRemaining = transitionTime; + colorSaturationTransitionState->transitionTime = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1308,8 +1337,9 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati uint16_t halfWay = isEnhanced ? HALF_MAX_UINT16T : HALF_MAX_UINT8T; bool moveUp; - Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState(endpoint); - ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionStateByIndex(epIndex); + ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionStateByIndex(epIndex); VerifyOrReturnError(nullptr != colorSaturationTransitionState, Status::UnsupportedEndpoint); VerifyOrReturnError(nullptr != colorHueTransitionState, Status::UnsupportedEndpoint); @@ -1355,6 +1385,7 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati colorHueTransitionState->stepsRemaining = max(transitionTime, 1); colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorHueTransitionState->timeRemaining = transitionTime; + colorHueTransitionState->transitionTime = transitionTime; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->repeat = false; @@ -1363,6 +1394,7 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati colorSaturationTransitionState->stepsRemaining = colorHueTransitionState->stepsRemaining; colorSaturationTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorSaturationTransitionState->timeRemaining = transitionTime; + colorSaturationTransitionState->transitionTime = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1393,9 +1425,11 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const bool isEnhanced) { MATTER_TRACE_SCOPE("moveHue", "ColorControl"); - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; - ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); + EndpointId endpoint = commandPath.mEndpointId; + Status status = Status::Success; + + uint16_t epIndex = getEndpointIndex(endpoint); + ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionStateByIndex(epIndex); VerifyOrExit(colorHueTransitionState != nullptr, status = Status::UnsupportedEndpoint); @@ -1421,7 +1455,7 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const if (moveMode == HueMoveMode::kStop) { // Per spec any saturation transition must also be cancelled. - Color16uTransitionState * saturationState = getSaturationTransitionState(endpoint); + Color16uTransitionState * saturationState = getSaturationTransitionStateByIndex(epIndex); initSaturationTransitionState(endpoint, saturationState); commandObj->AddStatus(commandPath, Status::Success); return true; @@ -1467,11 +1501,12 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const colorHueTransitionState->stepsRemaining = TRANSITION_STEPS_PER_1S; colorHueTransitionState->stepsTotal = TRANSITION_STEPS_PER_1S; colorHueTransitionState->timeRemaining = MAX_INT16U_VALUE; + colorHueTransitionState->transitionTime = MAX_INT16U_VALUE; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->repeat = true; // hue movement can last forever. Indicate this with a remaining time of maxint - Attributes::RemainingTime::Set(endpoint, MAX_INT16U_VALUE); + SetQuietReportRemainingTime(endpoint, MAX_INT16U_VALUE); // kick off the state machine: scheduleTimerCallbackMs(configureHSVEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -1600,6 +1635,7 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons colorHueTransitionState->stepsRemaining = max(transitionTime, 1); colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorHueTransitionState->timeRemaining = transitionTime; + colorHueTransitionState->transitionTime = transitionTime; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->up = (direction == HueDirection::kUp); colorHueTransitionState->repeat = false; @@ -1742,6 +1778,7 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const colorHueTransitionState->stepsRemaining = max(transitionTime, 1); colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorHueTransitionState->timeRemaining = transitionTime; + colorHueTransitionState->transitionTime = transitionTime; colorHueTransitionState->endpoint = endpoint; colorHueTransitionState->repeat = false; @@ -1766,7 +1803,8 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; - Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionStateByIndex(epIndex); VerifyOrExit(colorSaturationTransitionState != nullptr, status = Status::UnsupportedEndpoint); // check moveMode and rate before any operation is done on the transition states @@ -1794,7 +1832,7 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, if (moveMode == SaturationMoveMode::kStop) { // Per spec any hue transition must also be cancelled. - ColorHueTransitionState * hueState = getColorHueTransitionState(endpoint); + ColorHueTransitionState * hueState = getColorHueTransitionStateByIndex(epIndex); initHueTransitionState(endpoint, hueState, false /*isEnhancedHue don't care*/); commandObj->AddStatus(commandPath, Status::Success); return true; @@ -1817,6 +1855,7 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, colorSaturationTransitionState->stepsRemaining = transitionTime; colorSaturationTransitionState->stepsTotal = transitionTime; colorSaturationTransitionState->timeRemaining = transitionTime; + colorSaturationTransitionState->transitionTime = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1915,6 +1954,7 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, colorSaturationTransitionState->stepsRemaining = max(transitionTime, 1); colorSaturationTransitionState->stepsTotal = colorSaturationTransitionState->stepsRemaining; colorSaturationTransitionState->timeRemaining = transitionTime; + colorSaturationTransitionState->transitionTime = transitionTime; colorSaturationTransitionState->endpoint = endpoint; colorSaturationTransitionState->lowLimit = MIN_SATURATION_VALUE; colorSaturationTransitionState->highLimit = MAX_SATURATION_VALUE; @@ -1945,7 +1985,8 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons uint8_t isColorLoopActive = 0; uint8_t deactiveColorLoop = 0; - ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionStateByIndex(epIndex); VerifyOrExit(colorHueTransitionState != nullptr, status = Status::UnsupportedEndpoint); // Validate the action and direction parameters of the command @@ -2030,7 +2071,9 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons uint16_t storedEnhancedHue = 0; Attributes::ColorLoopStoredEnhancedHue::Get(endpoint, &storedEnhancedHue); - Attributes::EnhancedCurrentHue::Set(endpoint, storedEnhancedHue); + MarkAttributeDirty markDirty = + SetQuietReportAttribute(quietEnhancedHue[epIndex], storedEnhancedHue, true /*isStartOrEndOfTransition*/, 0); + Attributes::EnhancedCurrentHue::Set(endpoint, quietEnhancedHue[epIndex].value().Value(), markDirty); } else { @@ -2063,13 +2106,18 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons void ColorControlServer::updateHueSatCommand(EndpointId endpoint) { MATTER_TRACE_SCOPE("updateHueSat", "ColorControl"); - ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); - Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionStateByIndex(epIndex); + Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionStateByIndex(epIndex); uint8_t previousHue = colorHueTransitionState->currentHue; uint16_t previousSaturation = colorSaturationTransitionState->currentValue; uint16_t previousEnhancedhue = colorHueTransitionState->currentEnhancedHue; + bool isHueTansitionStart = (colorHueTransitionState->stepsRemaining == colorHueTransitionState->stepsTotal); + bool isSaturationTransitionStart = + (colorSaturationTransitionState->stepsRemaining == colorSaturationTransitionState->stepsTotal); + bool isHueTansitionDone = computeNewHueValue(colorHueTransitionState); bool isSaturationTransitionDone = computeNewColor16uValue(colorSaturationTransitionState); @@ -2084,32 +2132,43 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) scheduleTimerCallbackMs(configureHSVEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); } + uint8_t currentHue; + MarkAttributeDirty markDirty; if (colorHueTransitionState->isEnhancedHue) { + markDirty = SetQuietReportAttribute(quietEnhancedHue[epIndex], colorHueTransitionState->currentEnhancedHue, + (isHueTansitionStart || isHueTansitionDone), colorHueTransitionState->transitionTime); + Attributes::EnhancedCurrentHue::Set(endpoint, quietEnhancedHue[epIndex].value().Value(), markDirty); + currentHue = static_cast(colorHueTransitionState->currentEnhancedHue >> 8); + if (previousEnhancedhue != colorHueTransitionState->currentEnhancedHue) { - Attributes::EnhancedCurrentHue::Set(endpoint, colorHueTransitionState->currentEnhancedHue); - Attributes::CurrentHue::Set(endpoint, static_cast(colorHueTransitionState->currentEnhancedHue >> 8)); - ChipLogProgress(Zcl, "Enhanced Hue %d endpoint %d", colorHueTransitionState->currentEnhancedHue, endpoint); } } else { + currentHue = colorHueTransitionState->currentHue; if (previousHue != colorHueTransitionState->currentHue) { - Attributes::CurrentHue::Set(colorHueTransitionState->endpoint, colorHueTransitionState->currentHue); ChipLogProgress(Zcl, "Hue %d endpoint %d", colorHueTransitionState->currentHue, endpoint); } } + markDirty = SetQuietReportAttribute(quietHue[epIndex], currentHue, (isHueTansitionStart || isHueTansitionDone), + colorHueTransitionState->transitionTime); + Attributes::CurrentHue::Set(endpoint, quietHue[epIndex].value().Value(), markDirty); + if (previousSaturation != colorSaturationTransitionState->currentValue) { - Attributes::CurrentSaturation::Set(colorSaturationTransitionState->endpoint, - (uint8_t) colorSaturationTransitionState->currentValue); ChipLogProgress(Zcl, "Saturation %d endpoint %d", colorSaturationTransitionState->currentValue, endpoint); } + markDirty = SetQuietReportAttribute(quietSaturation[epIndex], colorSaturationTransitionState->currentValue, + (isSaturationTransitionStart || isSaturationTransitionDone), + colorSaturationTransitionState->transitionTime); + Attributes::CurrentSaturation::Set(endpoint, quietSaturation[epIndex].value().Value(), markDirty); + computePwmFromHsv(endpoint); } @@ -2118,16 +2177,13 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY /** - * @brief Returns Color16uTransitionState for X color associated to an endpoint + * @brief Returns Color16uTransitionState for X color associated to an endpoint index * * @param endpoint * @return ColorControlServer::Color16uTransitionState* */ -ColorControlServer::Color16uTransitionState * ColorControlServer::getXTransitionState(EndpointId endpoint) +ColorControlServer::Color16uTransitionState * ColorControlServer::getXTransitionStateByIndex(uint16_t index) { - uint16_t index = - emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); - Color16uTransitionState * state = nullptr; if (index < ArraySize(colorXtransitionStates)) { @@ -2138,16 +2194,24 @@ ColorControlServer::Color16uTransitionState * ColorControlServer::getXTransition } /** - * @brief Returns Color16uTransitionState for Y color associated to an endpoint + * @brief Returns Color16uTransitionState for X color associated to an endpoint * * @param endpoint * @return ColorControlServer::Color16uTransitionState* */ -ColorControlServer::Color16uTransitionState * ColorControlServer::getYTransitionState(EndpointId endpoint) +ColorControlServer::Color16uTransitionState * ColorControlServer::getXTransitionState(EndpointId endpoint) { - uint16_t index = - emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); + return getXTransitionStateByIndex(getEndpointIndex(endpoint)); +} +/** + * @brief Returns Color16uTransitionState for Y color associated to an endpoint index + * + * @param endpoint + * @return ColorControlServer::Color16uTransitionState* + */ +ColorControlServer::Color16uTransitionState * ColorControlServer::getYTransitionStateByIndex(uint16_t index) +{ Color16uTransitionState * state = nullptr; if (index < ArraySize(colorYtransitionStates)) { @@ -2157,6 +2221,17 @@ ColorControlServer::Color16uTransitionState * ColorControlServer::getYTransition return state; } +/** + * @brief Returns Color16uTransitionState for Y color associated to an endpoint + * + * @param endpoint + * @return ColorControlServer::Color16uTransitionState* + */ +ColorControlServer::Color16uTransitionState * ColorControlServer::getYTransitionState(EndpointId endpoint) +{ + return getYTransitionStateByIndex(getEndpointIndex(endpoint)); +} + uint16_t ColorControlServer::findNewColorValueFromStep(uint16_t oldValue, int16_t step) { uint16_t newValue; @@ -2207,8 +2282,9 @@ EmberEventControl * ColorControlServer::configureXYEventControl(EndpointId endpo */ Status ColorControlServer::moveToColor(uint16_t colorX, uint16_t colorY, uint16_t transitionTime, EndpointId endpoint) { - Color16uTransitionState * colorXTransitionState = getXTransitionState(endpoint); - Color16uTransitionState * colorYTransitionState = getYTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorXTransitionState = getXTransitionStateByIndex(epIndex); + Color16uTransitionState * colorYTransitionState = getYTransitionStateByIndex(epIndex); VerifyOrReturnError(nullptr != colorXTransitionState, Status::UnsupportedEndpoint); VerifyOrReturnError(nullptr != colorYTransitionState, Status::UnsupportedEndpoint); @@ -2226,6 +2302,7 @@ Status ColorControlServer::moveToColor(uint16_t colorX, uint16_t colorY, uint16_ colorXTransitionState->stepsRemaining = max(transitionTime, 1); colorXTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; colorXTransitionState->timeRemaining = transitionTime; + colorXTransitionState->transitionTime = transitionTime; colorXTransitionState->endpoint = endpoint; colorXTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorXTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -2236,11 +2313,12 @@ Status ColorControlServer::moveToColor(uint16_t colorX, uint16_t colorY, uint16_ colorYTransitionState->stepsRemaining = colorXTransitionState->stepsRemaining; colorYTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; colorYTransitionState->timeRemaining = transitionTime; + colorYTransitionState->transitionTime = transitionTime; colorYTransitionState->endpoint = endpoint; colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - Attributes::RemainingTime::Set(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); @@ -2275,8 +2353,9 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; - Color16uTransitionState * colorXTransitionState = getXTransitionState(endpoint); - Color16uTransitionState * colorYTransitionState = getYTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorXTransitionState = getXTransitionStateByIndex(epIndex); + Color16uTransitionState * colorYTransitionState = getYTransitionStateByIndex(epIndex); VerifyOrExit(colorXTransitionState != nullptr, status = Status::UnsupportedEndpoint); VerifyOrExit(colorYTransitionState != nullptr, status = Status::UnsupportedEndpoint); @@ -2320,6 +2399,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons colorXTransitionState->stepsRemaining = transitionTimeX; colorXTransitionState->stepsTotal = transitionTimeX; colorXTransitionState->timeRemaining = transitionTimeX; + colorXTransitionState->transitionTime = transitionTimeX; colorXTransitionState->endpoint = endpoint; colorXTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorXTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -2340,18 +2420,12 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons colorYTransitionState->stepsRemaining = transitionTimeY; colorYTransitionState->stepsTotal = transitionTimeY; colorYTransitionState->timeRemaining = transitionTimeY; + colorYTransitionState->transitionTime = transitionTimeY; colorYTransitionState->endpoint = endpoint; colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - if (transitionTimeX < transitionTimeY) - { - Attributes::RemainingTime::Set(endpoint, transitionTimeX); - } - else - { - Attributes::RemainingTime::Set(endpoint, transitionTimeY); - } + SetQuietReportRemainingTime(endpoint, max(transitionTimeX, transitionTimeY)); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -2377,8 +2451,9 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons Status status = Status::Success; - Color16uTransitionState * colorXTransitionState = getXTransitionState(endpoint); - Color16uTransitionState * colorYTransitionState = getYTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorXTransitionState = getXTransitionStateByIndex(epIndex); + Color16uTransitionState * colorYTransitionState = getYTransitionStateByIndex(epIndex); VerifyOrExit(colorXTransitionState != nullptr, status = Status::UnsupportedEndpoint); VerifyOrExit(colorYTransitionState != nullptr, status = Status::UnsupportedEndpoint); @@ -2414,6 +2489,7 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorXTransitionState->stepsRemaining = max(transitionTime, 1); colorXTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; colorXTransitionState->timeRemaining = transitionTime; + colorXTransitionState->transitionTime = transitionTime; colorXTransitionState->endpoint = endpoint; colorXTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorXTransitionState->highLimit = MAX_CIE_XY_VALUE; @@ -2424,11 +2500,12 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorYTransitionState->stepsRemaining = colorXTransitionState->stepsRemaining; colorYTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; colorYTransitionState->timeRemaining = transitionTime; + colorYTransitionState->transitionTime = transitionTime; colorYTransitionState->endpoint = endpoint; colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - Attributes::RemainingTime::Set(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); @@ -2445,15 +2522,15 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons */ void ColorControlServer::updateXYCommand(EndpointId endpoint) { - Color16uTransitionState * colorXTransitionState = getXTransitionState(endpoint); - Color16uTransitionState * colorYTransitionState = getYTransitionState(endpoint); - bool isXTransitionDone, isYTransitionDone; + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorXTransitionState = getXTransitionStateByIndex(epIndex); + Color16uTransitionState * colorYTransitionState = getYTransitionStateByIndex(epIndex); // compute new values for X and Y. - isXTransitionDone = computeNewColor16uValue(colorXTransitionState); - isYTransitionDone = computeNewColor16uValue(colorYTransitionState); + bool isXTransitionDone = computeNewColor16uValue(colorXTransitionState); + bool isYTransitionDone = computeNewColor16uValue(colorYTransitionState); - Attributes::RemainingTime::Set(endpoint, max(colorXTransitionState->timeRemaining, colorYTransitionState->timeRemaining)); + SetQuietReportRemainingTime(endpoint, max(colorXTransitionState->timeRemaining, colorYTransitionState->timeRemaining)); if (isXTransitionDone && isYTransitionDone) { @@ -2464,9 +2541,18 @@ void ColorControlServer::updateXYCommand(EndpointId endpoint) scheduleTimerCallbackMs(configureXYEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); } - // update the attributes - Attributes::CurrentX::Set(endpoint, colorXTransitionState->currentValue); - Attributes::CurrentY::Set(endpoint, colorYTransitionState->currentValue); + bool isXTransitionStart = (colorXTransitionState->stepsRemaining == colorXTransitionState->stepsTotal); + bool isYTransitionStart = (colorYTransitionState->stepsRemaining == colorYTransitionState->stepsTotal); + + MarkAttributeDirty markXDirty = + SetQuietReportAttribute(quietColorX[epIndex], colorXTransitionState->currentValue, + (isXTransitionStart || isXTransitionDone), colorXTransitionState->transitionTime); + MarkAttributeDirty markYDirty = + SetQuietReportAttribute(quietColorY[epIndex], colorYTransitionState->currentValue, + (isYTransitionStart || isYTransitionDone), colorYTransitionState->transitionTime); + + Attributes::CurrentX::Set(endpoint, quietColorX[epIndex].value().Value(), markXDirty); + Attributes::CurrentY::Set(endpoint, quietColorY[epIndex].value().Value(), markYDirty); ChipLogProgress(Zcl, "Color X %d Color Y %d", colorXTransitionState->currentValue, colorYTransitionState->currentValue); @@ -2477,16 +2563,13 @@ void ColorControlServer::updateXYCommand(EndpointId endpoint) #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP /** - * @brief Get the Temp Transition State object associated to the endpoint + * @brief Get the Temp Transition State object associated to the endpoint index * * @param endpoint * @return Color16uTransitionState* */ -ColorControlServer::Color16uTransitionState * ColorControlServer::getTempTransitionState(EndpointId endpoint) +ColorControlServer::Color16uTransitionState * ColorControlServer::getTempTransitionStateByIndex(uint16_t index) { - uint16_t index = - emberAfGetClusterServerEndpointIndex(endpoint, ColorControl::Id, MATTER_DM_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT); - Color16uTransitionState * state = nullptr; if (index < ArraySize(colorTempTransitionStates)) { @@ -2496,6 +2579,17 @@ ColorControlServer::Color16uTransitionState * ColorControlServer::getTempTransit return state; } +/** + * @brief Get the Temp Transition State object associated to the endpoint + * + * @param endpoint + * @return Color16uTransitionState* + */ +ColorControlServer::Color16uTransitionState * ColorControlServer::getTempTransitionState(EndpointId endpoint) +{ + return getTempTransitionStateByIndex(getEndpointIndex(endpoint)); +} + /** * @brief executes move to color temp logic * @@ -2541,6 +2635,7 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT colorTempTransitionState->stepsRemaining = max(transitionTime, 1); colorTempTransitionState->stepsTotal = colorTempTransitionState->stepsRemaining; colorTempTransitionState->timeRemaining = transitionTime; + colorTempTransitionState->transitionTime = transitionTime; colorTempTransitionState->endpoint = endpoint; colorTempTransitionState->lowLimit = temperatureMin; colorTempTransitionState->highLimit = temperatureMax; @@ -2670,7 +2765,7 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint) } } - Attributes::RemainingTime::Set(endpoint, colorTempTransitionState->timeRemaining); + SetQuietReportRemainingTime(endpoint, colorTempTransitionState->timeRemaining); if (isColorTempTransitionDone) { @@ -2792,11 +2887,12 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, colorTempTransitionState->stepsRemaining = transitionTime; colorTempTransitionState->stepsTotal = transitionTime; colorTempTransitionState->timeRemaining = transitionTime; + colorTempTransitionState->transitionTime = transitionTime; colorTempTransitionState->endpoint = endpoint; colorTempTransitionState->lowLimit = colorTemperatureMinimum; colorTempTransitionState->highLimit = colorTemperatureMaximum; - Attributes::RemainingTime::Set(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime); // kick off the state machine: scheduleTimerCallbackMs(configureTempEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -2909,11 +3005,12 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, colorTempTransitionState->stepsRemaining = max(transitionTime, 1); colorTempTransitionState->stepsTotal = colorTempTransitionState->stepsRemaining; colorTempTransitionState->timeRemaining = transitionTime; + colorTempTransitionState->transitionTime = transitionTime; colorTempTransitionState->endpoint = endpoint; colorTempTransitionState->lowLimit = colorTemperatureMinimum; colorTempTransitionState->highLimit = colorTemperatureMaximum; - Attributes::RemainingTime::Set(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime); // kick off the state machine: scheduleTimerCallbackMs(configureTempEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); @@ -3006,6 +3103,89 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint) #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP +/* + * @brief + * Utility function used to update a color control attribute which has the quiet reporting quality. + * matching the following report conditions: + * - At most once per second, or + * - At the start of the movement/transition, or + * - At the end of the movement/transition, or + * - When it changes from null to any other value and vice versa. (Implicit to the QuieterReportingAttribute class) + * + * The QuietReportAttribute class is updated with the new value and when the report conditions are met, + * this function will return MarkAttributeDirty::kIfChanged. + * It is expected that the user will use this return value to trigger a reporting mechanism for the attribute with the new value + * (Which was updated in the quietReporter) + * + * @param quietReporter: The QuieterReportingAttribute object for the attribute to update. + * @param newValue: Value to update the attribute with + * @param isStartOrEndOfTransition: Boolean that indicatse whether the update is occurring at the start or end of a level transition + * @return MarkAttributeDirty::kIfChanged when the attribute must be maredk dirty and be reported. MarkAttributeDirty::kNo when it + * when it no report is needed. + */ +template +MarkAttributeDirty ColorControlServer::SetQuietReportAttribute(QuieterReportingAttribute & quietReporter, V newValue, + bool isStartOrEndOfTransition, uint16_t transitionTime) +{ + AttributeDirtyState dirtyState; + auto now = System::SystemClock().GetMonotonicTimestamp(); + + if (isStartOrEndOfTransition) + { + // At the start or end of the movement/transition we must report + auto predicate = [](const typename QuieterReportingAttribute::SufficientChangePredicateCandidate &) -> bool { + return true; + }; + dirtyState = quietReporter.SetValue(newValue, now, predicate); + } + else + { + // During transitions, reports should be at most once per second + + // For "infinite" transition, default reports interval to 10s (100 1/10ths of a second ) + if (transitionTime == MAX_INT16U_VALUE) + { + transitionTime = 100; + } + + // Opt for the longest interval between reports, 1s or (transitionTime / 4). + // Since transitionTime is in 1/10th of a second, convert it to ms (x 100), thus * 100/4 -> * 25 + System::Clock::Milliseconds64 reportInterval = System::Clock::Milliseconds64(std::max(1000, transitionTime * 25)); + auto predicate = quietReporter.GetPredicateForSufficientTimeSinceLastDirty(reportInterval); + dirtyState = quietReporter.SetValue(newValue, now, predicate); + } + + return (dirtyState == AttributeDirtyState::kMustReport) ? MarkAttributeDirty::kIfChanged : MarkAttributeDirty::kNo; +} + +/* + * @brief + * Function used to set the remaining time based on quiet reporting conditions. + * It will update the attribute storage and report the attribute if it is determined dirty. + * The condition on which the attribute must be reported are defined by the set QuieterReportingPolicyFlags + * of the quietRemainingTime object and the implicit conditions of the QuieterReportingAttribute class + * + * @param endpoint: Endpoint of the RemainingTime attribute to set + * @param newRemainingTime: Value to update the RemainingTime attribute with + * @return Success in setting the attribute value or the IM error code for the failure. + */ +Status ColorControlServer::SetQuietReportRemainingTime(EndpointId endpoint, uint16_t newRemainingTime) +{ + uint16_t epIndex = getEndpointIndex(endpoint); + auto markDirty = MarkAttributeDirty::kNo; + auto now = System::SystemClock().GetMonotonicTimestamp(); + // Establish the quiet report condition for the RemainingTime Attribute + // The quiet report is by the previously set policies : + // - kMarkDirtyOnChangeToFromZero : When the value changes from 0 to any other value and vice versa, or + // - kMarkDirtyOnIncrement : When the value increases. + if (quietRemainingTime[epIndex].SetValue(newRemainingTime, now) == AttributeDirtyState::kMustReport) + { + markDirty = MarkAttributeDirty::kIfChanged; + } + + return Attributes::RemainingTime::Set(endpoint, quietRemainingTime[epIndex].value().Value(), markDirty); +} + /********************************************************** * Callbacks Implementation *********************************************************/ diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index f453c6f02872e4..4238fed1dd8b2d 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include #include @@ -109,6 +111,8 @@ class ColorControlServer // The amount of time remaining until the transition completes. Measured in tenths of a second. // When the transition repeats indefinitely, this will hold the maximum value possible. uint16_t timeRemaining; + // The total transitionTime in 1/10th of a seconds + uint16_t transitionTime; uint16_t initialEnhancedHue; uint16_t currentEnhancedHue; uint16_t finalEnhancedHue; @@ -127,6 +131,8 @@ class ColorControlServer uint16_t stepsTotal; // The amount of time remaining until the transition completes. Measured in tenths of a second. uint16_t timeRemaining; + // The total transitionTime in 1/10th of a seconds + uint16_t transitionTime; uint16_t lowLimit; uint16_t highLimit; chip::EndpointId endpoint; @@ -194,12 +200,30 @@ class ColorControlServer void cancelEndpointTimerCallback(chip::EndpointId endpoint); + template + chip::app::MarkAttributeDirty SetQuietReportAttribute(chip::app::QuieterReportingAttribute & quietReporter, V newValue, + bool isStartOrEndOfTransition, uint16_t transitionTime); + chip::Protocols::InteractionModel::Status SetQuietReportRemainingTime(chip::EndpointId endpoint, uint16_t newRemainingTime); + private: /********************************************************** * Functions Definitions *********************************************************/ - ColorControlServer() {} + ColorControlServer() + { + for (size_t i = 0; i < kColorControlClusterServerMaxEndpointCount; i++) + { + // Set the quiet report policies for the RemaininTime Attribute on all endpoint + // - kMarkDirtyOnChangeToFromZero : When the value changes from 0 to any other value and vice versa, or + // - kMarkDirtyOnIncrement : When the value increases. + quietRemainingTime[i] + .policy() + .Set(chip::app::QuieterReportingPolicyEnum::kMarkDirtyOnIncrement) + .Set(chip::app::QuieterReportingPolicyEnum::kMarkDirtyOnChangeToFromZero); + } + } + bool shouldExecuteIfOff(chip::EndpointId endpoint, uint8_t optionMask, uint8_t optionOverride); void handleModeSwitch(chip::EndpointId endpoint, uint8_t newColorMode); uint16_t computeTransitionTimeFromStateAndRate(Color16uTransitionState * p, uint16_t rate); @@ -213,6 +237,7 @@ class ColorControlServer static void timerCallback(chip::System::Layer *, void * callbackContext); void scheduleTimerCallbackMs(EmberEventControl * control, uint32_t delayMs); void cancelEndpointTimerCallback(EmberEventControl * control); + uint16_t getEndpointIndex(chip::EndpointId); #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV chip::Protocols::InteractionModel::Status moveToSaturation(uint8_t saturation, uint16_t transitionTime, @@ -221,6 +246,8 @@ class ColorControlServer bool isEnhanced, chip::EndpointId endpoint); ColorHueTransitionState * getColorHueTransitionState(chip::EndpointId endpoint); Color16uTransitionState * getSaturationTransitionState(chip::EndpointId endpoint); + ColorHueTransitionState * getColorHueTransitionStateByIndex(uint16_t index); + Color16uTransitionState * getSaturationTransitionStateByIndex(uint16_t index); uint8_t getSaturation(chip::EndpointId endpoint); uint8_t addHue(uint8_t hue1, uint8_t hue2); uint8_t subtractHue(uint8_t hue1, uint8_t hue2); @@ -241,12 +268,15 @@ class ColorControlServer chip::EndpointId endpoint); Color16uTransitionState * getXTransitionState(chip::EndpointId endpoint); Color16uTransitionState * getYTransitionState(chip::EndpointId endpoint); + Color16uTransitionState * getXTransitionStateByIndex(uint16_t index); + Color16uTransitionState * getYTransitionStateByIndex(uint16_t index); uint16_t findNewColorValueFromStep(uint16_t oldValue, int16_t step); EmberEventControl * configureXYEventControl(chip::EndpointId); #endif // #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP Color16uTransitionState * getTempTransitionState(chip::EndpointId endpoint); + Color16uTransitionState * getTempTransitionStateByIndex(uint16_t index); chip::Protocols::InteractionModel::Status moveToColorTemp(chip::EndpointId aEndpoint, uint16_t colorTemperature, uint16_t transitionTime); uint16_t getTemperatureCoupleToLevelMin(chip::EndpointId endpoint); @@ -264,11 +294,18 @@ class ColorControlServer #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV ColorHueTransitionState colorHueTransitionStates[kColorControlClusterServerMaxEndpointCount]; Color16uTransitionState colorSatTransitionStates[kColorControlClusterServerMaxEndpointCount]; + + chip::app::QuieterReportingAttribute quietHue[kColorControlClusterServerMaxEndpointCount]; + chip::app::QuieterReportingAttribute quietSaturation[kColorControlClusterServerMaxEndpointCount]; + chip::app::QuieterReportingAttribute quietEnhancedHue[kColorControlClusterServerMaxEndpointCount]; #endif #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY Color16uTransitionState colorXtransitionStates[kColorControlClusterServerMaxEndpointCount]; Color16uTransitionState colorYtransitionStates[kColorControlClusterServerMaxEndpointCount]; + + chip::app::QuieterReportingAttribute quietColorX[kColorControlClusterServerMaxEndpointCount]; + chip::app::QuieterReportingAttribute quietColorY[kColorControlClusterServerMaxEndpointCount]; #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP @@ -276,6 +313,7 @@ class ColorControlServer #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP EmberEventControl eventControls[kColorControlClusterServerMaxEndpointCount]; + chip::app::QuieterReportingAttribute quietRemainingTime[kColorControlClusterServerMaxEndpointCount]; #ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT friend class DefaultColorControlSceneHandler; diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 9c1ef210532b95..148ab5419f5b84 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -25,6 +25,10 @@ "name": "cluster_enums_enum", "path": "../../zap-templates/partials/cluster-enums-enum.zapt" }, + { + "name": "cluster_enums_ensure_known_value", + "path": "../../zap-templates/partials/cluster-enums-ensure-known-value.zapt" + }, { "name": "cluster_objects_field_init", "path": "../../zap-templates/partials/cluster-objects-field-init.zapt" diff --git a/src/app/zap-templates/partials/cluster-enums-ensure-known-value.zapt b/src/app/zap-templates/partials/cluster-enums-ensure-known-value.zapt new file mode 100644 index 00000000000000..939c33c037246a --- /dev/null +++ b/src/app/zap-templates/partials/cluster-enums-ensure-known-value.zapt @@ -0,0 +1,14 @@ +{{#unless (isInConfigList (concat ns "::" label) "EnumsNotUsedAsTypeInXML")}} +static auto __attribute__((unused)) EnsureKnownEnumValue({{ns}}::{{asType label}} val) +{ + using EnumType = {{ns}}::{{asType label}}; + switch (val) { + {{#zcl_enum_items}} + case EnumType::k{{asUpperCamelCase label}}: + {{/zcl_enum_items}} + return val; + default: + return EnumType::kUnknownEnumValue; + } +} +{{/unless}} diff --git a/src/app/zap-templates/templates/app/cluster-enums-check.zapt b/src/app/zap-templates/templates/app/cluster-enums-check.zapt index c5acb97314f4ff..b0d8ce150c4dbd 100644 --- a/src/app/zap-templates/templates/app/cluster-enums-check.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums-check.zapt @@ -9,40 +9,17 @@ namespace app { namespace Clusters { {{#zcl_enums}} {{#if has_more_than_one_cluster}} -{{#unless (isInConfigList (concat "::" label) "EnumsNotUsedAsTypeInXML")}} -static auto __attribute__((unused)) EnsureKnownEnumValue(detail::{{asType label}} val) -{ - using EnumType = detail::{{asType label}}; - switch (val) { - {{#zcl_enum_items}} - case EnumType::k{{asUpperCamelCase label}}: - {{/zcl_enum_items}} - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -{{/unless}} +{{> cluster_enums_ensure_known_value ns="detail"}} +{{else if has_no_clusters}} +{{> cluster_enums_ensure_known_value ns="Globals"}} + {{/if}} {{/zcl_enums}} {{#zcl_clusters}} {{#zcl_enums}} {{#unless has_more_than_one_cluster}} -{{#unless (isInConfigList (concat (asUpperCamelCase ../name) "::" label) "EnumsNotUsedAsTypeInXML")}} -static auto __attribute__((unused)) EnsureKnownEnumValue({{asUpperCamelCase ../name}}::{{asType label}} val) -{ - using EnumType = {{asUpperCamelCase ../name}}::{{asType label}}; - switch (val) { - {{#zcl_enum_items}} - case EnumType::k{{asUpperCamelCase label}}: - {{/zcl_enum_items}} - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -{{/unless}} +{{> cluster_enums_ensure_known_value ns=(asUpperCamelCase ../name)}} {{/unless}} {{/zcl_enums}} diff --git a/src/app/zap-templates/templates/app/cluster-enums.zapt b/src/app/zap-templates/templates/app/cluster-enums.zapt index 17ce795200795f..3a1457895c8107 100644 --- a/src/app/zap-templates/templates/app/cluster-enums.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums.zapt @@ -37,6 +37,37 @@ k{{asUpperCamelCase label}} = {{asHex mask}}, } // namespace detail +namespace Globals { +// Global enums. +{{#zcl_enums}} + +{{#if has_no_clusters}} + +{{> cluster_enums_enum ns=""}} + +{{/if}} +{{/zcl_enums}} + +// Global bitmaps. +{{#zcl_bitmaps}} + +{{#if has_no_clusters}} +{{! Work around https://github.com/project-chip/zap/issues/1370 and manually filter out built-in bitmap types. }} +{{#if_is_atomic label}} +{{else}} + +// Bitmap for {{label}} +enum class {{asType label}} : {{asUnderlyingZclType name}} { +{{#zcl_bitmap_items}} +k{{asUpperCamelCase label}} = {{asHex mask}}, +{{/zcl_bitmap_items}} +}; + +{{/if_is_atomic}} +{{/if}} +{{/zcl_bitmaps}} + +} // namespace Globals {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt index 50bd812be31521..1322756b85213e 100644 --- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt @@ -64,6 +64,18 @@ namespace Structs { } // namespace Structs } // namespace detail +namespace Globals { +// Global structs +namespace Structs { +{{#zcl_structs}} +{{#if has_no_clusters}} +{{> cluster_objects_struct header=false}} + +{{/if}} +{{/zcl_structs}} +} // namespace Structs +} // namespace Globals + {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_structs}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 1453523b1b7986..e9f42b17c5ff66 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -35,6 +35,18 @@ namespace Structs { } // namespace detail namespace Globals { + +// Global structs. +namespace Structs { + +{{#zcl_structs}} +{{#if has_no_clusters}} +{{> cluster_objects_struct header=true}} + +{{/if}} +{{/zcl_structs}} +} // namespace Structs + namespace Attributes { {{#zcl_attributes_server}} {{#unless clusterRef}} diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index a8850f6b056186..06e893aa963be4 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -288,7 +288,7 @@ def _BuildClusterIndex(): ''' Build internal cluster index for locating the corresponding cluster object by path in the future. ''' for clusterName, obj in inspect.getmembers(sys.modules['chip.clusters.Objects']): - if ('chip.clusters.Objects' in str(obj)) and inspect.isclass(obj): + if ('chip.clusters.Objects' in str(obj)) and inspect.isclass(obj) and issubclass(obj, Cluster): _ClusterIndex[obj.id] = obj diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 29aca6d33be3b8..fe9a008e11066e 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -36,6 +36,40 @@ ClusterObjectDescriptor, ClusterObjectFieldDescriptor) from .Types import Nullable, NullValue +class Globals: + class Enums: + class TestGlobalEnum(MatterIntEnum): + kSomeValue = 0x00 + kSomeOtherValue = 0x01 + kFinalValue = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 3, + + class Bitmaps: + class TestGlobalBitmap(IntFlag): + kFirstBit = 0x1 + kSecondBit = 0x2 + + class Structs: + @dataclass + class TestGlobalStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="myBitmap", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="myEnum", Tag=2, Type=typing.Union[None, Nullable, Globals.Enums.TestGlobalEnum]), + ]) + + name: 'str' = "" + myBitmap: 'typing.Union[Nullable, uint]' = NullValue + myEnum: 'typing.Union[None, Nullable, Globals.Enums.TestGlobalEnum]' = None + + @dataclass class Identify(Cluster): @@ -74,16 +108,16 @@ class EffectIdentifierEnum(MatterIntEnum): kStopEffect = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class EffectVariantEnum(MatterIntEnum): kDefault = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class IdentifyTypeEnum(MatterIntEnum): @@ -95,8 +129,8 @@ class IdentifyTypeEnum(MatterIntEnum): kActuator = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Commands: @@ -622,16 +656,16 @@ class DelayedAllOffEffectVariantEnum(MatterIntEnum): kDelayedOffSlowFade = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DyingLightEffectVariantEnum(MatterIntEnum): kDyingLightFadeOff = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class EffectIdentifierEnum(MatterIntEnum): @@ -639,8 +673,8 @@ class EffectIdentifierEnum(MatterIntEnum): kDyingLight = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class StartUpOnOffEnum(MatterIntEnum): @@ -649,8 +683,8 @@ class StartUpOnOffEnum(MatterIntEnum): kToggle = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -1145,8 +1179,8 @@ class MoveModeEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class StepModeEnum(MatterIntEnum): @@ -1154,8 +1188,8 @@ class StepModeEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -2528,8 +2562,8 @@ class AccessControlEntryAuthModeEnum(MatterIntEnum): kGroup = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class AccessControlEntryPrivilegeEnum(MatterIntEnum): @@ -2540,8 +2574,8 @@ class AccessControlEntryPrivilegeEnum(MatterIntEnum): kAdminister = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class ChangeTypeEnum(MatterIntEnum): @@ -2550,8 +2584,8 @@ class ChangeTypeEnum(MatterIntEnum): kRemoved = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Structs: @@ -2870,8 +2904,8 @@ class ActionErrorEnum(MatterIntEnum): kInterrupted = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ActionStateEnum(MatterIntEnum): @@ -2881,8 +2915,8 @@ class ActionStateEnum(MatterIntEnum): kDisabled = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ActionTypeEnum(MatterIntEnum): @@ -2895,8 +2929,8 @@ class ActionTypeEnum(MatterIntEnum): kAlarm = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class EndpointListTypeEnum(MatterIntEnum): @@ -2905,8 +2939,8 @@ class EndpointListTypeEnum(MatterIntEnum): kZone = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -3479,8 +3513,8 @@ class ColorEnum(MatterIntEnum): kGold = 0x14 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 21, class ProductFinishEnum(MatterIntEnum): @@ -3492,8 +3526,8 @@ class ProductFinishEnum(MatterIntEnum): kFabric = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Structs: @@ -4107,8 +4141,8 @@ class ApplyUpdateActionEnum(MatterIntEnum): kDiscontinue = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DownloadProtocolEnum(MatterIntEnum): @@ -4118,8 +4152,8 @@ class DownloadProtocolEnum(MatterIntEnum): kVendorSpecific = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class StatusEnum(MatterIntEnum): @@ -4129,8 +4163,8 @@ class StatusEnum(MatterIntEnum): kDownloadProtocolNotSupported = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Commands: @@ -4384,8 +4418,8 @@ class AnnouncementReasonEnum(MatterIntEnum): kUrgentUpdateAvailable = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class ChangeReasonEnum(MatterIntEnum): @@ -4396,8 +4430,8 @@ class ChangeReasonEnum(MatterIntEnum): kDelayByProvider = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class UpdateStateEnum(MatterIntEnum): @@ -4412,8 +4446,8 @@ class UpdateStateEnum(MatterIntEnum): kDelayedOnUserConsent = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 9, class Structs: @@ -4894,8 +4928,8 @@ class CalendarTypeEnum(MatterIntEnum): kUseActiveLocale = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 12, class HourFormatEnum(MatterIntEnum): @@ -4904,8 +4938,8 @@ class HourFormatEnum(MatterIntEnum): kUseActiveLocale = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -5090,8 +5124,8 @@ class TempUnitEnum(MatterIntEnum): kKelvin = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -5475,8 +5509,8 @@ class BatApprovedChemistryEnum(MatterIntEnum): kZincCerium = 0x20 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 33, class BatChargeFaultEnum(MatterIntEnum): @@ -5493,8 +5527,8 @@ class BatChargeFaultEnum(MatterIntEnum): kSafetyTimeout = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 11, class BatChargeLevelEnum(MatterIntEnum): @@ -5503,8 +5537,8 @@ class BatChargeLevelEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class BatChargeStateEnum(MatterIntEnum): @@ -5514,8 +5548,8 @@ class BatChargeStateEnum(MatterIntEnum): kIsNotCharging = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class BatCommonDesignationEnum(MatterIntEnum): @@ -5602,8 +5636,8 @@ class BatCommonDesignationEnum(MatterIntEnum): k32600 = 0x50 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 81, class BatFaultEnum(MatterIntEnum): @@ -5612,8 +5646,8 @@ class BatFaultEnum(MatterIntEnum): kUnderTemp = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class BatReplaceabilityEnum(MatterIntEnum): @@ -5623,8 +5657,8 @@ class BatReplaceabilityEnum(MatterIntEnum): kFactoryReplaceable = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class PowerSourceStatusEnum(MatterIntEnum): @@ -5634,8 +5668,8 @@ class PowerSourceStatusEnum(MatterIntEnum): kUnavailable = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class WiredCurrentTypeEnum(MatterIntEnum): @@ -5643,8 +5677,8 @@ class WiredCurrentTypeEnum(MatterIntEnum): kDc = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class WiredFaultEnum(MatterIntEnum): @@ -5653,8 +5687,8 @@ class WiredFaultEnum(MatterIntEnum): kUnderVoltage = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -6420,8 +6454,8 @@ class CommissioningErrorEnum(MatterIntEnum): kBusyWithOtherAdmin = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class RegulatoryLocationTypeEnum(MatterIntEnum): @@ -6430,8 +6464,8 @@ class RegulatoryLocationTypeEnum(MatterIntEnum): kIndoorOutdoor = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Structs: @@ -6794,8 +6828,8 @@ class NetworkCommissioningStatusEnum(MatterIntEnum): kUnknownError = 0x0C # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 13, class WiFiBandEnum(MatterIntEnum): @@ -6807,8 +6841,8 @@ class WiFiBandEnum(MatterIntEnum): k1g = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -7422,8 +7456,8 @@ class IntentEnum(MatterIntEnum): kCrashLogs = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class StatusEnum(MatterIntEnum): @@ -7434,8 +7468,8 @@ class StatusEnum(MatterIntEnum): kDenied = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class TransferProtocolEnum(MatterIntEnum): @@ -7443,8 +7477,8 @@ class TransferProtocolEnum(MatterIntEnum): kBdx = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Commands: @@ -7640,8 +7674,8 @@ class BootReasonEnum(MatterIntEnum): kSoftwareReset = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class HardwareFaultEnum(MatterIntEnum): @@ -7658,8 +7692,8 @@ class HardwareFaultEnum(MatterIntEnum): kTamperDetected = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 11, class InterfaceTypeEnum(MatterIntEnum): @@ -7670,8 +7704,8 @@ class InterfaceTypeEnum(MatterIntEnum): kThread = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class NetworkFaultEnum(MatterIntEnum): @@ -7681,8 +7715,8 @@ class NetworkFaultEnum(MatterIntEnum): kConnectionFailed = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class RadioFaultEnum(MatterIntEnum): @@ -7695,8 +7729,8 @@ class RadioFaultEnum(MatterIntEnum): kEthernetFault = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -8550,8 +8584,8 @@ class ConnectionStatusEnum(MatterIntEnum): kNotConnected = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class NetworkFaultEnum(MatterIntEnum): @@ -8561,8 +8595,8 @@ class NetworkFaultEnum(MatterIntEnum): kNetworkJammed = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class RoutingRoleEnum(MatterIntEnum): @@ -8575,8 +8609,8 @@ class RoutingRoleEnum(MatterIntEnum): kLeader = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -9917,8 +9951,8 @@ class AssociationFailureCauseEnum(MatterIntEnum): kSsidNotFound = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ConnectionStatusEnum(MatterIntEnum): @@ -9926,8 +9960,8 @@ class ConnectionStatusEnum(MatterIntEnum): kNotConnected = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class SecurityTypeEnum(MatterIntEnum): @@ -9939,8 +9973,8 @@ class SecurityTypeEnum(MatterIntEnum): kWpa3 = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class WiFiVersionEnum(MatterIntEnum): @@ -9953,8 +9987,8 @@ class WiFiVersionEnum(MatterIntEnum): kAh = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -10397,8 +10431,8 @@ class PHYRateEnum(MatterIntEnum): kRate400G = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class Bitmaps: @@ -10720,16 +10754,16 @@ class GranularityEnum(MatterIntEnum): kMicrosecondsGranularity = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class StatusCode(MatterIntEnum): kTimeNotAccepted = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class TimeSourceEnum(MatterIntEnum): @@ -10752,8 +10786,8 @@ class TimeSourceEnum(MatterIntEnum): kGnss = 0x10 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 17, class TimeZoneDatabaseEnum(MatterIntEnum): @@ -10762,8 +10796,8 @@ class TimeZoneDatabaseEnum(MatterIntEnum): kNone = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -11408,8 +11442,8 @@ class ColorEnum(MatterIntEnum): kGold = 0x14 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 21, class ProductFinishEnum(MatterIntEnum): @@ -11421,8 +11455,8 @@ class ProductFinishEnum(MatterIntEnum): kFabric = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -12259,8 +12293,8 @@ class CommissioningWindowStatusEnum(MatterIntEnum): kBasicWindowOpen = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class StatusCode(MatterIntEnum): @@ -12269,8 +12303,8 @@ class StatusCode(MatterIntEnum): kWindowNotOpen = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -12530,8 +12564,8 @@ class CertificateChainTypeEnum(MatterIntEnum): kPAICertificate = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class NodeOperationalCertStatusEnum(MatterIntEnum): @@ -12547,8 +12581,8 @@ class NodeOperationalCertStatusEnum(MatterIntEnum): kInvalidFabricIndex = 0x0B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Structs: @@ -13032,8 +13066,8 @@ class GroupKeySecurityPolicyEnum(MatterIntEnum): kCacheAndSync = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -14231,8 +14265,8 @@ class ClientTypeEnum(MatterIntEnum): kEphemeral = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class OperatingModeEnum(MatterIntEnum): @@ -14240,8 +14274,8 @@ class OperatingModeEnum(MatterIntEnum): kLit = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -14674,8 +14708,8 @@ class TimerStatusEnum(MatterIntEnum): kReady = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -14933,8 +14967,8 @@ class ErrorStateEnum(MatterIntEnum): kCommandInvalidInState = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class OperationalStateEnum(MatterIntEnum): @@ -14944,8 +14978,8 @@ class OperationalStateEnum(MatterIntEnum): kError = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Structs: @@ -15327,8 +15361,8 @@ class ModeTag(MatterIntEnum): kProofing = 0x4008 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -15596,8 +15630,8 @@ class DrynessLevelEnum(MatterIntEnum): kMax = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Attributes: @@ -16592,8 +16626,8 @@ class NumberOfRinsesEnum(MatterIntEnum): kMax = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -18025,8 +18059,8 @@ class AirQualityEnum(MatterIntEnum): kExtremelyPoor = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -18206,8 +18240,8 @@ class AlarmStateEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class ContaminationStateEnum(MatterIntEnum): @@ -18217,8 +18251,8 @@ class ContaminationStateEnum(MatterIntEnum): kCritical = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class EndOfServiceEnum(MatterIntEnum): @@ -18226,8 +18260,8 @@ class EndOfServiceEnum(MatterIntEnum): kExpired = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ExpressedStateEnum(MatterIntEnum): @@ -18242,8 +18276,8 @@ class ExpressedStateEnum(MatterIntEnum): kInterconnectCO = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 9, class MuteStateEnum(MatterIntEnum): @@ -18251,8 +18285,8 @@ class MuteStateEnum(MatterIntEnum): kMuted = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class SensitivityEnum(MatterIntEnum): @@ -18261,8 +18295,8 @@ class SensitivityEnum(MatterIntEnum): kLow = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -19079,8 +19113,8 @@ class ModeTag(MatterIntEnum): kDefrost = 0x4001 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -19619,8 +19653,8 @@ class ErrorStateEnum(MatterIntEnum): kCommandInvalidInState = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class OperationalStateEnum(MatterIntEnum): @@ -19630,8 +19664,8 @@ class OperationalStateEnum(MatterIntEnum): kError = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Structs: @@ -20939,8 +20973,8 @@ class ChangeIndicationEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DegradationDirectionEnum(MatterIntEnum): @@ -20948,8 +20982,8 @@ class DegradationDirectionEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ProductIdentifierTypeEnum(MatterIntEnum): @@ -20960,8 +20994,8 @@ class ProductIdentifierTypeEnum(MatterIntEnum): kOem = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Bitmaps: @@ -21234,8 +21268,8 @@ class ChangeIndicationEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DegradationDirectionEnum(MatterIntEnum): @@ -21243,8 +21277,8 @@ class DegradationDirectionEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ProductIdentifierTypeEnum(MatterIntEnum): @@ -21255,8 +21289,8 @@ class ProductIdentifierTypeEnum(MatterIntEnum): kOem = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Bitmaps: @@ -21890,8 +21924,8 @@ class StatusCodeEnum(MatterIntEnum): kFailureDueToFault = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class ValveStateEnum(MatterIntEnum): @@ -21900,8 +21934,8 @@ class ValveStateEnum(MatterIntEnum): kTransitioning = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -22344,8 +22378,8 @@ class MeasurementTypeEnum(MatterIntEnum): kElectricalEnergy = 0x0E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 15, class PowerModeEnum(MatterIntEnum): @@ -22354,8 +22388,8 @@ class PowerModeEnum(MatterIntEnum): kAc = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -22931,8 +22965,8 @@ class MeasurementTypeEnum(MatterIntEnum): kElectricalEnergy = 0x0E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 15, class Bitmaps: @@ -23301,8 +23335,8 @@ class BoostStateEnum(MatterIntEnum): kActive = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -23611,8 +23645,8 @@ class CriticalityLevelEnum(MatterIntEnum): kServiceDisconnect = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class HeatingSourceEnum(MatterIntEnum): @@ -23621,8 +23655,8 @@ class HeatingSourceEnum(MatterIntEnum): kNonElectric = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class LoadControlEventChangeSourceEnum(MatterIntEnum): @@ -23630,8 +23664,8 @@ class LoadControlEventChangeSourceEnum(MatterIntEnum): kUserAction = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class LoadControlEventStatusEnum(MatterIntEnum): @@ -23650,8 +23684,8 @@ class LoadControlEventStatusEnum(MatterIntEnum): kFailed = 0x0C # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 13, class Bitmaps: @@ -24202,8 +24236,8 @@ class FutureMessagePreferenceEnum(MatterIntEnum): kBanned = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MessagePriorityEnum(MatterIntEnum): @@ -24213,8 +24247,8 @@ class MessagePriorityEnum(MatterIntEnum): kCritical = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -24552,8 +24586,8 @@ class AdjustmentCauseEnum(MatterIntEnum): kGridOptimization = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class CauseEnum(MatterIntEnum): @@ -24564,8 +24598,8 @@ class CauseEnum(MatterIntEnum): kCancelled = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class CostTypeEnum(MatterIntEnum): @@ -24575,8 +24609,8 @@ class CostTypeEnum(MatterIntEnum): kTemperature = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ESAStateEnum(MatterIntEnum): @@ -24587,8 +24621,8 @@ class ESAStateEnum(MatterIntEnum): kPaused = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class ESATypeEnum(MatterIntEnum): @@ -24609,8 +24643,8 @@ class ESATypeEnum(MatterIntEnum): kOther = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class ForecastUpdateReasonEnum(MatterIntEnum): @@ -24619,8 +24653,8 @@ class ForecastUpdateReasonEnum(MatterIntEnum): kGridOptimization = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class OptOutStateEnum(MatterIntEnum): @@ -24630,8 +24664,8 @@ class OptOutStateEnum(MatterIntEnum): kOptOut = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class PowerAdjustReasonEnum(MatterIntEnum): @@ -24640,8 +24674,8 @@ class PowerAdjustReasonEnum(MatterIntEnum): kGridOptimizationAdjustment = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -25319,8 +25353,8 @@ class EnergyTransferStoppedReasonEnum(MatterIntEnum): kOther = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class FaultStateEnum(MatterIntEnum): @@ -25343,8 +25377,8 @@ class FaultStateEnum(MatterIntEnum): kOther = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 16, class StateEnum(MatterIntEnum): @@ -25357,8 +25391,8 @@ class StateEnum(MatterIntEnum): kFault = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class SupplyStateEnum(MatterIntEnum): @@ -25370,8 +25404,8 @@ class SupplyStateEnum(MatterIntEnum): kEnabled = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -26221,8 +26255,8 @@ class EnergyPriorityEnum(MatterIntEnum): kWaterConsumption = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -27528,8 +27562,8 @@ class AlarmCodeEnum(MatterIntEnum): kForcedUser = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class CredentialRuleEnum(MatterIntEnum): @@ -27538,8 +27572,8 @@ class CredentialRuleEnum(MatterIntEnum): kTri = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class CredentialTypeEnum(MatterIntEnum): @@ -27554,8 +27588,8 @@ class CredentialTypeEnum(MatterIntEnum): kAliroNonEvictableEndpointKey = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 9, class DataOperationTypeEnum(MatterIntEnum): @@ -27564,8 +27598,8 @@ class DataOperationTypeEnum(MatterIntEnum): kModify = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DlLockState(MatterIntEnum): @@ -27575,8 +27609,8 @@ class DlLockState(MatterIntEnum): kUnlatched = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class DlLockType(MatterIntEnum): @@ -27594,8 +27628,8 @@ class DlLockType(MatterIntEnum): kEurocylinder = 0x0B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 12, class DlStatus(MatterIntEnum): @@ -27608,8 +27642,8 @@ class DlStatus(MatterIntEnum): kNotFound = 0x8B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class DoorLockOperationEventCode(MatterIntEnum): @@ -27630,8 +27664,8 @@ class DoorLockOperationEventCode(MatterIntEnum): kManualUnlock = 0x0E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 15, class DoorLockProgrammingEventCode(MatterIntEnum): @@ -27644,8 +27678,8 @@ class DoorLockProgrammingEventCode(MatterIntEnum): kIdDeleted = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class DoorLockSetPinOrIdStatus(MatterIntEnum): @@ -27655,8 +27689,8 @@ class DoorLockSetPinOrIdStatus(MatterIntEnum): kDuplicateCodeError = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class DoorLockUserStatus(MatterIntEnum): @@ -27666,8 +27700,8 @@ class DoorLockUserStatus(MatterIntEnum): kNotSupported = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class DoorLockUserType(MatterIntEnum): @@ -27679,8 +27713,8 @@ class DoorLockUserType(MatterIntEnum): kNotSupported = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class DoorStateEnum(MatterIntEnum): @@ -27692,8 +27726,8 @@ class DoorStateEnum(MatterIntEnum): kDoorAjar = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class LockDataTypeEnum(MatterIntEnum): @@ -27713,8 +27747,8 @@ class LockDataTypeEnum(MatterIntEnum): kAliroNonEvictableEndpointKey = 0x0D # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class LockOperationTypeEnum(MatterIntEnum): @@ -27725,8 +27759,8 @@ class LockOperationTypeEnum(MatterIntEnum): kUnlatch = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class OperatingModeEnum(MatterIntEnum): @@ -27737,8 +27771,8 @@ class OperatingModeEnum(MatterIntEnum): kPassage = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class OperationErrorEnum(MatterIntEnum): @@ -27749,8 +27783,8 @@ class OperationErrorEnum(MatterIntEnum): kInsufficientBattery = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class OperationSourceEnum(MatterIntEnum): @@ -27767,8 +27801,8 @@ class OperationSourceEnum(MatterIntEnum): kAliro = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 11, class UserStatusEnum(MatterIntEnum): @@ -27777,8 +27811,8 @@ class UserStatusEnum(MatterIntEnum): kOccupiedDisabled = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class UserTypeEnum(MatterIntEnum): @@ -27794,8 +27828,8 @@ class UserTypeEnum(MatterIntEnum): kRemoteOnlyUser = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class Bitmaps: @@ -29577,8 +29611,8 @@ class EndProductType(MatterIntEnum): kUnknown = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 24, class Type(MatterIntEnum): @@ -29595,8 +29629,8 @@ class Type(MatterIntEnum): kUnknown = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class Bitmaps: @@ -30670,8 +30704,8 @@ class AreaTypeTag(MatterIntEnum): kWorkshop = 0x5E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 95, class FloorSurfaceTag(MatterIntEnum): @@ -30701,8 +30735,8 @@ class FloorSurfaceTag(MatterIntEnum): kVinyl = 0x17 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 24, class LandmarkTag(MatterIntEnum): @@ -30759,8 +30793,8 @@ class LandmarkTag(MatterIntEnum): kWineCooler = 0x32 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 51, class OperationalStatusEnum(MatterIntEnum): @@ -30770,8 +30804,8 @@ class OperationalStatusEnum(MatterIntEnum): kCompleted = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class PositionTag(MatterIntEnum): @@ -30791,8 +30825,8 @@ class PositionTag(MatterIntEnum): kBehind = 0x0D # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class SelectLocationsStatus(MatterIntEnum): @@ -30803,8 +30837,8 @@ class SelectLocationsStatus(MatterIntEnum): kInvalidSet = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class SkipCurrentLocationStatus(MatterIntEnum): @@ -30813,8 +30847,8 @@ class SkipCurrentLocationStatus(MatterIntEnum): kInvalidInMode = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -31239,8 +31273,8 @@ class ControlModeEnum(MatterIntEnum): kAutomatic = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class OperationModeEnum(MatterIntEnum): @@ -31250,8 +31284,8 @@ class OperationModeEnum(MatterIntEnum): kLocal = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -32166,8 +32200,8 @@ class ACCapacityFormatEnum(MatterIntEnum): kBTUh = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class ACCompressorTypeEnum(MatterIntEnum): @@ -32177,8 +32211,8 @@ class ACCompressorTypeEnum(MatterIntEnum): kT3 = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ACLouverPositionEnum(MatterIntEnum): @@ -32189,8 +32223,8 @@ class ACLouverPositionEnum(MatterIntEnum): kThreeQuarters = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class ACRefrigerantTypeEnum(MatterIntEnum): @@ -32200,8 +32234,8 @@ class ACRefrigerantTypeEnum(MatterIntEnum): kR407c = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ACTypeEnum(MatterIntEnum): @@ -32212,8 +32246,8 @@ class ACTypeEnum(MatterIntEnum): kHeatPumpInverter = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class ControlSequenceOfOperationEnum(MatterIntEnum): @@ -32225,8 +32259,8 @@ class ControlSequenceOfOperationEnum(MatterIntEnum): kCoolingAndHeatingWithReheat = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class PresetScenarioEnum(MatterIntEnum): @@ -32239,8 +32273,8 @@ class PresetScenarioEnum(MatterIntEnum): kUserDefined = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class SetpointChangeSourceEnum(MatterIntEnum): @@ -32249,8 +32283,8 @@ class SetpointChangeSourceEnum(MatterIntEnum): kExternal = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class SetpointRaiseLowerModeEnum(MatterIntEnum): @@ -32259,8 +32293,8 @@ class SetpointRaiseLowerModeEnum(MatterIntEnum): kBoth = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class StartOfWeekEnum(MatterIntEnum): @@ -32273,8 +32307,8 @@ class StartOfWeekEnum(MatterIntEnum): kSaturday = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class SystemModeEnum(MatterIntEnum): @@ -32289,8 +32323,8 @@ class SystemModeEnum(MatterIntEnum): kSleep = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class TemperatureSetpointHoldEnum(MatterIntEnum): @@ -32298,8 +32332,8 @@ class TemperatureSetpointHoldEnum(MatterIntEnum): kSetpointHoldOn = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ThermostatRunningModeEnum(MatterIntEnum): @@ -32308,8 +32342,8 @@ class ThermostatRunningModeEnum(MatterIntEnum): kHeat = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class Bitmaps: @@ -33821,8 +33855,8 @@ class AirflowDirectionEnum(MatterIntEnum): kReverse = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class FanModeEnum(MatterIntEnum): @@ -33835,8 +33869,8 @@ class FanModeEnum(MatterIntEnum): kSmart = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class FanModeSequenceEnum(MatterIntEnum): @@ -33848,8 +33882,8 @@ class FanModeSequenceEnum(MatterIntEnum): kOffHigh = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class StepDirectionEnum(MatterIntEnum): @@ -33857,8 +33891,8 @@ class StepDirectionEnum(MatterIntEnum): kDecrease = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -34229,8 +34263,8 @@ class KeypadLockoutEnum(MatterIntEnum): kLockout5 = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class ScheduleProgrammingVisibilityEnum(MatterIntEnum): @@ -34238,8 +34272,8 @@ class ScheduleProgrammingVisibilityEnum(MatterIntEnum): kScheduleProgrammingDenied = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class TemperatureDisplayModeEnum(MatterIntEnum): @@ -34247,8 +34281,8 @@ class TemperatureDisplayModeEnum(MatterIntEnum): kFahrenheit = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Attributes: @@ -34531,8 +34565,8 @@ class ColorLoopAction(MatterIntEnum): kActivateFromEnhancedCurrentHue = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class ColorLoopDirection(MatterIntEnum): @@ -34540,8 +34574,8 @@ class ColorLoopDirection(MatterIntEnum): kIncrementHue = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ColorMode(MatterIntEnum): @@ -34550,8 +34584,8 @@ class ColorMode(MatterIntEnum): kColorTemperature = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class HueDirection(MatterIntEnum): @@ -34561,8 +34595,8 @@ class HueDirection(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class HueMoveMode(MatterIntEnum): @@ -34571,8 +34605,8 @@ class HueMoveMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class HueStepMode(MatterIntEnum): @@ -34580,8 +34614,8 @@ class HueStepMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class SaturationMoveMode(MatterIntEnum): @@ -34590,8 +34624,8 @@ class SaturationMoveMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class SaturationStepMode(MatterIntEnum): @@ -34599,8 +34633,8 @@ class SaturationStepMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -36423,8 +36457,8 @@ class LightSensorTypeEnum(MatterIntEnum): kCmos = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Attributes: @@ -37530,8 +37564,8 @@ class OccupancySensorTypeEnum(MatterIntEnum): kPhysicalContact = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -37945,8 +37979,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -37955,8 +37989,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -37970,8 +38004,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -38311,8 +38345,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -38321,8 +38355,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -38336,8 +38370,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -38677,8 +38711,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -38687,8 +38721,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -38702,8 +38736,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -39043,8 +39077,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -39053,8 +39087,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -39068,8 +39102,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -39409,8 +39443,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -39419,8 +39453,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -39434,8 +39468,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -39775,8 +39809,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -39785,8 +39819,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -39800,8 +39834,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -40141,8 +40175,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -40151,8 +40185,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -40166,8 +40200,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -40507,8 +40541,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -40517,8 +40551,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -40532,8 +40566,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -40873,8 +40907,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -40883,8 +40917,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -40898,8 +40932,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -41239,8 +41273,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -41249,8 +41283,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -41264,8 +41298,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -42476,16 +42510,16 @@ class ChannelTypeEnum(MatterIntEnum): kOtt = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class LineupInfoTypeEnum(MatterIntEnum): kMso = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class StatusEnum(MatterIntEnum): @@ -42494,8 +42528,8 @@ class StatusEnum(MatterIntEnum): kNoMatches = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -43017,8 +43051,8 @@ class StatusEnum(MatterIntEnum): kNotAllowed = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Structs: @@ -43293,8 +43327,8 @@ class CharacteristicEnum(MatterIntEnum): kKaraoke = 0x11 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 18, class PlaybackStateEnum(MatterIntEnum): @@ -43304,8 +43338,8 @@ class PlaybackStateEnum(MatterIntEnum): kBuffering = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class StatusEnum(MatterIntEnum): @@ -43317,8 +43351,8 @@ class StatusEnum(MatterIntEnum): kSeekOutOfRange = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -43946,8 +43980,8 @@ class InputTypeEnum(MatterIntEnum): kOther = 0x0B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 12, class Bitmaps: @@ -44411,8 +44445,8 @@ class CECKeyCodeEnum(MatterIntEnum): kData = 0x76 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class StatusEnum(MatterIntEnum): @@ -44421,8 +44455,8 @@ class StatusEnum(MatterIntEnum): kInvalidKeyInCurrentState = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -44611,8 +44645,8 @@ class CharacteristicEnum(MatterIntEnum): kKaraoke = 0x11 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 18, class MetricTypeEnum(MatterIntEnum): @@ -44620,8 +44654,8 @@ class MetricTypeEnum(MatterIntEnum): kPercentage = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ParameterEnum(MatterIntEnum): @@ -44644,8 +44678,8 @@ class ParameterEnum(MatterIntEnum): kAny = 0x10 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 17, class StatusEnum(MatterIntEnum): @@ -44656,8 +44690,8 @@ class StatusEnum(MatterIntEnum): kAudioTrackNotAvailable = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Bitmaps: @@ -45023,8 +45057,8 @@ class OutputTypeEnum(MatterIntEnum): kOther = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -45246,8 +45280,8 @@ class StatusEnum(MatterIntEnum): kSystemBusy = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -45527,8 +45561,8 @@ class ApplicationStatusEnum(MatterIntEnum): kActiveVisibleNotFocus = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Structs: @@ -46492,8 +46526,8 @@ class StatusEnum(MatterIntEnum): kUnexpectedData = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Commands: @@ -46761,8 +46795,8 @@ class AreaTypeTag(MatterIntEnum): kWorkshop = 0x5E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 95, class Structs: @@ -49924,8 +49958,8 @@ class SimpleEnum(MatterIntEnum): kValueC = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -52402,8 +52436,8 @@ class FaultType(MatterIntEnum): kCertFault = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Commands: diff --git a/src/controller/python/templates/partials/bitmap_def.zapt b/src/controller/python/templates/partials/bitmap_def.zapt new file mode 100644 index 00000000000000..00f34968519dc8 --- /dev/null +++ b/src/controller/python/templates/partials/bitmap_def.zapt @@ -0,0 +1,4 @@ + class {{asType label}}(IntFlag): +{{#zcl_bitmap_items}} + k{{asUpperCamelCase label}} = {{asHex mask}} +{{/zcl_bitmap_items}} diff --git a/src/controller/python/templates/partials/enum_def.zapt b/src/controller/python/templates/partials/enum_def.zapt new file mode 100644 index 00000000000000..d8063739e159ef --- /dev/null +++ b/src/controller/python/templates/partials/enum_def.zapt @@ -0,0 +1,18 @@ +{{! Takes cluster (possibly "Globals") as argument, already upper-camel-cased. }} + class {{asType label}}(MatterIntEnum): +{{#zcl_enum_items}} + k{{asUpperCamelCase label}} = {{asHex value 2}} +{{/zcl_enum_items}} +{{#unless (isInConfigList (concat cluster "::" label) "EnumsNotUsedAsTypeInXML")}} + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, +{{else}} + # kUnknownEnumValue intentionally not defined. This enum never goes + # through DataModel::Decode, likely because it is a part of a derived + # cluster. As a result having kUnknownEnumValue in this enum is error + # prone, and was removed. See + # src/app/common/templates/config-data.yaml. +{{/unless}} diff --git a/src/controller/python/templates/partials/struct_def.zapt b/src/controller/python/templates/partials/struct_def.zapt new file mode 100644 index 00000000000000..86e643be7d8863 --- /dev/null +++ b/src/controller/python/templates/partials/struct_def.zapt @@ -0,0 +1,15 @@ +{{! Takes cluster (possibly "Globals") as argument, already upper-camel-cased. }} + @dataclass + class {{asUpperCamelCase name}}(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + {{#zcl_struct_items}} + ClusterObjectFieldDescriptor(Label="{{ asLowerCamelCase label }}", Tag={{ fieldIdentifier }}, Type={{zapTypeToPythonClusterObjectType type ns=../cluster}}), + {{/zcl_struct_items}} + ]) + + {{#zcl_struct_items}} + {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=../cluster}}' = {{getPythonFieldDefault type ns=../cluster}} + {{/zcl_struct_items}} diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index b5f8ed80ca03d9..0aa05721e69a16 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -19,6 +19,33 @@ from .ClusterObjects import (Cluster, ClusterAttributeDescriptor, ClusterCommand ClusterObjectDescriptor, ClusterObjectFieldDescriptor) from .Types import Nullable, NullValue +class Globals: + class Enums: +{{#zcl_enums}} +{{#if has_no_clusters}} +{{> enum_def cluster="Globals"}} + +{{/if}} +{{/zcl_enums}} + class Bitmaps: +{{#zcl_bitmaps}} +{{#if has_no_clusters}} +{{! Work around https://github.com/project-chip/zap/issues/1370 and manually filter out built-in bitmap types. }} +{{#if_is_atomic label}} +{{else}} +{{> bitmap_def }} + +{{/if_is_atomic}} +{{/if}} +{{/zcl_bitmaps}} + class Structs: +{{#zcl_structs}} +{{#if has_no_clusters}} +{{> struct_def cluster="Globals"}} + +{{/if}} +{{/zcl_structs}} + {{#zcl_clusters}} @dataclass @@ -50,23 +77,7 @@ class {{asUpperCamelCase name}}(Cluster): {{#first}} class Enums: {{/first}} - class {{asType label}}(MatterIntEnum): -{{#zcl_enum_items}} - k{{asUpperCamelCase label}} = {{asHex value 2}} -{{/zcl_enum_items}} -{{#unless (isInConfigList (concat (asUpperCamelCase ../name) "::" label) "EnumsNotUsedAsTypeInXML")}} - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, -{{else}} - # kUnknownEnumValue intentionally not defined. This enum never goes - # through DataModel::Decode, likely because it is a part of a derived - # cluster. As a result having kUnknownEnumValue in this enum is error - # prone, and was removed. See - # src/app/common/templates/config-data.yaml. -{{/unless}} +{{> enum_def cluster=(asUpperCamelCase ../name)}} {{#last}} {{/last}} @@ -75,30 +86,14 @@ class {{asUpperCamelCase name}}(Cluster): {{#first}} class Bitmaps: {{/first}} - class {{asType label}}(IntFlag): -{{#zcl_bitmap_items}} - k{{asUpperCamelCase label}} = {{asHex mask}} -{{/zcl_bitmap_items}} +{{> bitmap_def }} {{/zcl_bitmaps}} {{#zcl_structs}} {{#first}} class Structs: {{/first}} - @dataclass - class {{asUpperCamelCase name}}(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - {{#zcl_struct_items}} - ClusterObjectFieldDescriptor(Label="{{ asLowerCamelCase label }}", Tag={{ fieldIdentifier }}, Type={{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}), - {{/zcl_struct_items}} - ]) - - {{#zcl_struct_items}} - {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} - {{/zcl_struct_items}} +{{> struct_def cluster=(asUpperCamelCase parent.name) }} {{/zcl_structs}} {{#zcl_commands}} diff --git a/src/controller/python/templates/templates.json b/src/controller/python/templates/templates.json index bffd9dfa2de7cc..ebe67b0f384b22 100644 --- a/src/controller/python/templates/templates.json +++ b/src/controller/python/templates/templates.json @@ -22,8 +22,16 @@ "path": "../../../../src/app/zap-templates/partials/clusters_header.zapt" }, { - "name": "cluster_header", - "path": "../../../../src/app/zap-templates/partials/cluster_header.zapt" + "name": "enum_def", + "path": "partials/enum_def.zapt" + }, + { + "name": "bitmap_def", + "path": "partials/bitmap_def.zapt" + }, + { + "name": "struct_def", + "path": "partials/struct_def.zapt" } ], "templates": [ diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 1189c61b0516f3..98d9588260a460 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -9687,6 +9687,7 @@ clusters: # Targeting 1.4 - CommissionerControl + - EcosystemInformation - ServiceArea - ThreadBorderRouterManagement - ThreadNetworkDirectory @@ -9699,16 +9700,33 @@ - HoldTime - HoldTimeLimits commands: + BridgedDeviceBasicInformation: + # Targeting 1.4 + - KeepActive UnitTesting: # Ideally none of UnitTesting would be exposed as public API, but # for now just start doing that for new additions to it. - StringEchoRequest - StringEchoResponse structs: + Globals: + # Test-only value + - TestGlobalStruct OccupancySensing: # Targeting 1.4 - HoldTimeLimitsStruct + events: + BridgedDeviceBasicInformation: + # Targeting 1.4 + - ActiveChanged + enums: + Globals: + # Test-only value + - TestGlobalEnum bitmaps: + BridgedDeviceBasicInformation: + # Targeting 1.4 + - Feature OccupancySensing: # Targeting 1.4 - Feature @@ -9717,12 +9735,3 @@ Feature: # Targeting 1.4 - ActionSwitch - removed: - structs: - Globals: - # Don't enable TestGlobalStruct until the ZAP side is fixed to handle it properly - - TestGlobalStruct - enums: - Globals: - # Don't enable TestGlobalEnum until the ZAP side is fixed to handle it properly - - TestGlobalEnum diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index dd0eecc0006f2a..2bcdb3fbc3919e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17124,6 +17124,12 @@ MTR_DEPRECATED("Please use MTRBaseClusterUnitTesting", ios(16.1, 16.4), macos(13 @interface MTRBaseClusterTestCluster : MTRBaseClusterUnitTesting @end +typedef NS_ENUM(uint8_t, MTRDataTypeTestGlobalEnum) { + MTRDataTypeTestGlobalEnumSomeValue MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeTestGlobalEnumSomeOtherValue MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeTestGlobalEnumFinalValue MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { MTRIdentifyEffectIdentifierBlink MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRIdentifyEffectIdentifierBreathe MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index b7e1502c30330d..2ce1e1707d2987 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -19,6 +19,13 @@ NS_ASSUME_NONNULL_BEGIN +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDataTypeTestGlobalStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable myBitmap MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable myEnum MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) @interface MTRDescriptorClusterDeviceTypeStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 410af5b8c7b2cc..5b0eacb0ff3edb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -19,6 +19,39 @@ NS_ASSUME_NONNULL_BEGIN +@implementation MTRDataTypeTestGlobalStruct +- (instancetype)init +{ + if (self = [super init]) { + + _name = @""; + + _myBitmap = nil; + + _myEnum = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRDataTypeTestGlobalStruct alloc] init]; + + other.name = self.name; + other.myBitmap = self.myBitmap; + other.myEnum = self.myEnum; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: name:%@; myBitmap:%@; myEnum:%@; >", NSStringFromClass([self class]), _name, _myBitmap, _myEnum]; + return descriptionString; +} + +@end + @implementation MTRDescriptorClusterDeviceTypeStruct - (instancetype)init { diff --git a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp index 1eb7b01bfc83c9..574bde208a427c 100644 --- a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp @@ -357,14 +357,8 @@ void ConnectivityManagerImpl::DriveStationState() void ConnectivityManagerImpl::OnStationConnected() { - ChipDeviceEvent event; wfx_setup_ip6_link_local(SL_WFX_STA_INTERFACE); - NetworkCommissioning::SlWiFiDriver::GetInstance().OnConnectWiFiNetwork(); - // Alert other components of the new state. - event.Type = DeviceEventType::kWiFiConnectivityChange; - event.WiFiConnectivityChange.Result = kConnectivity_Established; - (void) PlatformMgr().PostEvent(&event); // Setting the rs911x in the power save mode #if (CHIP_CONFIG_ENABLE_ICD_SERVER && RS911X_WIFI) #if SLI_SI917 @@ -378,19 +372,22 @@ void ConnectivityManagerImpl::OnStationConnected() } #endif /* CHIP_CONFIG_ENABLE_ICD_SERVER && RS911X_WIFI */ UpdateInternetConnectivityState(); + // Alert other components of the new state. + ChipDeviceEvent event; + event.Type = DeviceEventType::kWiFiConnectivityChange; + event.WiFiConnectivityChange.Result = kConnectivity_Established; + (void) PlatformMgr().PostEvent(&event); } void ConnectivityManagerImpl::OnStationDisconnected() { // TODO: Invoke WARM to perform actions that occur when the WiFi station interface goes down. - + UpdateInternetConnectivityState(); // Alert other components of the new state. ChipDeviceEvent event; event.Type = DeviceEventType::kWiFiConnectivityChange; event.WiFiConnectivityChange.Result = kConnectivity_Lost; (void) PlatformMgr().PostEvent(&event); - - UpdateInternetConnectivityState(); } void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, void * aAppState) @@ -440,8 +437,6 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) event.InternetConnectivityChange.IPv6 = GetConnectivityChange(hadIPv6Conn, haveIPv6Conn); event.InternetConnectivityChange.ipAddress = addr; - (void) PlatformMgr().PostEvent(&event); - if (haveIPv4Conn != hadIPv4Conn) { ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv4", (haveIPv4Conn) ? "ESTABLISHED" : "LOST"); @@ -451,6 +446,7 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) { ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv6", (haveIPv6Conn) ? "ESTABLISHED" : "LOST"); } + (void) PlatformMgr().PostEvent(&event); } } diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp index f798054932e692..614a121280eaef 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp @@ -325,19 +325,14 @@ void SlWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callba CHIP_ERROR GetConnectedNetwork(Network & network) { wfx_wifi_provision_t wifiConfig; - - if (!wfx_is_sta_connected() || !wfx_get_wifi_provision(&wifiConfig)) - { - return CHIP_ERROR_INCORRECT_STATE; - } - - uint8_t length = strnlen(wifiConfig.ssid, DeviceLayer::Internal::kMaxWiFiSSIDLength); - if (length > sizeof(network.networkID)) - { - ChipLogError(DeviceLayer, "SSID too long"); - return CHIP_ERROR_INTERNAL; - } - + network.networkIDLen = 0; + network.connected = false; + // we are able to fetch the wifi provision data and STA should be connected + VerifyOrReturnError(wfx_get_wifi_provision(&wifiConfig), CHIP_ERROR_UNINITIALIZED); + VerifyOrReturnError(wfx_is_sta_connected(), CHIP_ERROR_NOT_CONNECTED); + network.connected = true; + uint8_t length = strnlen(wifiConfig.ssid, DeviceLayer::Internal::kMaxWiFiSSIDLength); + VerifyOrReturnError(length < sizeof(network.networkID), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(network.networkID, wifiConfig.ssid, length); network.networkIDLen = length; diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.h b/src/platform/silabs/NetworkCommissioningWiFiDriver.h index 55148e3700091d..f152edb343cbf2 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.h +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.h @@ -30,6 +30,8 @@ inline constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; inline constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 20; } // namespace +CHIP_ERROR GetConnectedNetwork(Network & network); + template class SlScanResponseIterator : public Iterator { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index dd4bf2387c3a2e..af96e92e1dc3a7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -268,6 +268,19 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(detail::ProductIdentifi return EnumType::kUnknownEnumValue; } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::TestGlobalEnum val) +{ + using EnumType = Globals::TestGlobalEnum; + switch (val) + { + case EnumType::kSomeValue: + case EnumType::kSomeOtherValue: + case EnumType::kFinalValue: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::EffectIdentifierEnum val) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index aaa24825e49d82..8a15f1f0b1bac1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -276,6 +276,33 @@ enum class ProductIdentifierTypeEnum : uint8_t } // namespace detail +namespace Globals { +// Global enums. + +// Enum for TestGlobalEnum +enum class TestGlobalEnum : uint8_t +{ + kSomeValue = 0x00, + kSomeOtherValue = 0x01, + kFinalValue = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +// Global bitmaps. + +// Bitmap for TestGlobalBitmap +enum class TestGlobalBitmap : uint32_t +{ + kFirstBit = 0x1, + kSecondBit = 0x2, +}; + +} // namespace Globals + namespace Identify { // Enum for EffectIdentifierEnum diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 618bbb50b5ecb3..2a3e9856803f68 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -552,6 +552,59 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Structs } // namespace detail +namespace Globals { +// Global structs +namespace Structs { + +namespace TestGlobalStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kMyBitmap), myBitmap); + encoder.Encode(to_underlying(Fields::kMyEnum), myEnum); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kMyBitmap)) + { + err = DataModel::Decode(reader, myBitmap); + } + else if (__context_tag == to_underlying(Fields::kMyEnum)) + { + err = DataModel::Decode(reader, myEnum); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace TestGlobalStruct + +} // namespace Structs +} // namespace Globals + namespace Identify { namespace Commands { 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 6b9901ba351a58..81be5e1224e81d 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 @@ -319,6 +319,38 @@ using DecodableType = Type; } // namespace detail namespace Globals { + +// Global structs. +namespace Structs { + +namespace TestGlobalStruct { +enum class Fields : uint8_t +{ + kName = 0, + kMyBitmap = 1, + kMyEnum = 2, +}; + +struct Type +{ +public: + chip::CharSpan name; + DataModel::Nullable> myBitmap; + Optional> myEnum; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace TestGlobalStruct + +} // namespace Structs + namespace Attributes { namespace GeneratedCommandList { struct TypeInfo diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 76a2d92d51a154..c93045a49de528 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -423,6 +423,44 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::Opera ComplexArgumentParser::Finalize(request.operationalStateLabel); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TestGlobalStruct.name", "name", value.isMember("name"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TestGlobalStruct.myBitmap", "myBitmap", value.isMember("myBitmap"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + valueCopy.removeMember("name"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "myBitmap"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.myBitmap, value["myBitmap"])); + valueCopy.removeMember("myBitmap"); + + if (value.isMember("myEnum")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "myEnum"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.myEnum, value["myEnum"])); + } + valueCopy.removeMember("myEnum"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.name); + ComplexArgumentParser::Finalize(request.myBitmap); + ComplexArgumentParser::Finalize(request.myEnum); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 6a6c29d57ff790..a72e57e690d024 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -71,6 +71,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs static void Finalize(chip::app::Clusters::detail::Structs::OperationalStateStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & request, Json::Value & value); 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 76880f90f6cfd4..c6c1231bab95d1 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -368,6 +368,39 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Globals::Structs::TestGlobalStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MyBitmap", indent + 1, value.myBitmap); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MyBitmap'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MyEnum", indent + 1, value.myEnum); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MyEnum'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::DecodableType & value) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index e7faf1c9a35b88..4cfb8d31d2098c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -50,6 +50,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::OperationalStateStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Globals::Structs::TestGlobalStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::DecodableType & value);