ArtNet.Packet.BitField.TalkToMe (ArtNet v0.1.0)

View Source

TalkToMe bit field used by ArtNet.Packet.ArtPoll.

This field tells nodes how the controller wants ArtPollReply responses and diagnostics to be sent.

Bit size

This bit field is encoded in 8 bits.

Bit layout

FieldDescriptionBitsDefaultValue
reply_on_changeSend replies when node conditions change.1requiredboolean flag
diagnosticsSend diagnostics messages.2requiredboolean flag
diag_unicastSend diagnostics by unicast.3requiredboolean flag
vlcInclude VLC transmission support in discovery.4requiredboolean flag
targeted_modeUse targeted mode fields in ArtPoll.5falseboolean flag

Summary

Functions

Returns the bit-field schema in declaration order.

Returns the total number of bits encoded by this bit field.

Decodes an unsigned integer into this bit-field struct.

Encodes this bit-field struct into an unsigned integer.

Types

t()

@type t() :: %ArtNet.Packet.BitField.TalkToMe{
  diag_unicast: :boolean,
  diagnostics: :boolean,
  reply_on_change: :boolean,
  targeted_mode: :boolean,
  vlc: :boolean
}

Functions

bit_field_schema()

@spec bit_field_schema() :: [
  {key :: atom(),
   {ArtNet.Packet.BitField.schema_type(),
    {start_bit :: non_neg_integer(), length :: pos_integer()}}}
]

Returns the bit-field schema in declaration order.

bit_size()

@spec bit_size() :: pos_integer()

Returns the total number of bits encoded by this bit field.

This bit field is encoded in 8 bits.

decode(value)

@spec decode(non_neg_integer()) :: {:ok, t()} | :error

Decodes an unsigned integer into this bit-field struct.

encode(struct)

@spec encode(t()) :: {:ok, non_neg_integer()} | :error

Encodes this bit-field struct into an unsigned integer.