dmx

package
v0.0.0-...-d74d36f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtNetController

type ArtNetController struct {
	// contains filtered or unexported fields
}

ArtNetController holds the networking data for ArtNet communication.

func NewArtNetController

func NewArtNetController(srcIP string, dstIP string) (*ArtNetController, error)

NewArtNetController registers all ArtNet communication on this device to control the given ArtNet target node.

func (*ArtNetController) SendDMX

func (c *ArtNetController) SendDMX(frame DMXFrame, net uint8, sub uint8) error

SendDMX sends the DMX frame to the given net and sub-net.

type DMXFrame

type DMXFrame [512]byte

DMXFrame holds a single 512 byte DMX frame.

type Device

type Device struct {
	// R holds the red channel.
	R uint16 `json:"Red"`
	// G holds the green channel.
	G uint16 `json:"Green"`
	// B holds the blue channel.
	B uint16 `json:"Blue"`

	// RValue holds the red value.
	RValue uint8
	// RValue holds the green value.
	GValue uint8
	// RValue holds the blue value.
	BValue uint8

	// Statics holds the static DMX data for this device
	Statics map[uint16]uint8
}

Device holds the DMX data of an rgb device.

func (*Device) UpdateFrame

func (d *Device) UpdateFrame(frame *DMXFrame)

UpdateFrame updates the given DMX frame with the current channel values.

func (*Device) Verify

func (d *Device) Verify() error

Verify checks if the Device is a valid DMX device.

type Universe

type Universe struct {
	// Devices holds the devices of this universe.
	Devices []*Device

	// Net holds the ArtNet net, a group of 16 consecutive sub-nets or 256 consecutive universes.
	Net uint8
	// SubNet holds the ArtNet sub-net, a group of 16 consecutive universes.
	SubNet uint8
}

Universe holds a DMX universe.

func (*Universe) SendColorUpdate

func (u *Universe) SendColorUpdate(controller *ArtNetController) error

SendColorUpdate sends a color update from the universe devices over the given controller.

func (*Universe) Verify

func (u *Universe) Verify() error

Verify checks if the Universe is a valid DMX universe.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL