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

View Source

Firmware transfer block types used by ArtNet.Packet.ArtFirmwareMaster.

Values

AtomDescriptionValue
firm_firstFirst firmware block.0x0 / 0b00000000
firm_contContinuation firmware block.0x1 / 0b00000001
firm_lastFinal firmware block.0x2 / 0b00000010
ubea_firstFirst UBEA block.0x3 / 0b00000011
ubea_contContinuation UBEA block.0x4 / 0b00000100
ubea_lastFinal UBEA block.0x5 / 0b00000101

Summary

Functions

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

Returns the integer code for :firm_cont.

Returns the integer code for :firm_first.

Returns the integer code for :firm_last.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Returns the integer code for :ubea_cont.

Returns the integer code for :ubea_first.

Returns the integer code for :ubea_last.

Types

type()

@type type() ::
  :firm_first | :firm_cont | :firm_last | :ubea_first | :ubea_cont | :ubea_last

Functions

bit_size()

@spec bit_size() :: pos_integer()

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

firm_cont()

@spec firm_cont() :: non_neg_integer()

Returns the integer code for :firm_cont.

The code is 0x1.

firm_first()

@spec firm_first() :: non_neg_integer()

Returns the integer code for :firm_first.

The code is 0x0.

firm_last()

@spec firm_last() :: non_neg_integer()

Returns the integer code for :firm_last.

The code is 0x2.

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.

ubea_cont()

@spec ubea_cont() :: non_neg_integer()

Returns the integer code for :ubea_cont.

The code is 0x4.

ubea_first()

@spec ubea_first() :: non_neg_integer()

Returns the integer code for :ubea_first.

The code is 0x3.

ubea_last()

@spec ubea_last() :: non_neg_integer()

Returns the integer code for :ubea_last.

The code is 0x5.