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

View Source

Diagnostic priority values used by ArtNet.Packet.ArtPoll and ArtNet.Packet.ArtDiagData.

Values

AtomDescriptionValue
dp_allAll diagnostic messages.0x0 / 0b00000000
dp_lowLow priority and above.0x10 / 0b00010000
dp_medMedium priority and above.0x40 / 0b01000000
dp_highHigh priority and above.0x80 / 0b10000000
dp_criticalCritical messages only.0xE0 / 0b11100000
dp_volatileVolatile messages.0xF0 / 0b11110000

Summary

Functions

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

Returns the integer code for :dp_all.

Returns the integer code for :dp_critical.

Returns the integer code for :dp_high.

Returns the integer code for :dp_low.

Returns the integer code for :dp_med.

Returns the integer code for :dp_volatile.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Types

type()

@type type() :: :dp_all | :dp_low | :dp_med | :dp_high | :dp_critical | :dp_volatile

Functions

bit_size()

@spec bit_size() :: pos_integer()

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

dp_all()

@spec dp_all() :: non_neg_integer()

Returns the integer code for :dp_all.

The code is 0x0.

dp_critical()

@spec dp_critical() :: non_neg_integer()

Returns the integer code for :dp_critical.

The code is 0xE0.

dp_high()

@spec dp_high() :: non_neg_integer()

Returns the integer code for :dp_high.

The code is 0x80.

dp_low()

@spec dp_low() :: non_neg_integer()

Returns the integer code for :dp_low.

The code is 0x10.

dp_med()

@spec dp_med() :: non_neg_integer()

Returns the integer code for :dp_med.

The code is 0x40.

dp_volatile()

@spec dp_volatile() :: non_neg_integer()

Returns the integer code for :dp_volatile.

The code is 0xF0.

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.