Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed wrong datamodel in Level Cluster (#23656)
Browse files Browse the repository at this point in the history
Added: Cluster code to LevelControlOptions Bitmap
Fixed: LevelControlOptions was defined wrong as Enum, Changed it to a Bitmap
Changed/Fixed: Level Cluster Attribute 15 (OPTIONS) datatype from BITMAP8 to LevelControlOptions (Bitmap8) type
Changed/Fixed: Level Command datatype for 'OptionsMask' and 'OptionsOverride' from BITMAP8 to LevelControlOptions
jsloth authored and pull[bot] committed Aug 3, 2023
1 parent d16e9e5 commit 4222225
Showing 41 changed files with 842 additions and 611 deletions.
Original file line number Diff line number Diff line change
@@ -300,14 +300,19 @@ server cluster LevelControl = 8 {
kFrequency = 0x4;
}

bitmap LevelControlOptions : BITMAP8 {
kExecuteIfOff = 0x1;
kCoupleColorTempToLevel = 0x2;
}

readonly attribute nullable int8u currentLevel = 0;
readonly attribute int16u remainingTime = 1;
readonly attribute int8u minLevel = 2;
readonly attribute int8u maxLevel = 3;
readonly attribute int16u currentFrequency = 4;
readonly attribute int16u minFrequency = 5;
readonly attribute int16u maxFrequency = 6;
attribute bitmap8 options = 15;
attribute LevelControlOptions options = 15;
attribute int16u onOffTransitionTime = 16;
attribute nullable int8u onLevel = 17;
attribute nullable int16u onTransitionTime = 18;
@@ -320,55 +325,55 @@ server cluster LevelControl = 8 {
request struct MoveToLevelRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

request struct MoveToLevelWithOnOffRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveWithOnOffRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepWithOnOffRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopWithOnOffRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0;
Original file line number Diff line number Diff line change
@@ -269,64 +269,69 @@ server cluster LevelControl = 8 {
kFrequency = 0x4;
}

bitmap LevelControlOptions : BITMAP8 {
kExecuteIfOff = 0x1;
kCoupleColorTempToLevel = 0x2;
}

readonly attribute nullable int8u currentLevel = 0;
attribute bitmap8 options = 15;
attribute LevelControlOptions options = 15;
attribute nullable int8u onLevel = 17;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct MoveToLevelRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

request struct MoveToLevelWithOnOffRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveWithOnOffRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepWithOnOffRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopWithOnOffRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0;
39 changes: 22 additions & 17 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
@@ -105,14 +105,19 @@ server cluster LevelControl = 8 {
kFrequency = 0x4;
}

bitmap LevelControlOptions : BITMAP8 {
kExecuteIfOff = 0x1;
kCoupleColorTempToLevel = 0x2;
}

readonly attribute nullable int8u currentLevel = 0;
readonly attribute int16u remainingTime = 1;
readonly attribute int8u minLevel = 2;
readonly attribute int8u maxLevel = 3;
readonly attribute int16u currentFrequency = 4;
readonly attribute int16u minFrequency = 5;
readonly attribute int16u maxFrequency = 6;
attribute bitmap8 options = 15;
attribute LevelControlOptions options = 15;
attribute int16u onOffTransitionTime = 16;
attribute nullable int8u onLevel = 17;
attribute nullable int16u onTransitionTime = 18;
@@ -125,55 +130,55 @@ server cluster LevelControl = 8 {
request struct MoveToLevelRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

request struct MoveToLevelWithOnOffRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveWithOnOffRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepWithOnOffRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopWithOnOffRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0;
39 changes: 22 additions & 17 deletions examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
Original file line number Diff line number Diff line change
@@ -169,11 +169,16 @@ server cluster LevelControl = 8 {
kFrequency = 0x4;
}

bitmap LevelControlOptions : BITMAP8 {
kExecuteIfOff = 0x1;
kCoupleColorTempToLevel = 0x2;
}

readonly attribute nullable int8u currentLevel = 0;
readonly attribute int16u remainingTime = 1;
readonly attribute int8u minLevel = 2;
readonly attribute int8u maxLevel = 3;
attribute bitmap8 options = 15;
attribute LevelControlOptions options = 15;
attribute nullable int8u onLevel = 17;
attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384;
readonly attribute command_id generatedCommandList[] = 65528;
@@ -185,55 +190,55 @@ server cluster LevelControl = 8 {
request struct MoveToLevelRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

request struct MoveToLevelWithOnOffRequest {
INT8U level = 0;
nullable INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct MoveWithOnOffRequest {
MoveMode moveMode = 0;
nullable INT8U rate = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
LevelControlOptions optionsMask = 2;
LevelControlOptions optionsOverride = 3;
}

request struct StepWithOnOffRequest {
StepMode stepMode = 0;
INT8U stepSize = 1;
nullable INT16U transitionTime = 2;
BITMAP8 optionsMask = 3;
BITMAP8 optionsOverride = 4;
LevelControlOptions optionsMask = 3;
LevelControlOptions optionsOverride = 4;
}

request struct StopWithOnOffRequest {
BITMAP8 optionsMask = 0;
BITMAP8 optionsOverride = 1;
LevelControlOptions optionsMask = 0;
LevelControlOptions optionsOverride = 1;
}

command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0;
Loading

0 comments on commit 4222225

Please sign in to comment.