struct Matter::Cluster::Definitions::ModeSelect::ModeOption

Overview

This is a struct representing a possible mode of the server.

Included Modules

Defined in:

matter/cluster/definitions/mode_select.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(any : TLV::Any) #

[View source]

Class Method Detail

def self.from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) #

[View source]
def self.from_slice(bytes : Bytes) #

[View source]
def self.from_tlv(any : TLV::Any) #

[View source]
def self.from_tlv(data : Bytes) #

[View source]

Instance Method Detail

def label : String #

This field is readable text that describes the mode option that can be used by a client to indicate to the user what this option means. This field is meant to be readable and understandable by the user.


[View source]
def label=(label : String) #

This field is readable text that describes the mode option that can be used by a client to indicate to the user what this option means. This field is meant to be readable and understandable by the user.


[View source]
def mode : UInt8 #

The Mode field is used to identify the mode option. The value shall be unique for every item in the SupportedModes attribute.


[View source]
def mode=(mode : UInt8) #

The Mode field is used to identify the mode option. The value shall be unique for every item in the SupportedModes attribute.


[View source]
def semantic_tags : Array(SemanticTag) #

This field is a list of semantic tags that map to the mode option. This may be used by clients to determine the meaning of the mode option as defined in a standard or manufacturer specific namespace. Semantic tags can help clients look for options that meet certain criteria. A semantic tag shall be either a standard tag or manufacturer specific tag as defined in each SemanticTagStruct list entry.

A mode option may have more than one semantic tag. A mode option may be mapped to a mixture of standard and manufacturer specific semantic tags.

All standard semantic tags are from a single namespace indicated by the StandardNamespace attribute.

For example: A mode labeled "100%" can have both the HIGH (MS) and MAX (standard) semantic tag. Clients seeking the option for either HIGH or MAX will find the same option in this case.


[View source]
def semantic_tags=(semantic_tags : Array(SemanticTag)) #

This field is a list of semantic tags that map to the mode option. This may be used by clients to determine the meaning of the mode option as defined in a standard or manufacturer specific namespace. Semantic tags can help clients look for options that meet certain criteria. A semantic tag shall be either a standard tag or manufacturer specific tag as defined in each SemanticTagStruct list entry.

A mode option may have more than one semantic tag. A mode option may be mapped to a mixture of standard and manufacturer specific semantic tags.

All standard semantic tags are from a single namespace indicated by the StandardNamespace attribute.

For example: A mode labeled "100%" can have both the HIGH (MS) and MAX (standard) semantic tag. Clients seeking the option for either HIGH or MAX will find the same option in this case.


[View source]
def to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Nil #

[View source]
def to_slice : Bytes #

[View source]
def to_tlv(outer_tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : TLV::Any #

[View source]