Skip to content

Commit

Permalink
Enabled atributes & commands on media playback endpoint (#18762)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov authored and pull[bot] committed Feb 5, 2024
1 parent c73489c commit 5301345
Show file tree
Hide file tree
Showing 3 changed files with 448 additions and 85 deletions.
15 changes: 15 additions & 0 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,9 @@ server cluster MediaPlayback = 1286 {
readonly attribute single playbackSpeed = 4;
readonly attribute nullable int64u seekRangeEnd = 5;
readonly attribute nullable int64u seekRangeStart = 6;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -2344,6 +2347,18 @@ endpoint 1 {
}

server cluster MediaPlayback {
ram attribute currentState;
ram attribute startTime;
ram attribute duration;
callback attribute sampledPosition;
ram attribute playbackSpeed;
ram attribute seekRangeEnd;
ram attribute seekRangeStart;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0x003;
ram attribute clusterRevision default = 1;
}

server cluster MediaInput {
Expand Down
307 changes: 299 additions & 8 deletions examples/tv-app/tv-common/tv-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8377,7 +8377,96 @@
"define": "MEDIA_PLAYBACK_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"commands": [
{
"name": "Play",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "Pause",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "StopPlayback",
"code": 2,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "StartOver",
"code": 3,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "Previous",
"code": 4,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "Next",
"code": 5,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "Rewind",
"code": 6,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "FastForward",
"code": 7,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "SkipForward",
"code": 8,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "SkipBackward",
"code": 9,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
},
{
"name": "Seek",
"code": 11,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": []
},
{
Expand All @@ -8387,8 +8476,210 @@
"define": "MEDIA_PLAYBACK_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": []
"commands": [
{
"name": "PlaybackResponse",
"code": 10,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
}
],
"attributes": [
{
"name": "CurrentState",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "PlaybackStateEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "StartTime",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "epoch_us",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "Duration",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int64u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SampledPosition",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "PlaybackPosition",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "PlaybackSpeed",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "single",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SeekRangeEnd",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "int64u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SeekRangeStart",
"code": 6,
"mfgCode": null,
"side": "server",
"type": "int64u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x003",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Media Input",
Expand Down Expand Up @@ -8998,7 +9289,7 @@
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand Down Expand Up @@ -9030,7 +9321,7 @@
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand All @@ -9046,7 +9337,7 @@
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand All @@ -9062,7 +9353,7 @@
"side": "server",
"type": "array",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand Down Expand Up @@ -10826,7 +11117,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Loading

0 comments on commit 5301345

Please sign in to comment.