Skip to content

Commit

Permalink
Regen
Browse files Browse the repository at this point in the history
  • Loading branch information
robszewczyk committed Feb 15, 2024
1 parent 5bbc159 commit d1d6787
Show file tree
Hide file tree
Showing 557 changed files with 113,929 additions and 125,159 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4456,7 +4456,7 @@ provisional cluster EnergyEvse = 153 {
}

/** The Power Topology Cluster provides a mechanism for expressing how power is flowing between endpoints. */
cluster PowerTopology = 156 {
provisional cluster PowerTopology = 156 {
revision 1;

bitmap Feature : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,20 @@
package chip.devicecontroller.cluster.eventstructs

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

import java.util.Optional

class AccessControlClusterAccessControlEntryChangedEvent (
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?,
val fabricIndex: UInt) {
override fun toString(): String = buildString {
class AccessControlClusterAccessControlEntryChangedEvent(
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue:
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?,
val fabricIndex: UInt
) {
override fun toString(): String = buildString {
append("AccessControlClusterAccessControlEntryChangedEvent {\n")
append("\tadminNodeID : $adminNodeID\n")
append("\tadminPasscodeID : $adminPasscodeID\n")
Expand All @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlEntryChangedEvent (
tlvWriter.apply {
startStructure(tlvTag)
if (adminNodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
if (adminPasscodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType)
if (latestValue != null) {
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
endStructure()
}
Expand All @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlEntryChangedEvent (
private const val TAG_LATEST_VALUE = 4
private const val TAG_FABRIC_INDEX = 254

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent {
fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
): AccessControlClusterAccessControlEntryChangedEvent {
tlvReader.enterStructure(tlvTag)
val adminNodeID = if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID = if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val adminNodeID =
if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID =
if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE))
val latestValue = if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val latestValue =
if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct
.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))

tlvReader.exitContainer()

return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex)
return AccessControlClusterAccessControlEntryChangedEvent(
adminNodeID,
adminPasscodeID,
changeType,
latestValue,
fabricIndex
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,20 @@
package chip.devicecontroller.cluster.eventstructs

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

import java.util.Optional

class AccessControlClusterAccessControlExtensionChangedEvent (
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?,
val fabricIndex: UInt) {
override fun toString(): String = buildString {
class AccessControlClusterAccessControlExtensionChangedEvent(
val adminNodeID: ULong?,
val adminPasscodeID: UInt?,
val changeType: UInt,
val latestValue:
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?,
val fabricIndex: UInt
) {
override fun toString(): String = buildString {
append("AccessControlClusterAccessControlExtensionChangedEvent {\n")
append("\tadminNodeID : $adminNodeID\n")
append("\tadminPasscodeID : $adminPasscodeID\n")
Expand All @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent (
tlvWriter.apply {
startStructure(tlvTag)
if (adminNodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
}
if (adminPasscodeID != null) {
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID)
} else {
putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
}
put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType)
if (latestValue != null) {
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this)
} else {
putNull(ContextSpecificTag(TAG_LATEST_VALUE))
}
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
endStructure()
}
Expand All @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlExtensionChangedEvent (
private const val TAG_LATEST_VALUE = 4
private const val TAG_FABRIC_INDEX = 254

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent {
fun fromTlv(
tlvTag: Tag,
tlvReader: TlvReader
): AccessControlClusterAccessControlExtensionChangedEvent {
tlvReader.enterStructure(tlvTag)
val adminNodeID = if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID = if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val adminNodeID =
if (!tlvReader.isNull()) {
tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D))
null
}
val adminPasscodeID =
if (!tlvReader.isNull()) {
tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D))
null
}
val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE))
val latestValue = if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val latestValue =
if (!tlvReader.isNull()) {
chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct
.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader)
} else {
tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE))
null
}
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))

tlvReader.exitContainer()

return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex)
return AccessControlClusterAccessControlExtensionChangedEvent(
adminNodeID,
adminPasscodeID,
changeType,
latestValue,
fabricIndex
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,14 @@
package chip.devicecontroller.cluster.eventstructs

import chip.devicecontroller.cluster.*
import matter.tlv.AnonymousTag
import java.util.Optional
import matter.tlv.ContextSpecificTag
import matter.tlv.Tag
import matter.tlv.TlvParsingException
import matter.tlv.TlvReader
import matter.tlv.TlvWriter

import java.util.Optional

class AccountLoginClusterLoggedOutEvent (
val node: Optional<ULong>) {
override fun toString(): String = buildString {
class AccountLoginClusterLoggedOutEvent(val node: Optional<ULong>) {
override fun toString(): String = buildString {
append("AccountLoginClusterLoggedOutEvent {\n")
append("\tnode : $node\n")
append("}\n")
Expand All @@ -38,24 +34,25 @@ class AccountLoginClusterLoggedOutEvent (
tlvWriter.apply {
startStructure(tlvTag)
if (node.isPresent) {
val optnode = node.get()
put(ContextSpecificTag(TAG_NODE), optnode)
}
val optnode = node.get()
put(ContextSpecificTag(TAG_NODE), optnode)
}
endStructure()
}
}

companion object {
private const val TAG_NODE = 0

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccountLoginClusterLoggedOutEvent {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccountLoginClusterLoggedOutEvent {
tlvReader.enterStructure(tlvTag)
val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) {
Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE)))
} else {
Optional.empty()
}

val node =
if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) {
Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE)))
} else {
Optional.empty()
}

tlvReader.exitContainer()

return AccountLoginClusterLoggedOutEvent(node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@
package chip.devicecontroller.cluster.eventstructs

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

import java.util.Optional

class ActionsClusterActionFailedEvent (
val actionID: UInt,
val invokeID: ULong,
val newState: UInt,
val error: UInt) {
override fun toString(): String = buildString {
class ActionsClusterActionFailedEvent(
val actionID: UInt,
val invokeID: ULong,
val newState: UInt,
val error: UInt
) {
override fun toString(): String = buildString {
append("ActionsClusterActionFailedEvent {\n")
append("\tactionID : $actionID\n")
append("\tinvokeID : $invokeID\n")
Expand All @@ -57,13 +54,13 @@ class ActionsClusterActionFailedEvent (
private const val TAG_NEW_STATE = 2
private const val TAG_ERROR = 3

fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent {
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent {
tlvReader.enterStructure(tlvTag)
val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D))
val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D))
val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE))
val error = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR))

tlvReader.exitContainer()

return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error)
Expand Down
Loading

0 comments on commit d1d6787

Please sign in to comment.