Skip to content

Commit

Permalink
Fixed wrong datamodel in Level Cluster
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
  • Loading branch information
jsloth committed Nov 17, 2022
1 parent cf45410 commit 0a4b0fb
Show file tree
Hide file tree
Showing 38 changed files with 823 additions and 602 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
39 changes: 22 additions & 17 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
39 changes: 22 additions & 17 deletions examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 0a4b0fb

Please sign in to comment.