packet

package
Version: v0.0.0-...-748cf5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package packet contains the ArtNet packet definitions

Index

Constants

View Source
const ArtNetPort = 6454

ArtNetPort is the fixed ArtNet port 6454.

Variables

View Source
var ArtNet = [8]byte{0x41, 0x72, 0x74, 0x2d, 0x4e, 0x65, 0x74, 0x00}

ArtNet is the fixed string "Art-Net" terminated with a zero

Functions

This section is empty.

Types

type ArtAddressPacket

type ArtAddressPacket struct {
	// Inherit the Header header
	Header

	// NetSwitch contains Bits 14-8 of the 15 bit Port-Address are encoded into the bottom 7
	// bits of this field. This is used in combination with SubSwitch and SwIn[] or SwOut[]
	// to produce the full universe address.
	NetSwitch uint8

	// BindIndex defines the bound node which originated this packet and is used to uniquely identify
	// the bound node when identical IP addresses are in use. This number represents the order of bound
	// devices. A lower number means closer to root device. A value of 1 means root device.
	BindIndex uint8

	// ShortName for the Node. The Controller uses the ArtAddress packet to program this
	// string. Max length is 17 characters. This is a fixed length field, although the string
	// it contains can be shorter than the field.
	ShortName [18]byte

	// LongName for the Node. The Controller uses the ArtAddress packet to program this string.
	// Max length is 63. This is a fixed length field, although the string it contains can be
	// shorter than the field.
	LongName [64]byte

	// SwIn Bits 3-0 of the 15 bit Port-Address for each of the 4
	// possible input ports are encoded into the low nibble
	SwIn [4]uint8

	// SwOut Bits 3-0 of the 15 bit Port-Address for each of the 4
	// possible output ports are encoded into the low nibble.
	SwOut [4]uint8

	// SubSwitch contains Bits 7-4 of the 15 bit Port-Address are encoded into the bottom 4
	// bits of this field. This is used in combination with NetSwitch and SwIn[] or SwOut[]
	// to produce the full universe address.
	SubSwitch uint8

	// SwVideo is set to 00 when video display is showing local data. Set to 01 when video
	// is showing ethernet data. The field is now deprecated
	SwVideo uint8

	// Command contains Node configuration commands. Note that Ltp / Htp settings should be
	// retained by the node during power cycling
	Command uint8
}

ArtAddressPacket contains an ArtAddress Packet.

A Controller or monitoring device on the network can reprogram numerous controls of a node remotely. This, for example, would allow the lighting console to re-route DMX512 data at remote locations. This is achieved by sending an ArtAddress packet to the Node’s IP address. (The IP address is returned in the ArtPoll packet). The node replies with an ArtPollReply packet. Fields 5 to 13 contain the data that will be programmed into the node

Packet Strategy:

Controller -  Receive:            No Action
              Unicast Transmit:   Controller transmits to a specific node IP address
              Broadcast Transmit: Not Allowed
Node -        Receive:            Reply by broadcasting ArtPollReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed
MediaServer - Receive:            Reply by broadcasting ArtPollReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed

func NewArtAddressPacket

func NewArtAddressPacket() *ArtAddressPacket

NewArtAddressPacket returns an ArtNetPacket with the correct OpCode

func (*ArtAddressPacket) MarshalBinary

func (p *ArtAddressPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtAddressPacket into a byte slice.

func (*ArtAddressPacket) UnmarshalBinary

func (p *ArtAddressPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtAddressPacket.

type ArtCommandPacket

type ArtCommandPacket struct {
	// Inherit the Header header
	Header

	// ESTAmanufacturer contains a code used to represent equipment manufacturer.
	ESTAmanufacturer [2]byte

	// Length indicates the length of the data
	Length uint16

	// Data is an ASCII string, null terminated. Max length is 512 bytes including the null terminator
	Data [512]byte
}

ArtCommandPacket contains an ArtCommand Packet.

The ArtCommand packet is used to send property set style commands. The packet can be unicast or broadcast, the decision being application specific.

The Data field contains the command text. The text is ASCII encoded and is null terminated and is case insensitive. It is legal, although inefficient, to set the Data array size to the maximum of 512 and null pad unused entries. The command text may contain multiple commands and adheres to the following syntax:

Command=Data&

The ampersand is a break between commands. Also note that the text is capitalised for readability; it is case insensitive. Thus far, two commands are defined by Art-Net. It is anticipated that additional commands will be added as other manufacturers register commands which have industry wide relevance. These commands shall be transmitted with EstaMan = 0xFFFF.

SwoutText - This command is used to re-programme the label associated with the

ArtPollReply->Swout fields. Syntax: "SwoutText=Playback&"

SwinText - This command is used to re-programme the label associated with the

ArtPollReply->Swin fields. Syntax: "SwinText=Record&"

Packet Strategy:

Controller -  Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific
Node -        Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific
MediaServer - Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific

func NewArtCommandPacket

func NewArtCommandPacket() *ArtCommandPacket

NewArtCommandPacket returns an ArtNetPacket with the correct OpCode

func (*ArtCommandPacket) MarshalBinary

func (p *ArtCommandPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtCommandPacket into a byte slice.

func (*ArtCommandPacket) UnmarshalBinary

func (p *ArtCommandPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtCommandPacket.

type ArtDMXPacket

type ArtDMXPacket struct {
	// Inherit the Header header
	Header

	// Sequence number is used to ensure that ArtDmx packets are used in the correct order.
	// When Art-Net is carried over a medium such as the Internet, it is possible that ArtDmx packets
	// will reach the receiver out of order.
	// This field is incremented in the range 0x01 to 0xff to allow the receiving node to resequence
	// packets. The Sequence field is set to 0x00 to disable this feature
	Sequence uint8

	// Physical input port from which DMX512 data was input. This field is for information
	// only. Use Universe for data routing
	Physical uint8

	// SubUni is the low byte of the 15 bit Port-Address to which this packet is destined
	SubUni uint8

	// Net is the top 7 bits of the 15 bit Port-Address to which this packet is destined
	Net uint8

	// Length indicates the length of the data. This value should be an even number in the
	// range 2 – 512. It represents the number of DMX512 channels encoded in packet.
	// NB: Products which convert Art-Net to DMX512 may opt to always send 512 channels
	Length uint16

	// Data is a string of DMX512 lighting data
	Data [512]byte
}

ArtDMXPacket contains an ArtDMX Packet.

ArtDmx is the data packet used to transfer DMX512 data. The format is identical for Node to Controller, Node to Node and Controller to Node. The Data is output through the DMX O/P port corresponding to the Universe setting. In the absence of received ArtDmx packets, each DMX O/P port re-transmits the same frame continuously. The first complete DMX frame received at each input port is placed in an ArtDmx packet as above and transmitted as an ArtDmx packet containing the relevant Universe parameter. Each subsequent DMX frame containing new data (different length or different contents) is also transmitted as an ArtDmx packet. Nodes do not transmit ArtDmx for DMX512 inputs that have not received data since power on. However, an input that is active but not changing, will re-transmit the last valid ArtDmx packet at approximately 4-second intervals. (Note. In order to converge the needs of Art-Net and sACN it is recommended that Art-Net devices actually use a re-transmit time of 800mS to 1000mS). A DMX input that fails will not continue to transmit ArtDmx data.

Packet Strategy:

Controller -  Receive:            Application Specific
              Unicast Transmit:   Yes
              Broadcast Transmit: No
Node -        Receive:            Application Specific
              Unicast Transmit:   Yes
              Broadcast Transmit: No
MediaServer - Receive:            Application Specific
              Unicast Transmit:   Yes
              Broadcast Transmit: No

func NewArtDMXPacket

func NewArtDMXPacket() *ArtDMXPacket

NewArtDMXPacket returns an ArtNetPacket with the correct OpCode

func (*ArtDMXPacket) MarshalBinary

func (p *ArtDMXPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtDMXPacket into a byte slice.

func (*ArtDMXPacket) UnmarshalBinary

func (p *ArtDMXPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtDMXPacket.

type ArtDiagDataPacket

type ArtDiagDataPacket struct {
	// Inherit the Header header
	Header

	// Priority contains the lowest priority of diagnostics message that should be sent
	Priority code.PriorityCode

	// Length indicates the length of the data
	Length uint16

	// Data is an ASCII string, null terminated. Max length is 512 bytes including the null terminator
	Data [512]byte
	// contains filtered or unexported fields
}

ArtDiagDataPacket contains an ArtDiagData Packet.

ArtDiagData is a general purpose packet that allows a node or controller to send diagnostics data for display. The ArtPoll packet sent by controllers defines the destination to which these messages should be sent.

Packet Strategy:

Controller -  Receive:            Application Specific
              Unicast Transmit:   As defined by ArtPoll
              Broadcast Transmit: As defined by ArtPoll
Node -        Receive:            No Action
              Unicast Transmit:   As defined by ArtPoll
              Broadcast Transmit: As defined by ArtPoll
MediaServer - Receive:            No Action
              Unicast Transmit:   As defined by ArtPoll
              Broadcast Transmit: As defined by ArtPoll

func NewArtDiagDataPacket

func NewArtDiagDataPacket() *ArtDiagDataPacket

NewArtDiagDataPacket returns an ArtNetPacket with the correct OpCode

func (*ArtDiagDataPacket) MarshalBinary

func (p *ArtDiagDataPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtDiagDataPacket into a byte slice.

func (*ArtDiagDataPacket) UnmarshalBinary

func (p *ArtDiagDataPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtDiagDataPacket.

type ArtIPProgPacket

type ArtIPProgPacket struct {
	// Inherit the Header header
	Header

	// Command defines the how this packet is processed. If all bits are clear, this
	// is an enquiry only
	Command uint8

	// ProgIP is IP Address to be programmed into Node if enabled by Command Field
	ProgIP [4]byte

	// ProgSubNet is Subnet mask to be programmed into Node if enabled by Command Field
	ProgSubNet [4]byte

	// ProgPort is deprecated
	ProgPort [2]byte
	// contains filtered or unexported fields
}

ArtIPProgPacket contains an ArtIPProg Packet.

The ArtIpProg packet allows the IP settings of a Node to be reprogrammed. The ArtIpProg packet is sent by a Controller to the private address of a Node. If the Node supports remote programming of IP address, it will respond with an ArtIpProgReply packet. In all scenarios, the ArtIpProgReply is sent to the private address of the sender

Packet Strategy:

Controller -  Receive:            No Action
              Unicast Transmit:   Controller transmits to a specific node IP address
              Broadcast Transmit: Not Allowed
Node -        Receive:            Reply with ArtIpProgReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed
MediaServer - Receive:            Reply with ArtIpProgReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed

func NewArtIPProgPacket

func NewArtIPProgPacket() *ArtIPProgPacket

NewArtIPProgPacket returns an ArtNetPacket with the correct OpCode

func (*ArtIPProgPacket) MarshalBinary

func (p *ArtIPProgPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtIPProgPacket into a byte slice.

func (*ArtIPProgPacket) UnmarshalBinary

func (p *ArtIPProgPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtIPProgPacket.

type ArtIPProgReplyPacket

type ArtIPProgReplyPacket struct {
	// Inherit the Header header
	Header

	// ProgIP is IP Address to be programmed into Node if enabled by Command Field
	ProgIP [4]byte

	// ProgSubNet is Subnet mask to be programmed into Node if enabled by Command Field
	ProgSubNet [4]byte

	// ProgPort is deprecated
	ProgPort [2]byte

	// Status defines if DHCP is enabled or not
	Status uint8
	// contains filtered or unexported fields
}

ArtIPProgReplyPacket contains an ArtIPProgReply Packet.

The ArtIpProgReply packet is issued by a Node in response to an ArtIpProg packet. Nodes that do not support remote programming of IP address do not reply to ArtIpProg packets. In all scenarios, the ArtIpProgReply is sent to the private address of the sender.

Packet Strategy:

Controller -  Receive:            No Action
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed
Node -        Receive:            No Action
              Unicast Transmit:   Transmits to specific Controller IP address
              Broadcast Transmit: Not Allowed
MediaServer - Receive:            No Action
              Unicast Transmit:   Transmits to specific Controller IP address
              Broadcast Transmit: Not Allowed

func NewArtIPProgReplyPacket

func NewArtIPProgReplyPacket() *ArtIPProgReplyPacket

NewArtIPProgReplyPacket returns an ArtNetPacket with the correct OpCode

func (*ArtIPProgReplyPacket) MarshalBinary

func (p *ArtIPProgReplyPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtIPProgReplyPacket into a byte slice.

func (*ArtIPProgReplyPacket) UnmarshalBinary

func (p *ArtIPProgReplyPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtIPProgReplyPacket.

type ArtNetPacket

type ArtNetPacket interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
	// contains filtered or unexported methods
}

ArtNetPacket is the interface used for passing around different kinds of ArtNet packets.

func Unmarshal

func Unmarshal(b []byte) (p ArtNetPacket, err error)

Unmarshal will unmarshal the bytes into an ArtNetPacket

type ArtNzsPacket

type ArtNzsPacket struct {
	// Inherit the Header header
	Header

	// Sequence number is used to ensure that ArtNzs packets are used in the correct order.
	// When Art-Net is carried over a medium such as the Internet, it is possible that ArtNzs packets
	// will reach the receiver out of order.
	// This field is incremented in the range 0x01 to 0xff to allow the receiving node to resequence
	// packets. The Sequence field is set to 0x00 to disable this feature
	Sequence uint8

	// StartCode is the DMX512 start code of this packet. Must not be Zero or RDM
	StartCode uint8

	// SubUni is the low byte of the 15 bit Port-Address to which this packet is destined
	SubUni uint8

	// Net is the top 7 bits of the 15 bit Port-Address to which this packet is destined
	Net uint8

	// Length indicates the length of the data. This value should be a number in the
	// range 1 – 512. It represents the number of DMX512 channels encoded in packet.
	Length uint16

	// Data is a variable length string of DMX512 lighting data
	Data [512]byte
}

ArtNzsPacket contains an ArtNzs Packet.

ArtNzs is the data packet used to transfer DMX512 data with non-zero start codes (except RDM). The format is identical for Node to Controller, Node to Node and Controller to Node

Packet Strategy:

Controller -  Receive:            Application Specific
              Unicast Transmit:   Yes
              Broadcast Transmit: No
Node -        Receive:            Application Specific
              Unicast Transmit:   Yes
              Broadcast Transmit: No
MediaServer - Receive:            Application Specific
              Unicast Transmit:   Yes
              Broadcast Transmit: No

func NewArtNzsPacket

func NewArtNzsPacket() *ArtNzsPacket

NewArtNzsPacket returns an ArtNetPacket with the correct OpCode

func (*ArtNzsPacket) MarshalBinary

func (p *ArtNzsPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtNzsPacket into a byte slice.

func (*ArtNzsPacket) UnmarshalBinary

func (p *ArtNzsPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtNzsPacket.

type ArtPollPacket

type ArtPollPacket struct {
	// Inherit the Header header
	Header

	// TalkToMe defines the behavior of the Node
	TalkToMe code.TalkToMe

	// Priority contains the lowest priority of diagnostics message that should be sent
	Priority code.PriorityCode
}

ArtPollPacket contains an ArtPoll Packet.

The ArtPoll packet is used to discover the presence of other Controllers, Nodes and Media Servers. The ArtPoll packet is only sent by a Controller. Both Controllers and Nodes respond to the packet.

A Controller broadcasts an ArtPoll packet to IP address 2.255.255.255 (sub-net mask 255.0.0.0) at UDP port 0x1936, this is the Directed Broadcast address.

The Controller may assume a maximum timeout of 3 seconds between sending ArtPoll and receiving all ArtPollReply packets. If the Controller does not receive a response in this time it should consider the Node to have disconnected.

The Controller that broadcasts an ArtPoll should also reply to its own message (to Directed Broadcast address) with an ArtPollReply. This ensures that any other Controllers listening to the network will detect all devices without the need for all Controllers connected to the network to send ArtPoll packets. It is a requirement of Art-Net that all controllers broadcast an ArtPoll every 2.5 to 3 seconds. This ensures that any network devices can easily detect a disconnect.

Packet Strategy:

Controller -  Receive:            Send ArtPollReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Controller broadcasts this packet to poll all Controllers and
                                 Nodes on the network
Node -        Receive:            Send ArtPollReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed
MediaServer - Receive:            Send ArtPollReply
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed

func NewArtPollPacket

func NewArtPollPacket() *ArtPollPacket

NewArtPollPacket returns an ArtNetPacket with the correct OpCode

func (*ArtPollPacket) MarshalBinary

func (p *ArtPollPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtPollPacket into a byte slice.

func (*ArtPollPacket) UnmarshalBinary

func (p *ArtPollPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtPollPacket.

type ArtPollReplyPacket

type ArtPollReplyPacket struct {
	// ID is an Array of 8 characters, the final character is a null termination.
	// Value should be []byte{‘A’,‘r’,‘t’,‘-‘,‘N’,‘e’,‘t’,0x00}
	// ArtPollReply is the only packet not containing version, so do this here
	ID [8]byte

	// OpCode defines the class of data following within this UDP packet.
	// Transmitted low byte first.
	OpCode code.OpCode

	// IPAddress is the Node’s IPv4 address. When binding is implemented, bound nodes may
	// share the root node’s IP Address and the BindIndex is used to differentiate the nodes.
	IPAddress [4]byte

	// Port is always 0x1936 Transmitted low byte first.
	Port uint16

	// VersionInfo contains the Node’s firmware revision number. The Controller should only
	// use this field to decide if a firmware update should proceed. The convention is that
	// a higher number is a more recent release of firmware.
	VersionInfo uint16

	// NetSwitch contains Bits 14-8 of the 15 bit Port-Address are encoded into the bottom 7
	// bits of this field. This is used in combination with SubSwitch and SwIn[] or SwOut[]
	// to produce the full universe address.
	NetSwitch uint8

	// SubSwitch contains Bits 7-4 of the 15 bit Port-Address are encoded into the bottom 4
	// bits of this field. This is used in combination with NetSwitch and SwIn[] or SwOut[]
	// to produce the full universe address.
	SubSwitch uint8

	// Oem word describes the equipment vendor and the feature set available.
	Oem uint16

	// UBEAVersion contains the firmware version of the User Bios Extension Area (UBEA).
	// If the UBEA is not programmed, this field contains zero.
	UBEAVersion uint8

	// Status1 indicates General Status register containing bit fields as follows.
	Status1 code.Status1

	// ESTAmanufacturer contains a code used to represent equipment manufacturer.
	// They are assigned by ESTA. This field can be interpreted as two ASCII bytes
	// representing the manufacturer initials.
	ESTAmanufacturer [2]byte

	// ShortName for the Node. The Controller uses the ArtAddress packet to program this
	// string. Max length is 17 characters. This is a fixed length field, although the string
	// it contains can be shorter than the field.
	ShortName [18]byte

	// LongName for the Node. The Controller uses the ArtAddress packet to program this string.
	// Max length is 63. This is a fixed length field, although the string it contains can be
	// shorter than the field.
	LongName [64]byte

	// NodeReport is a textual report of the Node’s operating status or operational errors.
	// It is primarily intended for ‘engineering’ data.
	NodeReport [64]code.NodeReportCode

	// NumPorts describes the number of input or output ports. If number of inputs is not
	// equal to number of outputs, the largest value is taken. Zero is a legal value if no
	// input or output ports are implemented. The maximum value is 4. Nodes can ignore this
	// field as the information is implicit in PortTypes.
	NumPorts uint16

	// PortTypes defines the operation and protocol of each channel
	PortTypes [4]code.PortType

	// GoodInput defines input status of the node
	GoodInput [4]code.GoodInput

	// GoodOutput defines output status of the node
	GoodOutput [4]code.GoodOutput

	// SwIn Bits 3-0 of the 15 bit Port-Address for each of the 4
	// possible input ports are encoded into the low nibble
	SwIn [4]uint8

	// SwOut Bits 3-0 of the 15 bit Port-Address for each of the 4
	// possible output ports are encoded into the low nibble.
	SwOut [4]uint8

	// SwVideo is set to 00 when video display is showing local data. Set to 01 when video
	// is showing ethernet data. The field is now deprecated
	SwVideo uint8

	// SwMacro shows if the Node supports macro key inputs, this byte represents the trigger values.
	SwMacro code.SwMacro

	// SwRemote show if the Node supports remote trigger inputs, this byte represents the trigger values.
	SwRemote code.SwRemote

	// Style code defines the equipment style of the device.
	Style code.StyleCode

	// Macaddress of the Node. Set to zero if node cannot supply this information.
	Macaddress [6]byte

	// BindIP is the IP of the root device if this unit is part of a larger or modular product.
	BindIP [4]byte

	// BindIndex represents the order of bound devices. A lower number means closer to root device.
	// A value of 1 means root device.
	BindIndex uint8

	// Status2 indicates Product capabilities
	Status2 code.Status2
	// contains filtered or unexported fields
}

ArtPollReplyPacket contains an ArtPollReply Packet.

A device, in response to a Controller’s ArtPoll, sends the ArtPollReply. This packet is also broadcast to the Directed Broadcast address by all Art-Net devices on power up.

Packet Strategy:

All devices - Receive:            No Art-Net action.
              Unicast Transmit:   Not Allowed.
              Broadcast Transmit: Directed Broadcasts this packet in response to an ArtPoll.

func NewArtPollReplyPacket

func NewArtPollReplyPacket() *ArtPollReplyPacket

NewArtPollReplyPacket returns a new ArtPollReply Packet

func (*ArtPollReplyPacket) MarshalBinary

func (p *ArtPollReplyPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtPollReplyPacket into a byte slice.

func (*ArtPollReplyPacket) UnmarshalBinary

func (p *ArtPollReplyPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtPollReplyPacket.

type ArtSyncPacket

type ArtSyncPacket struct {
	// Inherit the Header header
	Header
	// contains filtered or unexported fields
}

ArtSyncPacket contains an ArtSync Packet.

The ArtSync packet can be used to force nodes to synchronously output ArtDmx packets to their outputs. This is useful in video and media-wall applications. A controller that wishes to implement synchronous transmission will unicast multiple universes of ArtDmx and then broadcast an ArtSync to synchronously transfer all the ArtDmx packets to the nodes’ outputs at the same time.

Packet Strategy:

Controller -  Receive:            No Action
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Controller broadcasts this packet to synchronously
                                  transfer previous ArtDmx packets to Node’s output
Node -        Receive:            Transfer previous ArtDmx packets to output
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed
MediaServer - Receive:            Transfer previous ArtDmx packets to output
              Unicast Transmit:   Not Allowed
              Broadcast Transmit: Not Allowed

func NewArtSyncPacket

func NewArtSyncPacket() *ArtSyncPacket

NewArtSyncPacket returns an ArtNetPacket with the correct OpCode

func (*ArtSyncPacket) MarshalBinary

func (p *ArtSyncPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtSyncPacket into a byte slice.

func (*ArtSyncPacket) UnmarshalBinary

func (p *ArtSyncPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtSyncPacket.

type ArtTimeCodePacket

type ArtTimeCodePacket struct {
	// Inherit the Header header
	Header

	// Frames time. 0 – 29 depending on mode
	Frames uint8

	// Seconds 0 - 59
	Seconds uint8

	// Minutes 0 - 59
	Minutes uint8

	//Hours 0 - 23
	Hours uint8

	// Type of source, 0 = Film (24fps), 1 = EBU (25fps), 2 = DF (29.97fps), 3 = SMPTE (30fps)
	Type uint8
	// contains filtered or unexported fields
}

ArtTimeCodePacket contains an ArtTimeCode Packet.

ArtTimeCode allows time code to be transported over the network. The data format is compatible with both longitudinal time code and MIDI time code. The four key types of Film, EBU, Drop Frame and SMPTE are also encoded. Use of the packet is application specific but in general a single controller will broadcast the packet to the network.

Packet Strategy:

Controller -  Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific
Node -        Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific
MediaServer - Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific

func NewArtTimeCodePacket

func NewArtTimeCodePacket() *ArtTimeCodePacket

NewArtTimeCodePacket returns an ArtNetPacket with the correct OpCode

func (*ArtTimeCodePacket) MarshalBinary

func (p *ArtTimeCodePacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtTimeCodePacket into a byte slice.

func (*ArtTimeCodePacket) UnmarshalBinary

func (p *ArtTimeCodePacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtTimeCodePacket.

type ArtTriggerPacket

type ArtTriggerPacket struct {
	// Inherit the Header header
	Header

	// Oem word describes the equipment manufacturer code of nodes that shall accept this trigger
	Oem uint16

	// Key is the Trigger Key
	Key uint8

	// SubKey is the Trigger SubKey
	SubKey uint8

	// Data interpretation of the payload is defined by the Key
	Data [512]byte
	// contains filtered or unexported fields
}

ArtTriggerPacket contains an ArtTrigger Packet.

The ArtTrigger packet is used to send trigger macros to the network. The most common implementation involves a single controller broadcasting to all other devices. In some circumstances a controller may only wish to trigger a single device or a small group in which case unicast would be used

The Key is an 8-bit number which defines the purpose of the packet. The interpretation of this field is dependent upon the Oem field. If the Oem field is set to a value other than 0xffff then the Key and SubKey fields are manufacturer specific

The SubKey is an 8-bit number. The interpretation of this field is dependent upon the Oem field. If the Oem field is set to a value other than 0xffff then the Key and SubKey fields are manufacturer specific.

The Payload is a fixed length array of 512, 8-bit bytes. The interpretation of this field is dependent upon the Oem field. If the Oem field is set to a value other than 0xffff then the Payload is manufacturer specific.

However, when the Oem field = 0xffff the meaning of the Key, SubKey and Payload is:

Key - Name - SubKey:

0 - KeyAscii - The SubKey field contains an ASCII character which the receiving device should
               process as if it were a keyboard press. (Payload not used).
1 - KeyMacro - The SubKey field contains the number of a Macro which the receiving device
               should execute. (Payload not used).
2 - KeySoft  - The SubKey field contains a soft-key number which the receiving device should
               process as if it were a soft-key keyboard press. (Payload not used).
3 - KeyShow  - The SubKey field contains the number of a Show which the receiving device
               should run. (Payload not used).
4 - - 255      Undefined

Packet Strategy:

Controller -  Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific
Node -        Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific
MediaServer - Receive:            Application Specific
              Unicast Transmit:   Application Specific
              Broadcast Transmit: Application Specific

func NewArtTriggerPacket

func NewArtTriggerPacket() *ArtTriggerPacket

NewArtTriggerPacket returns an ArtNetPacket with the correct OpCode

func (*ArtTriggerPacket) MarshalBinary

func (p *ArtTriggerPacket) MarshalBinary() ([]byte, error)

MarshalBinary marshals an ArtTriggerPacket into a byte slice.

func (*ArtTriggerPacket) UnmarshalBinary

func (p *ArtTriggerPacket) UnmarshalBinary(b []byte) error

UnmarshalBinary unmarshals the contents of a byte slice into an ArtTriggerPacket.

type Header struct {
	// ID is an Array of 8 characters, the final character is a null termination.
	// Value should be []byte{‘A’,‘r’,‘t’,‘-‘,‘N’,‘e’,‘t’,0x00}
	ID [8]byte

	// OpCode defines the class of data following within this UDP packet.
	// Transmitted low byte first.
	OpCode code.OpCode

	// Version of this packet
	Version [2]byte
}

Header contains the base header for an ArtNet Packet

Directories

Path Synopsis
Package code contains codes used in ArtNet packets
Package code contains codes used in ArtNet packets

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL