Documentation ¶
Index ¶
Constants ¶
const Full byte = 255
Full is the highest level of dimmer we can output
const TimeLongForm = "2006-01-02 15:04:05.000000000-0700"
TimeLongForm is the format for storing time in the JSON
Variables ¶
This section is empty.
Functions ¶
func ValidState ¶
ValidState returns a valid schema from `../api/valid`
Types ¶
type Address ¶
type Address int
Address is a certain DMX output address
const MaxAddress Address = 512
MaxAddress is the maximum adddress
type Cue ¶
type Duration ¶
type Duration int
Duration is the number of MS in a duration
func DurationMarshall ¶
DurationMarshall converst a go Duration into an int
type Fixture ¶
Fixture is a fixture imported from ../api/valid. It is used for testing.
func GetFixture ¶
GetFixture return a fixture from ../api/vali
func GetFixtures ¶
GetFixtures returns all the fixture from ../api/valid
type Level ¶
type Level float32
Level describes what output a certain instrument, or groups of instruments is set to
type Live ¶
type Live struct { Level Level `json:"level"` LiveCue LiveCue `json:"cue"` Systems Systems `json:"systems"` }
Live holds everything that is currently up on stage atm
type LiveCue ¶
type LiveCue struct { UUID string `json:"uuid,omitempty"` Time Time `json:"time,omitempty"` Percent float32 `json:"percent,omitempty"` }
LiveCue is the current cue that is up
func (*LiveCue) Output ¶
Output will figure out what the output of the current cue is.
It will use the `Time` or `Percent` to figure out how much of the transition from the previous has happened
If there is a `Time` it will use this as the time started for the current cue, looking at the duration of the current cue as the transition. time. Then with the `now` time it can figure out how far the transition is along
Otherwise, it will look at the `Percent` to show how long the transition is along
If this is the first cue, it will transition from a blank output to it
type Output ¶
Output is a mapping for DMX output
func OutputFromJSON ¶
OutputFromJSON takes a JSON mapping of strings to numbers and returns an output
func ParseAndOutput ¶
ParseAndOutput will simply combines Output() with Parse().
func (Output) AddOnTop ¶
AddOnTop takes another output and adds it at a higher priority to this output merging the two
func (Output) MultiplyBy ¶
MultiplyBy will take all the output values and multiply them by some float. It will cap at the maximum byte size of 255, if the resault would be over
type SchemaError ¶
type SchemaError struct {
Errors []gojsonschema.ResultError
}
SchemaError is returned when a JSON schema does not match.
func (*SchemaError) Error ¶
func (se *SchemaError) Error() (s string)
type State ¶
State contains everything that makes up the current show and stage
type System ¶
type Time ¶
type Time string
Time is how times are stored in the JSON
func TimeFromJSON ¶
TimeFromJSON takes a JSON of a string