Skip to content

Commit 1f3675c

Browse files
authored
TV Matter Media: Updated existing cluster to resolve the issue project-chip#31320 (project-chip#31865)
* Update TV & TV Casting App ZAPs * Update Matter files
1 parent 849f882 commit 1f3675c

File tree

4 files changed

+455
-12
lines changed

4 files changed

+455
-12
lines changed

examples/tv-app/tv-common/tv-app.matter

+110
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,99 @@ cluster UserLabel = 65 {
20072007
readonly attribute int16u clusterRevision = 65533;
20082008
}
20092009

2010+
/** This cluster provides an interface for passing messages to be presented by a device. */
2011+
cluster Messages = 151 {
2012+
revision 3;
2013+
2014+
enum FutureMessagePreferenceEnum : enum8 {
2015+
kAllowed = 0;
2016+
kIncreased = 1;
2017+
kReduced = 2;
2018+
kDisallowed = 3;
2019+
kBanned = 4;
2020+
}
2021+
2022+
enum MessagePriorityEnum : enum8 {
2023+
kLow = 0;
2024+
kMedium = 1;
2025+
kHigh = 2;
2026+
kCritical = 3;
2027+
}
2028+
2029+
bitmap Feature : bitmap32 {
2030+
kReceivedConfirmation = 0x1;
2031+
kConfirmationResponse = 0x2;
2032+
kConfirmationReply = 0x4;
2033+
kProtectedMessages = 0x8;
2034+
}
2035+
2036+
bitmap MessageControlBitmap : bitmap8 {
2037+
kConfirmationRequired = 0x1;
2038+
kResponseRequired = 0x2;
2039+
kReplyMessage = 0x4;
2040+
kMessageConfirmed = 0x8;
2041+
kMessageProtected = 0x10;
2042+
}
2043+
2044+
struct MessageResponseOptionStruct {
2045+
optional int32u messageResponseID = 0;
2046+
optional char_string<32> label = 1;
2047+
}
2048+
2049+
struct MessageStruct {
2050+
octet_string<16> messageID = 0;
2051+
MessagePriorityEnum priority = 1;
2052+
MessageControlBitmap messageControl = 2;
2053+
nullable epoch_s startTime = 3;
2054+
nullable int16u duration = 4;
2055+
char_string<256> messageText = 5;
2056+
optional MessageResponseOptionStruct responses[] = 6;
2057+
}
2058+
2059+
info event MessageQueued = 0 {
2060+
octet_string messageID = 0;
2061+
}
2062+
2063+
info event MessagePresented = 1 {
2064+
octet_string messageID = 0;
2065+
}
2066+
2067+
info event MessageComplete = 2 {
2068+
octet_string messageID = 0;
2069+
optional nullable int32u responseID = 1;
2070+
optional nullable char_string reply = 2;
2071+
nullable FutureMessagePreferenceEnum futureMessagesPreference = 3;
2072+
}
2073+
2074+
readonly attribute MessageStruct messages[] = 0;
2075+
readonly attribute octet_string activeMessageIDs[] = 1;
2076+
readonly attribute command_id generatedCommandList[] = 65528;
2077+
readonly attribute command_id acceptedCommandList[] = 65529;
2078+
readonly attribute event_id eventList[] = 65530;
2079+
readonly attribute attrib_id attributeList[] = 65531;
2080+
readonly attribute bitmap32 featureMap = 65532;
2081+
readonly attribute int16u clusterRevision = 65533;
2082+
2083+
request struct PresentMessagesRequestRequest {
2084+
octet_string<16> messageID = 0;
2085+
MessagePriorityEnum priority = 1;
2086+
MessageControlBitmap messageControl = 2;
2087+
nullable epoch_s startTime = 3;
2088+
nullable int16u duration = 4;
2089+
char_string<256> messageText = 5;
2090+
optional MessageResponseOptionStruct responses[] = 6;
2091+
}
2092+
2093+
request struct CancelMessagesRequestRequest {
2094+
octet_string messageIDs[] = 0;
2095+
}
2096+
2097+
/** Command for requesting messages be presented */
2098+
fabric command PresentMessagesRequest(PresentMessagesRequestRequest): DefaultSuccess = 0;
2099+
/** Command for cancelling message present requests */
2100+
fabric command CancelMessagesRequest(CancelMessagesRequestRequest): DefaultSuccess = 1;
2101+
}
2102+
20102103
/** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */
20112104
cluster RelativeHumidityMeasurement = 1029 {
20122105
revision 3;
@@ -3433,6 +3526,23 @@ endpoint 1 {
34333526
callback attribute clusterRevision;
34343527
}
34353528

3529+
server cluster Messages {
3530+
emits event MessageQueued;
3531+
emits event MessagePresented;
3532+
emits event MessageComplete;
3533+
callback attribute messages;
3534+
callback attribute activeMessageIDs;
3535+
callback attribute generatedCommandList;
3536+
callback attribute acceptedCommandList;
3537+
callback attribute eventList;
3538+
callback attribute attributeList;
3539+
ram attribute featureMap default = 0;
3540+
ram attribute clusterRevision default = 3;
3541+
3542+
handle command PresentMessagesRequest;
3543+
handle command CancelMessagesRequest;
3544+
}
3545+
34363546
server cluster WakeOnLan {
34373547
ram attribute MACAddress;
34383548
ram attribute featureMap default = 0;

examples/tv-app/tv-common/tv-app.zap

+185-6
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
}
1818
],
1919
"package": [
20+
{
21+
"pathRelativity": "relativeToZap",
22+
"path": "../../../src/app/zap-templates/app-templates.json",
23+
"type": "gen-templates-json",
24+
"version": "chip-v1"
25+
},
2026
{
2127
"pathRelativity": "relativeToZap",
2228
"path": "../../../src/app/zap-templates/zcl/zcl.json",
2329
"type": "zcl-properties",
2430
"category": "matter",
2531
"version": 1,
2632
"description": "Matter SDK ZCL data"
27-
},
28-
{
29-
"pathRelativity": "relativeToZap",
30-
"path": "../../../src/app/zap-templates/app-templates.json",
31-
"type": "gen-templates-json",
32-
"version": "chip-v1"
3333
}
3434
],
3535
"endpointTypes": [
@@ -4691,6 +4691,185 @@
46914691
}
46924692
]
46934693
},
4694+
{
4695+
"name": "Messages",
4696+
"code": 151,
4697+
"mfgCode": null,
4698+
"define": "MESSAGES_CLUSTER",
4699+
"side": "server",
4700+
"enabled": 1,
4701+
"commands": [
4702+
{
4703+
"name": "PresentMessagesRequest",
4704+
"code": 0,
4705+
"mfgCode": null,
4706+
"source": "client",
4707+
"isIncoming": 1,
4708+
"isEnabled": 1
4709+
},
4710+
{
4711+
"name": "CancelMessagesRequest",
4712+
"code": 1,
4713+
"mfgCode": null,
4714+
"source": "client",
4715+
"isIncoming": 1,
4716+
"isEnabled": 1
4717+
}
4718+
],
4719+
"attributes": [
4720+
{
4721+
"name": "Messages",
4722+
"code": 0,
4723+
"mfgCode": null,
4724+
"side": "server",
4725+
"type": "array",
4726+
"included": 1,
4727+
"storageOption": "External",
4728+
"singleton": 0,
4729+
"bounded": 0,
4730+
"defaultValue": "",
4731+
"reportable": 1,
4732+
"minInterval": 1,
4733+
"maxInterval": 65534,
4734+
"reportableChange": 0
4735+
},
4736+
{
4737+
"name": "ActiveMessageIDs",
4738+
"code": 1,
4739+
"mfgCode": null,
4740+
"side": "server",
4741+
"type": "array",
4742+
"included": 1,
4743+
"storageOption": "External",
4744+
"singleton": 0,
4745+
"bounded": 0,
4746+
"defaultValue": "",
4747+
"reportable": 1,
4748+
"minInterval": 1,
4749+
"maxInterval": 65534,
4750+
"reportableChange": 0
4751+
},
4752+
{
4753+
"name": "GeneratedCommandList",
4754+
"code": 65528,
4755+
"mfgCode": null,
4756+
"side": "server",
4757+
"type": "array",
4758+
"included": 1,
4759+
"storageOption": "External",
4760+
"singleton": 0,
4761+
"bounded": 0,
4762+
"defaultValue": "",
4763+
"reportable": 1,
4764+
"minInterval": 1,
4765+
"maxInterval": 65534,
4766+
"reportableChange": 0
4767+
},
4768+
{
4769+
"name": "AcceptedCommandList",
4770+
"code": 65529,
4771+
"mfgCode": null,
4772+
"side": "server",
4773+
"type": "array",
4774+
"included": 1,
4775+
"storageOption": "External",
4776+
"singleton": 0,
4777+
"bounded": 0,
4778+
"defaultValue": "",
4779+
"reportable": 1,
4780+
"minInterval": 1,
4781+
"maxInterval": 65534,
4782+
"reportableChange": 0
4783+
},
4784+
{
4785+
"name": "EventList",
4786+
"code": 65530,
4787+
"mfgCode": null,
4788+
"side": "server",
4789+
"type": "array",
4790+
"included": 1,
4791+
"storageOption": "External",
4792+
"singleton": 0,
4793+
"bounded": 0,
4794+
"defaultValue": "",
4795+
"reportable": 1,
4796+
"minInterval": 1,
4797+
"maxInterval": 65534,
4798+
"reportableChange": 0
4799+
},
4800+
{
4801+
"name": "AttributeList",
4802+
"code": 65531,
4803+
"mfgCode": null,
4804+
"side": "server",
4805+
"type": "array",
4806+
"included": 1,
4807+
"storageOption": "External",
4808+
"singleton": 0,
4809+
"bounded": 0,
4810+
"defaultValue": "",
4811+
"reportable": 1,
4812+
"minInterval": 1,
4813+
"maxInterval": 65534,
4814+
"reportableChange": 0
4815+
},
4816+
{
4817+
"name": "FeatureMap",
4818+
"code": 65532,
4819+
"mfgCode": null,
4820+
"side": "server",
4821+
"type": "bitmap32",
4822+
"included": 1,
4823+
"storageOption": "RAM",
4824+
"singleton": 0,
4825+
"bounded": 0,
4826+
"defaultValue": "0",
4827+
"reportable": 1,
4828+
"minInterval": 1,
4829+
"maxInterval": 65534,
4830+
"reportableChange": 0
4831+
},
4832+
{
4833+
"name": "ClusterRevision",
4834+
"code": 65533,
4835+
"mfgCode": null,
4836+
"side": "server",
4837+
"type": "int16u",
4838+
"included": 1,
4839+
"storageOption": "RAM",
4840+
"singleton": 0,
4841+
"bounded": 0,
4842+
"defaultValue": "3",
4843+
"reportable": 1,
4844+
"minInterval": 1,
4845+
"maxInterval": 65534,
4846+
"reportableChange": 0
4847+
}
4848+
],
4849+
"events": [
4850+
{
4851+
"name": "MessageQueued",
4852+
"code": 0,
4853+
"mfgCode": null,
4854+
"side": "server",
4855+
"included": 1
4856+
},
4857+
{
4858+
"name": "MessagePresented",
4859+
"code": 1,
4860+
"mfgCode": null,
4861+
"side": "server",
4862+
"included": 1
4863+
},
4864+
{
4865+
"name": "MessageComplete",
4866+
"code": 2,
4867+
"mfgCode": null,
4868+
"side": "server",
4869+
"included": 1
4870+
}
4871+
]
4872+
},
46944873
{
46954874
"name": "Wake on LAN",
46964875
"code": 1283,

0 commit comments

Comments
 (0)