DeviceEnergyManagementTrait.ForecastStruct

class DeviceEnergyManagementTrait.ForecastStruct : ClusterStruct


Indicates a list of slots to describe the overall timing of the ESA's planned energy and power usage, with different power and energy demands for each slot. For example, slots might be used to describe the distinct stages of a washing machine cycle.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

ForecastStruct(
    forecastId: UInt,
    activeSlotNumber: UShort?,
    startTime: UInt,
    endTime: UInt,
    earliestStartTime: OptionalValue<UInt?>,
    latestEndTime: OptionalValue<UInt>,
    isPausable: Boolean,
    slots: List<DeviceEnergyManagementTrait.SlotStruct>,
    forecastUpdateReason: DeviceEnergyManagementTrait.ForecastUpdateReasonEnum
)

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

UShort?

Indicates which element of the Slots list is currently active in the forecast sequence.

OptionalValue<UInt?>

The earliest time, in UTC, that the ESA can start the forecast sequence.

UInt

The planned end time, in UTC, for the entire forecast.

UInt
DeviceEnergyManagementTrait.ForecastUpdateReasonEnum

The reason for updating the forecast.

Boolean
OptionalValue<UInt>

The latest end time, in UTC, for the entire forecast.

List<DeviceEnergyManagementTrait.SlotStruct>

A list of SlotStructs where the list must contain at least one entry but no more than 10.

UInt

The planned start time, in UTC, for the entire forecast.

Public constructors

ForecastStruct

ForecastStruct(
    forecastId: UInt,
    activeSlotNumber: UShort? = null,
    startTime: UInt,
    endTime: UInt,
    earliestStartTime: OptionalValue<UInt?> = OptionalValue.absent(),
    latestEndTime: OptionalValue<UInt> = OptionalValue.absent(),
    isPausable: Boolean = false,
    slots: List<DeviceEnergyManagementTrait.SlotStruct> = emptyList(),
    forecastUpdateReason: DeviceEnergyManagementTrait.ForecastUpdateReasonEnum = ForecastUpdateReasonEnum.InternalOptimization
)

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

activeSlotNumber

val activeSlotNumberUShort?

Indicates which element of the Slots list is currently active in the forecast sequence. A null value indicates that the sequence has not yet started.

earliestStartTime

val earliestStartTimeOptionalValue<UInt?>

The earliest time, in UTC, that the ESA can start the forecast sequence.

endTime

val endTimeUInt

The planned end time, in UTC, for the entire forecast.

forecastId

val forecastIdUInt

forecastUpdateReason

val forecastUpdateReasonDeviceEnergyManagementTrait.ForecastUpdateReasonEnum

The reason for updating the forecast.

isPausable

val isPausableBoolean

latestEndTime

val latestEndTimeOptionalValue<UInt>

The latest end time, in UTC, for the entire forecast.

slots

val slotsList<DeviceEnergyManagementTrait.SlotStruct>

A list of SlotStructs where the list must contain at least one entry but no more than 10.

startTime

val startTimeUInt

The planned start time, in UTC, for the entire forecast.