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

View Source

Failsafe state values used by ArtNet.Packet.BitField.Status3.

Values

AtomDescriptionValue
hold_lastHold the last output state.0x0 / 0b00
all_zeroDrive all output levels to zero.0x1 / 0b01
all_fullDrive all output levels to full.0x2 / 0b10
playback_scenePlay the recorded failsafe scene.0x3 / 0b11

Summary

Functions

Returns the integer code for :all_full.

Returns the integer code for :all_zero.

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

Returns the integer code for :hold_last.

Returns the integer code for :playback_scene.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Types

type()

@type type() :: :hold_last | :all_zero | :all_full | :playback_scene

Functions

all_full()

@spec all_full() :: non_neg_integer()

Returns the integer code for :all_full.

The code is 0x2.

all_zero()

@spec all_zero() :: non_neg_integer()

Returns the integer code for :all_zero.

The code is 0x1.

bit_size()

@spec bit_size() :: pos_integer()

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

hold_last()

@spec hold_last() :: non_neg_integer()

Returns the integer code for :hold_last.

The code is 0x0.

playback_scene()

@spec playback_scene() :: non_neg_integer()

Returns the integer code for :playback_scene.

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.