RefrigeratorAndTemperatureControlledCabinetModeTrait.ModeTagStruct

class RefrigeratorAndTemperatureControlledCabinetModeTrait.ModeTagStruct : ClusterStruct


Describes a mode tag. The same manufacturer code and mode tag value in separate cluster instances are part of the same namespace and have the same meaning. For example, a manufacturer tag meaning "pinch" can be used both in a cluster whose purpose is to choose the amount of sugar, or in a cluster whose purpose is to choose the amount of salt.

Summary

Public constructors

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

OptionalValue<UShort>

The manufacturer's vendor ID.

UShort

The mode tag within a mode tag namespace.

Public constructors

ModeTagStruct

ModeTagStruct(
    mfgCode: OptionalValue<UShort> = OptionalValue.absent(),
    value: UShort
)

Creates the ModeTagStruct class.

Public functions

getDescriptor

@HomeExperimentalApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalApi
open fun getFieldValueById(tagId: UInt): Any?

Returns the value of the field for the given tag ID.

Public properties

mfgCode

val mfgCodeOptionalValue<UShort>

The manufacturer's vendor ID.

value

val valueUShort

The mode tag within a mode tag namespace. If the mfgCode field exists, this is set to a manufacturer-defined value, otherwise, it's set to a standard value.