DeviceEnergyManagementTrait.PowerAdjustStruct

class DeviceEnergyManagementTrait.PowerAdjustStruct : ClusterStruct


The amount and duration of a power adjustment.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

PowerAdjustStruct(
    minPower: Long,
    maxPower: Long,
    minDuration: UInt,
    maxDuration: UInt
)

Creates the PowerAdjustStruct class.

Public functions

open StructDescriptor

Returns the descriptor for the struct.

open Any?

Returns the value of the field for the given tag ID.

Public properties

UInt

The maximum duration, in seconds, that a controller can invoke an ESA adjustment.

Long

The maximum power, in milliwatts, that the ESA can have its power adjusted to.

UInt

The minimum duration, in seconds, that a controller can invoke an ESA adjustment.

Long

The minimum power, in milliwatts, to which the ESA can have its power adjusted.

Public constructors

PowerAdjustStruct

PowerAdjustStruct(
    minPower: Long = 0,
    maxPower: Long = 0,
    minDuration: UInt,
    maxDuration: UInt
)

Creates the PowerAdjustStruct class.

Public functions

getDescriptor

@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?

Returns the value of the field for the given tag ID.

Public properties

maxDuration

val maxDurationUInt

The maximum duration, in seconds, that a controller can invoke an ESA adjustment.

maxPower

val maxPowerLong

The maximum power, in milliwatts, that the ESA can have its power adjusted to. A negative value indicates that the power flows away from loads, as in charging a battery inverter.

minDuration

val minDurationUInt

The minimum duration, in seconds, that a controller can invoke an ESA adjustment.

minPower

val minPowerLong

The minimum power, in milliwatts, to which the ESA can have its power adjusted. A negative value indicates that the power flows away from loads, as in charging a battery inverter.