DeviceEnergyManagementTrait.PowerAdjustRequestCommand.Request

class DeviceEnergyManagementTrait.PowerAdjustRequestCommand.Request : ClusterStruct


The request payload for the PowerAdjustRequest command.

Summary

Nested types

Descriptor enum for this command's request fields.

Public constructors

Request(
    power: Long,
    duration: UInt,
    cause: DeviceEnergyManagementTrait.AdjustmentCauseEnum
)

Creates a request payload for the PowerAdjustRequest command.

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

DeviceEnergyManagementTrait.AdjustmentCauseEnum

The cause of the request from the EMS.

UInt

The duration, in seconds, for which the ESA can adjust its power consumption.

Long

The power, in milliwatts, that the ESA can use during the adjustment period.

Public constructors

Request

Request(
    power: Long = 0,
    duration: UInt,
    cause: DeviceEnergyManagementTrait.AdjustmentCauseEnum = AdjustmentCauseEnum.LocalOptimization
)

Creates a request payload for the PowerAdjustRequest command.

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

cause

val cause: DeviceEnergyManagementTrait.AdjustmentCauseEnum

The cause of the request from the EMS.

duration

val duration: UInt

The duration, in seconds, for which the ESA can adjust its power consumption. This value must be within the range of MinDuration and MaxDuration in the PowerAdjustStruct.

power

val power: Long

The power, in milliwatts, that the ESA can use during the adjustment period. This value must be within the range of MinPower and MaxPower in the PowerAdjustStruct.