datamodel

package
v0.0.0-...-e93fc31 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionConfig

type ActionConfig struct {
	ID    string
	Steps []ActionStepConfig
}

type ActionCoreInterface

type ActionCoreInterface interface {
	Load(stateConfigs []ActionConfig)
	GetByID(id string) ActionInterface
	GetCurrentConfigs() []ActionConfig
	UpdateTimer(newConfig ActionConfig)
	DeleteTimer(id string) error
}

type ActionInterface

type ActionInterface interface {
}

type ActionState

type ActionState struct {
	Config ActionConfig
}

type ActionStepConfig

type ActionStepConfig struct {
	ActionType      string              // | s==state  | o=output    | t==timer      | l=level      |
	ActionParameter string              // | new State | new Setting | new Duration  | new Level    |
	LinkedStates    []LinkedStateConfig // | Allows to link states to the action replacing %d, in parameter with value of state, only valid for outputSteps |
	IDs             []string            // | IDs the actions should be executed for                                             |
}

type AliasConfig

type AliasConfig struct {
	ID          string
	DeviceID    string
	DeviceIndex int
}

type AliasCoreInterface

type AliasCoreInterface interface {
	Load(inputAliasConfigs []AliasConfig, outputAliasConfigs []AliasConfig)
	GetInputByID(id string) InputInterface
	GetOutputByID(id string) OutputInterface
	GetCurrentInputAliasConfigs() []AliasConfig
	GetCurrentOutputAliasConfigs() []AliasConfig
	UpdateInputAlias(aliasConfig AliasConfig)
	UpdateOutputAlias(aliasConfig AliasConfig)
	DeleteInputAlias(id string) error
	DeleteOutputAlias(id string) error
}

type DeviceState

type DeviceState struct {
	ID                 string
	DeviceOnlineStatus string
	DeviceState        *WLEDOutputState
	InputStatuses      []InputState
	OutputStatuses     []OutputState
}

type EngineConfig

type EngineConfig struct {
	Game GameConfig
}

type EngineState

type EngineState struct {
	Game    GameState
	Devices []DeviceState
	Inputs  []InputState
	Outputs []OutputState
}

type GameConfig

type GameConfig struct {
	ID string

	InputAliases  []AliasConfig
	OutputAliases []AliasConfig
	Levels        []LevelConfig
}

type GameState

type GameState struct {
	Config GameConfig

	RequiredInputIDs  []string
	RequiredOutputIDs []string

	ActiveLevel LeveLState
}

type InputInterface

type InputInterface interface {
}

type InputState

type InputState struct {
	ID     string
	Index  int
	Status string
	Value  bool
}

type LeveLState

type LeveLState struct {
	ID string

	Actions      []ActionState
	OutputGroups []OutputGroupState
	States       []StateState
	Timers       []TimerState
}

type LevelConfig

type LevelConfig struct {
	ID string

	OutputGroups []OutputGroupConfig
	States       []StateConfig
	Timers       []TimerConfig
	Actions      []ActionConfig
}

type LinkedStateConfig

type LinkedStateConfig struct {
	ParameterIndex int
	StateID        string
}

type OutputGroupConfig

type OutputGroupConfig struct {
	ID           string
	OutputIdents []OutputIdent
}
OutputGroupConfig struct {
	ID        string
	OutputIDs []string
}

type OutputGroupCoreInterface

type OutputGroupCoreInterface interface {
	Load(outputGroupConfigs []OutputGroupConfig)
	GetByID(id string) OutputInterface
	GetCurrentOutputGroupConfigs() []OutputGroupConfig
	UpdateOutputGroup(OutputGroupConfig)
	DeleteOutputGroup(id string) error
}

type OutputGroupState

type OutputGroupState struct {
	Config         OutputGroupConfig
	OutputStatuses []OutputState
}

type OutputIdent

type OutputIdent struct {
	ID    string
	Index int
}

type OutputInterface

type OutputInterface interface {
}

type OutputState

type OutputState struct {
	ID         string
	Index      int
	Online     bool
	DetectMode bool
	State      *WLEDOutputState
}

type StateActionConditionConfig

type StateActionConditionConfig struct {
	Condition string
	Parameter int
	ActionIDs []string
}

type StateConfig

type StateConfig struct {
	ID string

	InitialValue     int
	ActionConditions []StateActionConditionConfig
}

type StateCoreInterface

type StateCoreInterface interface {
	Load(stateConfigs []StateConfig)
	GetByID(id string) StateInterface
	GetCurrentConfigs() []StateConfig
	UpdateTimer(newStateConfig StateConfig)
	DeleteTimer(id string) error
}

type StateInterface

type StateInterface interface {
}

type StateState

type StateState struct {
	Config StateConfig

	Value int
}

type TimerConfig

type TimerConfig struct {
	ID         string
	DurationMs int
	ActionIDs  []string
}

type TimerCoreInterface

type TimerCoreInterface interface {
	Load(timerConfigs []TimerConfig)
	GetByID(id string) TimerInterface
	GetCurrentConfigs() []TimerConfig
	UpdateTimer(TimerConfig)
	DeleteTimer(id string) error
}

type TimerInterface

type TimerInterface interface {
	Reset(time.Duration)
	Stop()
	RemainingMs() int
	EndTime() time.Time
}

type TimerState

type TimerState struct {
	Config TimerConfig

	RemainingMs int
}

type WLEDOutputState

type WLEDOutputState struct {
	MasterBrightness           int    `xml:"ac"`
	PrimaryColorRGB            []int  `xml:"cl"`
	SecondaryColorRGB          []int  `xml:"cs"`
	NotificationSendingOn      bool   `xml:"ns"`
	NotificationReceiveOn      bool   `xml:"nr"`
	NightlightActive           bool   `xml:"nl"`
	NightlightDelay            int    `xml:"nf"`
	NightlightTargetBrightness int    `xml:"nd"`
	EffectIndex                int    `xml:"fx"`
	EffectSpeed                int    `xml:"sx"`
	EffectIntensity            int    `xml:"ix"`
	FastLEDPalette             int    `xml:"fp"`
	PrimaryWhiteValue          int    `xml:"wv"`
	SecondaryWhite             int    `xml:"ws"`
	CurrentPreset              int    `xml:"ps"`
	PresetCyclingEnabled       bool   `xml:"cy"`
	RGBorHSBUIMode             bool   `xml:"md"`
	ServerDescription          string `xml:"ds"`
	SegmentID                  int    `xml:"ss"`
}

Jump to

Keyboard shortcuts

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