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

View Source

GoodOutput bit field used by ArtNet.Packet.ArtPollReply.

The packet contains one GoodOutput value for each of the four reported ports. Each boolean describes the output state of that port.

Bit size

This bit field is encoded in 8 bits.

Bit layout

FieldDescriptionBitsDefaultValue
convert_sacnOutput is converting Art-Net to sACN.0requiredboolean flag
merge_ltp_modePort is merging in LTP mode.1requiredboolean flag
output_shortOutput short condition has been detected.2requiredboolean flag
mergingPort is currently merging data.3requiredboolean flag
dmx_test_packetDMX test packets are being output.4requiredboolean flag
dmx_sipDMX SIP packets are being output.5requiredboolean flag
dmx_textDMX text packets are being output.6requiredboolean flag
output_dataOutput data is being transmitted.7requiredboolean 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.GoodOutput{
  convert_sacn: :boolean,
  dmx_sip: :boolean,
  dmx_test_packet: :boolean,
  dmx_text: :boolean,
  merge_ltp_mode: :boolean,
  merging: :boolean,
  output_data: :boolean,
  output_short: :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.