IdentifyCommands

interface IdentifyCommands

Known direct subclasses
Identify

API for the Identify trait.


Summary

Public functions

suspend Unit
identify(identifyTime: UShort)

Start or stop the identification state for the receiving device.

suspend Unit
triggerEffect(
    effectIdentifier: IdentifyTrait.EffectIdentifierEnum,
    effectVariant: IdentifyTrait.EffectVariantEnum
)

Start an effect that provides visual feedback to the user.

Public functions

identify

suspend fun identify(identifyTime: UShort): Unit

Start or stop the identification state for the receiving device.

When this command is called, the identifyTime attribute is set to the value of identifyTime specified in this command.

Parameters
identifyTime: UShort

The amount of time, in seconds, that the device should identify itself. A value of 0 stops the identification state. A value other than 0 starts the identification state, which lasts for the value (seconds) specified.

triggerEffect

suspend fun triggerEffect(
    effectIdentifier: IdentifyTrait.EffectIdentifierEnum,
    effectVariant: IdentifyTrait.EffectVariantEnum
): Unit

Start an effect that provides visual feedback to the user.

For example, a device's LED may turn green when it has successfully connected to the network.

Parameters
effectIdentifier: IdentifyTrait.EffectIdentifierEnum

The identify effect to use. Must be a value from IdentifyTrait.EffectIdentifierEnum.

effectVariant: IdentifyTrait.EffectVariantEnum

Variant of the effect, indicated by the effectIdentifier parameter, that is triggered. This must be one of the values in IdentifyTrait.EffectVariantEnum.