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

View Source

Indicator state values used by ArtNet.Packet.BitField.Status1.

Values

AtomDescriptionValue
unknownIndicator state is unknown.0x0 / 0b00
locateLocate indication is active.0x1 / 0b01
muteIndicators are muted.0x2 / 0b10
normalIndicators are in normal mode.0x3 / 0b11

Summary

Functions

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

Returns the integer code for :locate.

Returns the integer code for :mute.

Returns the integer code for :normal.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Returns the integer code for :unknown.

Types

type()

@type type() :: :unknown | :locate | :mute | :normal

Functions

bit_size()

@spec bit_size() :: pos_integer()

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

locate()

@spec locate() :: non_neg_integer()

Returns the integer code for :locate.

The code is 0x1.

mute()

@spec mute() :: non_neg_integer()

Returns the integer code for :mute.

The code is 0x2.

normal()

@spec normal() :: non_neg_integer()

Returns the integer code for :normal.

The code is 0x3.

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.

unknown()

@spec unknown() :: non_neg_integer()

Returns the integer code for :unknown.

The code is 0x0.