pusher

package
v0.0.0-...-5e29a04 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivationRequest

type ActivationRequest struct {
	LongID           string     `json:"ID"`
	Connection       Connection `json:"connection"`
	Channels         []Channel  `json:"channels"`
	Model            string     `json:"model"`
	ConnectionMethod string     `json:"method"`
	DevNonce         int        `json:"nonce"`
}

ActivationRequest is a request from a fixture to join and come online

type ActivationResponse

type ActivationResponse struct {
	Success   bool   `json:"success"`
	Session   int    `json:"session"`
	FixtureID int    `json:"fixture"`
	Nonce     int    `json:"nonce"`
	Reason    string `json:"reason"`
	Hold      bool   `json:"bool"`
}

ActivationResponse is a JSON document sent in response to an activation request, if success is true, then the session, fixtureID, and nonce will be present, else, reason and hold will be present.

type Channel

type Channel struct {
	ID         uint16 `json:"ID"`
	PixelCount uint16 `json:"pixelCnt"`
	RGBW       bool   `json:"RGBW"`
}

Channel is a single strip

func CastChannels

func CastChannels(c []db.Channel) []Channel

func (Channel) CastToDB

func (c Channel) CastToDB(deviceID int) db.Channel

type Connection

type Connection struct {
	IP   string `json:"IP"`
	Port int    `json:"port"`
	Type string `json:"type"`
	MQTT bool   `json:"mqtt"`
}

Connection is a UDP, TCP, or HTTP connection to a valid fixture

type Fixture

type Fixture struct {
	Name       string     `json:"name"`
	DBID       int        `json:"omitempty"`
	LongID     string     `json:"ID"`
	PixelsID   uint16     `json:"pixelsID"`
	Connection Connection `json:"connection"`
	Channels   []Channel  `json:"channels"`
	UniverseID int        `json:"universe"`
}

Fixture is a device with LED strips attached

func CastFixture

func CastFixture(f db.Fixture, c []db.Channel) Fixture

func (Fixture) CastToDB

func (f Fixture) CastToDB() (db.Fixture, []db.Channel)

type FixtureSpan

type FixtureSpan []Fixture

type Universe

type Universe struct {
	Name     string    `json:"name"`
	ID       string    `json:"id"`
	Fixtures []Fixture `json:"fixtures"`
}

func (Universe) CastToDB

func (u Universe) CastToDB() (db.Universe, []db.Fixture)

Jump to

Keyboard shortcuts

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