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

View Source

Time code type values used by ArtNet.Packet.ArtTimeCode.

Values

AtomDescriptionValue
film24 fps film time code.0x0 / 0b00000000
ebu25 fps EBU time code.0x1 / 0b00000001
drop_frame29.97 fps drop-frame time code.0x2 / 0b00000010
smpte30 fps SMPTE time code.0x3 / 0b00000011

Summary

Functions

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

Returns the integer code for :drop_frame.

Returns the integer code for :ebu.

Returns the integer code for :film.

Returns the integer code for :smpte.

Converts an integer code into its enum atom.

Converts an enum atom into its integer code.

Types

type()

@type type() :: :film | :ebu | :drop_frame | :smpte

Functions

bit_size()

@spec bit_size() :: pos_integer()

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

drop_frame()

@spec drop_frame() :: non_neg_integer()

Returns the integer code for :drop_frame.

The code is 0x2.

ebu()

@spec ebu() :: non_neg_integer()

Returns the integer code for :ebu.

The code is 0x1.

film()

@spec film() :: non_neg_integer()

Returns the integer code for :film.

The code is 0x0.

smpte()

@spec smpte() :: non_neg_integer()

Returns the integer code for :smpte.

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.