Documentation ¶
Overview ¶
Package artnet attempts to implement the Art-Net 4 specification from (c) Artistic Licence Holding Ltd, available at www.Art-Net.org.uk. Art-Net is an Ethernet protocol based on the TCP/IP protocol suite. Its purpose is to allow transfer of large amounts of DMX512 data over a wide area using standard networking technology.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControlledNode ¶
type ControlledNode struct { LastSeen time.Time Node NodeConfig UDPAddress net.UDPAddr Sequence uint8 DMXBuffer map[DmxAddress][512]byte LastUpdate time.Time // contains filtered or unexported fields }
ControlledNode hols the configuration of a node we control
type Controller ¶
type Controller struct { // Nodes is a slice of nodes that are seen by this controller Nodes []*ControlledNode OutputAddress map[DmxAddress]*ControlledNode InputAddress map[DmxAddress]*ControlledNode // contains filtered or unexported fields }
Controller holds the information for a controller
func NewController ¶
func NewController(name string, ip net.IP, log Logger) *Controller
NewController return a Controller
func (*Controller) SendDMXToAddress ¶
func (c *Controller) SendDMXToAddress(dmx [512]byte, address DmxAddress)
SendDMXToAddress will set the DMXBuffer for a destination address and update the node
type DmxAddress ¶
DmxAddress contains a universe address
func (DmxAddress) Integer ¶
func (a DmxAddress) Integer() int
Integer returns the integer representation of DmxAddress
func (DmxAddress) String ¶
func (a DmxAddress) String() string
String returns a string representation of DmxAddress
type Fields ¶
type Fields map[string]interface{}
Fields are a representation of formatted log fields
type InputPort ¶
type InputPort struct { Address DmxAddress Type code.PortType Status code.GoodInput }
InputPort contains information for an input port
type Node ¶
type Node struct { // Config holds the configuration of this node Config NodeConfig // contains filtered or unexported fields }
Node is the information known about a node
type NodeConfig ¶
type NodeConfig struct { OEM uint16 Version uint16 BiosVersion uint8 Manufacturer string Type code.StyleCode Name string Description string Ethernet net.HardwareAddr IP net.IP BindIP net.IP BindIndex uint8 Port uint16 Report []code.NodeReportCode Status1 code.Status1 Status2 code.Status2 BaseAddress DmxAddress InputPorts []InputPort OutputPorts []OutputPort }
NodeConfig is a representation of a single node.
func ConfigFromArtPollReply ¶
func ConfigFromArtPollReply(p packet.ArtPollReplyPacket) NodeConfig
ConfigFromArtPollReply will return a Config from the information in the ArtPollReplyPacket
type OutputPort ¶
type OutputPort struct { Address DmxAddress Type code.PortType Status code.GoodOutput }
OutputPort contains information for an input port
Directories ¶
Path | Synopsis |
---|---|
example
|
|
Package packet contains the ArtNet packet definitions
|
Package packet contains the ArtNet packet definitions |
code
Package code contains codes used in ArtNet packets
|
Package code contains codes used in ArtNet packets |
Package version implements the version of the protocol
|
Package version implements the version of the protocol |