ArtNet. Packet. ArtTodData
(ArtNet v0.1.0)
View Source
Sends a Table of Devices for RDM discovery.
Nodes use this packet to return discovered RDM UIDs and discovery response status to a controller.
Packet layout
| Part | Field | Description | Default | Size | Format |
|---|---|---|---|---|---|
| Header | id | fixed | 8 bytes | "Art-Net\\0" | |
| Header | op_code | 0x8100 | 2 bytes | little-endian OpCode | |
| Header | prot_ver | 14 | 2 bytes | protocol version | |
| Payload | rdm_version | RDM protocol version. | 1 | 1 byte | unsigned integer (8 bits) |
| Payload | port | Physical port number for the table of devices. | required | 1 byte | unsigned integer (8 bits) |
| Payload | spare | Reserved bytes, transmitted as zero. | <<0, 0, 0, 0, 0, 0>> | 6 bytes | binary (6 bytes) |
| Payload | bind_index | Bind index of the node reporting the table. | 1 | 1 byte | unsigned integer (8 bits) |
| Payload | net | Bits 8-14 of the 15-bit Port-Address. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command_response | Table-of-devices response type. | :tod_full | 1 byte | ArtNet.Packet.EnumTable.TodDataCommandResponse enum |
| Payload | address | Low byte of the Port-Address. | required | 1 byte | unsigned integer (8 bits) |
| Payload | uid_total | Total number of UIDs in the full table. | required | 2 bytes | unsigned integer (16 bits) |
| Payload | block_count | Block number for segmented tables. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | uid_count | Number of UIDs carried in this packet. | required | 1 byte | unsigned integer (8 bits) |
| Payload | tod | List of discovered RDM UIDs. | required | variable (6 bytes each) | list of binary (6 bytes) |
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.ArtTodData{ address: :integer, bind_index: :integer, block_count: :integer, command_response: ArtNet.Packet.EnumTable.TodDataCommandResponse.type(), net: :integer, port: :integer, rdm_version: :integer, spare: :binary, tod: [:binary], uid_count: :integer, uid_total: :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 0x8100.
@spec require_version_header?() :: boolean()
Returns whether this packet includes the Art-Net protocol version header.
Returns the packet payload schema in declaration order.