Skip to content

Commit

Permalink
Enable Media Struct Atributes on chip tool (#14841)
Browse files Browse the repository at this point in the history
* Enable attributes & fix unnecessary value in zapt

* Run zap regen script
  • Loading branch information
lazarkov authored and pull[bot] committed Sep 7, 2023
1 parent 6b22311 commit 3495206
Show file tree
Hide file tree
Showing 11 changed files with 471 additions and 89 deletions.
21 changes: 21 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,18 @@ client cluster ApplicationLauncher = 1292 {
kLineupInfo = 0x2;
}

struct ApplicationEP {
Application application = 0;
CHAR_STRING endpoint = 1;
}

struct Application {
INT16U catalogVendorId = 0;
CHAR_STRING applicationId = 1;
}

readonly attribute INT16U applicationLauncherList[] = 0;
attribute ApplicationEP applicationLauncherApp = 1;
readonly global attribute command_id serverGeneratedCommandList[] = 65528;
readonly global attribute command_id clientGeneratedCommandList[] = 65529;
readonly global attribute attrib_id attributeList[] = 65531;
Expand Down Expand Up @@ -567,7 +573,16 @@ client cluster Channel = 1284 {
CHAR_STRING<32> affiliateCallSign = 4;
}

struct LineupInfo {
CHAR_STRING operatorName = 0;
CHAR_STRING lineupName = 1;
CHAR_STRING postalCode = 2;
LineupInfoTypeEnum lineupInfoType = 3;
}

readonly attribute ChannelInfo channelList[] = 0;
attribute LineupInfo channelLineup = 1;
attribute ChannelInfo currentChannel = 2;
readonly global attribute command_id serverGeneratedCommandList[] = 65528;
readonly global attribute command_id clientGeneratedCommandList[] = 65529;
readonly global attribute attrib_id attributeList[] = 65531;
Expand Down Expand Up @@ -2291,9 +2306,15 @@ client cluster MediaPlayback = 1286 {
kSeekOutOfRange = 5;
}

struct PlaybackPosition {
INT64U updatedAt = 0;
INT64U position = 1;
}

readonly attribute PlaybackStateEnum playbackState = 0;
readonly attribute epoch_us startTime = 1;
readonly attribute int64u duration = 2;
attribute PlaybackPosition position = 3;
readonly attribute single playbackSpeed = 4;
readonly attribute int64u seekRangeEnd = 5;
readonly attribute int64u seekRangeStart = 6;
Expand Down
19 changes: 10 additions & 9 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8015,7 +8015,7 @@
],
"attributes": [
{
"name": "groupKeyMap",
"name": "GroupKeyMap",
"code": 0,
"mfgCode": null,
"side": "server",
Expand All @@ -8030,7 +8030,7 @@
"reportableChange": 0
},
{
"name": "groupTable",
"name": "GroupTable",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -8045,7 +8045,7 @@
"reportableChange": 0
},
{
"name": "maxGroupsPerFabric",
"name": "MaxGroupsPerFabric",
"code": 2,
"mfgCode": null,
"side": "server",
Expand All @@ -8060,7 +8060,7 @@
"reportableChange": 0
},
{
"name": "maxGroupKeysPerFabric",
"name": "MaxGroupKeysPerFabric",
"code": 3,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -14085,7 +14085,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"included": 0,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
Expand All @@ -14100,7 +14100,7 @@
"code": 2,
"mfgCode": null,
"side": "server",
"included": 0,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
Expand Down Expand Up @@ -14560,7 +14560,7 @@
"code": 3,
"mfgCode": null,
"side": "server",
"included": 0,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
Expand Down Expand Up @@ -15624,7 +15624,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"included": 0,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
Expand Down Expand Up @@ -17946,5 +17946,6 @@
"endpointVersion": 1,
"deviceIdentifier": 22
}
]
],
"log": []
}
1 change: 0 additions & 1 deletion src/controller/java/templates/partials/decode_value.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if ({{source}}.IsNull()) {
ChipLogError(Zcl, "Could not find class ChipStructs${{cluster}}Cluster{{asUpperCamelCase type}}");
return {{earlyReturn}};
}
chip::JniClass structJniClass({{asLowerCamelCase type}}StructClass);
jmethodID {{asLowerCamelCase type}}StructCtor = env->GetMethodID({{asLowerCamelCase type}}StructClass, "<init>"
, "({{#zcl_struct_items_by_struct_name type}}{{asJniSignature type null ../cluster true}}{{/zcl_struct_items_by_struct_name}})V");
if ({{asLowerCamelCase type}}StructCtor == nullptr) {
Expand Down
Loading

0 comments on commit 3495206

Please sign in to comment.