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 ¶
func ArtPollReplyFromConfig ¶
func ArtPollReplyFromConfig(c NodeConfig) *packet.ArtPollReplyPacket
ArtPollReplyFromConfig will return a ArtPollReplyPacket from the NodeConfig TODO: make this a more complete packet by adding the other NodeConfig fields
Types ¶
type Address ¶
Address contains a universe address
type ControlledNode ¶
type ControlledNode struct {
LastSeen time.Time
Node NodeConfig
UDPAddress net.UDPAddr
Sequence uint8
DMXBuffer map[Address]*dmxBuffer
// 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[Address]*ControlledNode
InputAddress map[Address]*ControlledNode
// contains filtered or unexported fields
}
Controller holds the information for a controller
func NewController ¶
NewController return a Controller
func (*Controller) SendDMXToAddress ¶
func (c *Controller) SendDMXToAddress(dmx [512]byte, address Address)
SendDMXToAddress will set the DMXBuffer for a destination address and update the node
func (*Controller) SetOption ¶
func (c *Controller) SetOption(option Option) error
SetOption runs a functional option against Controller.
type Fields ¶
type Fields map[string]interface{}
Fields are a representation of formatted log fields
type Logger ¶
Logger is the interface for a logger
func NewDefaultLogger ¶
func NewDefaultLogger() Logger
NewDefaultLogger returns a Logger based on logrus
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
func NewNodeWithCallback ¶
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 Address
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 Option ¶
type Option func(*Controller) error
Option is a functional option handler for Controller.
type OutputPort ¶
type OutputPort struct {
Address Address
Type code.PortType
Status code.GoodOutput
}
OutputPort contains information for an input port
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
controller
command
|
|
|
node
command
|
|
|
poll
command
|
|
|
simpledmx
command
|
|
|
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 |