Documentation
¶
Index ¶
- Constants
- Variables
- func CalcSceneLength(sc *cntl.DMXScene) uint64
- func Merge(cmds []cntl.DMXCommands, cs []cntl.DMXCommands) []cntl.DMXCommands
- func MergeAtOffset(cmds []cntl.DMXCommands, cs []cntl.DMXCommands, offset int) []cntl.DMXCommands
- func MergeWithFrameChange(cmds []cntl.DMXCommands, cs []cntl.DMXCommands, paramsNoteValue uint8) []cntl.DMXCommands
- func RenderAnimation(ds *cntl.DataStore, dd []*cntl.DMXDevice, a *cntl.DMXAnimation) ([]cntl.DMXCommands, error)
- func RenderDeviceParams(ds *cntl.DataStore, dp *cntl.DMXDeviceParams) ([]cntl.DMXCommands, error)
- func RenderParams(ds *cntl.DataStore, dd []*cntl.DMXDevice, p cntl.DMXParams) (cmds cntl.DMXCommands, err error)
- func RenderPreset(ds *cntl.DataStore, p *cntl.DMXPreset) ([]cntl.DMXCommands, error)
- func RenderScene(ds *cntl.DataStore, sc *cntl.DMXScene) ([]cntl.DMXCommands, error)
- func RenderTransition(ds *cntl.DataStore, dd []*cntl.DMXDevice, t *cntl.DMXTransition) ([]cntl.DMXCommands, error)
- func RenderTransitionParams(ds *cntl.DataStore, dd []*cntl.DMXDevice, t *cntl.DMXTransition, ...) ([]cntl.DMXCommands, error)
- func ResolveDeviceSelector(ds *cntl.DataStore, sel *cntl.DMXDeviceSelector) ([]*cntl.DMXDevice, error)
- func ResolveDevicesByTag(ds *cntl.DataStore, tag cntl.Tag) (dd []*cntl.DMXDevice)
- func ResolveDevicesByTags(ds *cntl.DataStore, tags []cntl.Tag) (dd []*cntl.DMXDevice)
- func StreamlineScenes(ds *cntl.DataStore, s *cntl.Song) (map[uint64][]*cntl.DMXScene, error)
Constants ¶
const ( ChannelRed cntl.DMXChannel = 1 + iota ChannelGreen ChannelBlue ChannelWhite ChannelStrobe ChannelMode ChannelDimmer ChannelTilt ChannelTiltFine ChannelPan ChannelPanFine ChannelPanTiltSpeed )
DeviceTypes usable in this application
Variables ¶
var ( ErrDeviceHasDisabledModeChannel = errors.New("device has disabled Mode channel") ErrDeviceHasDisabledStrobeChannel = errors.New("device has disabled Strobe channel") ErrDeviceHasDisabledDimmerChannel = errors.New("device has disabled Dimmer channel") ErrDeviceIsNotMoving = errors.New("device is not moving, cannot use tilt and pan") ErrDeviceParamsDevicesInvalid = errors.New("DMXDeviceParams must have either a group or a device") ErrDeviceParamsValuesInvalid = errors.New("DMXDeviceParams must not have more the one of [Animation, Transition, Params]") ErrDeviceParamsNoDevices = errors.New("DMXDeviceParams matches no device") ErrDeviceParamsColorVarMustBeExclusive = errors.New("DMXDeviceParams cannot have a $color var and one of [red, green, blue, white]") ErrTransitionDeviceParamsMustMatchLED = errors.New("DMXTransition contains a param set where the LED is not the same") ErrDeviceSelectorMustHaveTagsOrID = errors.New("DMXDeviceSelector must have either tags or an ID") ErrDeviceSelectorCannotHaveTagsAndID = errors.New("DMXDeviceSelector cannot have tags and an ID") )
Render Errors
Functions ¶
func CalcSceneLength ¶
CalcSceneLength calculates the length of a given scene in render frames
func Merge ¶
func Merge(cmds []cntl.DMXCommands, cs []cntl.DMXCommands) []cntl.DMXCommands
Merge merges two arrays of DMXCommands
func MergeAtOffset ¶
func MergeAtOffset(cmds []cntl.DMXCommands, cs []cntl.DMXCommands, offset int) []cntl.DMXCommands
MergeAtOffset merges two arrays of DMXCommands after a given offset
func MergeWithFrameChange ¶
func MergeWithFrameChange(cmds []cntl.DMXCommands, cs []cntl.DMXCommands, paramsNoteValue uint8) []cntl.DMXCommands
MergeWithFrameChange merges two given DMXCommand slices, respecting that the second one is not in the right renderFrames setting Like, cs is in 16th and RenderFrames ist 64th we have to add spacing while merging
func RenderAnimation ¶
func RenderAnimation(ds *cntl.DataStore, dd []*cntl.DMXDevice, a *cntl.DMXAnimation) ([]cntl.DMXCommands, error)
RenderAnimation renders the given DMXAnimation to an array of DMXCommands to be sent to a DMX device
func RenderDeviceParams ¶
func RenderDeviceParams(ds *cntl.DataStore, dp *cntl.DMXDeviceParams) ([]cntl.DMXCommands, error)
RenderDeviceParams renders the given DMXDeviceParams to an array of DMXCommands to be sent to a DMX device
func RenderParams ¶
func RenderParams(ds *cntl.DataStore, dd []*cntl.DMXDevice, p cntl.DMXParams) (cmds cntl.DMXCommands, err error)
RenderParams renders the given DMXParams to an array of DMXCommands to be sent to a DMX device
func RenderPreset ¶
RenderPreset renders a preset and returns an array of commands for every frame
func RenderScene ¶
RenderScene renders the given dmx scene to dmx commands and returns them. The first array dimension contains the render frames, the second dimension contains all dmx commands for a render frame.
func RenderTransition ¶
func RenderTransition(ds *cntl.DataStore, dd []*cntl.DMXDevice, t *cntl.DMXTransition) ([]cntl.DMXCommands, error)
RenderTransition renders the given DMXTransition to an array of DMXCommands to be sent to a DMX device
func RenderTransitionParams ¶
func RenderTransitionParams(ds *cntl.DataStore, dd []*cntl.DMXDevice, t *cntl.DMXTransition, p cntl.DMXTransitionParams) ([]cntl.DMXCommands, error)
RenderTransitionParams renders the params of given transition
func ResolveDeviceSelector ¶
func ResolveDeviceSelector(ds *cntl.DataStore, sel *cntl.DMXDeviceSelector) ([]*cntl.DMXDevice, error)
ResolveDeviceSelector returns all DMXDevices that match the given selector
func ResolveDevicesByTag ¶
ResolveDevicesByTag returns all DMXDevices that match the given tag
func ResolveDevicesByTags ¶
ResolveDevicesByTags returns all DMXDevices that match *all* of the given tags
Types ¶
This section is empty.