class Matter::Cluster::LevelControlCluster

Overview

Level Control Cluster Implementation (0x0008) Provides level control (dimming) functionality

Defined in:

matter/cluster/level_control_cluster.cr

Constant Summary

CLUSTER_ID = 8_u32
CLUSTER_REVISION = 65533_u32

Global attributes

CMD_MOVE = 1_u32
CMD_MOVE_TO_CLOSEST_FREQUENCY = 8_u32
CMD_MOVE_TO_LEVEL = 0_u32

Command IDs

CMD_MOVE_TO_LEVEL_WITH_ON_OFF = 4_u32
CMD_MOVE_WITH_ON_OFF = 5_u32
CMD_STEP = 2_u32
CMD_STEP_WITH_ON_OFF = 6_u32
CMD_STOP = 3_u32
CMD_STOP_WITH_ON_OFF = 7_u32
CURRENT_FREQUENCY = 4_u32
CURRENT_LEVEL = 0_u32

Attribute IDs

DEFAULT_MOVE_RATE = 20_u32
FEATURE_MAP = 65532_u32
MAX_FREQUENCY = 6_u32
MAX_LEVEL = 3_u32
MIN_FREQUENCY = 5_u32
MIN_LEVEL = 2_u32
OFF_TRANSITION_TIME = 19_u32
ON_LEVEL = 17_u32
ON_OFF_TRANSITION_TIME = 16_u32
ON_TRANSITION_TIME = 18_u32
OPTIONS = 15_u32
REMAINING_TIME = 1_u32
START_UP_CURRENT_LEVEL = 16384_u32

Constructors

Instance Method Summary

Instance methods inherited from class Matter::Cluster::Base

attributes : Array(AttributeMetadata) attributes, cluster_id : DataType::ClusterId cluster_id, cluster_id=(cluster_id : DataType::ClusterId) cluster_id=, commands : Array(CommandMetadata) commands, data_version : UInt32 data_version, data_version=(data_version : UInt32) data_version=, endpoint_id : DataType::EndpointNumber endpoint_id, endpoint_id=(endpoint_id : DataType::EndpointNumber) endpoint_id=, events : Array(EventMetadata) events, get_attribute_metadata(attribute_id : UInt32) : AttributeMetadata | Nil get_attribute_metadata, get_command_metadata(command_id : UInt32) : CommandMetadata | Nil get_command_metadata, invoke_command(command_id : UInt32, fields : Bytes = Bytes.new(0)) : InteractionModel::Status | Bytes invoke_command, name : String name, read_attribute(attribute_id : UInt32) : InteractionModel::Status | Bytes read_attribute, write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status write_attribute

Constructor methods inherited from class Matter::Cluster::Base

new(endpoint_id : DataType::EndpointNumber, cluster_id : DataType::ClusterId) new

Constructor Detail

def self.new(endpoint_id : DataType::EndpointNumber, current_level : UInt8 = 0_u8, min_level : UInt8 = 0_u8, max_level : UInt8 = 254_u8, on_level : UInt8 | Nil = nil, options : UInt8 = 0_u8) #

[View source]

Instance Method Detail

def attributes : Array(AttributeMetadata) #
Description copied from class Matter::Cluster::Base

Get all attribute metadata


[View source]
def commands : Array(CommandMetadata) #
Description copied from class Matter::Cluster::Base

Get all command metadata


[View source]
def current_level : UInt8 #

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

[View source]
def max_level : UInt8 #

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

[View source]
def min_level : UInt8 #

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

[View source]
def name : String #
Description copied from class Matter::Cluster::Base

Get cluster name


[View source]
def on_level : UInt8 | Nil #

[View source]
def on_level=(on_level : UInt8 | Nil) #

[View source]
def options : UInt8 #

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

[View source]
def read_attribute(attribute_id : UInt32) : InteractionModel::Status | Bytes #
Description copied from class Matter::Cluster::Base

Read an attribute value


[View source]
def remaining_time : UInt16 #

[View source]
def remaining_time=(remaining_time : UInt16) #

[View source]
def write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status #
Description copied from class Matter::Cluster::Base

Write an attribute value


[View source]