From fa20442efb58108116927352df0f0826d6339c3e Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Wed, 18 Dec 2024 16:37:18 -0700
Subject: [PATCH 1/7] Generated using ./alchemy zap --attribute="in-progress"
... /PushAVStreamTransport.adoc
---
.github/workflows/tests.yaml | 1 +
scripts/rules.matterlint | 1 +
.../chip/push-av-stream-transport-cluster.xml | 229 ++++++++++++++++++
.../zcl/zcl-with-test-extensions.json | 1 +
src/app/zap-templates/zcl/zcl.json | 1 +
src/app/zap_cluster_list.json | 2 +
6 files changed, 235 insertions(+)
create mode 100644 src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 1ed2a01bdbc018..c49559864d5aeb 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -96,6 +96,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
+ src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \
src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \
src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml \
diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint
index 4be932fffa2ccd..069d8b86766f1c 100644
--- a/scripts/rules.matterlint
+++ b/scripts/rules.matterlint
@@ -66,6 +66,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml";
load "../src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml";
diff --git a/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml
new file mode 100644
index 00000000000000..f54912eeba3f64
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Push AV Stream Transport
+ 0x0555
+ PUSH_AV_STREAM_TRANSPORT_CLUSTER
+
+ true
+
+
+
+
+
+ true
+
+ SupportedContainerFormats
+ SupportedIngestMethods
+ CurrentConnections
+
+ This command SHALL allocate a transport and return a PushTransportConnectionID.
+
+
+
+
+
+ This command SHALL be generated in response to an AllocatePushTransport command.
+
+
+
+
+
+
+ This command SHALL be generated to request the Node deallocates the specified transport.
+
+
+
+
+
+ This command is used to request the Node modifies the configuration of the specified push transport.
+
+
+
+
+
+
+ This command SHALL be generated to request the Node modifies the Transport Status of the transport.
+
+
+
+
+
+
+ This command SHALL be generated to request the Node to manually start the specified push transport.
+
+
+
+
+
+
+ This command SHALL return the Stream Options Configuration for the specified push transport.
+
+
+
+
+ This command SHALL be generated in response to a FindTransport command.
+
+
+
+
+
+
+
+ This event SHALL indicate a push transport transmission has begun.
+
+
+
+
+
+
+ This event SHALL indicate a push transport transmission has ended.
+
+
+
+
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index 6aa9408f715c53..2c3a67aee3d069 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -84,6 +84,7 @@
"mode-base-cluster.xml",
"mode-select-cluster.xml",
"mode-select-extensions.xml",
+ "push-av-stream-transport-cluster.xml",
"semantic-tag-namespace-enums.xml",
"network-commissioning-cluster.xml",
"occupancy-sensing-cluster.xml",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 836126d877426f..52933915f01e6f 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -77,6 +77,7 @@
"messages-cluster.xml",
"mode-base-cluster.xml",
"mode-select-cluster.xml",
+ "push-av-stream-transport-cluster.xml",
"semantic-tag-namespace-enums.xml",
"network-commissioning-cluster.xml",
"occupancy-sensing-cluster.xml",
diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json
index 7f9fe4a7dcd25f..ad73f7bb1dac99 100644
--- a/src/app/zap_cluster_list.json
+++ b/src/app/zap_cluster_list.json
@@ -69,6 +69,7 @@
"MESSAGES_CLUSTER": [],
"MODE_SELECT_CLUSTER": [],
"NETWORK_COMMISSIONING_CLUSTER": [],
+ "PUSH_AV_STREAM_TRANSPORT_CLUSTER": [],
"SAMPLE_MEI_CLUSTER": [],
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [],
"OCCUPANCY_SENSING_CLUSTER": [],
@@ -233,6 +234,7 @@
"NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
+ "PUSH_AV_STREAM_TRANSPORT_CLUSTER": [],
"SAMPLE_MEI_CLUSTER": ["sample-mei-server"],
"OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"],
"ON_OFF_CLUSTER": ["on-off-server"],
From 301b202b3adaaa5860eb830719f008e0aca185c6 Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Wed, 18 Dec 2024 16:41:29 -0700
Subject: [PATCH 2/7] Generated with ./scripts/tools/zap_regen_all.py
---
docs/ids_and_codes/zap_clusters.md | 1 +
.../data_model/controller-clusters.matter | 194 +++
.../chip/devicecontroller/ChipClusters.java | 456 ++++++
.../devicecontroller/ChipEventStructs.java | 152 ++
.../chip/devicecontroller/ChipStructs.java | 728 +++++++++
.../devicecontroller/ClusterIDMapping.java | 216 +++
.../devicecontroller/ClusterInfoMapping.java | 281 ++++
.../devicecontroller/ClusterReadMapping.java | 104 ++
.../devicecontroller/ClusterWriteMapping.java | 2 +
...TransportClusterPushTransportBeginEvent.kt | 80 +
...amTransportClusterPushTransportEndEvent.kt | 80 +
.../chip/devicecontroller/cluster/files.gni | 10 +
...nsportClusterCMAFContainerOptionsStruct.kt | 71 +
...mTransportClusterContainerOptionsStruct.kt | 76 +
...amTransportClusterMetadataOptionsStruct.kt | 72 +
...portClusterTransportConfigurationStruct.kt | 75 +
...TransportMotionTriggerTimeControlStruct.kt | 77 +
...mTransportClusterTransportOptionsStruct.kt | 165 ++
...ortClusterTransportTriggerOptionsStruct.kt | 158 ++
...nsportClusterTransportZoneOptionsStruct.kt | 81 +
.../clusters/PushAvStreamTransportCluster.kt | 1166 ++++++++++++++
...TransportClusterPushTransportBeginEvent.kt | 80 +
...amTransportClusterPushTransportEndEvent.kt | 80 +
.../java/matter/controller/cluster/files.gni | 11 +
...nsportClusterCMAFContainerOptionsStruct.kt | 71 +
...mTransportClusterContainerOptionsStruct.kt | 76 +
...amTransportClusterMetadataOptionsStruct.kt | 72 +
...portClusterTransportConfigurationStruct.kt | 75 +
...TransportMotionTriggerTimeControlStruct.kt | 77 +
...mTransportClusterTransportOptionsStruct.kt | 165 ++
...ortClusterTransportTriggerOptionsStruct.kt | 158 ++
...nsportClusterTransportZoneOptionsStruct.kt | 81 +
.../CHIPAttributeTLVValueDecoder.cpp | 174 +++
.../CHIPEventTLVValueDecoder.cpp | 143 ++
.../python/chip/clusters/CHIPClusters.py | 104 ++
.../python/chip/clusters/Objects.py | 574 +++++++
.../MTRAttributeSpecifiedCheck.mm | 36 +
.../MTRAttributeTLVValueDecoder.mm | 63 +
.../CHIP/zap-generated/MTRBaseClusters.h | 172 +++
.../CHIP/zap-generated/MTRBaseClusters.mm | 441 ++++++
.../CHIP/zap-generated/MTRClusterConstants.h | 25 +
.../CHIP/zap-generated/MTRClusterNames.mm | 117 ++
.../CHIP/zap-generated/MTRClusters.h | 49 +
.../CHIP/zap-generated/MTRClusters.mm | 210 +++
.../zap-generated/MTRCommandPayloadsObjc.h | 230 +++
.../zap-generated/MTRCommandPayloadsObjc.mm | 1089 +++++++++++++
.../MTRCommandPayloads_Internal.h | 48 +
.../zap-generated/MTRCommandTimedCheck.mm | 12 +
.../zap-generated/MTREventTLVValueDecoder.mm | 77 +
.../CHIP/zap-generated/MTRStructsObjc.h | 78 +
.../CHIP/zap-generated/MTRStructsObjc.mm | 354 +++++
.../zap-generated/attributes/Accessors.cpp | 205 +++
.../zap-generated/attributes/Accessors.h | 40 +
.../app-common/zap-generated/callback.h | 79 +
.../zap-generated/cluster-enums-check.h | 91 ++
.../app-common/zap-generated/cluster-enums.h | 113 ++
.../zap-generated/cluster-objects.cpp | 845 +++++++++++
.../zap-generated/cluster-objects.h | 723 +++++++++
.../app-common/zap-generated/ids/Attributes.h | 38 +
.../app-common/zap-generated/ids/Clusters.h | 3 +
.../app-common/zap-generated/ids/Commands.h | 38 +
.../app-common/zap-generated/ids/Events.h | 14 +
.../zap-generated/cluster/Commands.h | 341 +++++
.../cluster/logging/EntryToText.cpp | 55 +
.../zap-generated/cluster/Commands.h | 1342 +++++++++++++++++
65 files changed, 13114 insertions(+)
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/clusters/PushAvStreamTransportCluster.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt
diff --git a/docs/ids_and_codes/zap_clusters.md b/docs/ids_and_codes/zap_clusters.md
index a805a9436c29dd..7be5b8a45ef672 100644
--- a/docs/ids_and_codes/zap_clusters.md
+++ b/docs/ids_and_codes/zap_clusters.md
@@ -134,6 +134,7 @@ Generally regenerate using one of:
| 1362 | 0x552 | CameraAvSettingsUserLevelManagement |
| 1363 | 0x553 | WebRTCTransportProvider |
| 1364 | 0x554 | WebRTCTransportRequestor |
+| 1365 | 0x555 | PushAvStreamTransport |
| 1366 | 0x556 | Chime |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 492c4c50b706c8..e193bb343e728f 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -10139,6 +10139,200 @@ provisional cluster WebRTCTransportRequestor = 1364 {
command End(EndRequest): DefaultSuccess = 4;
}
+/** */
+cluster PushAvStreamTransport = 1365 {
+ revision 1;
+
+ enum ContainerFormatEnum : enum8 {
+ kCMAF = 0;
+ }
+
+ enum IngestMethodsEnum : enum8 {
+ kCMAFIngest = 0;
+ }
+
+ enum StatusCodeEnum : enum8 {
+ kAllocationNotPermitted = 2;
+ kInvalidTLSEndpoint = 3;
+ kInvalidStream = 4;
+ kInvalidURL = 5;
+ kInvalidZone = 6;
+ kUnsupportedContainerFormat = 7;
+ kUnsupportedIngestMethod = 8;
+ kInvalidTriggerType = 9;
+ kInvalidTransportStatus = 16;
+ }
+
+ enum StreamMultiplexingEnum : enum8 {
+ kInterleaved = 0;
+ }
+
+ enum StreamTypeEnum : enum8 {
+ kInternal = 0;
+ kRecording = 1;
+ kAnalysis = 2;
+ kLiveView = 3;
+ }
+
+ enum TransportStatusEnum : enum8 {
+ kActive = 0;
+ kInactive = 1;
+ }
+
+ enum TransportTriggerTypeEnum : enum8 {
+ kCommand = 0;
+ kMotion = 1;
+ kContinuous = 2;
+ }
+
+ enum TriggerActivationReasonEnum : enum8 {
+ kUserInitiated = 0;
+ kAutomation = 1;
+ kEmergency = 2;
+ }
+
+ bitmap Feature : bitmap32 {
+ kPerZoneSensitivity = 0x1;
+ }
+
+ bitmap SupportedContainerFormatsBitmap : bitmap8 {
+ kCMAF = 0x1;
+ }
+
+ bitmap SupportedIngestMethodsBitmap : bitmap8 {
+ kCMAFIngest = 0x1;
+ }
+
+ struct TransportMotionTriggerTimeControlStruct {
+ int16u initialDuration = 0;
+ int16u augmentationDuration = 1;
+ elapsed_s maxDuration = 2;
+ int16u blindDuration = 3;
+ }
+
+ struct TransportZoneOptionsStruct {
+ nullable int16u zone = 1;
+ optional int8u sensitivity = 2;
+ }
+
+ struct MetadataOptionsStruct {
+ StreamMultiplexingEnum multiplexing = 0;
+ boolean includeMotionZones = 1;
+ boolean enableMetadataPrivacySensitive = 2;
+ }
+
+ struct TransportTriggerOptionsStruct {
+ TransportTriggerTypeEnum triggerType = 0;
+ optional nullable TransportZoneOptionsStruct motionZones[] = 1;
+ optional nullable int8u motionSensitivity = 2;
+ optional TransportMotionTriggerTimeControlStruct motionTimeControl = 3;
+ optional int16u maxPreRollLen = 4;
+ }
+
+ struct CMAFContainerOptionsStruct {
+ int16u chunkDuration = 0;
+ optional octet_string CENCKey = 1;
+ }
+
+ struct ContainerOptionsStruct {
+ ContainerFormatEnum containerType = 0;
+ optional CMAFContainerOptionsStruct CMAFContainerOptions = 1;
+ }
+
+ struct TransportOptionsStruct {
+ StreamTypeEnum streamType = 0;
+ optional int16u videoStreamID = 1;
+ optional int16u audioStreamID = 2;
+ int16u endpointID = 3;
+ long_char_string<256> url = 4;
+ TransportTriggerOptionsStruct triggerOptions = 5;
+ IngestMethodsEnum ingestMethod = 6;
+ ContainerFormatEnum containerFormat = 7;
+ ContainerOptionsStruct containerOptions = 8;
+ optional MetadataOptionsStruct metadataOptions = 9;
+ optional epoch_s expiryTime = 10;
+ }
+
+ struct TransportConfigurationStruct {
+ int16u connectionID = 0;
+ TransportStatusEnum transportStatus = 1;
+ TransportOptionsStruct transportOptions = 2;
+ }
+
+ info event PushTransportBegin = 0 {
+ int16u connectionID = 0;
+ TransportTriggerTypeEnum triggerType = 1;
+ optional TriggerActivationReasonEnum activationReason = 2;
+ }
+
+ info event PushTransportEnd = 1 {
+ int16u connectionID = 0;
+ TransportTriggerTypeEnum triggerType = 1;
+ optional TriggerActivationReasonEnum activationReason = 2;
+ }
+
+ readonly attribute SupportedContainerFormatsBitmap supportedContainerFormats = 0;
+ readonly attribute SupportedIngestMethodsBitmap supportedIngestMethods = 1;
+ readonly attribute int16u currentConnections[] = 2;
+ 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 AllocatePushTransportRequest {
+ TransportOptionsStruct transportOptions = 0;
+ }
+
+ response struct AllocatePushTransportResponse = 1 {
+ int16u connectionID = 0;
+ TransportOptionsStruct transportOptions = 1;
+ TransportStatusEnum transportStatus = 2;
+ }
+
+ request struct DeallocatePushTransportRequest {
+ int16u connectionID = 0;
+ }
+
+ request struct ModifyPushTransportRequest {
+ int16u connectionID = 0;
+ TransportOptionsStruct transportOptions = 1;
+ }
+
+ request struct SetTransportStatusRequest {
+ int16u connectionID = 0;
+ TransportStatusEnum transportStatus = 1;
+ }
+
+ request struct ManuallyTriggerTransportRequest {
+ int16u connectionID = 0;
+ TriggerActivationReasonEnum activationReason = 1;
+ optional TransportMotionTriggerTimeControlStruct timeControl = 2;
+ }
+
+ request struct FindTransportRequest {
+ optional nullable int16u connectionID = 0;
+ }
+
+ response struct FindTransportResponse = 7 {
+ TransportConfigurationStruct streamConfigurations[] = 0;
+ }
+
+ /** This command SHALL allocate a transport and return a PushTransportConnectionID. */
+ command access(invoke: manage) AllocatePushTransport(AllocatePushTransportRequest): AllocatePushTransportResponse = 0;
+ /** This command SHALL be generated to request the Node deallocates the specified transport. */
+ command access(invoke: manage) DeallocatePushTransport(DeallocatePushTransportRequest): DefaultSuccess = 2;
+ /** This command is used to request the Node modifies the configuration of the specified push transport. */
+ command access(invoke: manage) ModifyPushTransport(ModifyPushTransportRequest): DefaultSuccess = 3;
+ /** This command SHALL be generated to request the Node modifies the Transport Status of the transport. */
+ command access(invoke: manage) SetTransportStatus(SetTransportStatusRequest): DefaultSuccess = 4;
+ /** This command SHALL be generated to request the Node to manually start the specified push transport. */
+ command ManuallyTriggerTransport(ManuallyTriggerTransportRequest): DefaultSuccess = 5;
+ /** This command SHALL return the Stream Options Configuration for the specified push transport. */
+ command FindTransport(FindTransportRequest): FindTransportResponse = 6;
+}
+
/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
provisional cluster Chime = 1366 {
revision 1;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index d8326291377418..f32182b925f5ca 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -62976,6 +62976,462 @@ public void onSuccess(byte[] tlv) {
}
}
+ public static class PushAvStreamTransportCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 1365L;
+
+ private static final long SUPPORTED_CONTAINER_FORMATS_ATTRIBUTE_ID = 0L;
+ private static final long SUPPORTED_INGEST_METHODS_ATTRIBUTE_ID = 1L;
+ private static final long CURRENT_CONNECTIONS_ATTRIBUTE_ID = 2L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public PushAvStreamTransportCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void allocatePushTransport(AllocatePushTransportResponseCallback callback, ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions) {
+ allocatePushTransport(callback, transportOptions, 0);
+ }
+
+ public void allocatePushTransport(AllocatePushTransportResponseCallback callback, ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList elements = new ArrayList<>();
+ final long transportOptionsFieldID = 0L;
+ BaseTLVType transportOptionstlvValue = transportOptions.encodeTlv();
+ elements.add(new StructElement(transportOptionsFieldID, transportOptionstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long connectionIDFieldID = 0L;
+ Integer connectionID = null;
+ final long transportOptionsFieldID = 1L;
+ ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions = null;
+ final long transportStatusFieldID = 2L;
+ Integer transportStatus = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == connectionIDFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ connectionID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == transportOptionsFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ transportOptions = ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct.decodeTlv(castingValue);
+ }
+ } else if (element.contextTagNum() == transportStatusFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ transportStatus = castingValue.value(Integer.class);
+ }
+ }
+ }
+ callback.onSuccess(connectionID, transportOptions, transportStatus);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void deallocatePushTransport(DefaultClusterCallback callback, Integer connectionID) {
+ deallocatePushTransport(callback, connectionID, 0);
+ }
+
+ public void deallocatePushTransport(DefaultClusterCallback callback, Integer connectionID, int timedInvokeTimeoutMs) {
+ final long commandId = 2L;
+
+ ArrayList elements = new ArrayList<>();
+ final long connectionIDFieldID = 0L;
+ BaseTLVType connectionIDtlvValue = new UIntType(connectionID);
+ elements.add(new StructElement(connectionIDFieldID, connectionIDtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void modifyPushTransport(DefaultClusterCallback callback, Integer connectionID, ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions) {
+ modifyPushTransport(callback, connectionID, transportOptions, 0);
+ }
+
+ public void modifyPushTransport(DefaultClusterCallback callback, Integer connectionID, ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions, int timedInvokeTimeoutMs) {
+ final long commandId = 3L;
+
+ ArrayList elements = new ArrayList<>();
+ final long connectionIDFieldID = 0L;
+ BaseTLVType connectionIDtlvValue = new UIntType(connectionID);
+ elements.add(new StructElement(connectionIDFieldID, connectionIDtlvValue));
+
+ final long transportOptionsFieldID = 1L;
+ BaseTLVType transportOptionstlvValue = transportOptions.encodeTlv();
+ elements.add(new StructElement(transportOptionsFieldID, transportOptionstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void setTransportStatus(DefaultClusterCallback callback, Integer connectionID, Integer transportStatus) {
+ setTransportStatus(callback, connectionID, transportStatus, 0);
+ }
+
+ public void setTransportStatus(DefaultClusterCallback callback, Integer connectionID, Integer transportStatus, int timedInvokeTimeoutMs) {
+ final long commandId = 4L;
+
+ ArrayList elements = new ArrayList<>();
+ final long connectionIDFieldID = 0L;
+ BaseTLVType connectionIDtlvValue = new UIntType(connectionID);
+ elements.add(new StructElement(connectionIDFieldID, connectionIDtlvValue));
+
+ final long transportStatusFieldID = 1L;
+ BaseTLVType transportStatustlvValue = new UIntType(transportStatus);
+ elements.add(new StructElement(transportStatusFieldID, transportStatustlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void manuallyTriggerTransport(DefaultClusterCallback callback, Integer connectionID, Integer activationReason, Optional timeControl) {
+ manuallyTriggerTransport(callback, connectionID, activationReason, timeControl, 0);
+ }
+
+ public void manuallyTriggerTransport(DefaultClusterCallback callback, Integer connectionID, Integer activationReason, Optional timeControl, int timedInvokeTimeoutMs) {
+ final long commandId = 5L;
+
+ ArrayList elements = new ArrayList<>();
+ final long connectionIDFieldID = 0L;
+ BaseTLVType connectionIDtlvValue = new UIntType(connectionID);
+ elements.add(new StructElement(connectionIDFieldID, connectionIDtlvValue));
+
+ final long activationReasonFieldID = 1L;
+ BaseTLVType activationReasontlvValue = new UIntType(activationReason);
+ elements.add(new StructElement(activationReasonFieldID, activationReasontlvValue));
+
+ final long timeControlFieldID = 2L;
+ BaseTLVType timeControltlvValue = timeControl.map((nonOptionaltimeControl) -> nonOptionaltimeControl.encodeTlv()).orElse(new EmptyType());
+ elements.add(new StructElement(timeControlFieldID, timeControltlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void findTransport(FindTransportResponseCallback callback, @Nullable Optional connectionID) {
+ findTransport(callback, connectionID, 0);
+ }
+
+ public void findTransport(FindTransportResponseCallback callback, @Nullable Optional connectionID, int timedInvokeTimeoutMs) {
+ final long commandId = 6L;
+
+ ArrayList elements = new ArrayList<>();
+ final long connectionIDFieldID = 0L;
+ BaseTLVType connectionIDtlvValue = connectionID != null ? connectionID.map((nonOptionalconnectionID) -> new UIntType(nonOptionalconnectionID)).orElse(new EmptyType()) : new NullType();
+ elements.add(new StructElement(connectionIDFieldID, connectionIDtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long streamConfigurationsFieldID = 0L;
+ ArrayList streamConfigurations = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == streamConfigurationsFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ streamConfigurations = castingValue.map((elementcastingValue) -> ChipStructs.PushAvStreamTransportClusterTransportConfigurationStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ callback.onSuccess(streamConfigurations);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface AllocatePushTransportResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer connectionID, ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions, Integer transportStatus);
+ }
+
+ public interface FindTransportResponseCallback extends BaseClusterCallback {
+ void onSuccess(ArrayList streamConfigurations);
+ }
+
+ public interface CurrentConnectionsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public void readSupportedContainerFormatsAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_CONTAINER_FORMATS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, SUPPORTED_CONTAINER_FORMATS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeSupportedContainerFormatsAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_CONTAINER_FORMATS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, SUPPORTED_CONTAINER_FORMATS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readSupportedIngestMethodsAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_INGEST_METHODS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, SUPPORTED_INGEST_METHODS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeSupportedIngestMethodsAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_INGEST_METHODS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, SUPPORTED_INGEST_METHODS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentConnectionsAttribute(
+ CurrentConnectionsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CONNECTIONS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_CONNECTIONS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentConnectionsAttribute(
+ CurrentConnectionsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CONNECTIONS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_CONNECTIONS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class ChimeCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1366L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
index 8905c909a086e2..491de7a3337b83 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
@@ -6777,6 +6777,158 @@ public String toString() {
return output.toString();
}
}
+public static class PushAvStreamTransportClusterPushTransportBeginEvent {
+ public Integer connectionID;
+ public Integer triggerType;
+ public Optional activationReason;
+ private static final long CONNECTION_ID_ID = 0L;
+ private static final long TRIGGER_TYPE_ID = 1L;
+ private static final long ACTIVATION_REASON_ID = 2L;
+
+ public PushAvStreamTransportClusterPushTransportBeginEvent(
+ Integer connectionID,
+ Integer triggerType,
+ Optional activationReason
+ ) {
+ this.connectionID = connectionID;
+ this.triggerType = triggerType;
+ this.activationReason = activationReason;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CONNECTION_ID_ID, new UIntType(connectionID)));
+ values.add(new StructElement(TRIGGER_TYPE_ID, new UIntType(triggerType)));
+ values.add(new StructElement(ACTIVATION_REASON_ID, activationReason.map((nonOptionalactivationReason) -> new UIntType(nonOptionalactivationReason)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterPushTransportBeginEvent decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer connectionID = null;
+ Integer triggerType = null;
+ Optional activationReason = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CONNECTION_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ connectionID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == TRIGGER_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ triggerType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == ACTIVATION_REASON_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ activationReason = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterPushTransportBeginEvent(
+ connectionID,
+ triggerType,
+ activationReason
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterPushTransportBeginEvent {\n");
+ output.append("\tconnectionID: ");
+ output.append(connectionID);
+ output.append("\n");
+ output.append("\ttriggerType: ");
+ output.append(triggerType);
+ output.append("\n");
+ output.append("\tactivationReason: ");
+ output.append(activationReason);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterPushTransportEndEvent {
+ public Integer connectionID;
+ public Integer triggerType;
+ public Optional activationReason;
+ private static final long CONNECTION_ID_ID = 0L;
+ private static final long TRIGGER_TYPE_ID = 1L;
+ private static final long ACTIVATION_REASON_ID = 2L;
+
+ public PushAvStreamTransportClusterPushTransportEndEvent(
+ Integer connectionID,
+ Integer triggerType,
+ Optional activationReason
+ ) {
+ this.connectionID = connectionID;
+ this.triggerType = triggerType;
+ this.activationReason = activationReason;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CONNECTION_ID_ID, new UIntType(connectionID)));
+ values.add(new StructElement(TRIGGER_TYPE_ID, new UIntType(triggerType)));
+ values.add(new StructElement(ACTIVATION_REASON_ID, activationReason.map((nonOptionalactivationReason) -> new UIntType(nonOptionalactivationReason)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterPushTransportEndEvent decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer connectionID = null;
+ Integer triggerType = null;
+ Optional activationReason = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CONNECTION_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ connectionID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == TRIGGER_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ triggerType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == ACTIVATION_REASON_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ activationReason = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterPushTransportEndEvent(
+ connectionID,
+ triggerType,
+ activationReason
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterPushTransportEndEvent {\n");
+ output.append("\tconnectionID: ");
+ output.append(connectionID);
+ output.append("\n");
+ output.append("\ttriggerType: ");
+ output.append(triggerType);
+ output.append("\n");
+ output.append("\tactivationReason: ");
+ output.append(activationReason);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class CommissionerControlClusterCommissioningRequestResultEvent {
public Long requestID;
public Long clientNodeID;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 5e2b078982f0bb..3960df4e4e0d55 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -14799,6 +14799,734 @@ public String toString() {
return output.toString();
}
}
+public static class PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct {
+ public Integer initialDuration;
+ public Integer augmentationDuration;
+ public Long maxDuration;
+ public Integer blindDuration;
+ private static final long INITIAL_DURATION_ID = 0L;
+ private static final long AUGMENTATION_DURATION_ID = 1L;
+ private static final long MAX_DURATION_ID = 2L;
+ private static final long BLIND_DURATION_ID = 3L;
+
+ public PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct(
+ Integer initialDuration,
+ Integer augmentationDuration,
+ Long maxDuration,
+ Integer blindDuration
+ ) {
+ this.initialDuration = initialDuration;
+ this.augmentationDuration = augmentationDuration;
+ this.maxDuration = maxDuration;
+ this.blindDuration = blindDuration;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(INITIAL_DURATION_ID, new UIntType(initialDuration)));
+ values.add(new StructElement(AUGMENTATION_DURATION_ID, new UIntType(augmentationDuration)));
+ values.add(new StructElement(MAX_DURATION_ID, new UIntType(maxDuration)));
+ values.add(new StructElement(BLIND_DURATION_ID, new UIntType(blindDuration)));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer initialDuration = null;
+ Integer augmentationDuration = null;
+ Long maxDuration = null;
+ Integer blindDuration = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == INITIAL_DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ initialDuration = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == AUGMENTATION_DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ augmentationDuration = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == MAX_DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ maxDuration = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == BLIND_DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ blindDuration = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct(
+ initialDuration,
+ augmentationDuration,
+ maxDuration,
+ blindDuration
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct {\n");
+ output.append("\tinitialDuration: ");
+ output.append(initialDuration);
+ output.append("\n");
+ output.append("\taugmentationDuration: ");
+ output.append(augmentationDuration);
+ output.append("\n");
+ output.append("\tmaxDuration: ");
+ output.append(maxDuration);
+ output.append("\n");
+ output.append("\tblindDuration: ");
+ output.append(blindDuration);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterTransportZoneOptionsStruct {
+ public @Nullable Integer zone;
+ public Optional sensitivity;
+ private static final long ZONE_ID = 1L;
+ private static final long SENSITIVITY_ID = 2L;
+
+ public PushAvStreamTransportClusterTransportZoneOptionsStruct(
+ @Nullable Integer zone,
+ Optional sensitivity
+ ) {
+ this.zone = zone;
+ this.sensitivity = sensitivity;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(ZONE_ID, zone != null ? new UIntType(zone) : new NullType()));
+ values.add(new StructElement(SENSITIVITY_ID, sensitivity.map((nonOptionalsensitivity) -> new UIntType(nonOptionalsensitivity)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterTransportZoneOptionsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ @Nullable Integer zone = null;
+ Optional sensitivity = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == ZONE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ zone = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == SENSITIVITY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ sensitivity = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterTransportZoneOptionsStruct(
+ zone,
+ sensitivity
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterTransportZoneOptionsStruct {\n");
+ output.append("\tzone: ");
+ output.append(zone);
+ output.append("\n");
+ output.append("\tsensitivity: ");
+ output.append(sensitivity);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterMetadataOptionsStruct {
+ public Integer multiplexing;
+ public Boolean includeMotionZones;
+ public Boolean enableMetadataPrivacySensitive;
+ private static final long MULTIPLEXING_ID = 0L;
+ private static final long INCLUDE_MOTION_ZONES_ID = 1L;
+ private static final long ENABLE_METADATA_PRIVACY_SENSITIVE_ID = 2L;
+
+ public PushAvStreamTransportClusterMetadataOptionsStruct(
+ Integer multiplexing,
+ Boolean includeMotionZones,
+ Boolean enableMetadataPrivacySensitive
+ ) {
+ this.multiplexing = multiplexing;
+ this.includeMotionZones = includeMotionZones;
+ this.enableMetadataPrivacySensitive = enableMetadataPrivacySensitive;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(MULTIPLEXING_ID, new UIntType(multiplexing)));
+ values.add(new StructElement(INCLUDE_MOTION_ZONES_ID, new BooleanType(includeMotionZones)));
+ values.add(new StructElement(ENABLE_METADATA_PRIVACY_SENSITIVE_ID, new BooleanType(enableMetadataPrivacySensitive)));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterMetadataOptionsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer multiplexing = null;
+ Boolean includeMotionZones = null;
+ Boolean enableMetadataPrivacySensitive = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == MULTIPLEXING_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ multiplexing = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == INCLUDE_MOTION_ZONES_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Boolean) {
+ BooleanType castingValue = element.value(BooleanType.class);
+ includeMotionZones = castingValue.value(Boolean.class);
+ }
+ } else if (element.contextTagNum() == ENABLE_METADATA_PRIVACY_SENSITIVE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Boolean) {
+ BooleanType castingValue = element.value(BooleanType.class);
+ enableMetadataPrivacySensitive = castingValue.value(Boolean.class);
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterMetadataOptionsStruct(
+ multiplexing,
+ includeMotionZones,
+ enableMetadataPrivacySensitive
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterMetadataOptionsStruct {\n");
+ output.append("\tmultiplexing: ");
+ output.append(multiplexing);
+ output.append("\n");
+ output.append("\tincludeMotionZones: ");
+ output.append(includeMotionZones);
+ output.append("\n");
+ output.append("\tenableMetadataPrivacySensitive: ");
+ output.append(enableMetadataPrivacySensitive);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterTransportTriggerOptionsStruct {
+ public Integer triggerType;
+ public @Nullable Optional> motionZones;
+ public @Nullable Optional motionSensitivity;
+ public Optional motionTimeControl;
+ public Optional maxPreRollLen;
+ private static final long TRIGGER_TYPE_ID = 0L;
+ private static final long MOTION_ZONES_ID = 1L;
+ private static final long MOTION_SENSITIVITY_ID = 2L;
+ private static final long MOTION_TIME_CONTROL_ID = 3L;
+ private static final long MAX_PRE_ROLL_LEN_ID = 4L;
+
+ public PushAvStreamTransportClusterTransportTriggerOptionsStruct(
+ Integer triggerType,
+ @Nullable Optional> motionZones,
+ @Nullable Optional motionSensitivity,
+ Optional motionTimeControl,
+ Optional maxPreRollLen
+ ) {
+ this.triggerType = triggerType;
+ this.motionZones = motionZones;
+ this.motionSensitivity = motionSensitivity;
+ this.motionTimeControl = motionTimeControl;
+ this.maxPreRollLen = maxPreRollLen;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(TRIGGER_TYPE_ID, new UIntType(triggerType)));
+ values.add(new StructElement(MOTION_ZONES_ID, motionZones != null ? motionZones.map((nonOptionalmotionZones) -> ArrayType.generateArrayType(nonOptionalmotionZones, (elementnonOptionalmotionZones) -> elementnonOptionalmotionZones.encodeTlv())).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(MOTION_SENSITIVITY_ID, motionSensitivity != null ? motionSensitivity.map((nonOptionalmotionSensitivity) -> new UIntType(nonOptionalmotionSensitivity)).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(MOTION_TIME_CONTROL_ID, motionTimeControl.map((nonOptionalmotionTimeControl) -> nonOptionalmotionTimeControl.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(MAX_PRE_ROLL_LEN_ID, maxPreRollLen.map((nonOptionalmaxPreRollLen) -> new UIntType(nonOptionalmaxPreRollLen)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterTransportTriggerOptionsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer triggerType = null;
+ @Nullable Optional> motionZones = null;
+ @Nullable Optional motionSensitivity = null;
+ Optional motionTimeControl = Optional.empty();
+ Optional maxPreRollLen = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == TRIGGER_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ triggerType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == MOTION_ZONES_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ motionZones = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.PushAvStreamTransportClusterTransportZoneOptionsStruct.decodeTlv(elementcastingValue)));
+ }
+ } else if (element.contextTagNum() == MOTION_SENSITIVITY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ motionSensitivity = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == MOTION_TIME_CONTROL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ motionTimeControl = Optional.of(ChipStructs.PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == MAX_PRE_ROLL_LEN_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ maxPreRollLen = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterTransportTriggerOptionsStruct(
+ triggerType,
+ motionZones,
+ motionSensitivity,
+ motionTimeControl,
+ maxPreRollLen
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterTransportTriggerOptionsStruct {\n");
+ output.append("\ttriggerType: ");
+ output.append(triggerType);
+ output.append("\n");
+ output.append("\tmotionZones: ");
+ output.append(motionZones);
+ output.append("\n");
+ output.append("\tmotionSensitivity: ");
+ output.append(motionSensitivity);
+ output.append("\n");
+ output.append("\tmotionTimeControl: ");
+ output.append(motionTimeControl);
+ output.append("\n");
+ output.append("\tmaxPreRollLen: ");
+ output.append(maxPreRollLen);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterCMAFContainerOptionsStruct {
+ public Integer chunkDuration;
+ public Optional CENCKey;
+ private static final long CHUNK_DURATION_ID = 0L;
+ private static final long CENC_KEY_ID = 1L;
+
+ public PushAvStreamTransportClusterCMAFContainerOptionsStruct(
+ Integer chunkDuration,
+ Optional CENCKey
+ ) {
+ this.chunkDuration = chunkDuration;
+ this.CENCKey = CENCKey;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CHUNK_DURATION_ID, new UIntType(chunkDuration)));
+ values.add(new StructElement(CENC_KEY_ID, CENCKey.map((nonOptionalCENCKey) -> new ByteArrayType(nonOptionalCENCKey)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterCMAFContainerOptionsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer chunkDuration = null;
+ Optional CENCKey = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CHUNK_DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ chunkDuration = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CENC_KEY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ CENCKey = Optional.of(castingValue.value(byte[].class));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterCMAFContainerOptionsStruct(
+ chunkDuration,
+ CENCKey
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterCMAFContainerOptionsStruct {\n");
+ output.append("\tchunkDuration: ");
+ output.append(chunkDuration);
+ output.append("\n");
+ output.append("\tCENCKey: ");
+ output.append(CENCKey.isPresent() ? Arrays.toString(CENCKey.get()) : "");
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterContainerOptionsStruct {
+ public Integer containerType;
+ public Optional CMAFContainerOptions;
+ private static final long CONTAINER_TYPE_ID = 0L;
+ private static final long CMAF_CONTAINER_OPTIONS_ID = 1L;
+
+ public PushAvStreamTransportClusterContainerOptionsStruct(
+ Integer containerType,
+ Optional CMAFContainerOptions
+ ) {
+ this.containerType = containerType;
+ this.CMAFContainerOptions = CMAFContainerOptions;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CONTAINER_TYPE_ID, new UIntType(containerType)));
+ values.add(new StructElement(CMAF_CONTAINER_OPTIONS_ID, CMAFContainerOptions.map((nonOptionalCMAFContainerOptions) -> nonOptionalCMAFContainerOptions.encodeTlv()).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterContainerOptionsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer containerType = null;
+ Optional CMAFContainerOptions = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CONTAINER_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ containerType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CMAF_CONTAINER_OPTIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ CMAFContainerOptions = Optional.of(ChipStructs.PushAvStreamTransportClusterCMAFContainerOptionsStruct.decodeTlv(castingValue));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterContainerOptionsStruct(
+ containerType,
+ CMAFContainerOptions
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterContainerOptionsStruct {\n");
+ output.append("\tcontainerType: ");
+ output.append(containerType);
+ output.append("\n");
+ output.append("\tCMAFContainerOptions: ");
+ output.append(CMAFContainerOptions);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterTransportOptionsStruct {
+ public Integer streamType;
+ public Optional videoStreamID;
+ public Optional audioStreamID;
+ public Integer endpointID;
+ public String url;
+ public ChipStructs.PushAvStreamTransportClusterTransportTriggerOptionsStruct triggerOptions;
+ public Integer ingestMethod;
+ public Integer containerFormat;
+ public ChipStructs.PushAvStreamTransportClusterContainerOptionsStruct containerOptions;
+ public Optional metadataOptions;
+ public Optional expiryTime;
+ private static final long STREAM_TYPE_ID = 0L;
+ private static final long VIDEO_STREAM_ID_ID = 1L;
+ private static final long AUDIO_STREAM_ID_ID = 2L;
+ private static final long ENDPOINT_ID_ID = 3L;
+ private static final long URL_ID = 4L;
+ private static final long TRIGGER_OPTIONS_ID = 5L;
+ private static final long INGEST_METHOD_ID = 6L;
+ private static final long CONTAINER_FORMAT_ID = 7L;
+ private static final long CONTAINER_OPTIONS_ID = 8L;
+ private static final long METADATA_OPTIONS_ID = 9L;
+ private static final long EXPIRY_TIME_ID = 10L;
+
+ public PushAvStreamTransportClusterTransportOptionsStruct(
+ Integer streamType,
+ Optional videoStreamID,
+ Optional audioStreamID,
+ Integer endpointID,
+ String url,
+ ChipStructs.PushAvStreamTransportClusterTransportTriggerOptionsStruct triggerOptions,
+ Integer ingestMethod,
+ Integer containerFormat,
+ ChipStructs.PushAvStreamTransportClusterContainerOptionsStruct containerOptions,
+ Optional metadataOptions,
+ Optional expiryTime
+ ) {
+ this.streamType = streamType;
+ this.videoStreamID = videoStreamID;
+ this.audioStreamID = audioStreamID;
+ this.endpointID = endpointID;
+ this.url = url;
+ this.triggerOptions = triggerOptions;
+ this.ingestMethod = ingestMethod;
+ this.containerFormat = containerFormat;
+ this.containerOptions = containerOptions;
+ this.metadataOptions = metadataOptions;
+ this.expiryTime = expiryTime;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType)));
+ values.add(new StructElement(VIDEO_STREAM_ID_ID, videoStreamID.map((nonOptionalvideoStreamID) -> new UIntType(nonOptionalvideoStreamID)).orElse(new EmptyType())));
+ values.add(new StructElement(AUDIO_STREAM_ID_ID, audioStreamID.map((nonOptionalaudioStreamID) -> new UIntType(nonOptionalaudioStreamID)).orElse(new EmptyType())));
+ values.add(new StructElement(ENDPOINT_ID_ID, new UIntType(endpointID)));
+ values.add(new StructElement(URL_ID, new StringType(url)));
+ values.add(new StructElement(TRIGGER_OPTIONS_ID, triggerOptions.encodeTlv()));
+ values.add(new StructElement(INGEST_METHOD_ID, new UIntType(ingestMethod)));
+ values.add(new StructElement(CONTAINER_FORMAT_ID, new UIntType(containerFormat)));
+ values.add(new StructElement(CONTAINER_OPTIONS_ID, containerOptions.encodeTlv()));
+ values.add(new StructElement(METADATA_OPTIONS_ID, metadataOptions.map((nonOptionalmetadataOptions) -> nonOptionalmetadataOptions.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(EXPIRY_TIME_ID, expiryTime.map((nonOptionalexpiryTime) -> new UIntType(nonOptionalexpiryTime)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterTransportOptionsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer streamType = null;
+ Optional videoStreamID = Optional.empty();
+ Optional audioStreamID = Optional.empty();
+ Integer endpointID = null;
+ String url = null;
+ ChipStructs.PushAvStreamTransportClusterTransportTriggerOptionsStruct triggerOptions = null;
+ Integer ingestMethod = null;
+ Integer containerFormat = null;
+ ChipStructs.PushAvStreamTransportClusterContainerOptionsStruct containerOptions = null;
+ Optional metadataOptions = Optional.empty();
+ Optional expiryTime = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == STREAM_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ streamType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == VIDEO_STREAM_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ videoStreamID = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == AUDIO_STREAM_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ audioStreamID = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == ENDPOINT_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ endpointID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == URL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ url = castingValue.value(String.class);
+ }
+ } else if (element.contextTagNum() == TRIGGER_OPTIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ triggerOptions = ChipStructs.PushAvStreamTransportClusterTransportTriggerOptionsStruct.decodeTlv(castingValue);
+ }
+ } else if (element.contextTagNum() == INGEST_METHOD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ ingestMethod = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CONTAINER_FORMAT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ containerFormat = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CONTAINER_OPTIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ containerOptions = ChipStructs.PushAvStreamTransportClusterContainerOptionsStruct.decodeTlv(castingValue);
+ }
+ } else if (element.contextTagNum() == METADATA_OPTIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ metadataOptions = Optional.of(ChipStructs.PushAvStreamTransportClusterMetadataOptionsStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == EXPIRY_TIME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ expiryTime = Optional.of(castingValue.value(Long.class));
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterTransportOptionsStruct(
+ streamType,
+ videoStreamID,
+ audioStreamID,
+ endpointID,
+ url,
+ triggerOptions,
+ ingestMethod,
+ containerFormat,
+ containerOptions,
+ metadataOptions,
+ expiryTime
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterTransportOptionsStruct {\n");
+ output.append("\tstreamType: ");
+ output.append(streamType);
+ output.append("\n");
+ output.append("\tvideoStreamID: ");
+ output.append(videoStreamID);
+ output.append("\n");
+ output.append("\taudioStreamID: ");
+ output.append(audioStreamID);
+ output.append("\n");
+ output.append("\tendpointID: ");
+ output.append(endpointID);
+ output.append("\n");
+ output.append("\turl: ");
+ output.append(url);
+ output.append("\n");
+ output.append("\ttriggerOptions: ");
+ output.append(triggerOptions);
+ output.append("\n");
+ output.append("\tingestMethod: ");
+ output.append(ingestMethod);
+ output.append("\n");
+ output.append("\tcontainerFormat: ");
+ output.append(containerFormat);
+ output.append("\n");
+ output.append("\tcontainerOptions: ");
+ output.append(containerOptions);
+ output.append("\n");
+ output.append("\tmetadataOptions: ");
+ output.append(metadataOptions);
+ output.append("\n");
+ output.append("\texpiryTime: ");
+ output.append(expiryTime);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class PushAvStreamTransportClusterTransportConfigurationStruct {
+ public Integer connectionID;
+ public Integer transportStatus;
+ public ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions;
+ private static final long CONNECTION_ID_ID = 0L;
+ private static final long TRANSPORT_STATUS_ID = 1L;
+ private static final long TRANSPORT_OPTIONS_ID = 2L;
+
+ public PushAvStreamTransportClusterTransportConfigurationStruct(
+ Integer connectionID,
+ Integer transportStatus,
+ ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions
+ ) {
+ this.connectionID = connectionID;
+ this.transportStatus = transportStatus;
+ this.transportOptions = transportOptions;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CONNECTION_ID_ID, new UIntType(connectionID)));
+ values.add(new StructElement(TRANSPORT_STATUS_ID, new UIntType(transportStatus)));
+ values.add(new StructElement(TRANSPORT_OPTIONS_ID, transportOptions.encodeTlv()));
+
+ return new StructType(values);
+ }
+
+ public static PushAvStreamTransportClusterTransportConfigurationStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer connectionID = null;
+ Integer transportStatus = null;
+ ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CONNECTION_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ connectionID = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == TRANSPORT_STATUS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ transportStatus = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == TRANSPORT_OPTIONS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ transportOptions = ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ return new PushAvStreamTransportClusterTransportConfigurationStruct(
+ connectionID,
+ transportStatus,
+ transportOptions
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("PushAvStreamTransportClusterTransportConfigurationStruct {\n");
+ output.append("\tconnectionID: ");
+ output.append(connectionID);
+ output.append("\n");
+ output.append("\ttransportStatus: ");
+ output.append(transportStatus);
+ output.append("\n");
+ output.append("\ttransportOptions: ");
+ output.append(transportOptions);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class ChimeClusterChimeSoundStruct {
public Integer chimeID;
public String name;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index e8440163d37360..a2a7cc53273644 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -394,6 +394,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == WebRTCTransportRequestor.ID) {
return new WebRTCTransportRequestor();
}
+ if (clusterId == PushAvStreamTransport.ID) {
+ return new PushAvStreamTransport();
+ }
if (clusterId == Chime.ID) {
return new Chime();
}
@@ -17974,6 +17977,219 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
+ public static class PushAvStreamTransport implements BaseCluster {
+ public static final long ID = 1365L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ SupportedContainerFormats(0L),
+ SupportedIngestMethods(1L),
+ CurrentConnections(2L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {
+ PushTransportBegin(0L),
+ PushTransportEnd(1L),;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ AllocatePushTransport(0L),
+ DeallocatePushTransport(2L),
+ ModifyPushTransport(3L),
+ SetTransportStatus(4L),
+ ManuallyTriggerTransport(5L),
+ FindTransport(6L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum AllocatePushTransportCommandField {TransportOptions(0),;
+ private final int id;
+ AllocatePushTransportCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static AllocatePushTransportCommandField value(int id) throws NoSuchFieldError {
+ for (AllocatePushTransportCommandField field : AllocatePushTransportCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum DeallocatePushTransportCommandField {ConnectionID(0),;
+ private final int id;
+ DeallocatePushTransportCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static DeallocatePushTransportCommandField value(int id) throws NoSuchFieldError {
+ for (DeallocatePushTransportCommandField field : DeallocatePushTransportCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ModifyPushTransportCommandField {ConnectionID(0),TransportOptions(1),;
+ private final int id;
+ ModifyPushTransportCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ModifyPushTransportCommandField value(int id) throws NoSuchFieldError {
+ for (ModifyPushTransportCommandField field : ModifyPushTransportCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum SetTransportStatusCommandField {ConnectionID(0),TransportStatus(1),;
+ private final int id;
+ SetTransportStatusCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static SetTransportStatusCommandField value(int id) throws NoSuchFieldError {
+ for (SetTransportStatusCommandField field : SetTransportStatusCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ManuallyTriggerTransportCommandField {ConnectionID(0),ActivationReason(1),TimeControl(2),;
+ private final int id;
+ ManuallyTriggerTransportCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ManuallyTriggerTransportCommandField value(int id) throws NoSuchFieldError {
+ for (ManuallyTriggerTransportCommandField field : ManuallyTriggerTransportCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum FindTransportCommandField {ConnectionID(0),;
+ private final int id;
+ FindTransportCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static FindTransportCommandField value(int id) throws NoSuchFieldError {
+ for (FindTransportCommandField field : FindTransportCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class Chime implements BaseCluster {
public static final long ID = 1366L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index f36a31e142d695..675c06556a2674 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -20899,6 +20899,160 @@ public void onError(Exception ex) {
}
}
+
+ public static class DelegatedPushAvStreamTransportClusterAllocatePushTransportResponseCallback implements ChipClusters.PushAvStreamTransportCluster.AllocatePushTransportResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer connectionID, ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct transportOptions, Integer transportStatus) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo connectionIDResponseValue = new CommandResponseInfo("connectionID", "Integer");
+ responseValues.put(connectionIDResponseValue, connectionID);
+ // transportOptions: Struct TransportOptionsStruct
+ // Conversion from this type to Java is not properly implemented yet
+ CommandResponseInfo transportStatusResponseValue = new CommandResponseInfo("transportStatus", "Integer");
+ responseValues.put(transportStatusResponseValue, transportStatus);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedPushAvStreamTransportClusterFindTransportResponseCallback implements ChipClusters.PushAvStreamTransportCluster.FindTransportResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(ArrayList streamConfigurations) {
+ Map responseValues = new LinkedHashMap<>();
+
+ // streamConfigurations: TransportConfigurationStruct
+ // Conversion from this type to Java is not properly implemented yet
+
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+ public static class DelegatedPushAvStreamTransportClusterCurrentConnectionsAttributeCallback implements ChipClusters.PushAvStreamTransportCluster.CurrentConnectionsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedPushAvStreamTransportClusterGeneratedCommandListAttributeCallback implements ChipClusters.PushAvStreamTransportCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedPushAvStreamTransportClusterAcceptedCommandListAttributeCallback implements ChipClusters.PushAvStreamTransportCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedPushAvStreamTransportClusterEventListAttributeCallback implements ChipClusters.PushAvStreamTransportCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedPushAvStreamTransportClusterAttributeListAttributeCallback implements ChipClusters.PushAvStreamTransportCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedChimeClusterInstalledChimeSoundsAttributeCallback implements ChipClusters.ChimeCluster.InstalledChimeSoundsAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -23360,6 +23514,10 @@ public Map initializeClusterMap() {
(ptr, endpointId) -> new ChipClusters.WebRTCTransportRequestorCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("webRTCTransportRequestor", webRTCTransportRequestorClusterInfo);
+ ClusterInfo pushAvStreamTransportClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.PushAvStreamTransportCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("pushAvStreamTransport", pushAvStreamTransportClusterInfo);
+
ClusterInfo chimeClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.ChimeCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("chime", chimeClusterInfo);
@@ -23510,6 +23668,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("webRTCTransportRequestor", webRTCTransportRequestorClusterInteractionInfoMap);
+ Map pushAvStreamTransportClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map pushAvStreamTransportallocatePushTransportCommandParams = new LinkedHashMap();
+
+ InteractionInfo pushAvStreamTransportallocatePushTransportInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster)
+ .allocatePushTransport((ChipClusters.PushAvStreamTransportCluster.AllocatePushTransportResponseCallback) callback
+ , (ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct)
+ commandArguments.get("transportOptions")
+
+ );
+ },
+ () -> new DelegatedPushAvStreamTransportClusterAllocatePushTransportResponseCallback(),
+ pushAvStreamTransportallocatePushTransportCommandParams
+ );
+ pushAvStreamTransportClusterInteractionInfoMap.put("allocatePushTransport", pushAvStreamTransportallocatePushTransportInteractionInfo);
+
+ Map pushAvStreamTransportdeallocatePushTransportCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo pushAvStreamTransportdeallocatePushTransportconnectionIDCommandParameterInfo = new CommandParameterInfo("connectionID", Integer.class, Integer.class);
+ pushAvStreamTransportdeallocatePushTransportCommandParams.put("connectionID",pushAvStreamTransportdeallocatePushTransportconnectionIDCommandParameterInfo);
+ InteractionInfo pushAvStreamTransportdeallocatePushTransportInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster)
+ .deallocatePushTransport((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("connectionID")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ pushAvStreamTransportdeallocatePushTransportCommandParams
+ );
+ pushAvStreamTransportClusterInteractionInfoMap.put("deallocatePushTransport", pushAvStreamTransportdeallocatePushTransportInteractionInfo);
+
+ Map pushAvStreamTransportmodifyPushTransportCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo pushAvStreamTransportmodifyPushTransportconnectionIDCommandParameterInfo = new CommandParameterInfo("connectionID", Integer.class, Integer.class);
+ pushAvStreamTransportmodifyPushTransportCommandParams.put("connectionID",pushAvStreamTransportmodifyPushTransportconnectionIDCommandParameterInfo);
+
+ InteractionInfo pushAvStreamTransportmodifyPushTransportInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster)
+ .modifyPushTransport((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("connectionID")
+ , (ChipStructs.PushAvStreamTransportClusterTransportOptionsStruct)
+ commandArguments.get("transportOptions")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ pushAvStreamTransportmodifyPushTransportCommandParams
+ );
+ pushAvStreamTransportClusterInteractionInfoMap.put("modifyPushTransport", pushAvStreamTransportmodifyPushTransportInteractionInfo);
+
+ Map pushAvStreamTransportsetTransportStatusCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo pushAvStreamTransportsetTransportStatusconnectionIDCommandParameterInfo = new CommandParameterInfo("connectionID", Integer.class, Integer.class);
+ pushAvStreamTransportsetTransportStatusCommandParams.put("connectionID",pushAvStreamTransportsetTransportStatusconnectionIDCommandParameterInfo);
+
+ CommandParameterInfo pushAvStreamTransportsetTransportStatustransportStatusCommandParameterInfo = new CommandParameterInfo("transportStatus", Integer.class, Integer.class);
+ pushAvStreamTransportsetTransportStatusCommandParams.put("transportStatus",pushAvStreamTransportsetTransportStatustransportStatusCommandParameterInfo);
+ InteractionInfo pushAvStreamTransportsetTransportStatusInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster)
+ .setTransportStatus((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("connectionID")
+ , (Integer)
+ commandArguments.get("transportStatus")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ pushAvStreamTransportsetTransportStatusCommandParams
+ );
+ pushAvStreamTransportClusterInteractionInfoMap.put("setTransportStatus", pushAvStreamTransportsetTransportStatusInteractionInfo);
+
+ Map pushAvStreamTransportmanuallyTriggerTransportCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo pushAvStreamTransportmanuallyTriggerTransportconnectionIDCommandParameterInfo = new CommandParameterInfo("connectionID", Integer.class, Integer.class);
+ pushAvStreamTransportmanuallyTriggerTransportCommandParams.put("connectionID",pushAvStreamTransportmanuallyTriggerTransportconnectionIDCommandParameterInfo);
+
+ CommandParameterInfo pushAvStreamTransportmanuallyTriggerTransportactivationReasonCommandParameterInfo = new CommandParameterInfo("activationReason", Integer.class, Integer.class);
+ pushAvStreamTransportmanuallyTriggerTransportCommandParams.put("activationReason",pushAvStreamTransportmanuallyTriggerTransportactivationReasonCommandParameterInfo);
+
+ InteractionInfo pushAvStreamTransportmanuallyTriggerTransportInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster)
+ .manuallyTriggerTransport((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("connectionID")
+ , (Integer)
+ commandArguments.get("activationReason")
+ , (Optional)
+ commandArguments.get("timeControl")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ pushAvStreamTransportmanuallyTriggerTransportCommandParams
+ );
+ pushAvStreamTransportClusterInteractionInfoMap.put("manuallyTriggerTransport", pushAvStreamTransportmanuallyTriggerTransportInteractionInfo);
+
+ Map pushAvStreamTransportfindTransportCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo pushAvStreamTransportfindTransportconnectionIDCommandParameterInfo = new CommandParameterInfo("connectionID", Optional.class, Integer.class);
+ pushAvStreamTransportfindTransportCommandParams.put("connectionID",pushAvStreamTransportfindTransportconnectionIDCommandParameterInfo);
+ InteractionInfo pushAvStreamTransportfindTransportInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster)
+ .findTransport((ChipClusters.PushAvStreamTransportCluster.FindTransportResponseCallback) callback
+ , (Optional)
+ commandArguments.get("connectionID")
+
+ );
+ },
+ () -> new DelegatedPushAvStreamTransportClusterFindTransportResponseCallback(),
+ pushAvStreamTransportfindTransportCommandParams
+ );
+ pushAvStreamTransportClusterInteractionInfoMap.put("findTransport", pushAvStreamTransportfindTransportInteractionInfo);
+
+ commandMap.put("pushAvStreamTransport", pushAvStreamTransportClusterInteractionInfoMap);
+
Map chimeClusterInteractionInfoMap = new LinkedHashMap<>();
Map chimeplayChimeSoundCommandParams = new LinkedHashMap();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index 3323ad5632be1d..855589c5a78b19 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -19081,6 +19081,109 @@ private static Map readWebRTCTransportRequestorInteract
return result;
}
+ private static Map readPushAvStreamTransportInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readPushAvStreamTransportSupportedContainerFormatsCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportSupportedContainerFormatsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readSupportedContainerFormatsAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readPushAvStreamTransportSupportedContainerFormatsCommandParams
+ );
+ result.put("readSupportedContainerFormatsAttribute", readPushAvStreamTransportSupportedContainerFormatsAttributeInteractionInfo);
+ Map readPushAvStreamTransportSupportedIngestMethodsCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportSupportedIngestMethodsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readSupportedIngestMethodsAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readPushAvStreamTransportSupportedIngestMethodsCommandParams
+ );
+ result.put("readSupportedIngestMethodsAttribute", readPushAvStreamTransportSupportedIngestMethodsAttributeInteractionInfo);
+ Map readPushAvStreamTransportCurrentConnectionsCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportCurrentConnectionsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readCurrentConnectionsAttribute(
+ (ChipClusters.PushAvStreamTransportCluster.CurrentConnectionsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedPushAvStreamTransportClusterCurrentConnectionsAttributeCallback(),
+ readPushAvStreamTransportCurrentConnectionsCommandParams
+ );
+ result.put("readCurrentConnectionsAttribute", readPushAvStreamTransportCurrentConnectionsAttributeInteractionInfo);
+ Map readPushAvStreamTransportGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.PushAvStreamTransportCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedPushAvStreamTransportClusterGeneratedCommandListAttributeCallback(),
+ readPushAvStreamTransportGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readPushAvStreamTransportGeneratedCommandListAttributeInteractionInfo);
+ Map readPushAvStreamTransportAcceptedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.PushAvStreamTransportCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedPushAvStreamTransportClusterAcceptedCommandListAttributeCallback(),
+ readPushAvStreamTransportAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readPushAvStreamTransportAcceptedCommandListAttributeInteractionInfo);
+ Map readPushAvStreamTransportEventListCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readEventListAttribute(
+ (ChipClusters.PushAvStreamTransportCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedPushAvStreamTransportClusterEventListAttributeCallback(),
+ readPushAvStreamTransportEventListCommandParams
+ );
+ result.put("readEventListAttribute", readPushAvStreamTransportEventListAttributeInteractionInfo);
+ Map readPushAvStreamTransportAttributeListCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.PushAvStreamTransportCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedPushAvStreamTransportClusterAttributeListAttributeCallback(),
+ readPushAvStreamTransportAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readPushAvStreamTransportAttributeListAttributeInteractionInfo);
+ Map readPushAvStreamTransportFeatureMapCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readPushAvStreamTransportFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readPushAvStreamTransportFeatureMapAttributeInteractionInfo);
+ Map readPushAvStreamTransportClusterRevisionCommandParams = new LinkedHashMap();
+ InteractionInfo readPushAvStreamTransportClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.PushAvStreamTransportCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readPushAvStreamTransportClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readPushAvStreamTransportClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map readChimeInteractionInfo() {
Map result = new LinkedHashMap<>();Map readChimeInstalledChimeSoundsCommandParams = new LinkedHashMap();
InteractionInfo readChimeInstalledChimeSoundsAttributeInteractionInfo = new InteractionInfo(
@@ -20639,6 +20742,7 @@ public Map> getReadAttributeMap() {
put("cameraAvSettingsUserLevelManagement", readCameraAvSettingsUserLevelManagementInteractionInfo());
put("webRTCTransportProvider", readWebRTCTransportProviderInteractionInfo());
put("webRTCTransportRequestor", readWebRTCTransportRequestorInteractionInfo());
+ put("pushAvStreamTransport", readPushAvStreamTransportInteractionInfo());
put("chime", readChimeInteractionInfo());
put("ecosystemInformation", readEcosystemInformationInteractionInfo());
put("commissionerControl", readCommissionerControlInteractionInfo());
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index 6df2ad6b8104e9..c36850932c50db 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -3746,6 +3746,8 @@ public Map> getWriteAttributeMap() {
writeAttributeMap.put("webRTCTransportProvider", writeWebRTCTransportProviderInteractionInfo);
Map writeWebRTCTransportRequestorInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("webRTCTransportRequestor", writeWebRTCTransportRequestorInteractionInfo);
+ Map writePushAvStreamTransportInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("pushAvStreamTransport", writePushAvStreamTransportInteractionInfo);
Map writeChimeInteractionInfo = new LinkedHashMap<>();
Map writeChimeActiveChimeIDCommandParams = new LinkedHashMap();
CommandParameterInfo chimeactiveChimeIDCommandParameterInfo =
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
new file mode 100644
index 00000000000000..c95fd429ca29e8
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.eventstructs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterPushTransportBeginEvent(
+ val connectionID: UInt,
+ val triggerType: UInt,
+ val activationReason: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterPushTransportBeginEvent {\n")
+ append("\tconnectionID : $connectionID\n")
+ append("\ttriggerType : $triggerType\n")
+ append("\tactivationReason : $activationReason\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONNECTION_ID), connectionID)
+ put(ContextSpecificTag(TAG_TRIGGER_TYPE), triggerType)
+ if (activationReason.isPresent) {
+ val optactivationReason = activationReason.get()
+ put(ContextSpecificTag(TAG_ACTIVATION_REASON), optactivationReason)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONNECTION_ID = 0
+ private const val TAG_TRIGGER_TYPE = 1
+ private const val TAG_ACTIVATION_REASON = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterPushTransportBeginEvent {
+ tlvReader.enterStructure(tlvTag)
+ val connectionID = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_ID))
+ val triggerType = tlvReader.getUInt(ContextSpecificTag(TAG_TRIGGER_TYPE))
+ val activationReason =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_ACTIVATION_REASON))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ACTIVATION_REASON)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterPushTransportBeginEvent(
+ connectionID,
+ triggerType,
+ activationReason,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt
new file mode 100644
index 00000000000000..641a39364a04df
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.eventstructs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterPushTransportEndEvent(
+ val connectionID: UInt,
+ val triggerType: UInt,
+ val activationReason: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterPushTransportEndEvent {\n")
+ append("\tconnectionID : $connectionID\n")
+ append("\ttriggerType : $triggerType\n")
+ append("\tactivationReason : $activationReason\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONNECTION_ID), connectionID)
+ put(ContextSpecificTag(TAG_TRIGGER_TYPE), triggerType)
+ if (activationReason.isPresent) {
+ val optactivationReason = activationReason.get()
+ put(ContextSpecificTag(TAG_ACTIVATION_REASON), optactivationReason)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONNECTION_ID = 0
+ private const val TAG_TRIGGER_TYPE = 1
+ private const val TAG_ACTIVATION_REASON = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterPushTransportEndEvent {
+ tlvReader.enterStructure(tlvTag)
+ val connectionID = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_ID))
+ val triggerType = tlvReader.getUInt(ContextSpecificTag(TAG_TRIGGER_TYPE))
+ val activationReason =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_ACTIVATION_REASON))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ACTIVATION_REASON)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterPushTransportEndEvent(
+ connectionID,
+ triggerType,
+ activationReason,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index 142702d10eca43..e93ab3c5d0ac19 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -125,6 +125,14 @@ structs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt",
@@ -239,6 +247,8 @@ eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
new file mode 100644
index 00000000000000..0294da99b76ad4
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterCMAFContainerOptionsStruct(
+ val chunkDuration: UInt,
+ val CENCKey: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterCMAFContainerOptionsStruct {\n")
+ append("\tchunkDuration : $chunkDuration\n")
+ append("\tCENCKey : $CENCKey\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CHUNK_DURATION), chunkDuration)
+ if (CENCKey.isPresent) {
+ val optCENCKey = CENCKey.get()
+ put(ContextSpecificTag(TAG_CENC_KEY), optCENCKey)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CHUNK_DURATION = 0
+ private const val TAG_CENC_KEY = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterCMAFContainerOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val chunkDuration = tlvReader.getUInt(ContextSpecificTag(TAG_CHUNK_DURATION))
+ val CENCKey =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CENC_KEY))) {
+ Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CENC_KEY)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterCMAFContainerOptionsStruct(chunkDuration, CENCKey)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
new file mode 100644
index 00000000000000..c8703c5b1360ff
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterContainerOptionsStruct(
+ val containerType: UInt,
+ val CMAFContainerOptions: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterContainerOptionsStruct {\n")
+ append("\tcontainerType : $containerType\n")
+ append("\tCMAFContainerOptions : $CMAFContainerOptions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONTAINER_TYPE), containerType)
+ if (CMAFContainerOptions.isPresent) {
+ val optCMAFContainerOptions = CMAFContainerOptions.get()
+ optCMAFContainerOptions.toTlv(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS), this)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONTAINER_TYPE = 0
+ private const val TAG_CMAF_CONTAINER_OPTIONS = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterContainerOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val containerType = tlvReader.getUInt(ContextSpecificTag(TAG_CONTAINER_TYPE))
+ val CMAFContainerOptions =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS))) {
+ Optional.of(
+ PushAvStreamTransportClusterCMAFContainerOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterContainerOptionsStruct(containerType, CMAFContainerOptions)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
new file mode 100644
index 00000000000000..46d1fd77f04778
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterMetadataOptionsStruct(
+ val multiplexing: UInt,
+ val includeMotionZones: Boolean,
+ val enableMetadataPrivacySensitive: Boolean,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterMetadataOptionsStruct {\n")
+ append("\tmultiplexing : $multiplexing\n")
+ append("\tincludeMotionZones : $includeMotionZones\n")
+ append("\tenableMetadataPrivacySensitive : $enableMetadataPrivacySensitive\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_MULTIPLEXING), multiplexing)
+ put(ContextSpecificTag(TAG_INCLUDE_MOTION_ZONES), includeMotionZones)
+ put(ContextSpecificTag(TAG_ENABLE_METADATA_PRIVACY_SENSITIVE), enableMetadataPrivacySensitive)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_MULTIPLEXING = 0
+ private const val TAG_INCLUDE_MOTION_ZONES = 1
+ private const val TAG_ENABLE_METADATA_PRIVACY_SENSITIVE = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterMetadataOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val multiplexing = tlvReader.getUInt(ContextSpecificTag(TAG_MULTIPLEXING))
+ val includeMotionZones = tlvReader.getBoolean(ContextSpecificTag(TAG_INCLUDE_MOTION_ZONES))
+ val enableMetadataPrivacySensitive =
+ tlvReader.getBoolean(ContextSpecificTag(TAG_ENABLE_METADATA_PRIVACY_SENSITIVE))
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterMetadataOptionsStruct(
+ multiplexing,
+ includeMotionZones,
+ enableMetadataPrivacySensitive,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
new file mode 100644
index 00000000000000..ea6f9d8b132563
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportConfigurationStruct(
+ val connectionID: UInt,
+ val transportStatus: UInt,
+ val transportOptions: PushAvStreamTransportClusterTransportOptionsStruct,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportConfigurationStruct {\n")
+ append("\tconnectionID : $connectionID\n")
+ append("\ttransportStatus : $transportStatus\n")
+ append("\ttransportOptions : $transportOptions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONNECTION_ID), connectionID)
+ put(ContextSpecificTag(TAG_TRANSPORT_STATUS), transportStatus)
+ transportOptions.toTlv(ContextSpecificTag(TAG_TRANSPORT_OPTIONS), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONNECTION_ID = 0
+ private const val TAG_TRANSPORT_STATUS = 1
+ private const val TAG_TRANSPORT_OPTIONS = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportConfigurationStruct {
+ tlvReader.enterStructure(tlvTag)
+ val connectionID = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_ID))
+ val transportStatus = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSPORT_STATUS))
+ val transportOptions =
+ PushAvStreamTransportClusterTransportOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_TRANSPORT_OPTIONS),
+ tlvReader,
+ )
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportConfigurationStruct(
+ connectionID,
+ transportStatus,
+ transportOptions,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt
new file mode 100644
index 00000000000000..bcbec51b37d88c
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct(
+ val initialDuration: UInt,
+ val augmentationDuration: UInt,
+ val maxDuration: ULong,
+ val blindDuration: UInt,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct {\n")
+ append("\tinitialDuration : $initialDuration\n")
+ append("\taugmentationDuration : $augmentationDuration\n")
+ append("\tmaxDuration : $maxDuration\n")
+ append("\tblindDuration : $blindDuration\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_INITIAL_DURATION), initialDuration)
+ put(ContextSpecificTag(TAG_AUGMENTATION_DURATION), augmentationDuration)
+ put(ContextSpecificTag(TAG_MAX_DURATION), maxDuration)
+ put(ContextSpecificTag(TAG_BLIND_DURATION), blindDuration)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_INITIAL_DURATION = 0
+ private const val TAG_AUGMENTATION_DURATION = 1
+ private const val TAG_MAX_DURATION = 2
+ private const val TAG_BLIND_DURATION = 3
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val initialDuration = tlvReader.getUInt(ContextSpecificTag(TAG_INITIAL_DURATION))
+ val augmentationDuration = tlvReader.getUInt(ContextSpecificTag(TAG_AUGMENTATION_DURATION))
+ val maxDuration = tlvReader.getULong(ContextSpecificTag(TAG_MAX_DURATION))
+ val blindDuration = tlvReader.getUInt(ContextSpecificTag(TAG_BLIND_DURATION))
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct(
+ initialDuration,
+ augmentationDuration,
+ maxDuration,
+ blindDuration,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt
new file mode 100644
index 00000000000000..3ab9c9e3daad60
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt
@@ -0,0 +1,165 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportOptionsStruct(
+ val streamType: UInt,
+ val videoStreamID: Optional,
+ val audioStreamID: Optional,
+ val endpointID: UInt,
+ val url: String,
+ val triggerOptions: PushAvStreamTransportClusterTransportTriggerOptionsStruct,
+ val ingestMethod: UInt,
+ val containerFormat: UInt,
+ val containerOptions: PushAvStreamTransportClusterContainerOptionsStruct,
+ val metadataOptions: Optional,
+ val expiryTime: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportOptionsStruct {\n")
+ append("\tstreamType : $streamType\n")
+ append("\tvideoStreamID : $videoStreamID\n")
+ append("\taudioStreamID : $audioStreamID\n")
+ append("\tendpointID : $endpointID\n")
+ append("\turl : $url\n")
+ append("\ttriggerOptions : $triggerOptions\n")
+ append("\tingestMethod : $ingestMethod\n")
+ append("\tcontainerFormat : $containerFormat\n")
+ append("\tcontainerOptions : $containerOptions\n")
+ append("\tmetadataOptions : $metadataOptions\n")
+ append("\texpiryTime : $expiryTime\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_STREAM_TYPE), streamType)
+ if (videoStreamID.isPresent) {
+ val optvideoStreamID = videoStreamID.get()
+ put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), optvideoStreamID)
+ }
+ if (audioStreamID.isPresent) {
+ val optaudioStreamID = audioStreamID.get()
+ put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), optaudioStreamID)
+ }
+ put(ContextSpecificTag(TAG_ENDPOINT_ID), endpointID)
+ put(ContextSpecificTag(TAG_URL), url)
+ triggerOptions.toTlv(ContextSpecificTag(TAG_TRIGGER_OPTIONS), this)
+ put(ContextSpecificTag(TAG_INGEST_METHOD), ingestMethod)
+ put(ContextSpecificTag(TAG_CONTAINER_FORMAT), containerFormat)
+ containerOptions.toTlv(ContextSpecificTag(TAG_CONTAINER_OPTIONS), this)
+ if (metadataOptions.isPresent) {
+ val optmetadataOptions = metadataOptions.get()
+ optmetadataOptions.toTlv(ContextSpecificTag(TAG_METADATA_OPTIONS), this)
+ }
+ if (expiryTime.isPresent) {
+ val optexpiryTime = expiryTime.get()
+ put(ContextSpecificTag(TAG_EXPIRY_TIME), optexpiryTime)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_STREAM_TYPE = 0
+ private const val TAG_VIDEO_STREAM_ID = 1
+ private const val TAG_AUDIO_STREAM_ID = 2
+ private const val TAG_ENDPOINT_ID = 3
+ private const val TAG_URL = 4
+ private const val TAG_TRIGGER_OPTIONS = 5
+ private const val TAG_INGEST_METHOD = 6
+ private const val TAG_CONTAINER_FORMAT = 7
+ private const val TAG_CONTAINER_OPTIONS = 8
+ private const val TAG_METADATA_OPTIONS = 9
+ private const val TAG_EXPIRY_TIME = 10
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE))
+ val videoStreamID =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_VIDEO_STREAM_ID))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)))
+ } else {
+ Optional.empty()
+ }
+ val audioStreamID =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_STREAM_ID))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID)))
+ } else {
+ Optional.empty()
+ }
+ val endpointID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_ID))
+ val url = tlvReader.getString(ContextSpecificTag(TAG_URL))
+ val triggerOptions =
+ PushAvStreamTransportClusterTransportTriggerOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_TRIGGER_OPTIONS),
+ tlvReader,
+ )
+ val ingestMethod = tlvReader.getUInt(ContextSpecificTag(TAG_INGEST_METHOD))
+ val containerFormat = tlvReader.getUInt(ContextSpecificTag(TAG_CONTAINER_FORMAT))
+ val containerOptions =
+ PushAvStreamTransportClusterContainerOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_CONTAINER_OPTIONS),
+ tlvReader,
+ )
+ val metadataOptions =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_METADATA_OPTIONS))) {
+ Optional.of(
+ PushAvStreamTransportClusterMetadataOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_METADATA_OPTIONS),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val expiryTime =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXPIRY_TIME))) {
+ Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXPIRY_TIME)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportOptionsStruct(
+ streamType,
+ videoStreamID,
+ audioStreamID,
+ endpointID,
+ url,
+ triggerOptions,
+ ingestMethod,
+ containerFormat,
+ containerOptions,
+ metadataOptions,
+ expiryTime,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt
new file mode 100644
index 00000000000000..0c02a83ddf521b
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt
@@ -0,0 +1,158 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportTriggerOptionsStruct(
+ val triggerType: UInt,
+ val motionZones: Optional>?,
+ val motionSensitivity: Optional?,
+ val motionTimeControl:
+ Optional,
+ val maxPreRollLen: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportTriggerOptionsStruct {\n")
+ append("\ttriggerType : $triggerType\n")
+ append("\tmotionZones : $motionZones\n")
+ append("\tmotionSensitivity : $motionSensitivity\n")
+ append("\tmotionTimeControl : $motionTimeControl\n")
+ append("\tmaxPreRollLen : $maxPreRollLen\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_TRIGGER_TYPE), triggerType)
+ if (motionZones != null) {
+ if (motionZones.isPresent) {
+ val optmotionZones = motionZones.get()
+ startArray(ContextSpecificTag(TAG_MOTION_ZONES))
+ for (item in optmotionZones.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_MOTION_ZONES))
+ }
+ if (motionSensitivity != null) {
+ if (motionSensitivity.isPresent) {
+ val optmotionSensitivity = motionSensitivity.get()
+ put(ContextSpecificTag(TAG_MOTION_SENSITIVITY), optmotionSensitivity)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_MOTION_SENSITIVITY))
+ }
+ if (motionTimeControl.isPresent) {
+ val optmotionTimeControl = motionTimeControl.get()
+ optmotionTimeControl.toTlv(ContextSpecificTag(TAG_MOTION_TIME_CONTROL), this)
+ }
+ if (maxPreRollLen.isPresent) {
+ val optmaxPreRollLen = maxPreRollLen.get()
+ put(ContextSpecificTag(TAG_MAX_PRE_ROLL_LEN), optmaxPreRollLen)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TRIGGER_TYPE = 0
+ private const val TAG_MOTION_ZONES = 1
+ private const val TAG_MOTION_SENSITIVITY = 2
+ private const val TAG_MOTION_TIME_CONTROL = 3
+ private const val TAG_MAX_PRE_ROLL_LEN = 4
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportTriggerOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val triggerType = tlvReader.getUInt(ContextSpecificTag(TAG_TRIGGER_TYPE))
+ val motionZones =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MOTION_ZONES))) {
+ Optional.of(
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_MOTION_ZONES))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ PushAvStreamTransportClusterTransportZoneOptionsStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_MOTION_ZONES))
+ null
+ }
+ val motionSensitivity =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MOTION_SENSITIVITY))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MOTION_SENSITIVITY)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_MOTION_SENSITIVITY))
+ null
+ }
+ val motionTimeControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MOTION_TIME_CONTROL))) {
+ Optional.of(
+ PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.fromTlv(
+ ContextSpecificTag(TAG_MOTION_TIME_CONTROL),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val maxPreRollLen =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_PRE_ROLL_LEN))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MAX_PRE_ROLL_LEN)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportTriggerOptionsStruct(
+ triggerType,
+ motionZones,
+ motionSensitivity,
+ motionTimeControl,
+ maxPreRollLen,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt
new file mode 100644
index 00000000000000..666e4d235fc4db
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportZoneOptionsStruct(
+ val zone: UInt?,
+ val sensitivity: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportZoneOptionsStruct {\n")
+ append("\tzone : $zone\n")
+ append("\tsensitivity : $sensitivity\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (zone != null) {
+ put(ContextSpecificTag(TAG_ZONE), zone)
+ } else {
+ putNull(ContextSpecificTag(TAG_ZONE))
+ }
+ if (sensitivity.isPresent) {
+ val optsensitivity = sensitivity.get()
+ put(ContextSpecificTag(TAG_SENSITIVITY), optsensitivity)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_ZONE = 1
+ private const val TAG_SENSITIVITY = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportZoneOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val zone =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_ZONE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_ZONE))
+ null
+ }
+ val sensitivity =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_SENSITIVITY))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SENSITIVITY)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportZoneOptionsStruct(zone, sensitivity)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/PushAvStreamTransportCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/PushAvStreamTransportCluster.kt
new file mode 100644
index 00000000000000..d495f814678c30
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/PushAvStreamTransportCluster.kt
@@ -0,0 +1,1166 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UByteSubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class AllocatePushTransportResponse(
+ val connectionID: UShort,
+ val transportOptions: PushAvStreamTransportClusterTransportOptionsStruct,
+ val transportStatus: UByte,
+ )
+
+ class FindTransportResponse(
+ val streamConfigurations: List
+ )
+
+ class CurrentConnectionsAttribute(val value: List)
+
+ sealed class CurrentConnectionsAttributeSubscriptionState {
+ data class Success(val value: List) : CurrentConnectionsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrentConnectionsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentConnectionsAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun allocatePushTransport(
+ transportOptions: PushAvStreamTransportClusterTransportOptionsStruct,
+ timedInvokeTimeout: Duration? = null,
+ ): AllocatePushTransportResponse {
+ val commandId: UInt = 0u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_TRANSPORT_OPTIONS_REQ: Int = 0
+ transportOptions.toTlv(ContextSpecificTag(TAG_TRANSPORT_OPTIONS_REQ), tlvWriter)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CONNECTION_ID: Int = 0
+ var connectionID_decoded: UShort? = null
+
+ val TAG_TRANSPORT_OPTIONS: Int = 1
+ var transportOptions_decoded: PushAvStreamTransportClusterTransportOptionsStruct? = null
+
+ val TAG_TRANSPORT_STATUS: Int = 2
+ var transportStatus_decoded: UByte? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CONNECTION_ID)) {
+ connectionID_decoded = tlvReader.getUShort(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_TRANSPORT_OPTIONS)) {
+ transportOptions_decoded =
+ PushAvStreamTransportClusterTransportOptionsStruct.fromTlv(tag, tlvReader)
+ }
+
+ if (tag == ContextSpecificTag(TAG_TRANSPORT_STATUS)) {
+ transportStatus_decoded = tlvReader.getUByte(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (connectionID_decoded == null) {
+ throw IllegalStateException("connectionID not found in TLV")
+ }
+
+ if (transportOptions_decoded == null) {
+ throw IllegalStateException("transportOptions not found in TLV")
+ }
+
+ if (transportStatus_decoded == null) {
+ throw IllegalStateException("transportStatus not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return AllocatePushTransportResponse(
+ connectionID_decoded,
+ transportOptions_decoded,
+ transportStatus_decoded,
+ )
+ }
+
+ suspend fun deallocatePushTransport(connectionID: UShort, timedInvokeTimeout: Duration? = null) {
+ val commandId: UInt = 2u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CONNECTION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CONNECTION_ID_REQ), connectionID)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun modifyPushTransport(
+ connectionID: UShort,
+ transportOptions: PushAvStreamTransportClusterTransportOptionsStruct,
+ timedInvokeTimeout: Duration? = null,
+ ) {
+ val commandId: UInt = 3u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CONNECTION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CONNECTION_ID_REQ), connectionID)
+
+ val TAG_TRANSPORT_OPTIONS_REQ: Int = 1
+ transportOptions.toTlv(ContextSpecificTag(TAG_TRANSPORT_OPTIONS_REQ), tlvWriter)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun setTransportStatus(
+ connectionID: UShort,
+ transportStatus: UByte,
+ timedInvokeTimeout: Duration? = null,
+ ) {
+ val commandId: UInt = 4u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CONNECTION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CONNECTION_ID_REQ), connectionID)
+
+ val TAG_TRANSPORT_STATUS_REQ: Int = 1
+ tlvWriter.put(ContextSpecificTag(TAG_TRANSPORT_STATUS_REQ), transportStatus)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun manuallyTriggerTransport(
+ connectionID: UShort,
+ activationReason: UByte,
+ timeControl: PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct?,
+ timedInvokeTimeout: Duration? = null,
+ ) {
+ val commandId: UInt = 5u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CONNECTION_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CONNECTION_ID_REQ), connectionID)
+
+ val TAG_ACTIVATION_REASON_REQ: Int = 1
+ tlvWriter.put(ContextSpecificTag(TAG_ACTIVATION_REASON_REQ), activationReason)
+
+ val TAG_TIME_CONTROL_REQ: Int = 2
+ timeControl?.let { timeControl.toTlv(ContextSpecificTag(TAG_TIME_CONTROL_REQ), tlvWriter) }
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun findTransport(
+ connectionID: UShort?,
+ timedInvokeTimeout: Duration? = null,
+ ): FindTransportResponse {
+ val commandId: UInt = 6u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CONNECTION_ID_REQ: Int = 0
+ connectionID?.let { tlvWriter.put(ContextSpecificTag(TAG_CONNECTION_ID_REQ), connectionID) }
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_STREAM_CONFIGURATIONS: Int = 0
+ var streamConfigurations_decoded:
+ List? =
+ null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_STREAM_CONFIGURATIONS)) {
+ streamConfigurations_decoded =
+ buildList {
+ tlvReader.enterArray(tag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ PushAvStreamTransportClusterTransportConfigurationStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (streamConfigurations_decoded == null) {
+ throw IllegalStateException("streamConfigurations not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return FindTransportResponse(streamConfigurations_decoded)
+ }
+
+ suspend fun readSupportedContainerFormatsAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Supportedcontainerformats attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeSupportedContainerFormatsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Supportedcontainerformats attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readSupportedIngestMethodsAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Supportedingestmethods attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeSupportedIngestMethodsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Supportedingestmethods attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentConnectionsAttribute(): CurrentConnectionsAttribute {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentconnections attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUShort(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return CurrentConnectionsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentConnectionsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrentConnectionsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Currentconnections attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUShort(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(CurrentConnectionsAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentConnectionsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(PushAvStreamTransportCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 1365u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
new file mode 100644
index 00000000000000..0aeaf246b39378
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.eventstructs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterPushTransportBeginEvent(
+ val connectionID: UShort,
+ val triggerType: UByte,
+ val activationReason: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterPushTransportBeginEvent {\n")
+ append("\tconnectionID : $connectionID\n")
+ append("\ttriggerType : $triggerType\n")
+ append("\tactivationReason : $activationReason\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONNECTION_ID), connectionID)
+ put(ContextSpecificTag(TAG_TRIGGER_TYPE), triggerType)
+ if (activationReason.isPresent) {
+ val optactivationReason = activationReason.get()
+ put(ContextSpecificTag(TAG_ACTIVATION_REASON), optactivationReason)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONNECTION_ID = 0
+ private const val TAG_TRIGGER_TYPE = 1
+ private const val TAG_ACTIVATION_REASON = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterPushTransportBeginEvent {
+ tlvReader.enterStructure(tlvTag)
+ val connectionID = tlvReader.getUShort(ContextSpecificTag(TAG_CONNECTION_ID))
+ val triggerType = tlvReader.getUByte(ContextSpecificTag(TAG_TRIGGER_TYPE))
+ val activationReason =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_ACTIVATION_REASON))) {
+ Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_ACTIVATION_REASON)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterPushTransportBeginEvent(
+ connectionID,
+ triggerType,
+ activationReason,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt
new file mode 100644
index 00000000000000..adbda81d0386e1
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.eventstructs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterPushTransportEndEvent(
+ val connectionID: UShort,
+ val triggerType: UByte,
+ val activationReason: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterPushTransportEndEvent {\n")
+ append("\tconnectionID : $connectionID\n")
+ append("\ttriggerType : $triggerType\n")
+ append("\tactivationReason : $activationReason\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONNECTION_ID), connectionID)
+ put(ContextSpecificTag(TAG_TRIGGER_TYPE), triggerType)
+ if (activationReason.isPresent) {
+ val optactivationReason = activationReason.get()
+ put(ContextSpecificTag(TAG_ACTIVATION_REASON), optactivationReason)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONNECTION_ID = 0
+ private const val TAG_TRIGGER_TYPE = 1
+ private const val TAG_ACTIVATION_REASON = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterPushTransportEndEvent {
+ tlvReader.enterStructure(tlvTag)
+ val connectionID = tlvReader.getUShort(ContextSpecificTag(TAG_CONNECTION_ID))
+ val triggerType = tlvReader.getUByte(ContextSpecificTag(TAG_TRIGGER_TYPE))
+ val activationReason =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_ACTIVATION_REASON))) {
+ Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_ACTIVATION_REASON)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterPushTransportEndEvent(
+ connectionID,
+ triggerType,
+ activationReason,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index 700f257e643888..93f8e17bdce6dc 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -125,6 +125,14 @@ matter_structs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt",
@@ -239,6 +247,8 @@ matter_eventstructs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportEndEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt",
@@ -365,6 +375,7 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ProxyValidCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/PulseWidthModulationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/PumpConfigurationAndControlCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/PushAvStreamTransportCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/RadonConcentrationMeasurementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/RefrigeratorAlarmCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/RefrigeratorAndTemperatureControlledCabinetModeCluster.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
new file mode 100644
index 00000000000000..e2cd0333a31845
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterCMAFContainerOptionsStruct(
+ val chunkDuration: UShort,
+ val CENCKey: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterCMAFContainerOptionsStruct {\n")
+ append("\tchunkDuration : $chunkDuration\n")
+ append("\tCENCKey : $CENCKey\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CHUNK_DURATION), chunkDuration)
+ if (CENCKey.isPresent) {
+ val optCENCKey = CENCKey.get()
+ put(ContextSpecificTag(TAG_CENC_KEY), optCENCKey)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CHUNK_DURATION = 0
+ private const val TAG_CENC_KEY = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterCMAFContainerOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val chunkDuration = tlvReader.getUShort(ContextSpecificTag(TAG_CHUNK_DURATION))
+ val CENCKey =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CENC_KEY))) {
+ Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CENC_KEY)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterCMAFContainerOptionsStruct(chunkDuration, CENCKey)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
new file mode 100644
index 00000000000000..9de1ac752a32e8
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterContainerOptionsStruct(
+ val containerType: UByte,
+ val CMAFContainerOptions: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterContainerOptionsStruct {\n")
+ append("\tcontainerType : $containerType\n")
+ append("\tCMAFContainerOptions : $CMAFContainerOptions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONTAINER_TYPE), containerType)
+ if (CMAFContainerOptions.isPresent) {
+ val optCMAFContainerOptions = CMAFContainerOptions.get()
+ optCMAFContainerOptions.toTlv(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS), this)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONTAINER_TYPE = 0
+ private const val TAG_CMAF_CONTAINER_OPTIONS = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterContainerOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val containerType = tlvReader.getUByte(ContextSpecificTag(TAG_CONTAINER_TYPE))
+ val CMAFContainerOptions =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS))) {
+ Optional.of(
+ PushAvStreamTransportClusterCMAFContainerOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterContainerOptionsStruct(containerType, CMAFContainerOptions)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
new file mode 100644
index 00000000000000..e9d2004e72ce32
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterMetadataOptionsStruct(
+ val multiplexing: UByte,
+ val includeMotionZones: Boolean,
+ val enableMetadataPrivacySensitive: Boolean,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterMetadataOptionsStruct {\n")
+ append("\tmultiplexing : $multiplexing\n")
+ append("\tincludeMotionZones : $includeMotionZones\n")
+ append("\tenableMetadataPrivacySensitive : $enableMetadataPrivacySensitive\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_MULTIPLEXING), multiplexing)
+ put(ContextSpecificTag(TAG_INCLUDE_MOTION_ZONES), includeMotionZones)
+ put(ContextSpecificTag(TAG_ENABLE_METADATA_PRIVACY_SENSITIVE), enableMetadataPrivacySensitive)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_MULTIPLEXING = 0
+ private const val TAG_INCLUDE_MOTION_ZONES = 1
+ private const val TAG_ENABLE_METADATA_PRIVACY_SENSITIVE = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterMetadataOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val multiplexing = tlvReader.getUByte(ContextSpecificTag(TAG_MULTIPLEXING))
+ val includeMotionZones = tlvReader.getBoolean(ContextSpecificTag(TAG_INCLUDE_MOTION_ZONES))
+ val enableMetadataPrivacySensitive =
+ tlvReader.getBoolean(ContextSpecificTag(TAG_ENABLE_METADATA_PRIVACY_SENSITIVE))
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterMetadataOptionsStruct(
+ multiplexing,
+ includeMotionZones,
+ enableMetadataPrivacySensitive,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
new file mode 100644
index 00000000000000..0b353db8ce3e0a
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportConfigurationStruct(
+ val connectionID: UShort,
+ val transportStatus: UByte,
+ val transportOptions: PushAvStreamTransportClusterTransportOptionsStruct,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportConfigurationStruct {\n")
+ append("\tconnectionID : $connectionID\n")
+ append("\ttransportStatus : $transportStatus\n")
+ append("\ttransportOptions : $transportOptions\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CONNECTION_ID), connectionID)
+ put(ContextSpecificTag(TAG_TRANSPORT_STATUS), transportStatus)
+ transportOptions.toTlv(ContextSpecificTag(TAG_TRANSPORT_OPTIONS), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CONNECTION_ID = 0
+ private const val TAG_TRANSPORT_STATUS = 1
+ private const val TAG_TRANSPORT_OPTIONS = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportConfigurationStruct {
+ tlvReader.enterStructure(tlvTag)
+ val connectionID = tlvReader.getUShort(ContextSpecificTag(TAG_CONNECTION_ID))
+ val transportStatus = tlvReader.getUByte(ContextSpecificTag(TAG_TRANSPORT_STATUS))
+ val transportOptions =
+ PushAvStreamTransportClusterTransportOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_TRANSPORT_OPTIONS),
+ tlvReader,
+ )
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportConfigurationStruct(
+ connectionID,
+ transportStatus,
+ transportOptions,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt
new file mode 100644
index 00000000000000..d60d3525daec65
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.kt
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct(
+ val initialDuration: UShort,
+ val augmentationDuration: UShort,
+ val maxDuration: UInt,
+ val blindDuration: UShort,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct {\n")
+ append("\tinitialDuration : $initialDuration\n")
+ append("\taugmentationDuration : $augmentationDuration\n")
+ append("\tmaxDuration : $maxDuration\n")
+ append("\tblindDuration : $blindDuration\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_INITIAL_DURATION), initialDuration)
+ put(ContextSpecificTag(TAG_AUGMENTATION_DURATION), augmentationDuration)
+ put(ContextSpecificTag(TAG_MAX_DURATION), maxDuration)
+ put(ContextSpecificTag(TAG_BLIND_DURATION), blindDuration)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_INITIAL_DURATION = 0
+ private const val TAG_AUGMENTATION_DURATION = 1
+ private const val TAG_MAX_DURATION = 2
+ private const val TAG_BLIND_DURATION = 3
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct {
+ tlvReader.enterStructure(tlvTag)
+ val initialDuration = tlvReader.getUShort(ContextSpecificTag(TAG_INITIAL_DURATION))
+ val augmentationDuration = tlvReader.getUShort(ContextSpecificTag(TAG_AUGMENTATION_DURATION))
+ val maxDuration = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_DURATION))
+ val blindDuration = tlvReader.getUShort(ContextSpecificTag(TAG_BLIND_DURATION))
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct(
+ initialDuration,
+ augmentationDuration,
+ maxDuration,
+ blindDuration,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt
new file mode 100644
index 00000000000000..15431c83a961c0
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportOptionsStruct.kt
@@ -0,0 +1,165 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportOptionsStruct(
+ val streamType: UByte,
+ val videoStreamID: Optional,
+ val audioStreamID: Optional,
+ val endpointID: UShort,
+ val url: String,
+ val triggerOptions: PushAvStreamTransportClusterTransportTriggerOptionsStruct,
+ val ingestMethod: UByte,
+ val containerFormat: UByte,
+ val containerOptions: PushAvStreamTransportClusterContainerOptionsStruct,
+ val metadataOptions: Optional,
+ val expiryTime: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportOptionsStruct {\n")
+ append("\tstreamType : $streamType\n")
+ append("\tvideoStreamID : $videoStreamID\n")
+ append("\taudioStreamID : $audioStreamID\n")
+ append("\tendpointID : $endpointID\n")
+ append("\turl : $url\n")
+ append("\ttriggerOptions : $triggerOptions\n")
+ append("\tingestMethod : $ingestMethod\n")
+ append("\tcontainerFormat : $containerFormat\n")
+ append("\tcontainerOptions : $containerOptions\n")
+ append("\tmetadataOptions : $metadataOptions\n")
+ append("\texpiryTime : $expiryTime\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_STREAM_TYPE), streamType)
+ if (videoStreamID.isPresent) {
+ val optvideoStreamID = videoStreamID.get()
+ put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), optvideoStreamID)
+ }
+ if (audioStreamID.isPresent) {
+ val optaudioStreamID = audioStreamID.get()
+ put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), optaudioStreamID)
+ }
+ put(ContextSpecificTag(TAG_ENDPOINT_ID), endpointID)
+ put(ContextSpecificTag(TAG_URL), url)
+ triggerOptions.toTlv(ContextSpecificTag(TAG_TRIGGER_OPTIONS), this)
+ put(ContextSpecificTag(TAG_INGEST_METHOD), ingestMethod)
+ put(ContextSpecificTag(TAG_CONTAINER_FORMAT), containerFormat)
+ containerOptions.toTlv(ContextSpecificTag(TAG_CONTAINER_OPTIONS), this)
+ if (metadataOptions.isPresent) {
+ val optmetadataOptions = metadataOptions.get()
+ optmetadataOptions.toTlv(ContextSpecificTag(TAG_METADATA_OPTIONS), this)
+ }
+ if (expiryTime.isPresent) {
+ val optexpiryTime = expiryTime.get()
+ put(ContextSpecificTag(TAG_EXPIRY_TIME), optexpiryTime)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_STREAM_TYPE = 0
+ private const val TAG_VIDEO_STREAM_ID = 1
+ private const val TAG_AUDIO_STREAM_ID = 2
+ private const val TAG_ENDPOINT_ID = 3
+ private const val TAG_URL = 4
+ private const val TAG_TRIGGER_OPTIONS = 5
+ private const val TAG_INGEST_METHOD = 6
+ private const val TAG_CONTAINER_FORMAT = 7
+ private const val TAG_CONTAINER_OPTIONS = 8
+ private const val TAG_METADATA_OPTIONS = 9
+ private const val TAG_EXPIRY_TIME = 10
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE))
+ val videoStreamID =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_VIDEO_STREAM_ID))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)))
+ } else {
+ Optional.empty()
+ }
+ val audioStreamID =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_STREAM_ID))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID)))
+ } else {
+ Optional.empty()
+ }
+ val endpointID = tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT_ID))
+ val url = tlvReader.getString(ContextSpecificTag(TAG_URL))
+ val triggerOptions =
+ PushAvStreamTransportClusterTransportTriggerOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_TRIGGER_OPTIONS),
+ tlvReader,
+ )
+ val ingestMethod = tlvReader.getUByte(ContextSpecificTag(TAG_INGEST_METHOD))
+ val containerFormat = tlvReader.getUByte(ContextSpecificTag(TAG_CONTAINER_FORMAT))
+ val containerOptions =
+ PushAvStreamTransportClusterContainerOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_CONTAINER_OPTIONS),
+ tlvReader,
+ )
+ val metadataOptions =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_METADATA_OPTIONS))) {
+ Optional.of(
+ PushAvStreamTransportClusterMetadataOptionsStruct.fromTlv(
+ ContextSpecificTag(TAG_METADATA_OPTIONS),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val expiryTime =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXPIRY_TIME))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_EXPIRY_TIME)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportOptionsStruct(
+ streamType,
+ videoStreamID,
+ audioStreamID,
+ endpointID,
+ url,
+ triggerOptions,
+ ingestMethod,
+ containerFormat,
+ containerOptions,
+ metadataOptions,
+ expiryTime,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt
new file mode 100644
index 00000000000000..7bf4183adfc741
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportTriggerOptionsStruct.kt
@@ -0,0 +1,158 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportTriggerOptionsStruct(
+ val triggerType: UByte,
+ val motionZones: Optional>?,
+ val motionSensitivity: Optional?,
+ val motionTimeControl:
+ Optional,
+ val maxPreRollLen: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportTriggerOptionsStruct {\n")
+ append("\ttriggerType : $triggerType\n")
+ append("\tmotionZones : $motionZones\n")
+ append("\tmotionSensitivity : $motionSensitivity\n")
+ append("\tmotionTimeControl : $motionTimeControl\n")
+ append("\tmaxPreRollLen : $maxPreRollLen\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_TRIGGER_TYPE), triggerType)
+ if (motionZones != null) {
+ if (motionZones.isPresent) {
+ val optmotionZones = motionZones.get()
+ startArray(ContextSpecificTag(TAG_MOTION_ZONES))
+ for (item in optmotionZones.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_MOTION_ZONES))
+ }
+ if (motionSensitivity != null) {
+ if (motionSensitivity.isPresent) {
+ val optmotionSensitivity = motionSensitivity.get()
+ put(ContextSpecificTag(TAG_MOTION_SENSITIVITY), optmotionSensitivity)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_MOTION_SENSITIVITY))
+ }
+ if (motionTimeControl.isPresent) {
+ val optmotionTimeControl = motionTimeControl.get()
+ optmotionTimeControl.toTlv(ContextSpecificTag(TAG_MOTION_TIME_CONTROL), this)
+ }
+ if (maxPreRollLen.isPresent) {
+ val optmaxPreRollLen = maxPreRollLen.get()
+ put(ContextSpecificTag(TAG_MAX_PRE_ROLL_LEN), optmaxPreRollLen)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TRIGGER_TYPE = 0
+ private const val TAG_MOTION_ZONES = 1
+ private const val TAG_MOTION_SENSITIVITY = 2
+ private const val TAG_MOTION_TIME_CONTROL = 3
+ private const val TAG_MAX_PRE_ROLL_LEN = 4
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportTriggerOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val triggerType = tlvReader.getUByte(ContextSpecificTag(TAG_TRIGGER_TYPE))
+ val motionZones =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MOTION_ZONES))) {
+ Optional.of(
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_MOTION_ZONES))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ PushAvStreamTransportClusterTransportZoneOptionsStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_MOTION_ZONES))
+ null
+ }
+ val motionSensitivity =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MOTION_SENSITIVITY))) {
+ Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_MOTION_SENSITIVITY)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_MOTION_SENSITIVITY))
+ null
+ }
+ val motionTimeControl =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MOTION_TIME_CONTROL))) {
+ Optional.of(
+ PushAvStreamTransportClusterTransportMotionTriggerTimeControlStruct.fromTlv(
+ ContextSpecificTag(TAG_MOTION_TIME_CONTROL),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val maxPreRollLen =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_PRE_ROLL_LEN))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MAX_PRE_ROLL_LEN)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportTriggerOptionsStruct(
+ triggerType,
+ motionZones,
+ motionSensitivity,
+ motionTimeControl,
+ maxPreRollLen,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt
new file mode 100644
index 00000000000000..a14896415f0b4f
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/PushAvStreamTransportClusterTransportZoneOptionsStruct.kt
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class PushAvStreamTransportClusterTransportZoneOptionsStruct(
+ val zone: UShort?,
+ val sensitivity: Optional,
+) {
+ override fun toString(): String = buildString {
+ append("PushAvStreamTransportClusterTransportZoneOptionsStruct {\n")
+ append("\tzone : $zone\n")
+ append("\tsensitivity : $sensitivity\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (zone != null) {
+ put(ContextSpecificTag(TAG_ZONE), zone)
+ } else {
+ putNull(ContextSpecificTag(TAG_ZONE))
+ }
+ if (sensitivity.isPresent) {
+ val optsensitivity = sensitivity.get()
+ put(ContextSpecificTag(TAG_SENSITIVITY), optsensitivity)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_ZONE = 1
+ private const val TAG_SENSITIVITY = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): PushAvStreamTransportClusterTransportZoneOptionsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val zone =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUShort(ContextSpecificTag(TAG_ZONE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_ZONE))
+ null
+ }
+ val sensitivity =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_SENSITIVITY))) {
+ Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_SENSITIVITY)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return PushAvStreamTransportClusterTransportZoneOptionsStruct(zone, sensitivity)
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 1c959aa8fc3c15..ec5a77895adac2 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -42501,6 +42501,180 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
break;
}
+ case app::Clusters::PushAvStreamTransport::Id: {
+ using namespace app::Clusters::PushAvStreamTransport;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::SupportedContainerFormats::Id: {
+ using TypeInfo = Attributes::SupportedContainerFormats::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::SupportedIngestMethods::Id: {
+ using TypeInfo = Attributes::SupportedIngestMethods::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::CurrentConnections::Id: {
+ using TypeInfo = Attributes::CurrentConnections::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Integer";
+ std::string newElement_0CtorSignature = "(I)V";
+ jint jninewElement_0 = static_cast