Documentation
¶
Overview ¶
Package code contains codes used in ArtNet packets
Index ¶
- func ValidOp(o OpCode) bool
- func ValidStyle(o StyleCode) bool
- type GoodInput
- func (s GoodInput) Data() bool
- func (s GoodInput) Disabled() bool
- func (s GoodInput) Receive() bool
- func (s GoodInput) SIP() bool
- func (s GoodInput) String() string
- func (s GoodInput) Test() bool
- func (s GoodInput) Text() bool
- func (s GoodInput) WithData(enable bool) GoodInput
- func (s GoodInput) WithDisabled(enable bool) GoodInput
- func (s GoodInput) WithReceive(enable bool) GoodInput
- func (s GoodInput) WithSIP(enable bool) GoodInput
- func (s GoodInput) WithTest(enable bool) GoodInput
- func (s GoodInput) WithText(enable bool) GoodInput
- type GoodOutput
- func (s GoodOutput) ACN() bool
- func (s GoodOutput) Data() bool
- func (s GoodOutput) LTP() bool
- func (s GoodOutput) Merging() bool
- func (s GoodOutput) Output() bool
- func (s GoodOutput) SIP() bool
- func (s GoodOutput) String() string
- func (s GoodOutput) Test() bool
- func (s GoodOutput) Text() bool
- func (s GoodOutput) WithACN(enable bool) GoodOutput
- func (s GoodOutput) WithData(enable bool) GoodOutput
- func (s GoodOutput) WithLTP(enable bool) GoodOutput
- func (s GoodOutput) WithMerging(enable bool) GoodOutput
- func (s GoodOutput) WithOutput(enable bool) GoodOutput
- func (s GoodOutput) WithSIP(enable bool) GoodOutput
- func (s GoodOutput) WithTest(enable bool) GoodOutput
- func (s GoodOutput) WithText(enable bool) GoodOutput
- type NodeReportCode
- type OpCode
- type PortType
- type PriorityCode
- type Status1
- func (s Status1) BootROM() bool
- func (s Status1) Indicator() string
- func (s Status1) PortAddr() string
- func (s Status1) RDM() bool
- func (s Status1) String() string
- func (s Status1) UBEA() bool
- func (s Status1) WithBootROM(enable bool) Status1
- func (s Status1) WithIndicator(v string) Status1
- func (s Status1) WithPortAddr(v string) Status1
- func (s Status1) WithRDM(enable bool) Status1
- func (s Status1) WithUBEA(enable bool) Status1
- type Status2
- func (s Status2) Browser() bool
- func (s Status2) DHCP() bool
- func (s Status2) DHCPCapable() bool
- func (s Status2) Port15() bool
- func (s Status2) Squawk() bool
- func (s Status2) String() string
- func (s Status2) Switch() bool
- func (s Status2) WithBrowser(enable bool) Status2
- func (s Status2) WithDHCP(enable bool) Status2
- func (s Status2) WithDHCPCapable(enable bool) Status2
- func (s Status2) WithPort15(enable bool) Status2
- func (s Status2) WithSquawk(enable bool) Status2
- func (s Status2) WithSwitch(enable bool) Status2
- type StyleCode
- type SwMacro
- func (s SwMacro) Macro1() bool
- func (s SwMacro) Macro2() bool
- func (s SwMacro) Macro3() bool
- func (s SwMacro) Macro4() bool
- func (s SwMacro) Macro5() bool
- func (s SwMacro) Macro6() bool
- func (s SwMacro) Macro7() bool
- func (s SwMacro) Macro8() bool
- func (s SwMacro) String() string
- func (s SwMacro) WithMacro1(enable bool) SwMacro
- func (s SwMacro) WithMacro2(enable bool) SwMacro
- func (s SwMacro) WithMacro3(enable bool) SwMacro
- func (s SwMacro) WithMacro4(enable bool) SwMacro
- func (s SwMacro) WithMacro5(enable bool) SwMacro
- func (s SwMacro) WithMacro6(enable bool) SwMacro
- func (s SwMacro) WithMacro7(enable bool) SwMacro
- func (s SwMacro) WithMacro8(enable bool) SwMacro
- type SwRemote
- func (s SwRemote) Remote1() bool
- func (s SwRemote) Remote2() bool
- func (s SwRemote) Remote3() bool
- func (s SwRemote) Remote4() bool
- func (s SwRemote) Remote5() bool
- func (s SwRemote) Remote6() bool
- func (s SwRemote) Remote7() bool
- func (s SwRemote) Remote8() bool
- func (s SwRemote) String() string
- func (s SwRemote) WithRemote1(enable bool) SwRemote
- func (s SwRemote) WithRemote2(enable bool) SwRemote
- func (s SwRemote) WithRemote3(enable bool) SwRemote
- func (s SwRemote) WithRemote4(enable bool) SwRemote
- func (s SwRemote) WithRemote5(enable bool) SwRemote
- func (s SwRemote) WithRemote6(enable bool) SwRemote
- func (s SwRemote) WithRemote7(enable bool) SwRemote
- func (s SwRemote) WithRemote8(enable bool) SwRemote
- type TalkToMe
- func (t TalkToMe) DiagUnicast() bool
- func (t TalkToMe) Diagnostics() bool
- func (t TalkToMe) ReplyOnChange() bool
- func (t TalkToMe) String() string
- func (t TalkToMe) VLC() bool
- func (t TalkToMe) WithDiagUnicast(enable bool) TalkToMe
- func (t TalkToMe) WithDiagnostics(enable bool) TalkToMe
- func (t TalkToMe) WithReplyOnChange(enable bool) TalkToMe
- func (t TalkToMe) WithVLC(enable bool) TalkToMe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoodInput ¶
type GoodInput uint8
GoodInput indicates input status of the node
func (GoodInput) WithDisabled ¶
WithDisabled sets Input is disabled
func (GoodInput) WithReceive ¶
WithReceive sets if Receive errors detected
type GoodOutput ¶
type GoodOutput uint8
GoodOutput indicates output status of the node
func (GoodOutput) ACN ¶
func (s GoodOutput) ACN() bool
ACN indicates Output is selected to transmit sACN
func (GoodOutput) Merging ¶
func (s GoodOutput) Merging() bool
Merging indicates Output is merging ArtNet data
func (GoodOutput) Output ¶
func (s GoodOutput) Output() bool
Output indicates DMX output short detected on power up
func (GoodOutput) String ¶
func (s GoodOutput) String() string
String returns a string representation of GoodOutput
func (GoodOutput) Test ¶
func (s GoodOutput) Test() bool
Test indicates Channel includes DMX512 test packets
func (GoodOutput) Text ¶
func (s GoodOutput) Text() bool
Text indicates Channel includes DMX512 text packets
func (GoodOutput) WithACN ¶
func (s GoodOutput) WithACN(enable bool) GoodOutput
WithACN sets Output to transmit sACN
func (GoodOutput) WithData ¶
func (s GoodOutput) WithData(enable bool) GoodOutput
WithData sets Data transmitted
func (GoodOutput) WithLTP ¶
func (s GoodOutput) WithLTP(enable bool) GoodOutput
WithLTP sets Merge Mode is LTP
func (GoodOutput) WithMerging ¶
func (s GoodOutput) WithMerging(enable bool) GoodOutput
WithMerging sets Output is merging ArtNet data
func (GoodOutput) WithOutput ¶
func (s GoodOutput) WithOutput(enable bool) GoodOutput
WithOutput sets DMX output short detected on power up
func (GoodOutput) WithSIP ¶
func (s GoodOutput) WithSIP(enable bool) GoodOutput
WithSIP sets Channel includes DMX512 SIP’s
func (GoodOutput) WithTest ¶
func (s GoodOutput) WithTest(enable bool) GoodOutput
WithTest sets Channel includes DMX512 test packets
func (GoodOutput) WithText ¶
func (s GoodOutput) WithText(enable bool) GoodOutput
WithText sets Channel includes DMX512 text packets
type NodeReportCode ¶
type NodeReportCode uint8
NodeReportCode defines generic error, advisory and status messages for both Nodes and Controllers
const ( // RcDebug Booted in debug mode (Only used in development) RcDebug NodeReportCode = 0x00 // RcPowerOk Power On Tests successful RcPowerOk NodeReportCode = 0x01 // RcPowerFail Hardware tests failed at Power On RcPowerFail NodeReportCode = 0x02 // RcSocketWr1 Last UDP from Node failed due to truncated length, Most likely caused by a collision. RcSocketWr1 NodeReportCode = 0x03 // RcParseFail Unable to identify last UDP transmission. Check OpCode and packet length. RcParseFail NodeReportCode = 0x04 // RcUDPFail Unable to open Udp Socket in last transmission attempt RcUDPFail NodeReportCode = 0x05 // RcShNameOk Confirms that Short Name programming via ArtAddress, was successful. RcShNameOk NodeReportCode = 0x06 // RcLoNameOk Confirms that Long Name programming via ArtAddress, was successful. RcLoNameOk NodeReportCode = 0x07 // RcDmxError DMX512 receive errors detected. RcDmxError NodeReportCode = 0x08 // RcDmxUDPFull Ran out of internal DMX transmit buffers. RcDmxUDPFull NodeReportCode = 0x09 // RcDmxRxFull Ran out of internal DMX Rx buffers. RcDmxRxFull NodeReportCode = 0x0a // RcSwitchErr Rx Universe switches conflict. RcSwitchErr NodeReportCode = 0x0b // RcConfigErr Product configuration does not match firmware. RcConfigErr NodeReportCode = 0x0c // RcDmxShort DMX output short detected. See GoodOutput field. RcDmxShort NodeReportCode = 0x0d // RcFirmwareFail Last attempt to upload new firmware failed. RcFirmwareFail NodeReportCode = 0x0e // RcUserFail User changed switch settings when address locked by remote programming. User changes ignored. RcUserFail NodeReportCode = 0x0f // RcFactoryRes Factory reset has occurred RcFactoryRes NodeReportCode = 0x10 )
func (NodeReportCode) String ¶
func (i NodeReportCode) String() string
type OpCode ¶
type OpCode uint16
OpCode defines the class of data following an UDP packet.
const ( // OpPoll This is an ArtPoll packet, no other data is contained in this UDP packet. OpPoll OpCode = 0x2000 // OpPollReply This is an ArtPollReply Packet. It contains device status information. OpPollReply OpCode = 0x2100 // OpDiagData Diagnostics and data logging packet. OpDiagData OpCode = 0x2300 // OpCommand Used to send text based parameter commands. OpCommand OpCode = 0x2400 // OpOutput This is an ArtDmx data packet. It contains zero start code DMX512 information for a single Universe. OpOutput OpCode = 0x5000 // OpDMX This is an ArtDmx data packet. It contains zero start code DMX512 information for a single Universe. OpDMX OpCode = OpOutput // OpNzs This is an ArtNzs data packet. It contains non-zero start code (except RDM) DMX512 information for a single Universe. OpNzs OpCode = 0x5100 // OpSync This is an ArtSync data packet. It is used to force synchronous transfer of ArtDmx packets to a node’s output. OpSync OpCode = 0x5200 // OpAddress This is an ArtAddress packet. It contains remote programming information for a Node. OpAddress OpCode = 0x6000 // OpInput This is an ArtInput packet. It contains enable–disable data for DMX inputs. OpInput OpCode = 0x7000 // OpTodRequest This is an ArtTodRequest packet. It is used to request a Table of Devices (ToD) for RDM discovery. OpTodRequest OpCode = 0x8000 // OpTodData This is an ArtTodData packet. It is used to send a Table of Devices (ToD) for RDM discovery. OpTodData OpCode = 0x8100 // OpTodControl This is an ArtTodControl packet. It is used to send RDM discovery control messages. OpTodControl OpCode = 0x8200 // OpRdm This is an ArtRdm packet. It is used to send all non discovery RDM messages. OpRdm OpCode = 0x8300 // OpRdmSub This is an ArtRdmSub packet. It is used to send compressed, RDM Sub-Device data. OpRdmSub OpCode = 0x8400 // OpMedia This is an ArtMedia packet. It is Unicast by a Media Server and acted upon by a Controller. OpMedia OpCode = 0x9000 // OpMediaPatch This is an ArtMediaPatch packet. It is Unicast by a Controller and acted upon by a Media Server. OpMediaPatch OpCode = 0x9100 // OpMediaControl This is an ArtMediaControl packet. It is Unicast by a Controller and acted upon by a Media Server. OpMediaControl OpCode = 0x9200 // OpMediaContrlReply This is an ArtMediaControlReply packet. It is Unicast by a Media Server and acted upon by a Controller. OpMediaContrlReply OpCode = 0x9300 // OpTimeCode This is an ArtTimeCode packet. It is used to transport time code over the network. OpTimeCode OpCode = 0x9700 // OpTimeSync Used to synchronise real time date and clock OpTimeSync OpCode = 0x9800 // OpTrigger Used to send trigger macros OpTrigger OpCode = 0x9900 // OpDirectory Requests a node's file list OpDirectory OpCode = 0x9a00 // OpDirectoryReply Replies to OpDirectory with file list OpDirectoryReply OpCode = 0x9b00 // OpVideoSetup This is an ArtVideoSetup packet. It contains video screen setup information for nodes that implement the extended video features. OpVideoSetup OpCode = 0xa010 // OpVideoPalette This is an ArtVideoPalette packet. It contains colour palette setup information for nodes that implement the extended video features. OpVideoPalette OpCode = 0xa020 // OpVideoData This is an ArtVideoData packet. It contains display data for nodes that implement the extended video features. OpVideoData OpCode = 0xa040 // OpMacMaster This packet is deprecated. OpMacMaster OpCode = 0xf000 // OpMacSlave This packet is deprecated. OpMacSlave OpCode = 0xf100 // OpFirmwareMaster This is an ArtFirmwareMaster packet. It is used to upload new firmware or firmware extensions to theNode. OpFirmwareMaster OpCode = 0xf200 // OpFirmwareReply This is an ArtFirmwareReply packet. It is returned by the node to acknowledge receipt of an ArtFirmwareMaster packet or ArtFileTnMaster packet. OpFirmwareReply OpCode = 0xf300 // OpFileTnMaster Uploads user file to node. OpFileTnMaster OpCode = 0xf400 // OpFileFnMaster Downloads user file from node. OpFileFnMaster OpCode = 0xf500 // OpFileFnReply Server to Node acknowledge for download packets. OpFileFnReply OpCode = 0xf600 // OpIPProg This is an ArtIpProg packet. It is used to re-programme the IP address andMask of the Node. OpIPProg OpCode = 0xf800 // OpIPProgReply This is an ArtIpProgReply packet. It is returned by the node to acknowledge receipt of an ArtIpProg packet. OpIPProgReply OpCode = 0xf900 )
type PortType ¶
type PortType uint8
PortType defines the operation and protocol of each channel. (A product with 4 inputs and 4 outputs would report 0xc0, 0xc0, 0xc0, 0xc0). The array length is fixed, independent of the number of inputs or outputs physically available on the Node
func (PortType) Type ¶
Type returns the Port-Address Programming Authority "DMX512" | "MIDI" | "Avab" | "Colortran CMX" | "ADB 62.5" | "Art-Net"
func (PortType) WithOutput ¶
WithOutput sets channel can output onto the Art-Net Network
type PriorityCode ¶
type PriorityCode uint8
PriorityCode defines Diagnostics Priority codes. These are used in ArtPoll and ArtDiagData
const ( // DpAll all message. DpAll PriorityCode = 0x00 // DpLow Low priority message. DpLow PriorityCode = 0x10 // DpMed Medium priority message. DpMed PriorityCode = 0x40 // DpHigh High priority message. DpHigh PriorityCode = 0x80 // DpCritical Critical priority message. DpCritical PriorityCode = 0xe0 // DpVolatile Volatile message. Messages of this type are displayed on a single line in the // DMX-Workshop diagnostics display. All other types are displayed in a list box. DpVolatile PriorityCode = 0xf0 )
func (PriorityCode) String ¶
func (i PriorityCode) String() string
type Status1 ¶
type Status1 uint8
Status1 is a general Status register containing bit fields.
func (Status1) Indicator ¶
Indicator returns the Port-Address Programming Authority "unknown": Indicator state unknown. "locate": Indicators in Locate / Identify Mode. "mute": Indicators in Mute Mode. "normal": Indicators in Normal Mode.
func (Status1) PortAddr ¶
PortAddr returns the Port-Address Programming Authority "unknown": Port-Address Programming Authority unknown "front": All Port-Address set by front panel controls. "net": All or part of Port-Address programmed by networkor Web browser. "unused": Not used.
func (Status1) WithBootROM ¶
WithBootROM sets the boot location false: Normal firmware boot (from flash). Nodes that do not support dual boot,
clear this field to zero.
true: Booted from ROM.
func (Status1) WithIndicator ¶
WithIndicator sets Indicator state v = "unknown": Indicator state unknown. v = "locate": Indicators in Locate / Identify Mode. v = "mute": Indicators in Mute Mode. v = "normal": Indicators in Normal Mode.
func (Status1) WithPortAddr ¶
WithPortAddr sets the Port-Address Programming Authority v = "unknown": Port-Address Programming Authority unknown v = "front": All Port-Address set by front panel controls. v = "net": All or part of Port-Address programmed by networkor Web browser. v = "unused": Not used.
type Status2 ¶
type Status2 uint8
Status2 indicates Product capabilities
func (Status2) DHCPCapable ¶
DHCPCapable indicates if product is capable of DHCP
func (Status2) WithBrowser ¶
WithBrowser sets if product supports web browser configuration
func (Status2) WithDHCPCapable ¶
WithDHCPCapable sets if product is capable of DHCP
func (Status2) WithPort15 ¶
WithPort15 sets if product supports 15 bit Port-Address (Art-Net 3 or 4)
func (Status2) WithSquawk ¶
WithSquawk sets if product is squawking
func (Status2) WithSwitch ¶
WithSwitch sets if product is able to switch between Art-Net and sACN
type StyleCode ¶
type StyleCode uint8
StyleCode defines the class of data following an UDP packet.
const ( // StNode A DMX to / from Art-Net device StNode StyleCode = 0x00 // StController A lighting console. StController StyleCode = 0x01 // StMedia A Media Server. StMedia StyleCode = 0x02 // StRoute A network routing device. StRoute StyleCode = 0x03 // StBackup A backup device. StBackup StyleCode = 0x04 // StConfig A configuration or diagnostic tool. StConfig StyleCode = 0x05 // StVisual A visualiser. StVisual StyleCode = 0x06 )
type SwMacro ¶
type SwMacro uint8
SwMacro represents the trigger values if the Node supports macro key inputs. The Node is responsible for ‘debouncing’ inputs. When the ArtPollReply is set to transmit automatically, (TalkToMe Bit 1), the ArtPollReply will be sent on both key down and key up events. However, the Controller should not assume that only one bit position has changed. The Macro inputs are used for remote event triggering or cueing.
func (SwMacro) WithMacro1 ¶
WithMacro1 sets Macro 1 active
func (SwMacro) WithMacro2 ¶
WithMacro2 sets Macro 2 active
func (SwMacro) WithMacro3 ¶
WithMacro3 sets Macro 3 active
func (SwMacro) WithMacro4 ¶
WithMacro4 sets Macro 4 active
func (SwMacro) WithMacro5 ¶
WithMacro5 sets Macro 5 active
func (SwMacro) WithMacro6 ¶
WithMacro6 sets Macro 6 active
func (SwMacro) WithMacro7 ¶
WithMacro7 sets Macro 7 active
func (SwMacro) WithMacro8 ¶
WithMacro8 sets Macro 8 active
type SwRemote ¶
type SwRemote uint8
SwRemote represents the trigger values ff the Node supports remote trigger inputs. The Node is responsible for ‘debouncing’ inputs. When the ArtPollReply is set to transmit automatically, (TalkToMe Bit 1), the ArtPollReply will be sent on both key down and key up events. However, the Controller should not assume that only one bit position has changed. The Remote inputs are used for remote event triggering or cueing
func (SwRemote) WithRemote1 ¶
WithRemote1 sets Remote 1 active
func (SwRemote) WithRemote2 ¶
WithRemote2 sets Remote 2 active
func (SwRemote) WithRemote3 ¶
WithRemote3 sets Remote 3 active
func (SwRemote) WithRemote4 ¶
WithRemote4 sets Remote 4 active
func (SwRemote) WithRemote5 ¶
WithRemote5 sets Remote 5 active
func (SwRemote) WithRemote6 ¶
WithRemote6 sets Remote 6 active
func (SwRemote) WithRemote7 ¶
WithRemote7 sets Remote 7 active
func (SwRemote) WithRemote8 ¶
WithRemote8 sets Remote 8 active
type TalkToMe ¶
type TalkToMe uint8
TalkToMe sets the behaviour of a Node only bits 1-4 matter, rest is zero
func (TalkToMe) DiagUnicast ¶
DiagUnicast returns the stats of the bit 3
func (TalkToMe) Diagnostics ¶
Diagnostics returns the stats of the bit 2
func (TalkToMe) ReplyOnChange ¶
ReplyOnChange returns the status of the bit 1
func (TalkToMe) WithDiagUnicast ¶
WithDiagUnicast determines wether diagnostics messages are unicast or broadcast
func (TalkToMe) WithDiagnostics ¶
WithDiagnostics sends diagnostics messages
func (TalkToMe) WithReplyOnChange ¶
WithReplyOnChange allows the Controller to be informed of changes without the need to continuously poll.