diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index b893f790792eb5..e2db6276265c91 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2007,6 +2007,99 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for passing messages to be presented by a device. */ +cluster Messages = 151 { + revision 3; + + enum FutureMessagePreferenceEnum : enum8 { + kAllowed = 0; + kIncreased = 1; + kReduced = 2; + kDisallowed = 3; + kBanned = 4; + } + + enum MessagePriorityEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kCritical = 3; + } + + bitmap Feature : bitmap32 { + kReceivedConfirmation = 0x1; + kConfirmationResponse = 0x2; + kConfirmationReply = 0x4; + kProtectedMessages = 0x8; + } + + bitmap MessageControlBitmap : bitmap8 { + kConfirmationRequired = 0x1; + kResponseRequired = 0x2; + kReplyMessage = 0x4; + kMessageConfirmed = 0x8; + kMessageProtected = 0x10; + } + + struct MessageResponseOptionStruct { + optional int32u messageResponseID = 0; + optional char_string<32> label = 1; + } + + struct MessageStruct { + octet_string<16> messageID = 0; + MessagePriorityEnum priority = 1; + MessageControlBitmap messageControl = 2; + nullable epoch_s startTime = 3; + nullable int16u duration = 4; + char_string<256> messageText = 5; + optional MessageResponseOptionStruct responses[] = 6; + } + + info event MessageQueued = 0 { + octet_string messageID = 0; + } + + info event MessagePresented = 1 { + octet_string messageID = 0; + } + + info event MessageComplete = 2 { + octet_string messageID = 0; + optional nullable int32u responseID = 1; + optional nullable char_string reply = 2; + nullable FutureMessagePreferenceEnum futureMessagesPreference = 3; + } + + readonly attribute MessageStruct messages[] = 0; + readonly attribute octet_string activeMessageIDs[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct PresentMessagesRequestRequest { + octet_string<16> messageID = 0; + MessagePriorityEnum priority = 1; + MessageControlBitmap messageControl = 2; + nullable epoch_s startTime = 3; + nullable int16u duration = 4; + char_string<256> messageText = 5; + optional MessageResponseOptionStruct responses[] = 6; + } + + request struct CancelMessagesRequestRequest { + octet_string messageIDs[] = 0; + } + + /** Command for requesting messages be presented */ + fabric command PresentMessagesRequest(PresentMessagesRequestRequest): DefaultSuccess = 0; + /** Command for cancelling message present requests */ + fabric command CancelMessagesRequest(CancelMessagesRequestRequest): DefaultSuccess = 1; +} + /** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ cluster RelativeHumidityMeasurement = 1029 { revision 3; @@ -3433,6 +3526,23 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster Messages { + emits event MessageQueued; + emits event MessagePresented; + emits event MessageComplete; + callback attribute messages; + callback attribute activeMessageIDs; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + + handle command PresentMessagesRequest; + handle command CancelMessagesRequest; + } + server cluster WakeOnLan { ram attribute MACAddress; ram attribute featureMap default = 0; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 955307dbf00c31..242fbba690931a 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -4691,6 +4691,185 @@ } ] }, + { + "name": "Messages", + "code": 151, + "mfgCode": null, + "define": "MESSAGES_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "PresentMessagesRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelMessagesRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Messages", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveMessageIDs", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "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": "EventList", + "code": 65530, + "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": "0", + "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": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "MessageQueued", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MessagePresented", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MessageComplete", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, { "name": "Wake on LAN", "code": 1283, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 16c934e5095488..50cf171b046f8c 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1485,6 +1485,99 @@ cluster FixedLabel = 64 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for passing messages to be presented by a device. */ +cluster Messages = 151 { + revision 3; + + enum FutureMessagePreferenceEnum : enum8 { + kAllowed = 0; + kIncreased = 1; + kReduced = 2; + kDisallowed = 3; + kBanned = 4; + } + + enum MessagePriorityEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kCritical = 3; + } + + bitmap Feature : bitmap32 { + kReceivedConfirmation = 0x1; + kConfirmationResponse = 0x2; + kConfirmationReply = 0x4; + kProtectedMessages = 0x8; + } + + bitmap MessageControlBitmap : bitmap8 { + kConfirmationRequired = 0x1; + kResponseRequired = 0x2; + kReplyMessage = 0x4; + kMessageConfirmed = 0x8; + kMessageProtected = 0x10; + } + + struct MessageResponseOptionStruct { + optional int32u messageResponseID = 0; + optional char_string<32> label = 1; + } + + struct MessageStruct { + octet_string<16> messageID = 0; + MessagePriorityEnum priority = 1; + MessageControlBitmap messageControl = 2; + nullable epoch_s startTime = 3; + nullable int16u duration = 4; + char_string<256> messageText = 5; + optional MessageResponseOptionStruct responses[] = 6; + } + + info event MessageQueued = 0 { + octet_string messageID = 0; + } + + info event MessagePresented = 1 { + octet_string messageID = 0; + } + + info event MessageComplete = 2 { + octet_string messageID = 0; + optional nullable int32u responseID = 1; + optional nullable char_string reply = 2; + nullable FutureMessagePreferenceEnum futureMessagesPreference = 3; + } + + readonly attribute MessageStruct messages[] = 0; + readonly attribute octet_string activeMessageIDs[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct PresentMessagesRequestRequest { + octet_string<16> messageID = 0; + MessagePriorityEnum priority = 1; + MessageControlBitmap messageControl = 2; + nullable epoch_s startTime = 3; + nullable int16u duration = 4; + char_string<256> messageText = 5; + optional MessageResponseOptionStruct responses[] = 6; + } + + request struct CancelMessagesRequestRequest { + octet_string messageIDs[] = 0; + } + + /** Command for requesting messages be presented */ + fabric command PresentMessagesRequest(PresentMessagesRequestRequest): DefaultSuccess = 0; + /** Command for cancelling message present requests */ + fabric command CancelMessagesRequest(CancelMessagesRequestRequest): DefaultSuccess = 1; +} + /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ cluster WakeOnLan = 1283 { revision 1; @@ -2763,6 +2856,7 @@ endpoint 1 { binding cluster OnOff; binding cluster LevelControl; binding cluster Descriptor; + binding cluster Messages; binding cluster WakeOnLan; binding cluster Channel; binding cluster TargetNavigator; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 2bb394da30433d..955ef18532ce02 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -3585,6 +3585,66 @@ } ] }, + { + "name": "Messages", + "code": 151, + "mfgCode": null, + "define": "MESSAGES_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "PresentMessagesRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CancelMessagesRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Wake on LAN", "code": 1283,