Skip to content

Commit

Permalink
[TV SDK] Enable media commands (project-chip#9429)
Browse files Browse the repository at this point in the history
* Enable media attributes

* Run zap regen command

* Add media playback attributes to all-clusters app so tests can pass

* Run zap_regen tool to generate code
  • Loading branch information
lazarkov authored Sep 17, 2021
1 parent 4275e88 commit 3516a1d
Show file tree
Hide file tree
Showing 22 changed files with 1,769 additions and 133 deletions.
123 changes: 122 additions & 1 deletion examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -12624,6 +12624,126 @@
}
],
"attributes": [
{
"name": "playback state",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "start time",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "duration",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "position updated at",
"code": 3,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "position",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "playback speed",
"code": 5,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "seek range end",
"code": 6,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "seek range start",
"code": 7,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down Expand Up @@ -17387,5 +17507,6 @@
"endpointVersion": null,
"deviceIdentifier": null
}
]
],
"log": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ limitations under the License.
<attribute side="server" code="0x0000" define="MEDIA_PLAYBACK_STATE" type="ENUM8" min="0x00" max="0x02" writable="false" default="0x00" optional="true">playback state</attribute>
<attribute side="server" code="0x0001" define="MEDIA_PLAYBACK_START_TIME" type="INT64U" min="0x00" writable="false" default="0xFF" optional="true">start time</attribute>
<attribute side="server" code="0x0002" define="MEDIA_PLAYBACK_DURATION" type="INT64U" min="0x00" writable="false" optional="true">duration</attribute>
<attribute side="server" code="0x0003" define="MEDIA_PLAYBACK_PLAYBACK_POSITION_UPDATED_AT" type="INT64U" min="0x00" writable="false" optional="true">updated at</attribute>
<attribute side="server" code="0x0004" define="MEDIA_PLAYBACK_PLAYBACK_POSITION" type="INT64U" min="0x00" writable="false" optional="true">posistion</attribute>
<attribute side="server" code="0x0003" define="MEDIA_PLAYBACK_PLAYBACK_POSITION_UPDATED_AT" type="INT64U" min="0x00" writable="false" optional="true">position updated at</attribute>
<attribute side="server" code="0x0004" define="MEDIA_PLAYBACK_PLAYBACK_POSITION" type="INT64U" min="0x00" writable="false" optional="true">position</attribute>
<!-- TODO: Convert to single once it is supported -->
<attribute side="server" code="0x0005" define="MEDIA_PLAYBACK_PLAYBACK_SPEED" type="INT64U" min="0x00" writable="false" optional="true">playback speed</attribute>
<attribute side="server" code="0x0006" define="MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_END" type="INT64U" min="0x00" writable="false" optional="true">seek range end</attribute>
Expand Down
120 changes: 120 additions & 0 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8344,6 +8344,126 @@
}
],
"attributes": [
{
"name": "playback state",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "start time",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0xFF",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "duration",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "position updated at",
"code": 3,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "position",
"code": 4,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "playback speed",
"code": 5,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "seek range end",
"code": 6,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "seek range start",
"code": 7,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down
Loading

0 comments on commit 3516a1d

Please sign in to comment.