ArtNet. Packet. ArtAddress
(ArtNet v0.1.0)
View Source
Sends remote programming information to a node.
This packet can change node addressing, short/long names, merge behavior, port direction, indicator state, and related node configuration.
Packet layout
| Part | Field | Description | Default | Size | Format |
|---|---|---|---|---|---|
| Header | id | fixed | 8 bytes | "Art-Net\\0" | |
| Header | op_code | 0x6000 | 2 bytes | little-endian OpCode | |
| Header | prot_ver | 14 | 2 bytes | protocol version | |
| Payload | net_switch | Top 7 bits of the node Net address. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | bind_index | Bind index of the node being configured. | 1 | 1 byte | unsigned integer (8 bits) |
| Payload | port_name | Short name to assign to the node. | required | 18 bytes | null-padded string (18 bytes) |
| Payload | long_name | Long name to assign to the node. | required | 64 bytes | null-padded string (64 bytes) |
| Payload | sw_in | Input Port-Address low byte values for each port. | required | 4 bytes (1 byte each) | list of unsigned integer (8 bits) |
| Payload | sw_out | Output Port-Address low byte values for each port. | required | 4 bytes (1 byte each) | list of unsigned integer (8 bits) |
| Payload | sub_switch | Sub-Net address shared by the node ports. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | acn_priority | sACN priority value to assign to the node. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command | Address programming command to execute. | :ac_none | 1 byte | ArtNet.Packet.EnumTable.AddressCommand enum |
Summary
Functions
Decodes a complete Art-Net binary as this packet type.
Encodes this packet struct into a complete Art-Net binary.
Builds a validated packet struct from a map or keyword list.
Builds a validated packet struct from a map or keyword list.
Returns the Art-Net OpCode value for this packet module.
Returns whether this packet includes the Art-Net protocol version header.
Returns the packet payload schema in declaration order.
Types
@type t() :: %ArtNet.Packet.ArtAddress{ acn_priority: :integer, bind_index: :integer, command: ArtNet.Packet.EnumTable.AddressCommand.type(), long_name: String.t(), net_switch: :integer, port_name: String.t(), sub_switch: :integer, sw_in: [:integer], sw_out: [:integer] }
Functions
Decodes a complete Art-Net binary as this packet type.
Encodes this packet struct into a complete Art-Net binary.
@spec new(map() | Keyword.t()) :: {:ok, t()} | {:error, ArtNet.EncodeError.t()}
Builds a validated packet struct from a map or keyword list.
Builds a validated packet struct from a map or keyword list.
Raises ArtNet.EncodeError when validation fails.
@spec op_code() :: pos_integer()
Returns the Art-Net OpCode value for this packet module.
The OpCode is 0x6000.
@spec require_version_header?() :: boolean()
Returns whether this packet includes the Art-Net protocol version header.
Returns the packet payload schema in declaration order.