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

View Source

GoodOutputB bit field used by ArtNet.Packet.ArtPollReply.

The packet contains one GoodOutputB value for each of the four reported ports. These bits extend the output status reported by GoodOutput.

Bit size

This bit field is encoded in 8 bits.

Bit layout

FieldDescriptionBitsDefaultValue
background_discovery_disabledRDM background discovery is disabled.4falseboolean flag
discovery_not_runningBackground discovery is not currently running.5falseboolean flag
continuous_output_stylePort uses continuous output style.6falseboolean flag
rdm_disabledRDM is disabled on the output.7falseboolean 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.GoodOutputB{
  background_discovery_disabled: :boolean,
  continuous_output_style: :boolean,
  discovery_not_running: :boolean,
  rdm_disabled: :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.