Skip to content

Commit

Permalink
Regenerate files correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterC1965 committed Jun 26, 2024
1 parent dec0b2e commit 3fbdfec
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class EnergyEvseClusterEnergyTransferStartedEvent(
val sessionID: ULong,
val state: UInt,
val maximumCurrent: Long,
val maximumDischargingCurrent: Optional<Long>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEnergyTransferStartedEvent {\n")
Expand Down Expand Up @@ -75,7 +76,7 @@ class EnergyEvseClusterEnergyTransferStartedEvent(
sessionID,
state,
maximumCurrent,
maximumDischargingCurrent
maximumDischargingCurrent,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class EnergyEvseClusterEnergyTransferStoppedEvent(
val state: UInt,
val reason: UInt,
val energyTransferred: Long,
val energyDischarged: Optional<Long>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEnergyTransferStoppedEvent {\n")
Expand Down Expand Up @@ -81,6 +82,7 @@ class EnergyEvseClusterEnergyTransferStoppedEvent(
state,
reason,
energyTransferred,
energyDischarged,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import matter.tlv.TlvReader
import matter.tlv.TlvWriter

class EnergyEvseClusterChargingTargetScheduleStruct(
val dayOfWeekForSequence: UInt,
val chargingTargets: List<EnergyEvseClusterChargingTargetStruct>,
val dayOfWeekForSequence: Optional<UInt>,
val chargingTargets: Optional<List<EnergyEvseClusterChargingTargetStruct>>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterChargingTargetScheduleStruct {\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import matter.tlv.TlvWriter

class WaterHeaterManagementCluster(
private val controller: MatterController,
private val endpointId: UShort
private val endpointId: UShort,
) {
class GeneratedCommandListAttribute(val value: List<UInt>)

Expand Down Expand Up @@ -92,7 +92,7 @@ class WaterHeaterManagementCluster(
temporarySetpoint: Short?,
targetPercentage: UByte?,
targetReheat: UByte?,
timedInvokeTimeout: Duration? = null
timedInvokeTimeout: Duration? = null,
) {
val commandId: UInt = 0u

Expand Down Expand Up @@ -128,7 +128,7 @@ class WaterHeaterManagementCluster(
InvokeRequest(
CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
tlvPayload = tlvWriter.getEncoded(),
timedRequest = timedInvokeTimeout
timedRequest = timedInvokeTimeout,
)

val response: InvokeResponse = controller.invoke(request)
Expand All @@ -146,7 +146,7 @@ class WaterHeaterManagementCluster(
InvokeRequest(
CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
tlvPayload = tlvWriter.getEncoded(),
timedRequest = timedInvokeTimeout
timedRequest = timedInvokeTimeout,
)

val response: InvokeResponse = controller.invoke(request)
Expand Down Expand Up @@ -186,7 +186,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeHeaterTypesAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UByteSubscriptionState> {
val ATTRIBUTE_ID: UInt = 0u
val attributePaths =
Expand All @@ -199,7 +199,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -267,7 +267,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeHeatDemandAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UByteSubscriptionState> {
val ATTRIBUTE_ID: UInt = 1u
val attributePaths =
Expand All @@ -280,7 +280,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -353,7 +353,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeTankVolumeAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UShortSubscriptionState> {
val ATTRIBUTE_ID: UInt = 2u
val attributePaths =
Expand All @@ -366,7 +366,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -444,7 +444,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeEstimatedHeatRequiredAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<LongSubscriptionState> {
val ATTRIBUTE_ID: UInt = 3u
val attributePaths =
Expand All @@ -457,7 +457,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -537,7 +537,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeTankPercentageAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UByteSubscriptionState> {
val ATTRIBUTE_ID: UInt = 4u
val attributePaths =
Expand All @@ -550,7 +550,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -625,7 +625,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeBoostStateAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UByteSubscriptionState> {
val ATTRIBUTE_ID: UInt = 5u
val attributePaths =
Expand All @@ -638,7 +638,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -713,7 +713,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeGeneratedCommandListAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<GeneratedCommandListAttributeSubscriptionState> {
val ATTRIBUTE_ID: UInt = 65528u
val attributePaths =
Expand All @@ -726,7 +726,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -810,7 +810,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeAcceptedCommandListAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<AcceptedCommandListAttributeSubscriptionState> {
val ATTRIBUTE_ID: UInt = 65529u
val attributePaths =
Expand All @@ -823,7 +823,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -907,7 +907,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeEventListAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<EventListAttributeSubscriptionState> {
val ATTRIBUTE_ID: UInt = 65530u
val attributePaths =
Expand All @@ -920,7 +920,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -1002,7 +1002,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeAttributeListAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<AttributeListAttributeSubscriptionState> {
val ATTRIBUTE_ID: UInt = 65531u
val attributePaths =
Expand All @@ -1015,7 +1015,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -1090,7 +1090,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeFeatureMapAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UIntSubscriptionState> {
val ATTRIBUTE_ID: UInt = 65532u
val attributePaths =
Expand All @@ -1103,7 +1103,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down Expand Up @@ -1171,7 +1171,7 @@ class WaterHeaterManagementCluster(

suspend fun subscribeClusterRevisionAttribute(
minInterval: Int,
maxInterval: Int
maxInterval: Int,
): Flow<UShortSubscriptionState> {
val ATTRIBUTE_ID: UInt = 65533u
val attributePaths =
Expand All @@ -1184,7 +1184,7 @@ class WaterHeaterManagementCluster(
eventPaths = emptyList(),
attributePaths = attributePaths,
minInterval = Duration.ofSeconds(minInterval.toLong()),
maxInterval = Duration.ofSeconds(maxInterval.toLong())
maxInterval = Duration.ofSeconds(maxInterval.toLong()),
)

return controller.subscribe(subscribeRequest).transform { subscriptionState ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class EnergyEvseClusterEnergyTransferStartedEvent(
val sessionID: UInt,
val state: UByte,
val maximumCurrent: Long,
val maximumDischargingCurrent: Optional<Long>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEnergyTransferStartedEvent {\n")
Expand Down Expand Up @@ -75,7 +76,7 @@ class EnergyEvseClusterEnergyTransferStartedEvent(
sessionID,
state,
maximumCurrent,
maximumDischargingCurrent
maximumDischargingCurrent,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class EnergyEvseClusterEnergyTransferStoppedEvent(
val state: UByte,
val reason: UByte,
val energyTransferred: Long,
val energyDischarged: Optional<Long>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterEnergyTransferStoppedEvent {\n")
Expand Down Expand Up @@ -81,6 +82,7 @@ class EnergyEvseClusterEnergyTransferStoppedEvent(
state,
reason,
energyTransferred,
energyDischarged,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import matter.tlv.TlvWriter

class EnergyEvseClusterChargingTargetScheduleStruct(
val dayOfWeekForSequence: Optional<UByte>,
val chargingTargets: Optional<List<EnergyEvseClusterChargingTargetStruct>>
val chargingTargets: Optional<List<EnergyEvseClusterChargingTargetStruct>>,
) {
override fun toString(): String = buildString {
append("EnergyEvseClusterChargingTargetScheduleStruct {\n")
Expand Down

0 comments on commit 3fbdfec

Please sign in to comment.