ArtNet.Packet.EnumTable.RdmCommandClass (ArtNet v0.1.0)

View Source

RDM command class values used by ArtNet.Packet.ArtRdmSub.

Values

AtomDescriptionValue
discovery_commandRDM discovery command.0x10 / 0b00010000
discovery_command_responseResponse to a discovery command.0x11 / 0b00010001
get_commandRDM get command.0x20 / 0b00100000
get_responseResponse to a get command.0x21 / 0b00100001
set_commandRDM set command.0x30 / 0b00110000
set_responseResponse to a set command.0x31 / 0b00110001

Summary

Functions

Returns the number of bits used to encode values in this enum table.

Returns the integer code for :discovery_command.

Returns the integer code for :discovery_command_response.

Returns the integer code for :get_command.

Returns the integer code for :get_response.

Returns the integer code for :set_command.

Returns the integer code for :set_response.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Types

type()

@type type() ::
  :discovery_command
  | :discovery_command_response
  | :get_command
  | :get_response
  | :set_command
  | :set_response

Functions

bit_size()

@spec bit_size() :: pos_integer()

Returns the number of bits used to encode values in this enum table.

discovery_command()

@spec discovery_command() :: non_neg_integer()

Returns the integer code for :discovery_command.

The code is 0x10.

discovery_command_response()

@spec discovery_command_response() :: non_neg_integer()

Returns the integer code for :discovery_command_response.

The code is 0x11.

get_command()

@spec get_command() :: non_neg_integer()

Returns the integer code for :get_command.

The code is 0x20.

get_response()

@spec get_response() :: non_neg_integer()

Returns the integer code for :get_response.

The code is 0x21.

set_command()

@spec set_command() :: non_neg_integer()

Returns the integer code for :set_command.

The code is 0x30.

set_response()

@spec set_response() :: non_neg_integer()

Returns the integer code for :set_response.

The code is 0x31.

to_atom(code)

@spec to_atom(term()) :: {:ok, type()} | :error

Converts an integer code into its enum atom.

Returns {:ok, atom} when the code is defined by this enum table, or :error otherwise.

to_code(value)

@spec to_code(term()) :: {:ok, non_neg_integer()} | :error

Converts an enum atom into its integer code.

Returns {:ok, code} when the atom is defined by this enum table, or :error otherwise.