-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated with ./scripts/tools/zap_regen_all.py
- Loading branch information
Showing
18 changed files
with
1,782 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
...icecontroller/cluster/eventstructs/PushAvStreamTransportClusterPushTransportBeginEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<UInt>, | ||
) { | ||
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, | ||
) | ||
} | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...evicecontroller/cluster/structs/PushAvStreamTransportClusterCMAFContainerOptionsStruct.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.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<ByteArray>?, | ||
) { | ||
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 != null) { | ||
if (CENCKey.isPresent) { | ||
val optCENCKey = CENCKey.get() | ||
put(ContextSpecificTag(TAG_CENC_KEY), optCENCKey) | ||
} | ||
} else { | ||
putNull(ContextSpecificTag(TAG_CENC_KEY)) | ||
} | ||
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.isNull()) { | ||
if (tlvReader.isNextTag(ContextSpecificTag(TAG_CENC_KEY))) { | ||
Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CENC_KEY))) | ||
} else { | ||
Optional.empty() | ||
} | ||
} else { | ||
tlvReader.getNull(ContextSpecificTag(TAG_CENC_KEY)) | ||
null | ||
} | ||
|
||
tlvReader.exitContainer() | ||
|
||
return PushAvStreamTransportClusterCMAFContainerOptionsStruct(chunkDuration, CENCKey) | ||
} | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
...ip/devicecontroller/cluster/structs/PushAvStreamTransportClusterContainerOptionsStruct.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* | ||
* 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<PushAvStreamTransportClusterCMAFContainerOptionsStruct>?, | ||
) { | ||
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 != null) { | ||
if (CMAFContainerOptions.isPresent) { | ||
val optCMAFContainerOptions = CMAFContainerOptions.get() | ||
optCMAFContainerOptions.toTlv(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS), this) | ||
} | ||
} else { | ||
putNull(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS)) | ||
} | ||
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.isNull()) { | ||
if (tlvReader.isNextTag(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS))) { | ||
Optional.of( | ||
PushAvStreamTransportClusterCMAFContainerOptionsStruct.fromTlv( | ||
ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS), | ||
tlvReader, | ||
) | ||
) | ||
} else { | ||
Optional.empty() | ||
} | ||
} else { | ||
tlvReader.getNull(ContextSpecificTag(TAG_CMAF_CONTAINER_OPTIONS)) | ||
null | ||
} | ||
|
||
tlvReader.exitContainer() | ||
|
||
return PushAvStreamTransportClusterContainerOptionsStruct(containerType, CMAFContainerOptions) | ||
} | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
...hip/devicecontroller/cluster/structs/PushAvStreamTransportClusterMetadataOptionsStruct.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
) | ||
} | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
...icecontroller/cluster/structs/PushAvStreamTransportClusterTransportConfigurationStruct.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.