diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 46debb8a6cd363..c18c6164c5c717 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -5847,65 +5847,62 @@ cluster ThermostatUserInterfaceConfiguration = 516 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -5916,16 +5913,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -5957,13 +5965,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -5977,150 +5985,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h b/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h index a80b5fe02d659d..73241be444dbcb 100644 --- a/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h +++ b/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h @@ -360,29 +360,29 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E { case Clusters::ColorControl::Commands::MoveToHue::Id: moveToHueCommand.hue = static_cast(data->args[0]); - moveToHueCommand.direction = static_cast(data->args[1]); + moveToHueCommand.direction = static_cast(data->args[1]); moveToHueCommand.transitionTime = static_cast(data->args[2]); - moveToHueCommand.optionsMask = static_cast(data->args[3]); - moveToHueCommand.optionsOverride = static_cast(data->args[4]); + moveToHueCommand.optionsMask = static_cast(data->args[3]); + moveToHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToHueCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::MoveHue::Id: - moveHueCommand.moveMode = static_cast(data->args[0]); + moveHueCommand.moveMode = static_cast(data->args[0]); moveHueCommand.rate = static_cast(data->args[1]); - moveHueCommand.optionsMask = static_cast(data->args[2]); - moveHueCommand.optionsOverride = static_cast(data->args[3]); + moveHueCommand.optionsMask = static_cast(data->args[2]); + moveHueCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveHueCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::StepHue::Id: - stepHueCommand.stepMode = static_cast(data->args[0]); + stepHueCommand.stepMode = static_cast(data->args[0]); stepHueCommand.stepSize = static_cast(data->args[1]); stepHueCommand.transitionTime = static_cast(data->args[2]); - stepHueCommand.optionsMask = static_cast(data->args[3]); - stepHueCommand.optionsOverride = static_cast(data->args[4]); + stepHueCommand.optionsMask = static_cast(data->args[3]); + stepHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stepHueCommand, onSuccess, onFailure); break; @@ -390,27 +390,27 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E case Clusters::ColorControl::Commands::MoveToSaturation::Id: moveToSaturationCommand.saturation = static_cast(data->args[0]); moveToSaturationCommand.transitionTime = static_cast(data->args[1]); - moveToSaturationCommand.optionsMask = static_cast(data->args[2]); - moveToSaturationCommand.optionsOverride = static_cast(data->args[3]); + moveToSaturationCommand.optionsMask = static_cast(data->args[2]); + moveToSaturationCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToSaturationCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::MoveSaturation::Id: - moveSaturationCommand.moveMode = static_cast(data->args[0]); + moveSaturationCommand.moveMode = static_cast(data->args[0]); moveSaturationCommand.rate = static_cast(data->args[1]); - moveSaturationCommand.optionsMask = static_cast(data->args[2]); - moveSaturationCommand.optionsOverride = static_cast(data->args[3]); + moveSaturationCommand.optionsMask = static_cast(data->args[2]); + moveSaturationCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveSaturationCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::StepSaturation::Id: - stepSaturationCommand.stepMode = static_cast(data->args[0]); + stepSaturationCommand.stepMode = static_cast(data->args[0]); stepSaturationCommand.stepSize = static_cast(data->args[1]); stepSaturationCommand.transitionTime = static_cast(data->args[2]); - stepSaturationCommand.optionsMask = static_cast(data->args[3]); - stepSaturationCommand.optionsOverride = static_cast(data->args[4]); + stepSaturationCommand.optionsMask = static_cast(data->args[3]); + stepSaturationCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stepSaturationCommand, onSuccess, onFailure); break; @@ -419,8 +419,8 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E moveToHueAndSaturationCommand.hue = static_cast(data->args[0]); moveToHueAndSaturationCommand.saturation = static_cast(data->args[1]); moveToHueAndSaturationCommand.transitionTime = static_cast(data->args[2]); - moveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); - moveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); + moveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); + moveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToHueAndSaturationCommand, onSuccess, onFailure); break; @@ -429,8 +429,8 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E moveToColorCommand.colorX = static_cast(data->args[0]); moveToColorCommand.colorY = static_cast(data->args[1]); moveToColorCommand.transitionTime = static_cast(data->args[2]); - moveToColorCommand.optionsMask = static_cast(data->args[3]); - moveToColorCommand.optionsOverride = static_cast(data->args[4]); + moveToColorCommand.optionsMask = static_cast(data->args[3]); + moveToColorCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToColorCommand, onSuccess, onFailure); break; @@ -438,8 +438,8 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E case Clusters::ColorControl::Commands::MoveColor::Id: moveColorCommand.rateX = static_cast(data->args[0]); moveColorCommand.rateY = static_cast(data->args[1]); - moveColorCommand.optionsMask = static_cast(data->args[2]); - moveColorCommand.optionsOverride = static_cast(data->args[3]); + moveColorCommand.optionsMask = static_cast(data->args[2]); + moveColorCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveColorCommand, onSuccess, onFailure); break; @@ -448,8 +448,8 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E stepColorCommand.stepX = static_cast(data->args[0]); stepColorCommand.stepY = static_cast(data->args[1]); stepColorCommand.transitionTime = static_cast(data->args[2]); - stepColorCommand.optionsMask = static_cast(data->args[3]); - stepColorCommand.optionsOverride = static_cast(data->args[4]); + stepColorCommand.optionsMask = static_cast(data->args[3]); + stepColorCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stepColorCommand, onSuccess, onFailure); break; @@ -457,37 +457,37 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E case Clusters::ColorControl::Commands::MoveToColorTemperature::Id: moveToColorTemperatureCommand.colorTemperatureMireds = static_cast(data->args[0]); moveToColorTemperatureCommand.transitionTime = static_cast(data->args[1]); - moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); - moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); + moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); + moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToColorTemperatureCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::EnhancedMoveToHue::Id: enhancedMoveToHueCommand.enhancedHue = static_cast(data->args[0]); - enhancedMoveToHueCommand.direction = static_cast(data->args[1]); + enhancedMoveToHueCommand.direction = static_cast(data->args[1]); enhancedMoveToHueCommand.transitionTime = static_cast(data->args[2]); - enhancedMoveToHueCommand.optionsMask = static_cast(data->args[3]); - enhancedMoveToHueCommand.optionsOverride = static_cast(data->args[4]); + enhancedMoveToHueCommand.optionsMask = static_cast(data->args[3]); + enhancedMoveToHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, enhancedMoveToHueCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::EnhancedMoveHue::Id: - enhancedMoveHueCommand.moveMode = static_cast(data->args[0]); + enhancedMoveHueCommand.moveMode = static_cast(data->args[0]); enhancedMoveHueCommand.rate = static_cast(data->args[1]); - enhancedMoveHueCommand.optionsMask = static_cast(data->args[2]); - enhancedMoveHueCommand.optionsOverride = static_cast(data->args[3]); + enhancedMoveHueCommand.optionsMask = static_cast(data->args[2]); + enhancedMoveHueCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, enhancedMoveHueCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::EnhancedStepHue::Id: - enhancedStepHueCommand.stepMode = static_cast(data->args[0]); + enhancedStepHueCommand.stepMode = static_cast(data->args[0]); enhancedStepHueCommand.stepSize = static_cast(data->args[1]); enhancedStepHueCommand.transitionTime = static_cast(data->args[2]); - enhancedStepHueCommand.optionsMask = static_cast(data->args[3]); - enhancedStepHueCommand.optionsOverride = static_cast(data->args[4]); + enhancedStepHueCommand.optionsMask = static_cast(data->args[3]); + enhancedStepHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, enhancedStepHueCommand, onSuccess, onFailure); break; @@ -496,51 +496,51 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E enhancedMoveToHueAndSaturationCommand.enhancedHue = static_cast(data->args[0]); enhancedMoveToHueAndSaturationCommand.saturation = static_cast(data->args[1]); enhancedMoveToHueAndSaturationCommand.transitionTime = static_cast(data->args[2]); - enhancedMoveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); - enhancedMoveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); + enhancedMoveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); + enhancedMoveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, enhancedMoveToHueAndSaturationCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::ColorLoopSet::Id: colorLoopSetCommand.updateFlags = - static_cast>(data->args[0]); - colorLoopSetCommand.action = static_cast(data->args[1]); - colorLoopSetCommand.direction = static_cast(data->args[2]); + static_cast>(data->args[0]); + colorLoopSetCommand.action = static_cast(data->args[1]); + colorLoopSetCommand.direction = static_cast(data->args[2]); colorLoopSetCommand.time = static_cast(data->args[3]); colorLoopSetCommand.startHue = static_cast(data->args[4]); - colorLoopSetCommand.optionsMask = static_cast(data->args[5]); - colorLoopSetCommand.optionsOverride = static_cast(data->args[6]); + colorLoopSetCommand.optionsMask = static_cast(data->args[5]); + colorLoopSetCommand.optionsOverride = static_cast(data->args[6]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, colorLoopSetCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::StopMoveStep::Id: - stopMoveStepCommand.optionsMask = static_cast(data->args[0]); - stopMoveStepCommand.optionsOverride = static_cast(data->args[1]); + stopMoveStepCommand.optionsMask = static_cast(data->args[0]); + stopMoveStepCommand.optionsOverride = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stopMoveStepCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::MoveColorTemperature::Id: - moveColorTemperatureCommand.moveMode = static_cast(data->args[0]); + moveColorTemperatureCommand.moveMode = static_cast(data->args[0]); moveColorTemperatureCommand.rate = static_cast(data->args[1]); moveColorTemperatureCommand.colorTemperatureMinimumMireds = static_cast(data->args[2]); moveColorTemperatureCommand.colorTemperatureMaximumMireds = static_cast(data->args[3]); - moveColorTemperatureCommand.optionsMask = static_cast(data->args[4]); - moveColorTemperatureCommand.optionsOverride = static_cast(data->args[5]); + moveColorTemperatureCommand.optionsMask = static_cast(data->args[4]); + moveColorTemperatureCommand.optionsOverride = static_cast(data->args[5]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveColorTemperatureCommand, onSuccess, onFailure); break; case Clusters::ColorControl::Commands::StepColorTemperature::Id: - stepColorTemperatureCommand.stepMode = static_cast(data->args[0]); + stepColorTemperatureCommand.stepMode = static_cast(data->args[0]); stepColorTemperatureCommand.stepSize = static_cast(data->args[1]); stepColorTemperatureCommand.transitionTime = static_cast(data->args[2]); stepColorTemperatureCommand.colorTemperatureMinimumMireds = static_cast(data->args[3]); stepColorTemperatureCommand.colorTemperatureMaximumMireds = static_cast(data->args[4]); - stepColorTemperatureCommand.optionsMask = static_cast(data->args[5]); - stepColorTemperatureCommand.optionsOverride = static_cast(data->args[6]); + stepColorTemperatureCommand.optionsMask = static_cast(data->args[5]); + stepColorTemperatureCommand.optionsOverride = static_cast(data->args[6]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stepColorTemperatureCommand, onSuccess, onFailure); break; @@ -577,52 +577,52 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb { case Clusters::ColorControl::Commands::MoveToHue::Id: moveToHueCommand.hue = static_cast(data->args[0]); - moveToHueCommand.direction = static_cast(data->args[1]); + moveToHueCommand.direction = static_cast(data->args[1]); moveToHueCommand.transitionTime = static_cast(data->args[2]); - moveToHueCommand.optionsMask = static_cast(data->args[3]); - moveToHueCommand.optionsOverride = static_cast(data->args[4]); + moveToHueCommand.optionsMask = static_cast(data->args[3]); + moveToHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToHueCommand); break; case Clusters::ColorControl::Commands::MoveHue::Id: - moveHueCommand.moveMode = static_cast(data->args[0]); + moveHueCommand.moveMode = static_cast(data->args[0]); moveHueCommand.rate = static_cast(data->args[1]); - moveHueCommand.optionsMask = static_cast(data->args[2]); - moveHueCommand.optionsOverride = static_cast(data->args[3]); + moveHueCommand.optionsMask = static_cast(data->args[2]); + moveHueCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveHueCommand); break; case Clusters::ColorControl::Commands::StepHue::Id: - stepHueCommand.stepMode = static_cast(data->args[0]); + stepHueCommand.stepMode = static_cast(data->args[0]); stepHueCommand.stepSize = static_cast(data->args[1]); stepHueCommand.transitionTime = static_cast(data->args[2]); - stepHueCommand.optionsMask = static_cast(data->args[3]); - stepHueCommand.optionsOverride = static_cast(data->args[4]); + stepHueCommand.optionsMask = static_cast(data->args[3]); + stepHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stepHueCommand); break; case Clusters::ColorControl::Commands::MoveToSaturation::Id: moveToSaturationCommand.saturation = static_cast(data->args[0]); moveToSaturationCommand.transitionTime = static_cast(data->args[1]); - moveToSaturationCommand.optionsMask = static_cast(data->args[2]); - moveToSaturationCommand.optionsOverride = static_cast(data->args[3]); + moveToSaturationCommand.optionsMask = static_cast(data->args[2]); + moveToSaturationCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToSaturationCommand); break; case Clusters::ColorControl::Commands::MoveSaturation::Id: - moveSaturationCommand.moveMode = static_cast(data->args[0]); + moveSaturationCommand.moveMode = static_cast(data->args[0]); moveSaturationCommand.rate = static_cast(data->args[1]); - moveSaturationCommand.optionsMask = static_cast(data->args[2]); - moveSaturationCommand.optionsOverride = static_cast(data->args[3]); + moveSaturationCommand.optionsMask = static_cast(data->args[2]); + moveSaturationCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveSaturationCommand); break; case Clusters::ColorControl::Commands::StepSaturation::Id: - stepSaturationCommand.stepMode = static_cast(data->args[0]); + stepSaturationCommand.stepMode = static_cast(data->args[0]); stepSaturationCommand.stepSize = static_cast(data->args[1]); stepSaturationCommand.transitionTime = static_cast(data->args[2]); - stepSaturationCommand.optionsMask = static_cast(data->args[3]); - stepSaturationCommand.optionsOverride = static_cast(data->args[4]); + stepSaturationCommand.optionsMask = static_cast(data->args[3]); + stepSaturationCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stepSaturationCommand); break; @@ -630,8 +630,8 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb moveToHueAndSaturationCommand.hue = static_cast(data->args[0]); moveToHueAndSaturationCommand.saturation = static_cast(data->args[1]); moveToHueAndSaturationCommand.transitionTime = static_cast(data->args[2]); - moveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); - moveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); + moveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); + moveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToHueAndSaturationCommand); break; @@ -639,16 +639,16 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb moveToColorCommand.colorX = static_cast(data->args[0]); moveToColorCommand.colorY = static_cast(data->args[1]); moveToColorCommand.transitionTime = static_cast(data->args[2]); - moveToColorCommand.optionsMask = static_cast(data->args[3]); - moveToColorCommand.optionsOverride = static_cast(data->args[4]); + moveToColorCommand.optionsMask = static_cast(data->args[3]); + moveToColorCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToColorCommand); break; case Clusters::ColorControl::Commands::MoveColor::Id: moveColorCommand.rateX = static_cast(data->args[0]); moveColorCommand.rateY = static_cast(data->args[1]); - moveColorCommand.optionsMask = static_cast(data->args[2]); - moveColorCommand.optionsOverride = static_cast(data->args[3]); + moveColorCommand.optionsMask = static_cast(data->args[2]); + moveColorCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveColorCommand); break; @@ -656,42 +656,42 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb stepColorCommand.stepX = static_cast(data->args[0]); stepColorCommand.stepY = static_cast(data->args[1]); stepColorCommand.transitionTime = static_cast(data->args[2]); - stepColorCommand.optionsMask = static_cast(data->args[3]); - stepColorCommand.optionsOverride = static_cast(data->args[4]); + stepColorCommand.optionsMask = static_cast(data->args[3]); + stepColorCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stepColorCommand); break; case Clusters::ColorControl::Commands::MoveToColorTemperature::Id: moveToColorTemperatureCommand.colorTemperatureMireds = static_cast(data->args[0]); moveToColorTemperatureCommand.transitionTime = static_cast(data->args[1]); - moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); - moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); + moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); + moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToColorTemperatureCommand); break; case Clusters::ColorControl::Commands::EnhancedMoveToHue::Id: enhancedMoveToHueCommand.enhancedHue = static_cast(data->args[0]); - enhancedMoveToHueCommand.direction = static_cast(data->args[1]); + enhancedMoveToHueCommand.direction = static_cast(data->args[1]); enhancedMoveToHueCommand.transitionTime = static_cast(data->args[2]); - enhancedMoveToHueCommand.optionsMask = static_cast(data->args[3]); - enhancedMoveToHueCommand.optionsOverride = static_cast(data->args[4]); + enhancedMoveToHueCommand.optionsMask = static_cast(data->args[3]); + enhancedMoveToHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, enhancedMoveToHueCommand); break; case Clusters::ColorControl::Commands::EnhancedMoveHue::Id: - enhancedMoveHueCommand.moveMode = static_cast(data->args[0]); + enhancedMoveHueCommand.moveMode = static_cast(data->args[0]); enhancedMoveHueCommand.rate = static_cast(data->args[1]); - enhancedMoveHueCommand.optionsMask = static_cast(data->args[2]); - enhancedMoveHueCommand.optionsOverride = static_cast(data->args[3]); + enhancedMoveHueCommand.optionsMask = static_cast(data->args[2]); + enhancedMoveHueCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, enhancedMoveHueCommand); break; case Clusters::ColorControl::Commands::EnhancedStepHue::Id: - enhancedStepHueCommand.stepMode = static_cast(data->args[0]); + enhancedStepHueCommand.stepMode = static_cast(data->args[0]); enhancedStepHueCommand.stepSize = static_cast(data->args[1]); enhancedStepHueCommand.transitionTime = static_cast(data->args[2]); - enhancedStepHueCommand.optionsMask = static_cast(data->args[3]); - enhancedStepHueCommand.optionsOverride = static_cast(data->args[4]); + enhancedStepHueCommand.optionsMask = static_cast(data->args[3]); + enhancedStepHueCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, enhancedStepHueCommand); break; @@ -699,48 +699,48 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb enhancedMoveToHueAndSaturationCommand.enhancedHue = static_cast(data->args[0]); enhancedMoveToHueAndSaturationCommand.saturation = static_cast(data->args[1]); enhancedMoveToHueAndSaturationCommand.transitionTime = static_cast(data->args[2]); - enhancedMoveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); - enhancedMoveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); + enhancedMoveToHueAndSaturationCommand.optionsMask = static_cast(data->args[3]); + enhancedMoveToHueAndSaturationCommand.optionsOverride = static_cast(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, enhancedMoveToHueAndSaturationCommand); break; case Clusters::ColorControl::Commands::ColorLoopSet::Id: colorLoopSetCommand.updateFlags = - static_cast>(data->args[0]); - colorLoopSetCommand.action = static_cast(data->args[1]); - colorLoopSetCommand.direction = static_cast(data->args[2]); + static_cast>(data->args[0]); + colorLoopSetCommand.action = static_cast(data->args[1]); + colorLoopSetCommand.direction = static_cast(data->args[2]); colorLoopSetCommand.time = static_cast(data->args[3]); colorLoopSetCommand.startHue = static_cast(data->args[4]); - colorLoopSetCommand.optionsMask = static_cast(data->args[5]); - colorLoopSetCommand.optionsOverride = static_cast(data->args[6]); + colorLoopSetCommand.optionsMask = static_cast(data->args[5]); + colorLoopSetCommand.optionsOverride = static_cast(data->args[6]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, colorLoopSetCommand); break; case Clusters::ColorControl::Commands::StopMoveStep::Id: - stopMoveStepCommand.optionsMask = static_cast(data->args[0]); - stopMoveStepCommand.optionsOverride = static_cast(data->args[1]); + stopMoveStepCommand.optionsMask = static_cast(data->args[0]); + stopMoveStepCommand.optionsOverride = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stopMoveStepCommand); break; case Clusters::ColorControl::Commands::MoveColorTemperature::Id: - moveColorTemperatureCommand.moveMode = static_cast(data->args[0]); + moveColorTemperatureCommand.moveMode = static_cast(data->args[0]); moveColorTemperatureCommand.rate = static_cast(data->args[1]); moveColorTemperatureCommand.colorTemperatureMinimumMireds = static_cast(data->args[2]); moveColorTemperatureCommand.colorTemperatureMaximumMireds = static_cast(data->args[3]); - moveColorTemperatureCommand.optionsMask = static_cast(data->args[4]); - moveColorTemperatureCommand.optionsOverride = static_cast(data->args[5]); + moveColorTemperatureCommand.optionsMask = static_cast(data->args[4]); + moveColorTemperatureCommand.optionsOverride = static_cast(data->args[5]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveColorTemperatureCommand); break; case Clusters::ColorControl::Commands::StepColorTemperature::Id: - stepColorTemperatureCommand.stepMode = static_cast(data->args[0]); + stepColorTemperatureCommand.stepMode = static_cast(data->args[0]); stepColorTemperatureCommand.stepSize = static_cast(data->args[1]); stepColorTemperatureCommand.transitionTime = static_cast(data->args[2]); stepColorTemperatureCommand.colorTemperatureMinimumMireds = static_cast(data->args[3]); stepColorTemperatureCommand.colorTemperatureMaximumMireds = static_cast(data->args[4]); - stepColorTemperatureCommand.optionsMask = static_cast(data->args[5]); - stepColorTemperatureCommand.optionsOverride = static_cast(data->args[6]); + stepColorTemperatureCommand.optionsMask = static_cast(data->args[5]); + stepColorTemperatureCommand.optionsOverride = static_cast(data->args[6]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stepColorTemperatureCommand); break; } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 1444915c368b6b..16f170c1379591 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -4281,65 +4281,62 @@ cluster ThermostatUserInterfaceConfiguration = 516 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -4350,16 +4347,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -4391,13 +4399,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -4411,150 +4419,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 961f40352b1052..d8758b3043edaa 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1715,65 +1715,62 @@ cluster GroupKeyManagement = 63 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -1784,16 +1781,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -1825,13 +1833,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -1845,150 +1853,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index d9841f769a79dd..0ef1c969727a6d 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1816,65 +1816,62 @@ cluster FixedLabel = 64 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -1885,16 +1882,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -1926,13 +1934,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -1946,150 +1954,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/common/imgui_ui/windows/light.cpp b/examples/common/imgui_ui/windows/light.cpp index 86899e044b2ed1..f4950739e6c416 100644 --- a/examples/common/imgui_ui/windows/light.cpp +++ b/examples/common/imgui_ui/windows/light.cpp @@ -155,14 +155,14 @@ void Light::Render() ImGui::Text("Color Control:"); ImGui::Indent(); const char * mode = // based on ColorMode attribute: spec 3.2.7.9 - (mColorMode == kColorModeCurrentHueAndCurrentSaturation) ? "Hue/Saturation" - : (mColorMode == kColorModeCurrentXAndCurrentY) ? "X/Y" - : (mColorMode == kColorModeColorTemperature) ? "Temperature/Mireds" - : "UNKNOWN"; + (mColorMode == ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation) ? "Hue/Saturation" + : (mColorMode == ColorControl::ColorModeEnum::kCurrentXAndCurrentY) ? "X/Y" + : (mColorMode == ColorControl::ColorModeEnum::kColorTemperatureMireds) ? "Temperature/Mireds" + : "UNKNOWN"; ImGui::Text("Mode: %s", mode); - if (mColorMode == kColorModeCurrentHueAndCurrentSaturation) + if (mColorMode == ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation) { const float hueDegrees = (mColorHue * 360.0f) / 254.0f; const float saturationPercent = 100.0f * (mColorSaturation / 254.0f); @@ -173,12 +173,12 @@ void Light::Render() ImGui::ColorButton("LightColor", HueSaturationToColor(hueDegrees, saturationPercent), 0 /* ImGuiColorEditFlags_* */, ImVec2(80, 80)); } - else if (mColorMode == kColorModeCurrentXAndCurrentY) + else if (mColorMode == ColorControl::ColorModeEnum::kCurrentXAndCurrentY) { ImGui::Text("Current X: %d", mColorX); ImGui::Text("Current Y: %d", mColorY); } - else if (mColorMode == kColorModeColorTemperature) + else if (mColorMode == ColorControl::ColorModeEnum::kColorTemperatureMireds) { ImGui::Text("Color Temperature Mireds: %d", mColorTemperatureMireds); } diff --git a/examples/common/imgui_ui/windows/light.h b/examples/common/imgui_ui/windows/light.h index 20942373d3111c..242f6c98b81889 100644 --- a/examples/common/imgui_ui/windows/light.h +++ b/examples/common/imgui_ui/windows/light.h @@ -62,7 +62,8 @@ class Light : public Window uint16_t mLevelRemainingTime10sOfSec = 0; // Color control - uint8_t mColorMode = kColorModeCurrentHueAndCurrentSaturation; + chip::app::Clusters::ColorControl::ColorModeEnum mColorMode = + chip::app::Clusters::ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation; uint8_t mColorHue = 0; uint8_t mColorSaturation = 0; uint16_t mColorX = 0; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 8cd9c653a75bb5..3909b6073c8b9c 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2502,65 +2502,62 @@ provisional cluster ScenesManagement = 98 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -2571,16 +2568,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2612,13 +2620,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2632,150 +2640,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 6924e96503d0c6..c93a50bb03e2dc 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -2558,65 +2558,62 @@ provisional cluster ScenesManagement = 98 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -2627,16 +2624,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2668,13 +2676,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2688,150 +2696,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index 331f7e79cadfe9..30f4d63c6a4e1e 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -1855,65 +1855,62 @@ cluster UserLabel = 65 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -1924,16 +1921,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -1965,13 +1973,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -1985,150 +1993,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index f6bb26ec689619..2abf5c7251711d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1979,65 +1979,62 @@ cluster UserLabel = 65 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -2048,16 +2045,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2089,13 +2097,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2109,150 +2117,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 9dee0bdcdb040d..b9dfeee6321680 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1890,65 +1890,62 @@ cluster UserLabel = 65 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -1959,16 +1956,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2000,13 +2008,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2020,150 +2028,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 5ddd7071470692..df7f0dfe4d9a55 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2310,65 +2310,62 @@ provisional cluster ScenesManagement = 98 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -2379,16 +2376,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2420,13 +2428,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2440,150 +2448,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 6add567a134707..35e00056736443 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1918,65 +1918,62 @@ cluster UserLabel = 65 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -1987,16 +1984,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2028,13 +2036,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2048,150 +2056,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index d0e06e94f94dac..f4c2928a35778e 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2014,65 +2014,62 @@ provisional cluster ScenesManagement = 98 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -2083,16 +2080,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2124,13 +2132,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2144,150 +2152,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index a9d48f8ae85b3c..59919ee6b48737 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -2305,65 +2305,62 @@ provisional cluster ScenesManagement = 98 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -2374,16 +2371,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -2415,13 +2423,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -2435,150 +2443,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/lighting-app/tizen/src/DBusInterface.cpp b/examples/lighting-app/tizen/src/DBusInterface.cpp index 50dbd37930b47f..36c0f19c35bb7a 100644 --- a/examples/lighting-app/tizen/src/DBusInterface.cpp +++ b/examples/lighting-app/tizen/src/DBusInterface.cpp @@ -217,11 +217,11 @@ void DBusInterface::InitOnOff() void DBusInterface::InitColor() { { - uint8_t value = 0; - auto status = Clusters::ColorControl::Attributes::ColorMode::Get(mEndpointId, &value); + auto value = Clusters::ColorControl::ColorModeEnum::kCurrentHueAndCurrentSaturation; + auto status = Clusters::ColorControl::Attributes::ColorMode::Get(mEndpointId, &value); VerifyOrReturn(status == Protocols::InteractionModel::Status::Success, ChipLogError(NotSpecified, "Error getting ColorMode: 0x%x", to_underlying(status))); - light_app_color_control_set_color_mode(mIfaceColorControl, value); + light_app_color_control_set_color_mode(mIfaceColorControl, to_underlying(value)); } { uint16_t value = 0; diff --git a/examples/lighting-app/tizen/src/main.cpp b/examples/lighting-app/tizen/src/main.cpp index c1cda62a2378d5..040a8a5fcb231f 100644 --- a/examples/lighting-app/tizen/src/main.cpp +++ b/examples/lighting-app/tizen/src/main.cpp @@ -123,7 +123,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & void emberAfColorControlClusterInitCallback(EndpointId endpoint) { // Set the color mode to color temperature. - Clusters::ColorControl::Attributes::ColorMode::Set(endpoint, ColorControlServer::EnhancedColorMode::kColorTemperature); + Clusters::ColorControl::Attributes::ColorMode::Set(endpoint, Clusters::ColorControl::ColorModeEnum::kColorTemperatureMireds); // Preserve the state of the color temperature attribute across reboots. Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::SetNull(endpoint); } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index b72a4b280351b9..8befb87daa5f9a 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -5872,65 +5872,62 @@ cluster ThermostatUserInterfaceConfiguration = 516 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -5941,16 +5938,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -5982,13 +5990,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -6002,150 +6010,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ @@ -6192,65 +6200,62 @@ cluster ColorControl = 768 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -6261,16 +6266,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -6302,13 +6318,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -6322,150 +6338,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 41421c7e917d0e..6cfcc1ab7ea6cf 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -5829,65 +5829,62 @@ cluster ThermostatUserInterfaceConfiguration = 516 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -5898,16 +5895,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -5939,13 +5947,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -5959,150 +5967,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ @@ -6149,65 +6157,62 @@ cluster ColorControl = 768 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -6218,16 +6223,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -6259,13 +6275,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -6279,150 +6295,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 135846fd606d48..3c20256117f2cb 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -3161,65 +3161,62 @@ cluster WindowCovering = 258 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -3230,16 +3227,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -3271,13 +3279,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -3291,150 +3299,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ 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 4a4fc69b4efe07..406d06f4b1e794 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -35,31 +36,6 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::ColorControl; using chip::Protocols::InteractionModel::Status; -// These constants are NOT currently spec compliant -// These should be changed once we have real specification enumeration -// names. -namespace chip { -namespace app { -namespace Clusters { -namespace ColorControl { - -namespace EnhancedColorMode { -constexpr uint8_t kCurrentHueAndCurrentSaturation = ColorControlServer::EnhancedColorMode::kCurrentHueAndCurrentSaturation; -constexpr uint8_t kCurrentXAndCurrentY = ColorControlServer::EnhancedColorMode::kCurrentXAndCurrentY; -constexpr uint8_t kColorTemperature = ColorControlServer::EnhancedColorMode::kColorTemperature; -constexpr uint8_t kEnhancedCurrentHueAndCurrentSaturation = - ColorControlServer::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation; -} // namespace EnhancedColorMode - -namespace Options { -constexpr uint8_t kExecuteIfOff = 1; -} // namespace Options - -} // namespace ColorControl -} // namespace Clusters -} // namespace app -} // namespace chip - #if defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl { @@ -174,12 +150,12 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl AddAttributeValuePair(pairs, Attributes::ColorTemperatureMireds::Id, temperatureValue, attributeCount); } - uint8_t modeValue; + EnhancedColorMode modeValue; if (Status::Success != Attributes::EnhancedColorMode::Get(endpoint, &modeValue)) { - modeValue = ColorControl::EnhancedColorMode::kCurrentXAndCurrentY; // Default mode value according to spec + modeValue = EnhancedColorMode::kCurrentXAndCurrentY; // Default mode value according to spec } - AddAttributeValuePair(pairs, Attributes::EnhancedColorMode::Id, modeValue, attributeCount); + AddAttributeValuePair(pairs, Attributes::EnhancedColorMode::Id, to_underlying(modeValue), attributeCount); app::DataModel::List attributeValueList(pairs, attributeCount); @@ -226,7 +202,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl #endif // Initialize action attributes to default values in case they are not in the scene - uint8_t targetColorMode = 0x00; + auto targetColorMode = EnhancedColorModeEnum::kCurrentHueAndCurrentSaturation; uint8_t loopActiveValue = 0x00; uint8_t loopDirectionValue = 0x00; uint16_t loopTimeValue = 0x0019; // Default loop time value according to spec @@ -238,7 +214,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl switch (decodePair.attributeID) { case Attributes::CurrentX::Id: - if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY)) + if (SupportsColorMode(endpoint, EnhancedColorMode::kCurrentXAndCurrentY)) { VerifyOrReturnError(decodePair.valueUnsigned16.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); colorXTransitionState->finalValue = @@ -246,7 +222,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } break; case Attributes::CurrentY::Id: - if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY)) + if (SupportsColorMode(endpoint, EnhancedColorMode::kCurrentXAndCurrentY)) { VerifyOrReturnError(decodePair.valueUnsigned16.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); colorYTransitionState->finalValue = @@ -254,14 +230,14 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } break; case Attributes::EnhancedCurrentHue::Id: - if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation)) + if (SupportsColorMode(endpoint, EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation)) { VerifyOrReturnError(decodePair.valueUnsigned16.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); colorHueTransitionState->finalEnhancedHue = decodePair.valueUnsigned16.Value(); } break; case Attributes::CurrentSaturation::Id: - if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation)) + if (SupportsColorMode(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation)) { VerifyOrReturnError(decodePair.valueUnsigned8.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); colorSaturationTransitionState->finalValue = std::min(static_cast(decodePair.valueUnsigned8.Value()), @@ -281,7 +257,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl loopTimeValue = decodePair.valueUnsigned16.Value(); break; case Attributes::ColorTemperatureMireds::Id: - if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kColorTemperature)) + if (SupportsColorMode(endpoint, EnhancedColorMode::kColorTemperatureMireds)) { VerifyOrReturnError(decodePair.valueUnsigned16.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); colorTempTransitionState->finalValue = @@ -290,10 +266,9 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl break; case Attributes::EnhancedColorMode::Id: VerifyOrReturnError(decodePair.valueUnsigned8.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); - if (decodePair.valueUnsigned8.Value() <= - static_cast(ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation)) + if (decodePair.valueUnsigned8.Value() <= to_underlying(EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation)) { - targetColorMode = decodePair.valueUnsigned8.Value(); + targetColorMode = static_cast(decodePair.valueUnsigned8.Value()); } break; default: @@ -328,25 +303,25 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl // Execute movement to value depending on the mode in the saved scene switch (targetColorMode) { - case ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation: + case EnhancedColorMode::kCurrentHueAndCurrentSaturation: #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV ColorControlServer::Instance().moveToSaturation(static_cast(colorSaturationTransitionState->finalValue), transitionTime10th, endpoint); #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV break; - case ColorControl::EnhancedColorMode::kCurrentXAndCurrentY: + case EnhancedColorMode::kCurrentXAndCurrentY: #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY ColorControlServer::Instance().moveToColor(colorXTransitionState->finalValue, colorYTransitionState->finalValue, transitionTime10th, endpoint); #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_XY break; - case ColorControl::EnhancedColorMode::kColorTemperature: + case EnhancedColorMode::kColorTemperatureMireds: #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP ColorControlServer::Instance().moveToColorTemp( endpoint, static_cast(colorTempTransitionState->finalValue), transitionTime10th); #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP break; - case ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation: + case EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation: #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV ColorControlServer::Instance().moveToHueAndSaturation( colorHueTransitionState->finalEnhancedHue, static_cast(colorSaturationTransitionState->finalValue), @@ -361,20 +336,20 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } private: - bool SupportsColorMode(EndpointId endpoint, uint8_t mode) + bool SupportsColorMode(EndpointId endpoint, EnhancedColorMode mode) { switch (mode) { - case ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation: + case EnhancedColorMode::kCurrentHueAndCurrentSaturation: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kHueAndSaturation); break; - case ColorControl::EnhancedColorMode::kCurrentXAndCurrentY: + case EnhancedColorMode::kCurrentXAndCurrentY: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kXy); break; - case ColorControl::EnhancedColorMode::kColorTemperature: + case EnhancedColorMode::kColorTemperatureMireds: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kColorTemperature); break; - case ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation: + case EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kEnhancedHue); break; default: @@ -494,7 +469,7 @@ Status ColorControlServer::stopAllColorTransitions(EndpointId endpoint) } bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - uint8_t optionsMask, uint8_t optionsOverride) + BitMask optionsMask, BitMask optionsOverride) { EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; @@ -534,7 +509,8 @@ bool ColorControlServer::stopMoveStepCommand(app::CommandHandler * commandObj, c return true; } -bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint, uint8_t optionMask, uint8_t optionOverride) +bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint, BitMask optionMask, + BitMask optionOverride) { // From 5.2.2.2.1.10 of ZCL7 document 14-0129-15f-zcl-ch-5-lighting.docx: // "Command execution SHALL NOT continue beyond the Options processing if @@ -549,7 +525,7 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint, uint8_t optionM return true; } - uint8_t options = 0x00; + BitMask options = 0x00; Attributes::Options::Get(endpoint, &options); bool on = true; @@ -576,23 +552,23 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint, uint8_t optionM // ---------- The following order is important in decision making ------- // -----------more readable ---------- // - if (optionMask == 0xFF && optionOverride == 0xFF) + if (optionMask == static_cast(0xFF) && optionOverride == static_cast(0xFF)) { // 0xFF are the default values passed to the command handler when // the payload is not present - in that case there is use of option // attribute to decide execution of the command - return READBITS(options, ColorControl::Options::kExecuteIfOff); + return options.Has(OptionsBitmap::kExecuteIfOff); } // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, ColorControl::Options::kExecuteIfOff)) + if (optionMask.Has(OptionsBitmap::kExecuteIfOff)) { // Mask is present and set in the command payload, this indicates // use the override as temporary option - return READBITS(optionOverride, ColorControl::Options::kExecuteIfOff); + return optionOverride.Has(OptionsBitmap::kExecuteIfOff); } - // if we are here - use the option attribute bits - return (READBITS(options, ColorControl::Options::kExecuteIfOff)); + // if we are here - use the option bits + return options.Has(OptionsBitmap::kExecuteIfOff); } /** @@ -606,28 +582,28 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint, uint8_t optionM * @param endpoint * @param newColorMode */ -void ColorControlServer::handleModeSwitch(EndpointId endpoint, uint8_t newColorMode) +void ColorControlServer::handleModeSwitch(EndpointId endpoint, EnhancedColorModeEnum newColorMode) { - uint8_t oldColorMode = 0; + auto oldColorMode = ColorModeEnum::kCurrentHueAndCurrentSaturation; Attributes::ColorMode::Get(endpoint, &oldColorMode); uint8_t colorModeTransition; - if (oldColorMode == newColorMode) + if (static_cast(oldColorMode) == newColorMode) { return; } Attributes::EnhancedColorMode::Set(endpoint, newColorMode); - if (newColorMode == ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation) + if (newColorMode == EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation) { - // Transpose COLOR_MODE_EHSV to ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation after setting + // Transpose COLOR_MODE_EHSV to EnhancedColorMode::kCurrentHueAndCurrentSaturation after setting // EnhancedColorMode - newColorMode = ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation; + newColorMode = EnhancedColorMode::kCurrentHueAndCurrentSaturation; } - Attributes::ColorMode::Set(endpoint, newColorMode); + Attributes::ColorMode::Set(endpoint, static_cast(newColorMode)); - colorModeTransition = static_cast((newColorMode << 4) + oldColorMode); + colorModeTransition = static_cast((to_underlying(newColorMode) << 4) + to_underlying(oldColorMode)); // Note: It may be OK to not do anything here. switch (colorModeTransition) @@ -1044,7 +1020,7 @@ void ColorControlServer::startColorLoop(EndpointId endpoint, uint8_t startFromSt colorHueTransitionState->initialEnhancedHue = startHue; - if (direction == to_underlying(ColorLoopDirection::kIncrementHue)) + if (direction == to_underlying(ColorLoopDirectionEnum::kIncrement)) { colorHueTransitionState->finalEnhancedHue = static_cast(startHue - 1); } @@ -1053,7 +1029,7 @@ void ColorControlServer::startColorLoop(EndpointId endpoint, uint8_t startFromSt colorHueTransitionState->finalEnhancedHue = static_cast(startHue + 1); } - colorHueTransitionState->up = (direction == to_underlying(ColorLoopDirection::kIncrementHue)); + colorHueTransitionState->up = (direction == to_underlying(ColorLoopDirectionEnum::kIncrement)); colorHueTransitionState->repeat = true; colorHueTransitionState->stepsRemaining = static_cast(time * TRANSITION_STEPS_PER_1S); @@ -1297,7 +1273,7 @@ Status ColorControlServer::moveToSaturation(uint8_t saturation, uint16_t transit stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); // now, kick off the state machine. initSaturationTransitionState(endpoint, colorSaturationTransitionState); @@ -1421,8 +1397,8 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati * @return false Failed */ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - HueMoveMode moveMode, uint16_t rate, uint8_t optionsMask, uint8_t optionsOverride, - bool isEnhanced) + HueMoveMode moveMode, uint16_t rate, BitMask optionsMask, + BitMask optionsOverride, bool isEnhanced) { MATTER_TRACE_SCOPE("moveHue", "ColorControl"); EndpointId endpoint = commandPath.mEndpointId; @@ -1464,11 +1440,11 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); } if (moveMode == HueMoveMode::kUp) @@ -1531,15 +1507,16 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const * @return false Failed */ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - uint16_t hue, HueDirection moveDirection, uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride, bool isEnhanced) + uint16_t hue, DirectionEnum moveDirection, uint16_t transitionTime, + BitMask optionsMask, BitMask optionsOverride, + bool isEnhanced) { MATTER_TRACE_SCOPE("moveToHue", "ColorControl"); EndpointId endpoint = commandPath.mEndpointId; Status status = Status::Success; uint16_t currentHue = 0; - HueDirection direction; + DirectionEnum direction; ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionState(endpoint); @@ -1568,33 +1545,33 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons // Convert the ShortestDistance/LongestDistance moveDirection values into Up/Down. switch (moveDirection) { - case HueDirection::kShortestDistance: + case DirectionEnum::kShortest: if ((isEnhanced && (static_cast(currentHue - hue) > HALF_MAX_UINT16T)) || (!isEnhanced && (static_cast(currentHue - hue) > HALF_MAX_UINT8T))) { - direction = HueDirection::kUp; + direction = DirectionEnum::kUp; } else { - direction = HueDirection::kDown; + direction = DirectionEnum::kDown; } break; - case HueDirection::kLongestDistance: + case DirectionEnum::kLongest: if ((isEnhanced && (static_cast(currentHue - hue) > HALF_MAX_UINT16T)) || (!isEnhanced && (static_cast(currentHue - hue) > HALF_MAX_UINT8T))) { - direction = HueDirection::kDown; + direction = DirectionEnum::kDown; } else { - direction = HueDirection::kUp; + direction = DirectionEnum::kUp; } break; - case HueDirection::kUp: - case HueDirection::kDown: + case DirectionEnum::kUp: + case DirectionEnum::kDown: direction = moveDirection; break; - case HueDirection::kUnknownEnumValue: + case DirectionEnum::kUnknownEnumValue: commandObj->AddStatus(commandPath, Status::InvalidCommand); return true; /* No default case, so if a new direction value gets added we will just fail @@ -1613,11 +1590,11 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); } // now, kick off the state machine. @@ -1637,7 +1614,7 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->transitionTime = transitionTime; colorHueTransitionState->endpoint = endpoint; - colorHueTransitionState->up = (direction == HueDirection::kUp); + colorHueTransitionState->up = (direction == DirectionEnum::kUp); colorHueTransitionState->repeat = false; SetHSVRemainingTime(endpoint); @@ -1667,8 +1644,9 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons */ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, uint16_t hue, - uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride, bool isEnhanced) + uint8_t saturation, uint16_t transitionTime, + BitMask optionsMask, BitMask optionsOverride, + bool isEnhanced) { MATTER_TRACE_SCOPE("moveToHueAndSaturation", "ColorControl"); // limit checking: hue and saturation are 0..254. Spec dictates we ignore @@ -1707,8 +1685,8 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com * @return false Failed */ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - HueStepMode stepMode, uint16_t stepSize, uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride, bool isEnhanced) + HueStepMode stepMode, uint16_t stepSize, uint16_t transitionTime, + BitMask optionsMask, BitMask optionsOverride, bool isEnhanced) { MATTER_TRACE_SCOPE("stepHue", "ColorControl"); EndpointId endpoint = commandPath.mEndpointId; @@ -1737,11 +1715,11 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); } // now, kick off the state machine. @@ -1839,7 +1817,7 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); if (moveMode == SaturationMoveMode::kUp) { @@ -1908,14 +1886,14 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, const Commands::StepSaturation::DecodableType & commandData) { MATTER_TRACE_SCOPE("stepSaturation", "ColorControl"); - auto stepMode = commandData.stepMode; - uint8_t stepSize = commandData.stepSize; - uint8_t transitionTime = commandData.transitionTime; - uint8_t optionsMask = commandData.optionsMask; - uint8_t optionsOverride = commandData.optionsOverride; - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; - uint8_t currentSaturation = 0; + auto stepMode = commandData.stepMode; + uint8_t stepSize = commandData.stepSize; + uint8_t transitionTime = commandData.transitionTime; + BitMask optionsMask = commandData.optionsMask; + BitMask optionsOverride = commandData.optionsOverride; + EndpointId endpoint = commandPath.mEndpointId; + Status status = Status::Success; + uint8_t currentSaturation = 0; Color16uTransitionState * colorSaturationTransitionState = getSaturationTransitionState(endpoint); VerifyOrExit(colorSaturationTransitionState != nullptr, status = Status::UnsupportedEndpoint); @@ -1937,7 +1915,7 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); // now, kick off the state machine. initSaturationTransitionState(endpoint, colorSaturationTransitionState); @@ -1973,24 +1951,24 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons const Commands::ColorLoopSet::DecodableType & commandData) { MATTER_TRACE_SCOPE("colorLoop", "ColorControl"); - auto updateFlags = commandData.updateFlags; - auto action = commandData.action; - auto direction = commandData.direction; - uint16_t time = commandData.time; - uint16_t startHue = commandData.startHue; - uint8_t optionsMask = commandData.optionsMask; - uint8_t optionsOverride = commandData.optionsOverride; - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; - uint8_t isColorLoopActive = 0; - uint8_t deactiveColorLoop = 0; + auto updateFlags = commandData.updateFlags; + auto action = commandData.action; + auto direction = commandData.direction; + uint16_t time = commandData.time; + uint16_t startHue = commandData.startHue; + BitMask optionsMask = commandData.optionsMask; + BitMask optionsOverride = commandData.optionsOverride; + EndpointId endpoint = commandPath.mEndpointId; + Status status = Status::Success; + uint8_t isColorLoopActive = 0; + uint8_t deactiveColorLoop = 0; uint16_t epIndex = getEndpointIndex(endpoint); ColorHueTransitionState * colorHueTransitionState = getColorHueTransitionStateByIndex(epIndex); VerifyOrExit(colorHueTransitionState != nullptr, status = Status::UnsupportedEndpoint); // Validate the action and direction parameters of the command - if (action == ColorLoopAction::kUnknownEnumValue || direction == ColorLoopDirection::kUnknownEnumValue) + if (action == ColorLoopActionEnum::kUnknownEnumValue || direction == ColorLoopDirectionEnum::kUnknownEnumValue) { commandObj->AddStatus(commandPath, Status::InvalidCommand); return true; @@ -2017,10 +1995,10 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons // Checks if color loop is active and stays active if (isColorLoopActive && !deactiveColorLoop) { - colorHueTransitionState->up = (direction == ColorLoopDirection::kIncrementHue); + colorHueTransitionState->up = (direction == ColorLoopDirectionEnum::kIncrement); colorHueTransitionState->initialEnhancedHue = colorHueTransitionState->currentEnhancedHue; - if (direction == ColorLoopDirection::kIncrementHue) + if (direction == ColorLoopDirectionEnum::kIncrement) { colorHueTransitionState->finalEnhancedHue = static_cast(colorHueTransitionState->initialEnhancedHue - 1); } @@ -2346,12 +2324,12 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveColor::DecodableType & commandData) { - int16_t rateX = commandData.rateX; - int16_t rateY = commandData.rateY; - uint8_t optionsMask = commandData.optionsMask; - uint8_t optionsOverride = commandData.optionsOverride; - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; + int16_t rateX = commandData.rateX; + int16_t rateY = commandData.rateY; + BitMask optionsMask = commandData.optionsMask; + BitMask optionsOverride = commandData.optionsOverride; + EndpointId endpoint = commandPath.mEndpointId; + Status status = Status::Success; uint16_t epIndex = getEndpointIndex(endpoint); Color16uTransitionState * colorXTransitionState = getXTransitionStateByIndex(epIndex); @@ -2380,7 +2358,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentXAndCurrentY); // now, kick off the state machine. Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->initialValue)); @@ -2438,16 +2416,16 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StepColor::DecodableType & commandData) { - int16_t stepX = commandData.stepX; - int16_t stepY = commandData.stepY; - uint16_t transitionTime = commandData.transitionTime; - uint8_t optionsMask = commandData.optionsMask; - uint8_t optionsOverride = commandData.optionsOverride; - EndpointId endpoint = commandPath.mEndpointId; - uint16_t currentColorX = 0; - uint16_t currentColorY = 0; - uint16_t colorX = 0; - uint16_t colorY = 0; + int16_t stepX = commandData.stepX; + int16_t stepY = commandData.stepY; + uint16_t transitionTime = commandData.transitionTime; + BitMask optionsMask = commandData.optionsMask; + BitMask optionsOverride = commandData.optionsOverride; + EndpointId endpoint = commandPath.mEndpointId; + uint16_t currentColorX = 0; + uint16_t currentColorY = 0; + uint16_t colorX = 0; + uint16_t colorY = 0; Status status = Status::Success; @@ -2480,7 +2458,7 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentXAndCurrentY); // now, kick off the state machine. colorXTransitionState->initialValue = currentColorX; @@ -2615,7 +2593,7 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kColorTemperature); + handleModeSwitch(endpoint, EnhancedColorMode::kColorTemperatureMireds); if (colorTemperature < temperatureMin) { @@ -2724,11 +2702,10 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint) if (status == Status::Success) { // Set ColorMode attributes to reflect ColorTemperature. - uint8_t updateColorMode = ColorControl::EnhancedColorMode::kColorTemperature; + auto updateColorMode = ColorModeEnum::kColorTemperatureMireds; Attributes::ColorMode::Set(endpoint, updateColorMode); - updateColorMode = ColorControl::EnhancedColorMode::kColorTemperature; - Attributes::EnhancedColorMode::Set(endpoint, updateColorMode); + Attributes::EnhancedColorMode::Set(endpoint, static_cast(updateColorMode)); } } } @@ -2798,16 +2775,16 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint) bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::MoveColorTemperature::DecodableType & commandData) { - auto moveMode = commandData.moveMode; - uint16_t rate = commandData.rate; - uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds; - uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds; - uint8_t optionsMask = commandData.optionsMask; - uint8_t optionsOverride = commandData.optionsOverride; - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; - uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE; - uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; + auto moveMode = commandData.moveMode; + uint16_t rate = commandData.rate; + uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds; + uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds; + BitMask optionsMask = commandData.optionsMask; + BitMask optionsOverride = commandData.optionsOverride; + EndpointId endpoint = commandPath.mEndpointId; + Status status = Status::Success; + uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE; + uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; uint16_t transitionTime; Color16uTransitionState * colorTempTransitionState = getTempTransitionState(endpoint); @@ -2854,7 +2831,7 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kColorTemperature); + handleModeSwitch(endpoint, EnhancedColorMode::kColorTemperatureMireds); // now, kick off the state machine. colorTempTransitionState->initialValue = 0; @@ -2922,17 +2899,17 @@ bool ColorControlServer::moveToColorTempCommand(app::CommandHandler * commandObj bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::StepColorTemperature::DecodableType & commandData) { - auto stepMode = commandData.stepMode; - uint16_t stepSize = commandData.stepSize; - uint16_t transitionTime = commandData.transitionTime; - uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds; - uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds; - uint8_t optionsMask = commandData.optionsMask; - uint8_t optionsOverride = commandData.optionsOverride; - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; - uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE; - uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; + auto stepMode = commandData.stepMode; + uint16_t stepSize = commandData.stepSize; + uint16_t transitionTime = commandData.transitionTime; + uint16_t colorTemperatureMinimum = commandData.colorTemperatureMinimumMireds; + uint16_t colorTemperatureMaximum = commandData.colorTemperatureMaximumMireds; + BitMask optionsMask = commandData.optionsMask; + BitMask optionsOverride = commandData.optionsOverride; + EndpointId endpoint = commandPath.mEndpointId; + Status status = Status::Success; + uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE; + uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; Color16uTransitionState * colorTempTransitionState = getTempTransitionState(endpoint); VerifyOrExit(colorTempTransitionState != nullptr, status = Status::UnsupportedEndpoint); @@ -2971,7 +2948,7 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kColorTemperature); + handleModeSwitch(endpoint, EnhancedColorMode::kColorTemperatureMireds); // now, kick off the state machine. colorTempTransitionState->initialValue = 0; @@ -3058,10 +3035,10 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint) return; } - uint8_t colorMode = 0; + auto colorMode = ColorModeEnum::kCurrentHueAndCurrentSaturation; Attributes::ColorMode::Get(endpoint, &colorMode); - if (colorMode == ColorControl::EnhancedColorMode::kColorTemperature) + if (static_cast(colorMode) == EnhancedColorMode::kColorTemperatureMireds) { app::DataModel::Nullable currentLevel; Status status = LevelControl::Attributes::CurrentLevel::Get(endpoint, currentLevel); 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 4238fed1dd8b2d..1ed9e33c403538 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -71,18 +71,10 @@ class ColorControlServer /********************************************************** * Enums *********************************************************/ - using HueStepMode = chip::app::Clusters::ColorControl::HueStepMode; - using HueMoveMode = chip::app::Clusters::ColorControl::HueMoveMode; - using HueDirection = chip::app::Clusters::ColorControl::HueDirection; - using Feature = chip::app::Clusters::ColorControl::Feature; - - enum EnhancedColorMode : uint8_t - { - kCurrentHueAndCurrentSaturation = 0, - kCurrentXAndCurrentY = 1, - kColorTemperature = 2, - kEnhancedCurrentHueAndCurrentSaturation = 3, - }; + using StepModeEnum = chip::app::Clusters::ColorControl::StepModeEnum; + using MoveModeEnum = chip::app::Clusters::ColorControl::MoveModeEnum; + using DirectionEnum = chip::app::Clusters::ColorControl::DirectionEnum; + using Feature = chip::app::Clusters::ColorControl::Feature; enum Conversion { @@ -150,20 +142,27 @@ class ColorControlServer bool HasFeature(chip::EndpointId endpoint, Feature feature); chip::Protocols::InteractionModel::Status stopAllColorTransitions(chip::EndpointId endpoint); bool stopMoveStepCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - uint8_t optionsMask, uint8_t optionsOverride); + chip::BitMask optionsMask, + chip::BitMask optionsOverride); #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_HSV bool moveHueCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - HueMoveMode moveMode, uint16_t rate, uint8_t optionsMask, uint8_t optionsOverride, bool isEnhanced); + MoveModeEnum moveMode, uint16_t rate, + chip::BitMask optionsMask, + chip::BitMask optionsOverride, bool isEnhanced); bool moveToHueCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, uint16_t hue, - HueDirection moveDirection, uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride, - bool isEnhanced); + DirectionEnum moveDirection, uint16_t transitionTime, + chip::BitMask optionsMask, + chip::BitMask optionsOverride, bool isEnhanced); bool moveToHueAndSaturationCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - uint16_t hue, uint8_t saturation, uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride, bool isEnhanced); + uint16_t hue, uint8_t saturation, uint16_t transitionTime, + chip::BitMask optionsMask, + chip::BitMask optionsOverride, + bool isEnhanced); bool stepHueCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - HueStepMode stepMode, uint16_t stepSize, uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride, bool isEnhanced); + StepModeEnum stepMode, uint16_t stepSize, uint16_t transitionTime, + chip::BitMask optionsMask, + chip::BitMask optionsOverride, bool isEnhanced); bool moveSaturationCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::ColorControl::Commands::MoveSaturation::DecodableType & commandData); bool moveToSaturationCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, @@ -224,8 +223,9 @@ class ColorControlServer } } - bool shouldExecuteIfOff(chip::EndpointId endpoint, uint8_t optionMask, uint8_t optionOverride); - void handleModeSwitch(chip::EndpointId endpoint, uint8_t newColorMode); + bool shouldExecuteIfOff(chip::EndpointId endpoint, chip::BitMask optionMask, + chip::BitMask optionOverride); + void handleModeSwitch(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum newColorMode); uint16_t computeTransitionTimeFromStateAndRate(Color16uTransitionState * p, uint16_t rate); EmberEventControl * getEventControl(chip::EndpointId endpoint); void computePwmFromHsv(chip::EndpointId endpoint); diff --git a/src/app/common/CompatEnumNames.h b/src/app/common/CompatEnumNames.h index ceb91c1981d203..a3154cbb682975 100644 --- a/src/app/common/CompatEnumNames.h +++ b/src/app/common/CompatEnumNames.h @@ -21,6 +21,8 @@ */ #pragma once +#include + namespace chip { namespace app { namespace Clusters { @@ -80,6 +82,50 @@ using StepMode = StepModeEnum; using LevelControlOptions = OptionsBitmap; } // namespace LevelControl +namespace ColorControl { +// https://github.com/project-chip/connectedhomeip/pull/33612 renamed this +enum class ColorMode : uint8_t +{ + kCurrentHueAndCurrentSaturation = to_underlying(ColorModeEnum::kCurrentHueAndCurrentSaturation), + kCurrentXAndCurrentY = to_underlying(ColorModeEnum::kCurrentXAndCurrentY), + kColorTemperature = to_underlying(ColorModeEnum::kColorTemperatureMireds), + kUnknownEnumValue = to_underlying(ColorModeEnum::kUnknownEnumValue) +}; + +enum class HueDirection : uint8_t +{ + ShortestDistance = to_underlying(DirectionEnum::kShortest), + LongestDistance = to_underlying(DirectionEnum::kLongest), + Up = to_underlying(DirectionEnum::kUp), + Down = to_underlying(DirectionEnum::kDown), + kUnknownEnumValue = to_underlying(DirectionEnum::kUnknownEnumValue) +}; + +enum class ColorCapabilities : uint16_t +{ + ColorLoopSupported = to_underlying(ColorCapabilitiesBitmap::kColorLoop), + ColorTemperatureSupported = to_underlying(ColorCapabilitiesBitmap::kColorTemperature), + EnhancedHueSupported = to_underlying(ColorCapabilitiesBitmap::kEnhancedHue), + HueSaturationSupported = to_underlying(ColorCapabilitiesBitmap::kHueSaturation), + XYAttributesSupported = to_underlying(ColorCapabilitiesBitmap::kXy) +}; + +enum class ColorLoopDirection : uint8_t +{ + DecrementHue = to_underlying(ColorLoopDirectionEnum::kDecrement), + IncrementHue = to_underlying(ColorLoopDirectionEnum::kIncrement), + kUnknownEnumValue = to_underlying(ColorLoopDirectionEnum::kUnknownEnumValue) +}; + +using EnhancedColorMode = EnhancedColorModeEnum; +using ColorLoopUpdateFlags = UpdateFlagsBitmap; +using ColorLoopAction = ColorLoopActionEnum; +using HueMoveMode = MoveModeEnum; +using HueStepMode = StepModeEnum; +using SaturationMoveMode = MoveModeEnum; +using SaturationStepMode = StepModeEnum; +} // namespace ColorControl + namespace RefrigeratorAlarm { // https://github.com/project-chip/connectedhomeip/pull/31517 renamed this using AlarmMap = AlarmBitmap; diff --git a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml index c97d4a59baa00b..f72140e712a703 100644 --- a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml @@ -17,57 +17,44 @@ limitations under the License. - + - - + + - + - + - - - - - - - - - - - - - - + - + - + - - - - - + + + + + - + @@ -75,17 +62,39 @@ limitations under the License. - + - + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -128,15 +137,15 @@ limitations under the License. CurrentY - DriftCompensation + DriftCompensation CompensationText ColorTemperatureMireds - ColorMode + ColorMode - Options + Options NumberOfPrimaries @@ -254,31 +263,31 @@ limitations under the License. Move to specified hue. - + - - + + Move hue up or down at specified rate. - + - - + + Step hue up or down by specified size at specified rate. - + - - + + @@ -287,29 +296,29 @@ limitations under the License. - - + + Move saturation up or down at specified rate. - + - - + + Step saturation up or down by specified size at specified rate. - + - - + + @@ -319,8 +328,8 @@ limitations under the License. - - + + @@ -330,8 +339,8 @@ limitations under the License. - - + + @@ -340,8 +349,8 @@ limitations under the License. - - + + @@ -351,8 +360,8 @@ limitations under the License. - - + + @@ -361,20 +370,20 @@ limitations under the License. - - + + EnhancedCurrentHue - EnhancedColorMode - ColorLoopActive - ColorLoopDirection + EnhancedColorMode + ColorLoopActive + ColorLoopDirection ColorLoopTime ColorLoopStartEnhancedHue ColorLoopStoredEnhancedHue - ColorCapabilities + ColorCapabilities ColorTempPhysicalMinMireds ColorTempPhysicalMaxMireds @@ -383,31 +392,31 @@ limitations under the License. Command description for EnhancedMoveToHue - + - - + + Command description for EnhancedMoveHue - + - - + + Command description for EnhancedStepHue - + - - + + @@ -417,54 +426,54 @@ limitations under the License. - - + + Command description for ColorLoopSet - - - + + + - - + + Command description for StopMoveStep - - + + Command description for MoveColorTemperature - + - - + + Command description for StepColorTemperature - + - - + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 02408e1ecf74b0..bfb1354849c9c4 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -7145,65 +7145,62 @@ cluster ThermostatUserInterfaceConfiguration = 516 { cluster ColorControl = 768 { revision 7; - enum ColorLoopAction : enum8 { + enum ColorLoopActionEnum : enum8 { kDeactivate = 0; kActivateFromColorLoopStartEnhancedHue = 1; kActivateFromEnhancedCurrentHue = 2; } - enum ColorLoopDirection : enum8 { - kDecrementHue = 0; - kIncrementHue = 1; + enum ColorLoopDirectionEnum : enum8 { + kDecrement = 0; + kIncrement = 1; } - enum ColorMode : enum8 { + enum ColorModeEnum : enum8 { kCurrentHueAndCurrentSaturation = 0; kCurrentXAndCurrentY = 1; - kColorTemperature = 2; + kColorTemperatureMireds = 2; } - enum HueDirection : enum8 { - kShortestDistance = 0; - kLongestDistance = 1; + enum DirectionEnum : enum8 { + kShortest = 0; + kLongest = 1; kUp = 2; kDown = 3; } - enum HueMoveMode : enum8 { - kStop = 0; - kUp = 1; - kDown = 3; + enum DriftCompensationEnum : enum8 { + kNone = 0; + kOtherOrUnknown = 1; + kTemperatureMonitoring = 2; + kOpticalLuminanceMonitoringAndFeedback = 3; + kOpticalColorMonitoringAndFeedback = 4; } - enum HueStepMode : enum8 { - kUp = 1; - kDown = 3; + enum EnhancedColorModeEnum : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperatureMireds = 2; + kEnhancedCurrentHueAndCurrentSaturation = 3; } - enum SaturationMoveMode : enum8 { + enum MoveModeEnum : enum8 { kStop = 0; kUp = 1; kDown = 3; } - enum SaturationStepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 1; kDown = 3; } - bitmap ColorCapabilities : bitmap16 { - kHueSaturationSupported = 0x1; - kEnhancedHueSupported = 0x2; - kColorLoopSupported = 0x4; - kXYAttributesSupported = 0x8; - kColorTemperatureSupported = 0x10; - } - - bitmap ColorLoopUpdateFlags : bitmap8 { - kUpdateAction = 0x1; - kUpdateDirection = 0x2; - kUpdateTime = 0x4; - kUpdateStartHue = 0x8; + bitmap ColorCapabilitiesBitmap : bitmap16 { + kHueSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; } bitmap Feature : bitmap32 { @@ -7214,16 +7211,27 @@ cluster ColorControl = 768 { kColorTemperature = 0x10; } + bitmap OptionsBitmap : bitmap8 { + kExecuteIfOff = 0x1; + } + + bitmap UpdateFlagsBitmap : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + readonly attribute optional int8u currentHue = 0; readonly attribute optional int8u currentSaturation = 1; readonly attribute optional int16u remainingTime = 2; readonly attribute optional int16u currentX = 3; readonly attribute optional int16u currentY = 4; - readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional DriftCompensationEnum driftCompensation = 5; readonly attribute optional char_string<254> compensationText = 6; readonly attribute optional int16u colorTemperatureMireds = 7; - readonly attribute enum8 colorMode = 8; - attribute bitmap8 options = 15; + readonly attribute ColorModeEnum colorMode = 8; + attribute OptionsBitmap options = 15; readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute optional int16u primary1X = 17; readonly attribute optional int16u primary1Y = 18; @@ -7255,13 +7263,13 @@ cluster ColorControl = 768 { attribute access(write: manage) optional int16u colorPointBY = 59; attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; readonly attribute optional int16u enhancedCurrentHue = 16384; - readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute EnhancedColorModeEnum enhancedColorMode = 16385; readonly attribute optional int8u colorLoopActive = 16386; readonly attribute optional int8u colorLoopDirection = 16387; readonly attribute optional int16u colorLoopTime = 16388; readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; - readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute ColorCapabilitiesBitmap colorCapabilities = 16394; readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; @@ -7275,150 +7283,150 @@ cluster ColorControl = 768 { request struct MoveToHueRequest { int8u hue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToSaturationRequest { int8u saturation = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveSaturationRequest { - SaturationMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int8u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; int8u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToHueAndSaturationRequest { int8u hue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorRequest { int16u colorX = 0; int16u colorY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveColorRequest { int16s rateX = 0; int16s rateY = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepColorRequest { int16s stepX = 0; int16s stepY = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct MoveToColorTemperatureRequest { int16u colorTemperatureMireds = 0; int16u transitionTime = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedMoveToHueRequest { int16u enhancedHue = 0; - HueDirection direction = 1; + DirectionEnum direction = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveHueRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; - bitmap8 optionsMask = 2; - bitmap8 optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct EnhancedStepHueRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct EnhancedMoveToHueAndSaturationRequest { int16u enhancedHue = 0; int8u saturation = 1; int16u transitionTime = 2; - bitmap8 optionsMask = 3; - bitmap8 optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct ColorLoopSetRequest { - ColorLoopUpdateFlags updateFlags = 0; - ColorLoopAction action = 1; - ColorLoopDirection direction = 2; + UpdateFlagsBitmap updateFlags = 0; + ColorLoopActionEnum action = 1; + ColorLoopDirectionEnum direction = 2; int16u time = 3; int16u startHue = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } request struct StopMoveStepRequest { - bitmap8 optionsMask = 0; - bitmap8 optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveColorTemperatureRequest { - HueMoveMode moveMode = 0; + MoveModeEnum moveMode = 0; int16u rate = 1; int16u colorTemperatureMinimumMireds = 2; int16u colorTemperatureMaximumMireds = 3; - bitmap8 optionsMask = 4; - bitmap8 optionsOverride = 5; + OptionsBitmap optionsMask = 4; + OptionsBitmap optionsOverride = 5; } request struct StepColorTemperatureRequest { - HueStepMode stepMode = 0; + StepModeEnum stepMode = 0; int16u stepSize = 1; int16u transitionTime = 2; int16u colorTemperatureMinimumMireds = 3; int16u colorTemperatureMaximumMireds = 4; - bitmap8 optionsMask = 5; - bitmap8 optionsOverride = 6; + OptionsBitmap optionsMask = 5; + OptionsBitmap optionsOverride = 6; } /** Move to specified hue. */ diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 82a4a6fe42e669..db775e5d52e5c6 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -32152,7 +32152,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -32830,7 +32830,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index ed3c9154cc8c3a..6b8ecd1c82b577 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -34913,10 +34913,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="remainingTime", Tag=0x00000002, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="currentX", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="currentY", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="driftCompensation", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="driftCompensation", Tag=0x00000005, Type=typing.Optional[ColorControl.Enums.DriftCompensationEnum]), ClusterObjectFieldDescriptor(Label="compensationText", Tag=0x00000006, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="colorTemperatureMireds", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="colorMode", Tag=0x00000008, Type=uint), + ClusterObjectFieldDescriptor(Label="colorMode", Tag=0x00000008, Type=ColorControl.Enums.ColorModeEnum), ClusterObjectFieldDescriptor(Label="options", Tag=0x0000000F, Type=uint), ClusterObjectFieldDescriptor(Label="numberOfPrimaries", Tag=0x00000010, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="primary1X", Tag=0x00000011, Type=typing.Optional[uint]), @@ -34949,7 +34949,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="colorPointBY", Tag=0x0000003B, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="colorPointBIntensity", Tag=0x0000003C, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="enhancedCurrentHue", Tag=0x00004000, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="enhancedColorMode", Tag=0x00004001, Type=uint), + ClusterObjectFieldDescriptor(Label="enhancedColorMode", Tag=0x00004001, Type=ColorControl.Enums.EnhancedColorModeEnum), ClusterObjectFieldDescriptor(Label="colorLoopActive", Tag=0x00004002, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="colorLoopDirection", Tag=0x00004003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="colorLoopTime", Tag=0x00004004, Type=typing.Optional[uint]), @@ -34973,10 +34973,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: remainingTime: 'typing.Optional[uint]' = None currentX: 'typing.Optional[uint]' = None currentY: 'typing.Optional[uint]' = None - driftCompensation: 'typing.Optional[uint]' = None + driftCompensation: 'typing.Optional[ColorControl.Enums.DriftCompensationEnum]' = None compensationText: 'typing.Optional[str]' = None colorTemperatureMireds: 'typing.Optional[uint]' = None - colorMode: 'uint' = None + colorMode: 'ColorControl.Enums.ColorModeEnum' = None options: 'uint' = None numberOfPrimaries: 'typing.Union[Nullable, uint]' = None primary1X: 'typing.Optional[uint]' = None @@ -35009,7 +35009,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: colorPointBY: 'typing.Optional[uint]' = None colorPointBIntensity: 'typing.Union[None, Nullable, uint]' = None enhancedCurrentHue: 'typing.Optional[uint]' = None - enhancedColorMode: 'uint' = None + enhancedColorMode: 'ColorControl.Enums.EnhancedColorModeEnum' = None colorLoopActive: 'typing.Optional[uint]' = None colorLoopDirection: 'typing.Optional[uint]' = None colorLoopTime: 'typing.Optional[uint]' = None @@ -35028,7 +35028,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class ColorLoopAction(MatterIntEnum): + class ColorLoopActionEnum(MatterIntEnum): kDeactivate = 0x00 kActivateFromColorLoopStartEnhancedHue = 0x01 kActivateFromEnhancedCurrentHue = 0x02 @@ -35038,28 +35038,28 @@ class ColorLoopAction(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, - class ColorLoopDirection(MatterIntEnum): - kDecrementHue = 0x00 - kIncrementHue = 0x01 + class ColorLoopDirectionEnum(MatterIntEnum): + kDecrement = 0x00 + kIncrement = 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 an unknown # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, - class ColorMode(MatterIntEnum): + class ColorModeEnum(MatterIntEnum): kCurrentHueAndCurrentSaturation = 0x00 kCurrentXAndCurrentY = 0x01 - kColorTemperature = 0x02 + kColorTemperatureMireds = 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 HueDirection(MatterIntEnum): - kShortestDistance = 0x00 - kLongestDistance = 0x01 + class DirectionEnum(MatterIntEnum): + kShortest = 0x00 + kLongest = 0x01 kUp = 0x02 kDown = 0x03 # All received enum values that are not listed above will be mapped @@ -35068,26 +35068,30 @@ class HueDirection(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, - class HueMoveMode(MatterIntEnum): - kStop = 0x00 - kUp = 0x01 - kDown = 0x03 + class DriftCompensationEnum(MatterIntEnum): + kNone = 0x00 + kOtherOrUnknown = 0x01 + kTemperatureMonitoring = 0x02 + kOpticalLuminanceMonitoringAndFeedback = 0x03 + kOpticalColorMonitoringAndFeedback = 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 an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 5, - class HueStepMode(MatterIntEnum): - kUp = 0x01 - kDown = 0x03 + class EnhancedColorModeEnum(MatterIntEnum): + kCurrentHueAndCurrentSaturation = 0x00 + kCurrentXAndCurrentY = 0x01 + kColorTemperatureMireds = 0x02 + kEnhancedCurrentHueAndCurrentSaturation = 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 an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 4, - class SaturationMoveMode(MatterIntEnum): + class MoveModeEnum(MatterIntEnum): kStop = 0x00 kUp = 0x01 kDown = 0x03 @@ -35097,7 +35101,7 @@ class SaturationMoveMode(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, - class SaturationStepMode(MatterIntEnum): + class StepModeEnum(MatterIntEnum): kUp = 0x01 kDown = 0x03 # All received enum values that are not listed above will be mapped @@ -35107,18 +35111,12 @@ class SaturationStepMode(MatterIntEnum): kUnknownEnumValue = 0, class Bitmaps: - class ColorCapabilities(IntFlag): - kHueSaturationSupported = 0x1 - kEnhancedHueSupported = 0x2 - kColorLoopSupported = 0x4 - kXYAttributesSupported = 0x8 - kColorTemperatureSupported = 0x10 - - class ColorLoopUpdateFlags(IntFlag): - kUpdateAction = 0x1 - kUpdateDirection = 0x2 - kUpdateTime = 0x4 - kUpdateStartHue = 0x8 + class ColorCapabilitiesBitmap(IntFlag): + kHueSaturation = 0x1 + kEnhancedHue = 0x2 + kColorLoop = 0x4 + kXy = 0x8 + kColorTemperature = 0x10 class Feature(IntFlag): kHueAndSaturation = 0x1 @@ -35127,6 +35125,15 @@ class Feature(IntFlag): kXy = 0x8 kColorTemperature = 0x10 + class OptionsBitmap(IntFlag): + kExecuteIfOff = 0x1 + + class UpdateFlagsBitmap(IntFlag): + kUpdateAction = 0x1 + kUpdateDirection = 0x2 + kUpdateTime = 0x4 + kUpdateStartHue = 0x8 + class Commands: @dataclass class MoveToHue(ClusterCommand): @@ -35140,14 +35147,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="hue", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.HueDirection), + ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.DirectionEnum), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) hue: 'uint' = 0 - direction: 'ColorControl.Enums.HueDirection' = 0 + direction: 'ColorControl.Enums.DirectionEnum' = 0 transitionTime: 'uint' = 0 optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -35163,13 +35170,13 @@ class MoveHue(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.MoveModeEnum), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'ColorControl.Enums.HueMoveMode' = 0 + moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 rate: 'uint' = 0 optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -35185,14 +35192,14 @@ class StepHue(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.StepModeEnum), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'ColorControl.Enums.HueStepMode' = 0 + stepMode: 'ColorControl.Enums.StepModeEnum' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 optionsMask: 'uint' = 0 @@ -35231,13 +35238,13 @@ class MoveSaturation(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.SaturationMoveMode), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.MoveModeEnum), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'ColorControl.Enums.SaturationMoveMode' = 0 + moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 rate: 'uint' = 0 optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -35253,14 +35260,14 @@ class StepSaturation(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.SaturationStepMode), + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.StepModeEnum), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'ColorControl.Enums.SaturationStepMode' = 0 + stepMode: 'ColorControl.Enums.StepModeEnum' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 optionsMask: 'uint' = 0 @@ -35394,14 +35401,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="enhancedHue", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.HueDirection), + ClusterObjectFieldDescriptor(Label="direction", Tag=1, Type=ColorControl.Enums.DirectionEnum), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) enhancedHue: 'uint' = 0 - direction: 'ColorControl.Enums.HueDirection' = 0 + direction: 'ColorControl.Enums.DirectionEnum' = 0 transitionTime: 'uint' = 0 optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -35417,13 +35424,13 @@ class EnhancedMoveHue(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.MoveModeEnum), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'ColorControl.Enums.HueMoveMode' = 0 + moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 rate: 'uint' = 0 optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 @@ -35439,14 +35446,14 @@ class EnhancedStepHue(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.StepModeEnum), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'ColorControl.Enums.HueStepMode' = 0 + stepMode: 'ColorControl.Enums.StepModeEnum' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 optionsMask: 'uint' = 0 @@ -35488,8 +35495,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="updateFlags", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="action", Tag=1, Type=ColorControl.Enums.ColorLoopAction), - ClusterObjectFieldDescriptor(Label="direction", Tag=2, Type=ColorControl.Enums.ColorLoopDirection), + ClusterObjectFieldDescriptor(Label="action", Tag=1, Type=ColorControl.Enums.ColorLoopActionEnum), + ClusterObjectFieldDescriptor(Label="direction", Tag=2, Type=ColorControl.Enums.ColorLoopDirectionEnum), ClusterObjectFieldDescriptor(Label="time", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="startHue", Tag=4, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=5, Type=uint), @@ -35497,8 +35504,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) updateFlags: 'uint' = 0 - action: 'ColorControl.Enums.ColorLoopAction' = 0 - direction: 'ColorControl.Enums.ColorLoopDirection' = 0 + action: 'ColorControl.Enums.ColorLoopActionEnum' = 0 + direction: 'ColorControl.Enums.ColorLoopDirectionEnum' = 0 time: 'uint' = 0 startHue: 'uint' = 0 optionsMask: 'uint' = 0 @@ -35533,7 +35540,7 @@ class MoveColorTemperature(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.HueMoveMode), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=ColorControl.Enums.MoveModeEnum), ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="colorTemperatureMinimumMireds", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="colorTemperatureMaximumMireds", Tag=3, Type=uint), @@ -35541,7 +35548,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=5, Type=uint), ]) - moveMode: 'ColorControl.Enums.HueMoveMode' = 0 + moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 rate: 'uint' = 0 colorTemperatureMinimumMireds: 'uint' = 0 colorTemperatureMaximumMireds: 'uint' = 0 @@ -35559,7 +35566,7 @@ class StepColorTemperature(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.HueStepMode), + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=ColorControl.Enums.StepModeEnum), ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="colorTemperatureMinimumMireds", Tag=3, Type=uint), @@ -35568,7 +35575,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), ]) - stepMode: 'ColorControl.Enums.HueStepMode' = 0 + stepMode: 'ColorControl.Enums.StepModeEnum' = 0 stepSize: 'uint' = 0 transitionTime: 'uint' = 0 colorTemperatureMinimumMireds: 'uint' = 0 @@ -35669,9 +35676,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[ColorControl.Enums.DriftCompensationEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[ColorControl.Enums.DriftCompensationEnum]' = None @dataclass class CompensationText(ClusterAttributeDescriptor): @@ -35717,9 +35724,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=ColorControl.Enums.ColorModeEnum) - value: 'uint' = 0 + value: 'ColorControl.Enums.ColorModeEnum' = 0 @dataclass class Options(ClusterAttributeDescriptor): @@ -36245,9 +36252,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=ColorControl.Enums.EnhancedColorModeEnum) - value: 'uint' = 0 + value: 'ColorControl.Enums.EnhancedColorModeEnum' = 0 @dataclass class ColorLoopActive(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index f899dba1fafe44..472a630d93df68 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -12882,7 +12882,7 @@ static id _Nullable DecodeAttributeValueForColorControlCluster(AttributeId aAttr return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::CompensationText::Id: { @@ -12920,7 +12920,7 @@ static id _Nullable DecodeAttributeValueForColorControlCluster(AttributeId aAttr return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::Options::Id: { @@ -12931,7 +12931,7 @@ static id _Nullable DecodeAttributeValueForColorControlCluster(AttributeId aAttr return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::NumberOfPrimaries::Id: { @@ -13323,7 +13323,7 @@ static id _Nullable DecodeAttributeValueForColorControlCluster(AttributeId aAttr return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ColorLoopActive::Id: { @@ -13389,7 +13389,7 @@ static id _Nullable DecodeAttributeValueForColorControlCluster(AttributeId aAttr return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } case Attributes::ColorTempPhysicalMinMireds::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index fab6862dd96a67..efb5fca9547fab 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -20203,65 +20203,62 @@ typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationTemperatureDispl } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { - MTRColorControlColorLoopActionDeactivate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlColorLoopActionActivateFromColorLoopStartEnhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlColorLoopActionActivateFromEnhancedCurrentHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRColorControlColorLoopActionDeactivate MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlColorLoopActionActivateFromColorLoopStartEnhancedHue MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlColorLoopActionActivateFromEnhancedCurrentHue MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRColorControlColorLoopDirection) { - MTRColorControlColorLoopDirectionDecrementHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlColorLoopDirectionIncrementHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRColorControlColorLoopDirectionDecrement MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlColorLoopDirectionIncrement MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRColorControlColorMode) { - MTRColorControlColorModeCurrentHueAndCurrentSaturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlColorModeCurrentXAndCurrentY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlColorModeColorTemperature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRColorControlHueDirection) { - MTRColorControlHueDirectionShortestDistance MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlHueDirectionLongestDistance MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlHueDirectionUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRColorControlHueDirectionDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRColorControlColorModeCurrentHueAndCurrentSaturation MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlColorModeCurrentXAndCurrentY MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlColorModeColorTemperatureMireds MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRColorControlHueMoveMode) { - MTRColorControlHueMoveModeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlHueMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlHueMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRColorControlDirection) { + MTRColorControlDirectionShortest MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlDirectionLongest MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlDirectionUp MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRColorControlDirectionDown MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRColorControlHueStepMode) { - MTRColorControlHueStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlHueStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRColorControlDriftCompensation) { + MTRColorControlDriftCompensationNone MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlDriftCompensationOtherOrUnknown MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlDriftCompensationTemperatureMonitoring MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRColorControlDriftCompensationOpticalLuminanceMonitoringAndFeedback MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRColorControlDriftCompensationOpticalColorMonitoringAndFeedback MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRColorControlSaturationMoveMode) { - MTRColorControlSaturationMoveModeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlSaturationMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlSaturationMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRColorControlEnhancedColorMode) { + MTRColorControlEnhancedColorModeCurrentHueAndCurrentSaturation MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlEnhancedColorModeCurrentXAndCurrentY MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlEnhancedColorModeColorTemperatureMireds MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRColorControlEnhancedColorModeEnhancedCurrentHueAndCurrentSaturation MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRColorControlSaturationStepMode) { - MTRColorControlSaturationStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlSaturationStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRColorControlMoveMode) { + MTRColorControlMoveModeStop MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRColorControlMoveModeUp MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlMoveModeDown MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint16_t, MTRColorControlColorCapabilities) { - MTRColorControlColorCapabilitiesHueSaturationSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRColorControlColorCapabilitiesEnhancedHueSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRColorControlColorCapabilitiesColorLoopSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRColorControlColorCapabilitiesXYAttributesSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRColorControlColorCapabilitiesColorTemperatureSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRColorControlStepMode) { + MTRColorControlStepModeUp MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRColorControlStepModeDown MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTRColorControlColorLoopUpdateFlags) { - MTRColorControlColorLoopUpdateFlagsUpdateAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRColorControlColorLoopUpdateFlagsUpdateDirection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRColorControlColorLoopUpdateFlagsUpdateTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRColorControlColorLoopUpdateFlagsUpdateStartHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint16_t, MTRColorControlColorCapabilitiesBitmap) { + MTRColorControlColorCapabilitiesBitmapHueSaturation MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRColorControlColorCapabilitiesBitmapEnhancedHue MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRColorControlColorCapabilitiesBitmapColorLoop MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRColorControlColorCapabilitiesBitmapXY MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRColorControlColorCapabilitiesBitmapColorTemperature MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRColorControlFeature) { MTRColorControlFeatureHueAndSaturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, @@ -20271,6 +20268,17 @@ typedef NS_OPTIONS(uint32_t, MTRColorControlFeature) { MTRColorControlFeatureColorTemperature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRColorControlOptionsBitmap) { + MTRColorControlOptionsBitmapExecuteIfOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRColorControlUpdateFlagsBitmap) { + MTRColorControlUpdateFlagsBitmapUpdateAction MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRColorControlUpdateFlagsBitmapUpdateDirection MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRColorControlUpdateFlagsBitmapUpdateTime MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRColorControlUpdateFlagsBitmapUpdateStartHue MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRBallastConfigurationBallastStatusBitmap) { MTRBallastConfigurationBallastStatusBitmapBallastNonOperational MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRBallastConfigurationBallastStatusBitmapLampFailure MTR_PROVISIONALLY_AVAILABLE = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 756425bba1b764..2c81423cfbb46a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -76739,7 +76739,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWri ListFreer listFreer; using TypeInfo = ColorControl::Attributes::Options::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 976d5a0ef241be..1334d8beba2654 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -23153,10 +23153,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23250,10 +23250,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.rate = self.rate.unsignedCharValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23353,10 +23353,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedCharValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23450,10 +23450,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23547,10 +23547,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.rate = self.rate.unsignedCharValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23650,10 +23650,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedCharValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23753,10 +23753,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23856,10 +23856,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -23953,10 +23953,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.rateY = self.rateY.shortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24056,10 +24056,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24153,10 +24153,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24268,10 +24268,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24365,10 +24365,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.rate = self.rate.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24468,10 +24468,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24571,10 +24571,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24686,10 +24686,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.startHue = self.startHue.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24771,10 +24771,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type encodableStruct; ListFreer listFreer; { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24880,10 +24880,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -24995,10 +24995,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.colorTemperatureMaximumMireds = self.colorTemperatureMaximumMireds.unsignedShortValue; } { - encodableStruct.optionsMask = self.optionsMask.unsignedCharValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.optionsOverride = self.optionsOverride.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); diff --git a/src/python_testing/TC_CC_2_2.py b/src/python_testing/TC_CC_2_2.py index 4f6a21b1ba2771..86080efd358456 100644 --- a/src/python_testing/TC_CC_2_2.py +++ b/src/python_testing/TC_CC_2_2.py @@ -137,14 +137,14 @@ async def test_TC_CC_2_2(self): self.step(6) if supports_hs: - cmd = cc.Commands.MoveHue(moveMode=cc.Enums.HueMoveMode.kDown, rate=225) + cmd = cc.Commands.MoveHue(moveMode=cc.Enums.MoveModeEnum.kDown, rate=225) await self.send_single_cmd(cmd) else: self.mark_current_step_skipped() self.step(7) if supports_hs: - cmd = cc.Commands.MoveSaturation(moveMode=cc.Enums.SaturationMoveMode.kDown, rate=225) + cmd = cc.Commands.MoveSaturation(moveMode=cc.Enums.MoveModeEnum.kDown, rate=225) await self.send_single_cmd(cmd) else: self.mark_current_step_skipped() @@ -173,7 +173,7 @@ def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor): self.skip_step(15) else: self.step(10) - cmd = cc.Commands.MoveToHue(hue=254, transitionTime=100, direction=cc.Enums.HueDirection.kShortestDistance) + cmd = cc.Commands.MoveToHue(hue=254, transitionTime=100, direction=cc.Enums.DirectionEnum.kShortest) await self.send_single_cmd(cmd) self.step(11) @@ -228,7 +228,7 @@ def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor): else: self.step(23) cmd = cc.Commands.EnhancedMoveToHue(enhancedHue=0, transitionTime=100, - direction=cc.Enums.HueDirection.kShortestDistance) + direction=cc.Enums.DirectionEnum.kShortest) await self.send_single_cmd(cmd) self.step(24) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index c5768be8b71f3d..a8fc013fa0ce19 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -27161,9 +27161,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DriftCompensation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -27177,9 +27177,10 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value, + MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -27190,9 +27191,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -27299,9 +27300,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -27315,9 +27316,10 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value, + MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -27328,9 +27330,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -27345,9 +27347,10 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace Options { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, + chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -27361,9 +27364,10 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -27374,9 +27378,10 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -29237,9 +29242,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace EnhancedColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -29253,9 +29258,10 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value, + MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -29266,9 +29272,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -29513,9 +29519,10 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorCapabilities { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, + chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = @@ -29529,9 +29536,11 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -29542,9 +29551,10 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 41422b72ca596d..cab9691ebbf4ed 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -4267,9 +4267,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu } // namespace CurrentY namespace DriftCompensation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, + chip::app::Clusters::ColorControl::DriftCompensationEnum * value); // DriftCompensationEnum +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value, + MarkAttributeDirty markDirty); } // namespace DriftCompensation namespace CompensationText { @@ -4285,15 +4287,20 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu } // namespace ColorTemperatureMireds namespace ColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, + chip::app::Clusters::ColorControl::ColorModeEnum * value); // ColorModeEnum +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value, + MarkAttributeDirty markDirty); } // namespace ColorMode namespace Options { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, + chip::BitMask * value); // OptionsBitmap +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Options namespace NumberOfPrimaries { @@ -4533,9 +4540,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu } // namespace EnhancedCurrentHue namespace EnhancedColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, + chip::app::Clusters::ColorControl::EnhancedColorModeEnum * value); // EnhancedColorModeEnum +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value, + MarkAttributeDirty markDirty); } // namespace EnhancedColorMode namespace ColorLoopActive { @@ -4569,9 +4578,14 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu } // namespace ColorLoopStoredEnhancedHue namespace ColorCapabilities { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Get(chip::EndpointId endpoint, + chip::BitMask * value); // ColorCapabilitiesBitmap +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace ColorCapabilities namespace ColorTempPhysicalMinMireds { 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 da2047e745d586..f63782c221d827 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 @@ -2942,9 +2942,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ThermostatUserInterface } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopAction val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopActionEnum val) { - using EnumType = ColorControl::ColorLoopAction; + using EnumType = ColorControl::ColorLoopActionEnum; switch (val) { case EnumType::kDeactivate: @@ -2955,38 +2955,38 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoop return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopDirection val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopDirectionEnum val) { - using EnumType = ColorControl::ColorLoopDirection; + using EnumType = ColorControl::ColorLoopDirectionEnum; switch (val) { - case EnumType::kDecrementHue: - case EnumType::kIncrementHue: + case EnumType::kDecrement: + case EnumType::kIncrement: return val; default: return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorModeEnum val) { - using EnumType = ColorControl::ColorMode; + using EnumType = ColorControl::ColorModeEnum; switch (val) { case EnumType::kCurrentHueAndCurrentSaturation: case EnumType::kCurrentXAndCurrentY: - case EnumType::kColorTemperature: + case EnumType::kColorTemperatureMireds: return val; default: return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueDirection val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::DirectionEnum val) { - using EnumType = ColorControl::HueDirection; + using EnumType = ColorControl::DirectionEnum; switch (val) { - case EnumType::kShortestDistance: - case EnumType::kLongestDistance: + case EnumType::kShortest: + case EnumType::kLongest: case EnumType::kUp: case EnumType::kDown: return val; @@ -2994,34 +2994,38 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueDirect return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueMoveMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::DriftCompensationEnum val) { - using EnumType = ColorControl::HueMoveMode; + using EnumType = ColorControl::DriftCompensationEnum; switch (val) { - case EnumType::kStop: - case EnumType::kUp: - case EnumType::kDown: + case EnumType::kNone: + case EnumType::kOtherOrUnknown: + case EnumType::kTemperatureMonitoring: + case EnumType::kOpticalLuminanceMonitoringAndFeedback: + case EnumType::kOpticalColorMonitoringAndFeedback: return val; default: return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueStepMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::EnhancedColorModeEnum val) { - using EnumType = ColorControl::HueStepMode; + using EnumType = ColorControl::EnhancedColorModeEnum; switch (val) { - case EnumType::kUp: - case EnumType::kDown: + case EnumType::kCurrentHueAndCurrentSaturation: + case EnumType::kCurrentXAndCurrentY: + case EnumType::kColorTemperatureMireds: + case EnumType::kEnhancedCurrentHueAndCurrentSaturation: return val; default: return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::SaturationMoveMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::MoveModeEnum val) { - using EnumType = ColorControl::SaturationMoveMode; + using EnumType = ColorControl::MoveModeEnum; switch (val) { case EnumType::kStop: @@ -3032,9 +3036,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::Saturatio return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::SaturationStepMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::StepModeEnum val) { - using EnumType = ColorControl::SaturationStepMode; + using EnumType = ColorControl::StepModeEnum; switch (val) { case EnumType::kUp: 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 571439625e121a..e78f8f4d064648 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 @@ -4343,8 +4343,8 @@ enum class TemperatureDisplayModeEnum : uint8_t namespace ColorControl { -// Enum for ColorLoopAction -enum class ColorLoopAction : uint8_t +// Enum for ColorLoopActionEnum +enum class ColorLoopActionEnum : uint8_t { kDeactivate = 0x00, kActivateFromColorLoopStartEnhancedHue = 0x01, @@ -4356,11 +4356,11 @@ enum class ColorLoopAction : uint8_t kUnknownEnumValue = 3, }; -// Enum for ColorLoopDirection -enum class ColorLoopDirection : uint8_t +// Enum for ColorLoopDirectionEnum +enum class ColorLoopDirectionEnum : uint8_t { - kDecrementHue = 0x00, - kIncrementHue = 0x01, + kDecrement = 0x00, + kIncrement = 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 @@ -4368,12 +4368,12 @@ enum class ColorLoopDirection : uint8_t kUnknownEnumValue = 2, }; -// Enum for ColorMode -enum class ColorMode : uint8_t +// Enum for ColorModeEnum +enum class ColorModeEnum : uint8_t { kCurrentHueAndCurrentSaturation = 0x00, kCurrentXAndCurrentY = 0x01, - kColorTemperature = 0x02, + kColorTemperatureMireds = 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 @@ -4381,13 +4381,13 @@ enum class ColorMode : uint8_t kUnknownEnumValue = 3, }; -// Enum for HueDirection -enum class HueDirection : uint8_t +// Enum for DirectionEnum +enum class DirectionEnum : uint8_t { - kShortestDistance = 0x00, - kLongestDistance = 0x01, - kUp = 0x02, - kDown = 0x03, + kShortest = 0x00, + kLongest = 0x01, + kUp = 0x02, + 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 @@ -4395,33 +4395,37 @@ enum class HueDirection : uint8_t kUnknownEnumValue = 4, }; -// Enum for HueMoveMode -enum class HueMoveMode : uint8_t +// Enum for DriftCompensationEnum +enum class DriftCompensationEnum : uint8_t { - kStop = 0x00, - kUp = 0x01, - kDown = 0x03, + kNone = 0x00, + kOtherOrUnknown = 0x01, + kTemperatureMonitoring = 0x02, + kOpticalLuminanceMonitoringAndFeedback = 0x03, + kOpticalColorMonitoringAndFeedback = 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. - kUnknownEnumValue = 2, + kUnknownEnumValue = 5, }; -// Enum for HueStepMode -enum class HueStepMode : uint8_t +// Enum for EnhancedColorModeEnum +enum class EnhancedColorModeEnum : uint8_t { - kUp = 0x01, - kDown = 0x03, + kCurrentHueAndCurrentSaturation = 0x00, + kCurrentXAndCurrentY = 0x01, + kColorTemperatureMireds = 0x02, + kEnhancedCurrentHueAndCurrentSaturation = 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. - kUnknownEnumValue = 0, + kUnknownEnumValue = 4, }; -// Enum for SaturationMoveMode -enum class SaturationMoveMode : uint8_t +// Enum for MoveModeEnum +enum class MoveModeEnum : uint8_t { kStop = 0x00, kUp = 0x01, @@ -4433,8 +4437,8 @@ enum class SaturationMoveMode : uint8_t kUnknownEnumValue = 2, }; -// Enum for SaturationStepMode -enum class SaturationStepMode : uint8_t +// Enum for StepModeEnum +enum class StepModeEnum : uint8_t { kUp = 0x01, kDown = 0x03, @@ -4445,23 +4449,14 @@ enum class SaturationStepMode : uint8_t kUnknownEnumValue = 0, }; -// Bitmap for ColorCapabilities -enum class ColorCapabilities : uint16_t +// Bitmap for ColorCapabilitiesBitmap +enum class ColorCapabilitiesBitmap : uint16_t { - kHueSaturationSupported = 0x1, - kEnhancedHueSupported = 0x2, - kColorLoopSupported = 0x4, - kXYAttributesSupported = 0x8, - kColorTemperatureSupported = 0x10, -}; - -// Bitmap for ColorLoopUpdateFlags -enum class ColorLoopUpdateFlags : uint8_t -{ - kUpdateAction = 0x1, - kUpdateDirection = 0x2, - kUpdateTime = 0x4, - kUpdateStartHue = 0x8, + kHueSaturation = 0x1, + kEnhancedHue = 0x2, + kColorLoop = 0x4, + kXy = 0x8, + kColorTemperature = 0x10, }; // Bitmap for Feature @@ -4473,6 +4468,21 @@ enum class Feature : uint32_t kXy = 0x8, kColorTemperature = 0x10, }; + +// Bitmap for OptionsBitmap +enum class OptionsBitmap : uint8_t +{ + kExecuteIfOff = 0x1, +}; + +// Bitmap for UpdateFlagsBitmap +enum class UpdateFlagsBitmap : uint8_t +{ + kUpdateAction = 0x1, + kUpdateDirection = 0x2, + kUpdateTime = 0x4, + kUpdateStartHue = 0x8, +}; } // namespace ColorControl namespace BallastConfiguration { 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 f0f1dea1de536d..e18b64797bb595 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 @@ -31602,11 +31602,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t hue = static_cast(0); + DirectionEnum direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31621,11 +31621,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t hue = static_cast(0); + DirectionEnum direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToHue @@ -31645,10 +31645,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint8_t rate = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31663,10 +31663,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint8_t rate = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveHue @@ -31687,11 +31687,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31706,11 +31706,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepHue @@ -31730,10 +31730,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31748,10 +31748,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToSaturation @@ -31771,10 +31771,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint8_t rate = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31789,10 +31789,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationMoveMode moveMode = static_cast(0); - uint8_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint8_t rate = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveSaturation @@ -31813,11 +31813,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31832,11 +31832,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationStepMode stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - uint8_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepSaturation @@ -31857,11 +31857,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t hue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31876,11 +31876,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint8_t hue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToHueAndSaturation @@ -31901,11 +31901,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorX = static_cast(0); - uint16_t colorY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t colorX = static_cast(0); + uint16_t colorY = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31920,11 +31920,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorX = static_cast(0); - uint16_t colorY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t colorX = static_cast(0); + uint16_t colorY = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToColor @@ -31944,10 +31944,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t rateX = static_cast(0); - int16_t rateY = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + int16_t rateX = static_cast(0); + int16_t rateY = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -31962,10 +31962,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t rateX = static_cast(0); - int16_t rateY = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + int16_t rateX = static_cast(0); + int16_t rateY = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveColor @@ -31986,11 +31986,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t stepX = static_cast(0); - int16_t stepY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + int16_t stepX = static_cast(0); + int16_t stepY = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32005,11 +32005,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t stepX = static_cast(0); - int16_t stepY = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + int16_t stepX = static_cast(0); + int16_t stepY = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepColor @@ -32029,10 +32029,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorTemperatureMireds = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t colorTemperatureMireds = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32047,10 +32047,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorTemperatureMireds = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t colorTemperatureMireds = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToColorTemperature @@ -32071,11 +32071,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t enhancedHue = static_cast(0); + DirectionEnum direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32090,11 +32090,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue = static_cast(0); - HueDirection direction = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t enhancedHue = static_cast(0); + DirectionEnum direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedMoveToHue @@ -32114,10 +32114,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint16_t rate = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32132,10 +32132,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint16_t rate = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedMoveHue @@ -32156,11 +32156,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32175,11 +32175,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedStepHue @@ -32200,11 +32200,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t enhancedHue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32219,11 +32219,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue = static_cast(0); - uint8_t saturation = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t enhancedHue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedMoveToHueAndSaturation @@ -32246,13 +32246,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - chip::BitMask updateFlags = static_cast>(0); - ColorLoopAction action = static_cast(0); - ColorLoopDirection direction = static_cast(0); - uint16_t time = static_cast(0); - uint16_t startHue = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::BitMask updateFlags = static_cast>(0); + ColorLoopActionEnum action = static_cast(0); + ColorLoopDirectionEnum direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32267,13 +32267,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - chip::BitMask updateFlags = static_cast>(0); - ColorLoopAction action = static_cast(0); - ColorLoopDirection direction = static_cast(0); - uint16_t time = static_cast(0); - uint16_t startHue = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::BitMask updateFlags = static_cast>(0); + ColorLoopActionEnum action = static_cast(0); + ColorLoopDirectionEnum direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ColorLoopSet @@ -32291,8 +32291,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopMoveStep::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32307,8 +32307,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StopMoveStep::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StopMoveStep @@ -32330,12 +32330,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32350,12 +32350,12 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode = static_cast(0); - uint16_t rate = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + MoveModeEnum moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveColorTemperature @@ -32378,13 +32378,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -32399,13 +32399,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode = static_cast(0); - uint16_t stepSize = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint16_t colorTemperatureMinimumMireds = static_cast(0); - uint16_t colorTemperatureMaximumMireds = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint16_t colorTemperatureMinimumMireds = static_cast(0); + uint16_t colorTemperatureMaximumMireds = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepColorTemperature @@ -32476,9 +32476,9 @@ struct TypeInfo namespace DriftCompensation { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::ColorControl::DriftCompensationEnum; + using DecodableType = chip::app::Clusters::ColorControl::DriftCompensationEnum; + using DecodableArgType = chip::app::Clusters::ColorControl::DriftCompensationEnum; static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::DriftCompensation::Id; } @@ -32513,9 +32513,9 @@ struct TypeInfo namespace ColorMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::ColorControl::ColorModeEnum; + using DecodableType = chip::app::Clusters::ColorControl::ColorModeEnum; + using DecodableArgType = chip::app::Clusters::ColorControl::ColorModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ColorMode::Id; } @@ -32525,9 +32525,9 @@ struct TypeInfo namespace Options { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Options::Id; } @@ -32909,9 +32909,9 @@ struct TypeInfo namespace EnhancedColorMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::ColorControl::EnhancedColorModeEnum; + using DecodableType = chip::app::Clusters::ColorControl::EnhancedColorModeEnum; + using DecodableArgType = chip::app::Clusters::ColorControl::EnhancedColorModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::EnhancedColorMode::Id; } @@ -32981,9 +32981,9 @@ struct TypeInfo namespace ColorCapabilities { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ColorCapabilities::Id; } @@ -33088,11 +33088,13 @@ struct TypeInfo Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); Attributes::CurrentX::TypeInfo::DecodableType currentX = static_cast(0); Attributes::CurrentY::TypeInfo::DecodableType currentY = static_cast(0); - Attributes::DriftCompensation::TypeInfo::DecodableType driftCompensation = static_cast(0); + Attributes::DriftCompensation::TypeInfo::DecodableType driftCompensation = + static_cast(0); Attributes::CompensationText::TypeInfo::DecodableType compensationText; Attributes::ColorTemperatureMireds::TypeInfo::DecodableType colorTemperatureMireds = static_cast(0); - Attributes::ColorMode::TypeInfo::DecodableType colorMode = static_cast(0); - Attributes::Options::TypeInfo::DecodableType options = static_cast(0); + Attributes::ColorMode::TypeInfo::DecodableType colorMode = static_cast(0); + Attributes::Options::TypeInfo::DecodableType options = + static_cast>(0); Attributes::NumberOfPrimaries::TypeInfo::DecodableType numberOfPrimaries; Attributes::Primary1X::TypeInfo::DecodableType primary1X = static_cast(0); Attributes::Primary1Y::TypeInfo::DecodableType primary1Y = static_cast(0); @@ -33123,14 +33125,16 @@ struct TypeInfo Attributes::ColorPointBX::TypeInfo::DecodableType colorPointBX = static_cast(0); Attributes::ColorPointBY::TypeInfo::DecodableType colorPointBY = static_cast(0); Attributes::ColorPointBIntensity::TypeInfo::DecodableType colorPointBIntensity; - Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); - Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = static_cast(0); + Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); + Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = + static_cast(0); Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive = static_cast(0); Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection = static_cast(0); Attributes::ColorLoopTime::TypeInfo::DecodableType colorLoopTime = static_cast(0); Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableType colorLoopStartEnhancedHue = static_cast(0); Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableType colorLoopStoredEnhancedHue = static_cast(0); - Attributes::ColorCapabilities::TypeInfo::DecodableType colorCapabilities = static_cast(0); + Attributes::ColorCapabilities::TypeInfo::DecodableType colorCapabilities = + static_cast>(0); Attributes::ColorTempPhysicalMinMireds::TypeInfo::DecodableType colorTempPhysicalMinMireds = static_cast(0); Attributes::ColorTempPhysicalMaxMireds::TypeInfo::DecodableType colorTempPhysicalMaxMireds = static_cast(0); Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableType coupleColorTempToLevelMinMireds = diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 57259e33d69d44..add8258f1e9db3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -23695,16 +23695,17 @@ void registerClusterColorControl(Commands & commands, CredentialIssuerCommands * WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-y", 0, UINT16_MAX, Attributes::CurrentY::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "drift-compensation", 0, UINT8_MAX, Attributes::DriftCompensation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "drift-compensation", 0, UINT8_MAX, Attributes::DriftCompensation::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "compensation-text", Attributes::CompensationText::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "color-temperature-mireds", 0, UINT16_MAX, Attributes::ColorTemperatureMireds::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "color-mode", 0, UINT8_MAX, Attributes::ColorMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "options", 0, UINT8_MAX, Attributes::Options::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique>( + Id, "color-mode", 0, UINT8_MAX, Attributes::ColorMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "options", 0, UINT8_MAX, Attributes::Options::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>(Id, "number-of-primaries", 0, UINT8_MAX, Attributes::NumberOfPrimaries::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -23777,8 +23778,9 @@ void registerClusterColorControl(Commands & commands, CredentialIssuerCommands * WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "enhanced-current-hue", 0, UINT16_MAX, Attributes::EnhancedCurrentHue::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "enhanced-color-mode", 0, UINT8_MAX, Attributes::EnhancedColorMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "enhanced-color-mode", 0, UINT8_MAX, Attributes::EnhancedColorMode::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "color-loop-active", 0, UINT8_MAX, Attributes::ColorLoopActive::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "color-loop-direction", 0, UINT8_MAX, Attributes::ColorLoopDirection::Id, @@ -23791,8 +23793,9 @@ void registerClusterColorControl(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "color-loop-stored-enhanced-hue", 0, UINT16_MAX, Attributes::ColorLoopStoredEnhancedHue::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "color-capabilities", 0, UINT16_MAX, Attributes::ColorCapabilities::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "color-capabilities", 0, UINT16_MAX, Attributes::ColorCapabilities::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "color-temp-physical-min-mireds", 0, UINT16_MAX, Attributes::ColorTempPhysicalMinMireds::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // 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 aa122cb62da046..12382e3cb41495 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -15550,7 +15550,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("CurrentY", 1, value); } case ColorControl::Attributes::DriftCompensation::Id: { - uint8_t value; + chip::app::Clusters::ColorControl::DriftCompensationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("DriftCompensation", 1, value); } @@ -15565,12 +15565,12 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ColorTemperatureMireds", 1, value); } case ColorControl::Attributes::ColorMode::Id: { - uint8_t value; + chip::app::Clusters::ColorControl::ColorModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ColorMode", 1, value); } case ColorControl::Attributes::Options::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Options", 1, value); } @@ -15730,7 +15730,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("EnhancedCurrentHue", 1, value); } case ColorControl::Attributes::EnhancedColorMode::Id: { - uint8_t value; + chip::app::Clusters::ColorControl::EnhancedColorModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EnhancedColorMode", 1, value); } @@ -15760,7 +15760,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ColorLoopStoredEnhancedHue", 1, value); } case ColorControl::Attributes::ColorCapabilities::Id: { - uint16_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ColorCapabilities", 1, value); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index a61f2a6fa6b27e..004bb29c546d1e 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -117680,8 +117680,8 @@ class ColorControlMoveToHue : public ClusterCommand { params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -117733,8 +117733,8 @@ class ColorControlMoveHue : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -117788,8 +117788,8 @@ class ColorControlStepHue : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -117841,8 +117841,8 @@ class ColorControlMoveToSaturation : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -117894,8 +117894,8 @@ class ColorControlMoveSaturation : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -117949,8 +117949,8 @@ class ColorControlStepSaturation : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118004,8 +118004,8 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118059,8 +118059,8 @@ class ColorControlMoveToColor : public ClusterCommand { params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118112,8 +118112,8 @@ class ColorControlMoveColor : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.rateX = [NSNumber numberWithShort:mRequest.rateX]; params.rateY = [NSNumber numberWithShort:mRequest.rateY]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118167,8 +118167,8 @@ class ColorControlStepColor : public ClusterCommand { params.stepX = [NSNumber numberWithShort:mRequest.stepX]; params.stepY = [NSNumber numberWithShort:mRequest.stepY]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118220,8 +118220,8 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118275,8 +118275,8 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118328,8 +118328,8 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118383,8 +118383,8 @@ class ColorControlEnhancedStepHue : public ClusterCommand { params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118438,8 +118438,8 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118497,8 +118497,8 @@ class ColorControlColorLoopSet : public ClusterCommand { params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118546,8 +118546,8 @@ class ColorControlStopMoveStep : public ClusterCommand { __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118603,8 +118603,8 @@ class ColorControlMoveColorTemperature : public ClusterCommand { params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -118662,8 +118662,8 @@ class ColorControlStepColorTemperature : public ClusterCommand { params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) {