Skip to content

Commit

Permalink
Updating regen
Browse files Browse the repository at this point in the history
  • Loading branch information
abeck-riis committed Nov 2, 2023
1 parent b390c3a commit b5ba4a4
Show file tree
Hide file tree
Showing 243 changed files with 11,014 additions and 6,200 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ import matter.tlv.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class WiFiNetworkDiagnosticsClusterAssociationFailureEvent(
val associationFailureCause: UInt,
val status: UInt
) {
override fun toString(): String = buildString {
import java.util.Optional

class WiFiNetworkDiagnosticsClusterAssociationFailureEvent (
val associationFailureCause: UInt,
val status: UInt) {
override fun toString(): String = buildString {
append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n")
append("\tassociationFailureCause : $associationFailureCause\n")
append("\tstatus : $status\n")
Expand All @@ -50,8 +51,7 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent(

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent {
tlvReader.enterStructure(tlvTag)
val associationFailureCause =
tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE))
val associationFailureCause = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE))
val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS))

tlvReader.exitContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.*
import matter.tlv.AnonymousTag
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class MicrowaveOvenModeClusterModeOptionStruct(
val label: String,
val mode: UInt,
val modeTags: List<MicrowaveOvenModeClusterModeTagStruct>
) {
override fun toString(): String = buildString {
import java.util.Optional

class MicrowaveOvenModeClusterModeOptionStruct (
val label: String,
val mode: UInt,
val modeTags: List<MicrowaveOvenModeClusterModeTagStruct>) {
override fun toString(): String = buildString {
append("MicrowaveOvenModeClusterModeOptionStruct {\n")
append("\tlabel : $label\n")
append("\tmode : $mode\n")
Expand All @@ -55,19 +57,18 @@ class MicrowaveOvenModeClusterModeOptionStruct(
private const val TAG_MODE = 1
private const val TAG_MODE_TAGS = 2

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MicrowaveOvenModeClusterModeOptionStruct {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MicrowaveOvenModeClusterModeOptionStruct {
tlvReader.enterStructure(tlvTag)
val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL))
val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE))
val modeTags =
buildList<MicrowaveOvenModeClusterModeTagStruct> {
tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS))
while (!tlvReader.isEndOfContainer()) {
add(MicrowaveOvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader))
}
tlvReader.exitContainer()
}

val modeTags = buildList<MicrowaveOvenModeClusterModeTagStruct> {
tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS))
while(!tlvReader.isEndOfContainer()) {
add(MicrowaveOvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader))
}
tlvReader.exitContainer()
}

tlvReader.exitContainer()

return MicrowaveOvenModeClusterModeOptionStruct(label, mode, modeTags)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@
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.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class MicrowaveOvenModeClusterModeTagStruct(val mfgCode: Optional<UInt>, val value: UInt) {
override fun toString(): String = buildString {
import java.util.Optional

class MicrowaveOvenModeClusterModeTagStruct (
val mfgCode: Optional<UInt>,
val value: UInt) {
override fun toString(): String = buildString {
append("MicrowaveOvenModeClusterModeTagStruct {\n")
append("\tmfgCode : $mfgCode\n")
append("\tvalue : $value\n")
Expand All @@ -35,9 +40,9 @@ class MicrowaveOvenModeClusterModeTagStruct(val mfgCode: Optional<UInt>, val val
tlvWriter.apply {
startStructure(tlvTag)
if (mfgCode.isPresent) {
val optmfgCode = mfgCode.get()
put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode)
}
val optmfgCode = mfgCode.get()
put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode)
}
put(ContextSpecificTag(TAG_VALUE), value)
endStructure()
}
Expand All @@ -47,16 +52,15 @@ class MicrowaveOvenModeClusterModeTagStruct(val mfgCode: Optional<UInt>, val val
private const val TAG_MFG_CODE = 0
private const val TAG_VALUE = 1

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MicrowaveOvenModeClusterModeTagStruct {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MicrowaveOvenModeClusterModeTagStruct {
tlvReader.enterStructure(tlvTag)
val mfgCode =
if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) {
Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)))
} else {
Optional.empty()
}
val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) {
Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)))
} else {
Optional.empty()
}
val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE))

tlvReader.exitContainer()

return MicrowaveOvenModeClusterModeTagStruct(mfgCode, value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,44 @@ package matter.devicecontroller.cluster.clusters
import matter.devicecontroller.cluster.structs.*

class AccessControlCluster(private val endpointId: UShort) {
class AclAttribute(val value: List<AccessControlClusterAccessControlEntryStruct>)
class AclAttribute(
val value: List<AccessControlClusterAccessControlEntryStruct>
)

class ExtensionAttribute(val value: List<AccessControlClusterAccessControlExtensionStruct>?)
class ExtensionAttribute(
val value: List<AccessControlClusterAccessControlExtensionStruct>?
)

class GeneratedCommandListAttribute(val value: List<UInt>)
class GeneratedCommandListAttribute(
val value: List<UInt>
)

class AcceptedCommandListAttribute(val value: List<UInt>)
class AcceptedCommandListAttribute(
val value: List<UInt>
)

class EventListAttribute(val value: List<UInt>)
class EventListAttribute(
val value: List<UInt>
)

class AttributeListAttribute(val value: List<UInt>)
class AttributeListAttribute(
val value: List<UInt>
)

suspend fun readAclAttribute(): AclAttribute {
// Implementation needs to be added here
}

suspend fun readAclAttributeWithFabricFilter(isFabricFiltered: Boolean): AclAttribute {
suspend fun readAclAttributeWithFabricFilter(
isFabricFiltered: Boolean
): AclAttribute {
// Implementation needs to be added here
}

suspend fun writeAclAttribute(value: List<AccessControlClusterAccessControlEntryStruct>) {

suspend fun writeAclAttribute(
value: List<AccessControlClusterAccessControlEntryStruct>
) {
// Implementation needs to be added here
}

Expand All @@ -51,7 +68,10 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun subscribeAclAttribute(minInterval: Int, maxInterval: Int): AclAttribute {
suspend fun subscribeAclAttribute(
minInterval: Int,
maxInterval: Int
): AclAttribute {
// Implementation needs to be added here
}

Expand All @@ -65,6 +85,7 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}


suspend fun writeExtensionAttribute(
value: List<AccessControlClusterAccessControlExtensionStruct>
) {
Expand All @@ -78,7 +99,10 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun subscribeExtensionAttribute(minInterval: Int, maxInterval: Int): ExtensionAttribute {
suspend fun subscribeExtensionAttribute(
minInterval: Int,
maxInterval: Int
): ExtensionAttribute {
// Implementation needs to be added here
}

Expand Down Expand Up @@ -141,7 +165,10 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute {
suspend fun subscribeEventListAttribute(
minInterval: Int,
maxInterval: Int
): EventListAttribute {
// Implementation needs to be added here
}

Expand All @@ -160,15 +187,21 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt {
suspend fun subscribeFeatureMapAttribute(
minInterval: Int,
maxInterval: Int
): UInt {
// Implementation needs to be added here
}

suspend fun readClusterRevisionAttribute(): UShort {
// Implementation needs to be added here
}

suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort {
suspend fun subscribeClusterRevisionAttribute(
minInterval: Int,
maxInterval: Int
): UShort {
// Implementation needs to be added here
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,43 @@ package matter.devicecontroller.cluster.clusters
import matter.devicecontroller.cluster.structs.*

class AccountLoginCluster(private val endpointId: UShort) {
class GetSetupPINResponse(val setupPIN: String)
class GetSetupPINResponse(
val setupPIN: String
)

class GeneratedCommandListAttribute(val value: List<UInt>)
class GeneratedCommandListAttribute(
val value: List<UInt>
)

class AcceptedCommandListAttribute(val value: List<UInt>)
class AcceptedCommandListAttribute(
val value: List<UInt>
)

class EventListAttribute(val value: List<UInt>)
class EventListAttribute(
val value: List<UInt>
)

class AttributeListAttribute(val value: List<UInt>)
class AttributeListAttribute(
val value: List<UInt>
)

suspend fun getSetupPIN(
tempAccountIdentifier: String,
timedInvokeTimeoutMs: Int? = null
): GetSetupPINResponse {
suspend fun getSetupPIN(tempAccountIdentifier: String, timedInvokeTimeoutMs: Int? = null): GetSetupPINResponse {
if (timedInvokeTimeoutMs != null) {
// Do the action with timedInvokeTimeoutMs
} else {
// Do the action without timedInvokeTimeoutMs
}
}

suspend fun login(
tempAccountIdentifier: String,
setupPIN: String,
timedInvokeTimeoutMs: Int? = null
) {
suspend fun login(tempAccountIdentifier: String, setupPIN: String, timedInvokeTimeoutMs: Int? = null) {
if (timedInvokeTimeoutMs != null) {
// Do the action with timedInvokeTimeoutMs
} else {
// Do the action without timedInvokeTimeoutMs
}
}

suspend fun logout(timedInvokeTimeoutMs: Int? = null) {
suspend fun logout(timedInvokeTimeoutMs: Int? = null) {
if (timedInvokeTimeoutMs != null) {
// Do the action with timedInvokeTimeoutMs
} else {
Expand Down Expand Up @@ -87,7 +90,10 @@ class AccountLoginCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute {
suspend fun subscribeEventListAttribute(
minInterval: Int,
maxInterval: Int
): EventListAttribute {
// Implementation needs to be added here
}

Expand All @@ -106,15 +112,21 @@ class AccountLoginCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt {
suspend fun subscribeFeatureMapAttribute(
minInterval: Int,
maxInterval: Int
): UInt {
// Implementation needs to be added here
}

suspend fun readClusterRevisionAttribute(): UShort {
// Implementation needs to be added here
}

suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort {
suspend fun subscribeClusterRevisionAttribute(
minInterval: Int,
maxInterval: Int
): UShort {
// Implementation needs to be added here
}

Expand Down
Loading

0 comments on commit b5ba4a4

Please sign in to comment.