ArtNet. Packet. ArtMediaControl
(ArtNet v0.1.0)
View Source
Sends media control commands to a media server.
This packet carries control values such as media type, page, file, and playback-related parameters.
Packet layout
| Part | Field | Description | Default | Size | Format |
|---|---|---|---|---|---|
| Header | id | fixed | 8 bytes | "Art-Net\\0" | |
| Header | op_code | 0x9200 | 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 | filler2 | Reserved byte, transmitted as zero. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | filler3 | Reserved byte, transmitted as zero. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | filler4 | Reserved byte, transmitted as zero. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | stream | Media stream identifier. | required | 1 byte | unsigned integer (8 bits) |
| Payload | control_command | Media control command code. | required | 1 byte | unsigned integer (8 bits) |
| Payload | command_data1 | First control command data byte. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command_data2 | Second control command data byte. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command_data3 | Third control command data byte. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command_data4 | Fourth control command data byte. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command_data5 | Fifth control command data byte. | 0 | 1 byte | unsigned integer (8 bits) |
| Payload | command_data6 | Sixth control command data byte. | 0 | 1 byte | 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.ArtMediaControl{
command_data1: :integer,
command_data2: :integer,
command_data3: :integer,
command_data4: :integer,
command_data5: :integer,
command_data6: :integer,
control_command: :integer,
filler1: :integer,
filler2: :integer,
filler3: :integer,
filler4: :integer,
stream: :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 0x9200.
@spec require_version_header?() :: boolean()
Returns whether this packet includes the Art-Net protocol version header.
Returns the packet payload schema in declaration order.