ArtNet. Packet. ArtDiagData
(ArtNet v0.1.0)
View Source
Carries diagnostic and data logging text from a node.
The priority field classifies the diagnostic severity, and data contains
the diagnostic payload bytes.
Packet layout
| Part | Field | Description | Default | Size | Format |
|---|---|---|---|---|---|
| Header | id | fixed | 8 bytes | "Art-Net\\0" | |
| Header | op_code | 0x2300 | 2 bytes | little-endian OpCode | |
| Header | prot_ver | 14 | 2 bytes | protocol version | |
| Payload | filler1 | Reserved byte, transmitted as zero. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | priority | Diagnostic priority level. | required | 1 byte | ArtNet.Packet.EnumTable.Priority enum |
| Payload | logical_port | Logical port associated with the diagnostic data. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | filler3 | Reserved byte, transmitted as zero. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | length | Number of diagnostic data bytes. | required | 2 bytes | unsigned integer (16 bits) |
| Payload | data | Diagnostic text or binary data bytes. | required | variable (1 byte each) | list of unsigned integer (8 bits) |
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.ArtDiagData{ data: [:integer], filler1: :integer, filler3: :integer, length: :integer, logical_port: :integer, priority: ArtNet.Packet.EnumTable.Priority.type() }
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 0x2300.
@spec require_version_header?() :: boolean()
Returns whether this packet includes the Art-Net protocol version header.
Returns the packet payload schema in declaration order.