ArtNet. Packet. ArtTimeCode
(ArtNet v0.1.0)
View Source
Transports time code over Art-Net.
The packet carries frame, seconds, minutes, hours, and time-code type fields.
Packet layout
| Part | Field | Description | Default | Size | Format |
|---|---|---|---|---|---|
| Header | id | fixed | 8 bytes | "Art-Net\\0" | |
| Header | op_code | 0x9700 | 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 | stream_id | Time-code stream identifier. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | frames | Time-code frame value. | required | 1 byte | unsigned integer (8 bits) |
| Payload | seconds | Time-code seconds value. | required | 1 byte | unsigned integer (8 bits) |
| Payload | minutes | Time-code minutes value. | required | 1 byte | unsigned integer (8 bits) |
| Payload | hours | Time-code hours value. | required | 1 byte | unsigned integer (8 bits) |
| Payload | type | Time-code frame-rate type. | required | 1 byte | ArtNet.Packet.EnumTable.TimeCodeType 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.ArtTimeCode{ filler1: :integer, frames: :integer, hours: :integer, minutes: :integer, seconds: :integer, stream_id: :integer, type: ArtNet.Packet.EnumTable.TimeCodeType.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 0x9700.
@spec require_version_header?() :: boolean()
Returns whether this packet includes the Art-Net protocol version header.
Returns the packet payload schema in declaration order.