Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDMXChannel ¶
ValidateDMXChannel helper function for ensuring channel is within range
Types ¶
type Controller ¶
type Controller interface { Connect() (err error) GetSerial() (info string, err error) GetProduct() (info string, err error) SetChannel(channel int16, value byte) error GetChannel(channel int16) (byte, error) Render() error }
Controller Generic interface for all USB DMX controllers
type ControllerConfig ¶
type ControllerConfig struct { VID uint16 `toml:"vid"` PID uint16 `toml:"pid"` OutputInterfaceID int `toml:"output_interface_id"` InputInterfaceID int `toml:"input_interface_id"` DebugLevel int `toml:"debug_level"` Context *gousb.Context }
ControllerConfig configuration for controlling device
func NewConfig ¶
func NewConfig(vid, pid uint16, outputInterfaceID, inputInterfaceID, debugLevel int) ControllerConfig
NewConfig helper function for creating a new ControllerConfig
func ReadConfigFile ¶
func ReadConfigFile(path string) (ControllerConfig, error)
ReadConfigFile reads device configuration information from file
func (*ControllerConfig) GetUSBContext ¶
func (c *ControllerConfig) GetUSBContext()
GetUSBContext gets a gousb/context for a given configuration
Click to show internal directories.
Click to hide internal directories.