DeviceEnergyManagementTrait.ConstraintsStruct

class DeviceEnergyManagementTrait.ConstraintsStruct : ClusterStruct


Allows a client such as an EMS to inform an ESA about a constraint period.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

ConstraintsStruct(
    startTime: UInt,
    duration: UInt,
    nominalPower: OptionalValue<Long>,
    maximumEnergy: OptionalValue<Long>,
    loadControl: OptionalValue<Byte>
)

Creates the ConstraintsStruct 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 duration, in seconds, of the constraint period.

OptionalValue<Byte>

Indicates the turn-up or turn-down value for the ESA during the constraint period.

OptionalValue<Long>

The maximum amount of energy, in megawatt hours, that the ESA can use during the constraint period.

OptionalValue<Long>

The nominal power, in milliwatts, at which the EMS requests the ESA to operate during the constrained period.

UInt

The start time, in UTC, of the constraint period.

Public constructors

ConstraintsStruct

ConstraintsStruct(
    startTime: UInt,
    duration: UInt,
    nominalPower: OptionalValue<Long> = OptionalValue.absent(),
    maximumEnergy: OptionalValue<Long> = OptionalValue.absent(),
    loadControl: OptionalValue<Byte> = OptionalValue.absent()
)

Creates the ConstraintsStruct 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

duration

val durationUInt

The duration, in seconds, of the constraint period.

loadControl

val loadControlOptionalValue<Byte>

Indicates the turn-up or turn-down value for the ESA during the constraint period. This is expressed as a signed value between -100 and +100. A negative value indicates a request to use less energy, and a positive value indicates a request to use more energy. A value of 0 is neutral.

maximumEnergy

val maximumEnergyOptionalValue<Long>

The maximum amount of energy, in megawatt hours, that the ESA can use during the constraint period. This is a signed value and can be used to indicate charging or discharging.

nominalPower

val nominalPowerOptionalValue<Long>

The nominal power, in milliwatts, at which the EMS requests the ESA to operate during the constrained period.

startTime

val startTimeUInt

The start time, in UTC, of the constraint period.