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

View Source

Firmware transfer reply values used by ArtNet.Packet.ArtFirmwareReply.

Values

AtomDescriptionValue
firm_block_goodCurrent block was accepted.0x0 / 0b00000000
firm_all_goodComplete transfer was accepted.0x1 / 0b00000001
firm_failTransfer failed.0xFF / 0b11111111

Summary

Functions

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

Returns the integer code for :firm_all_good.

Returns the integer code for :firm_block_good.

Returns the integer code for :firm_fail.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Types

type()

@type type() :: :firm_block_good | :firm_all_good | :firm_fail

Functions

bit_size()

@spec bit_size() :: pos_integer()

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

firm_all_good()

@spec firm_all_good() :: non_neg_integer()

Returns the integer code for :firm_all_good.

The code is 0x1.

firm_block_good()

@spec firm_block_good() :: non_neg_integer()

Returns the integer code for :firm_block_good.

The code is 0x0.

firm_fail()

@spec firm_fail() :: non_neg_integer()

Returns the integer code for :firm_fail.

The code is 0xFF.

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.