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

View Source

Status2 bit field used by ArtNet.Packet.ArtPollReply.

This field reports additional node capabilities and runtime state.

Bit size

This bit field is encoded in 8 bits.

Bit layout

FieldDescriptionBitsDefaultValue
support_browserNode supports web browser configuration.0requiredboolean flag
dhcpNode is currently using DHCP.1requiredboolean flag
dhcp_capableNode can use DHCP.2requiredboolean flag
port_15bitNode supports 15-bit Port-Address fields.3requiredboolean flag
can_switchOutput style can be switched.4requiredboolean flag
squawkingNode is currently squawking.5requiredboolean flag
switch_output_styleOutput style switch is active.6requiredboolean flag
control_rdmRDM can be controlled.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.Status2{
  can_switch: :boolean,
  control_rdm: :boolean,
  dhcp: :boolean,
  dhcp_capable: :boolean,
  port_15bit: :boolean,
  squawking: :boolean,
  support_browser: :boolean,
  switch_output_style: :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.