model

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveEffect

type ActiveEffect struct {
	Script   string                 `json:"script"`
	Name     string                 `json:"name"`
	Priority int                    `json:"priority"`
	Timeout  int                    `json:"timeout"`
	Args     map[string]interface{} `json:"args"`
}

ActiveEffect active effect info.

type Adjustment

type Adjustment struct {
	BacklightColored       *bool    `json:"backlightColored,omitempty"`
	BacklightThreshold     *int     `json:"backlightThreshold,omitempty"`
	Brightness             *int     `json:"brightness,omitempty"`
	BrightnessCompensation *int     `json:"brightnessCompensation,omitempty"`
	BrightnessGain         *float64 `json:"brightnessGain,omitempty"`
	Blue                   []int    `json:"blue,omitempty"`
	Cyan                   []int    `json:"cyan,omitempty"`
	GammaBlue              *float64 `json:"gammaBlue,omitempty"`
	GammaGreen             *float64 `json:"gammaGreen,omitempty"`
	GammaRed               *float64 `json:"gammaRed,omitempty"`
	Green                  []int    `json:"green,omitempty"`
	ID                     string   `json:"id,omitempty"`
	Magenta                []int    `json:"magenta,omitempty"`
	Red                    []int    `json:"red,omitempty"`
	SaturationGain         *float64 `json:"saturationGain,omitempty"`
	White                  []int    `json:"white,omitempty"`
	Yellow                 []int    `json:"yellow,omitempty"`
}

Adjustment values of color.

type Component

type Component struct {
	Enabled bool   `json:"enabled"`
	Name    string `json:"name"`
}

Component of Hyperion.

func (Component) Switchable

func (c Component) Switchable() bool

Switchable determine that component can be enabled/disabled.

type Effect

type Effect struct {
	Args   map[string]interface{} `json:"args,omitempty"`   // Optional object with additional properties
	File   string                 `json:"file,omitempty"`   // Optional
	Name   string                 `json:"name"`             // Required
	Script string                 `json:"script,omitempty"` // Optional
}

Effect object of named effect.

type Effects added in v1.3.0

type Effects []Effect

Effects list of Effect's.

func (Effects) System added in v1.3.0

func (e Effects) System() []Effect

System returns system provided effects.

func (Effects) Users added in v1.3.0

func (e Effects) Users() []Effect

Users returns user created effects.

type Grabber

type Grabber struct {
	Active    []string `json:"active"`
	Available []string `json:"available"`
}

Grabber state information.

type Image

type Image struct {
	ImageB64 string  `json:"imagedata"` // Data of image as Base64
	Format   *string `json:"format"`    // Default is "auto"
	Name     string  `json:"name"`      // The name of the image
}

type Information

type Information struct {
	ActiveEffects         []ActiveEffect           `json:"activeEffects"`
	ActiveLedColor        []map[string]interface{} `json:"activeLedColor"`
	Components            []Component              `json:"components"`
	Adjustments           []Adjustment             `json:"adjustment"`
	Effects               Effects                  `json:"effects"`
	ImageToLedMappingType string                   `json:"imageToLedMappingType"` // More info at https://docs.hyperion-project.org/json/Control.html#led-mapping
	VideoMode             string                   `json:"videomode"`             // More info at https://docs.hyperion-project.org/json/Control.html#video-mode
	Priorities            []Priority               `json:"priorities"`
	PrioritiesAutoselect  bool                     `json:"priorities_autoselect"`
	Instances             Instances                `json:"instance"`

	Grabbers struct {
		Audio  Grabber `json:"audio"`
		Screen Grabber `json:"screen"`
		Video  Grabber `json:"video"`
	} `json:"grabbers"`

	LedDevices struct {
		Available []string `json:"available"`
	} `json:"ledDevices"`

	Leds     []Led    `json:"leds"`
	Services []string `json:"services"`
}

Information response provides data about the live state of Hyperion.

type Instance

type Instance struct {
	Instance int    `json:"instance"`
	Running  bool   `json:"running"`
	Name     string `json:"friendly_name"`
}

Instance information and their state.

type InstanceCmd

type InstanceCmd string

InstanceCmd

const (
	InstanceCmdStart  InstanceCmd = "startInstance"
	InstanceCmdStop   InstanceCmd = "stopInstance"
	InstanceCmdSwitch InstanceCmd = "switchTo"
)

List of InstanceCmd's.

type Instances added in v1.3.0

type Instances []Instance

Instances list of Instance's.

func (Instances) Find added in v1.3.0

func (i Instances) Find(instance int) *Instance

Find instance by id.

type LEDMode

type LEDMode string

LEDMode for the incoming image.

const (
	LEDModeMulticolor LEDMode = "multicolor_mean"         // Simple per LED
	LEDModeUnicolor   LEDMode = "unicolor_mean"           //  Applied on all LEDs
	LEDModeSquared    LEDMode = "multicolor_mean_squared" //  Squared per LED
	LEDModeDominant   LEDMode = "dominant_color"          //  Dominant per LED
	LEDModeAdvanced   LEDMode = "dominant_color_advanced" //  Dominant advanced per LED
)

List of LEDMode's.

type Led

type Led struct {
	HMin float64 `json:"hmin"`
	HMax float64 `json:"hmax"`
	VMin float64 `json:"vmin"`
	VMax float64 `json:"vmax"`
}

Led layout information.

type Priority

type Priority struct {
	Active      bool   `json:"active"`
	Visible     bool   `json:"visible"`
	ComponentID string `json:"componentId"`
	Origin      string `json:"origin"`
	Owner       string `json:"owner"`
	Priority    int    `json:"priority"`
	Value       struct {
		HSL []float64 `json:"HSL"`
		RGB []int     `json:"RGB"`
	} `json:"value"`
	Duration int `json:"duration_ms"`
}

Priority info of the registered/active sources.

type System

type System struct {
	Hyperion struct {
		Build        string `json:"build"`
		GitRemote    string `json:"gitremote"`
		ID           string `json:"id"`
		IsGuiMode    bool   `json:"isGuiMode"`
		ReadOnlyMode bool   `json:"readOnlyMode"`
		RootPath     string `json:"rootPath"`
		Time         string `json:"time"`
		Version      string `json:"version"`
	} `json:"hyperion"`
	System struct {
		Architecture   string `json:"architecture"`
		CPUHardware    string `json:"cpuHardware"`
		CPUModelName   string `json:"cpuModelName"`
		CPUModelType   string `json:"cpuModelType"`
		CPURevision    string `json:"cpuRevision"`
		DomainName     string `json:"domainName"`
		HostName       string `json:"hostName"`
		IsUserAdmin    bool   `json:"isUserAdmin"`
		KernelType     string `json:"kernelType"`
		KernelVersion  string `json:"kernelVersion"`
		PrettyName     string `json:"prettyName"`
		ProductType    string `json:"productType"`
		ProductVersion string `json:"productVersion"`
		PyVersion      string `json:"pyVersion"`
		QtVersion      string `json:"qtVersion"`
		WordSize       string `json:"wordSize"`
	} `json:"system"`
}

System information about Hyperion server.

type VideoMode

type VideoMode string

VideoMode switch.

const (
	VideoMode2D  VideoMode = "2D"
	VideoMode3DS VideoMode = "3DSBS"
	VideoMode3DT VideoMode = "3DTAB"
)

List of VideoMode's.

Jump to

Keyboard shortcuts

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