ColorControlTrait.ColorLoopSetCommand.Request

class ColorControlTrait.ColorLoopSetCommand.Request


The request payload for the ColorLoopSet command.

Summary

Public constructors

Request(
    updateFlags: ColorControlTrait.ColorLoopUpdateFlags,
    action: ColorControlTrait.ColorLoopAction,
    direction: ColorControlTrait.ColorLoopDirection,
    time: UShort,
    startHue: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Creates a request payload for the ColorLoopSet command.

Public properties

ColorControlTrait.ColorLoopAction

The action to take if updateAction is set in updateFlags.

ColorControlTrait.ColorLoopDirection

The direction of the color loop if updateDirection is set in updateFlags.

UByte

Determines which bits in the options attribute should be overridden by optionsOverride.

UByte

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

UShort

The starting hue to use if updateStartHue is set in updateFlags.

UShort

The number of seconds over which to perform the full color loop if updateTime is set in updateFlags.

ColorControlTrait.ColorLoopUpdateFlags

The attributes to update before the color loop starts.

Public constructors

Request

Request(
    updateFlags: ColorControlTrait.ColorLoopUpdateFlags = ColorLoopUpdateFlags(),
    action: ColorControlTrait.ColorLoopAction = ColorLoopAction.Deactivate,
    direction: ColorControlTrait.ColorLoopDirection = ColorLoopDirection.DecrementHue,
    time: UShort,
    startHue: UShort,
    optionsMask: UByte,
    optionsOverride: UByte
)

Creates a request payload for the ColorLoopSet command.

Public properties

action

val actionColorControlTrait.ColorLoopAction

The action to take if updateAction is set in updateFlags. Must be a value from the ColorLoopAction enum.

direction

val directionColorControlTrait.ColorLoopDirection

The direction of the color loop if updateDirection is set in updateFlags. Must be a value from the ColorLoopDirection enum.

optionsMask

val optionsMaskUByte

Determines which bits in the options attribute should be overridden by optionsOverride.

optionsOverride

val optionsOverrideUByte

If the corresponding bit in optionsMask is set to 1, the bit set here overrides the corresponding bit in options attribute.

startHue

val startHueUShort

The starting hue to use if updateStartHue is set in updateFlags.

time

val timeUShort

The number of seconds over which to perform the full color loop if updateTime is set in updateFlags.

updateFlags

val updateFlagsColorControlTrait.ColorLoopUpdateFlags

The attributes to update before the color loop starts. See ColorLoopUpdateFlags for the list of flags to use.