hivecore

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

func (*Action) Run

func (o *Action) Run()

type ActionCore

type ActionCore struct {
	// contains filtered or unexported fields
}

func (*ActionCore) GetByID

func (o *ActionCore) GetByID(id string) (*Action, error)

func (*ActionCore) GetConfigGin

func (o *ActionCore) GetConfigGin(c *gin.Context)

type ActionStep

type ActionStep struct {
	// contains filtered or unexported fields
}

type Device

type Device interface {
	GetInputs() []InputDevice
	GetOutputs() []OutputInterface
	GetID() string
	GetBaseTopic() string
	GetStatus() datamodel.DeviceState
	GetOnlineStatus() string
	SetOnlineStatus(status string)
}

type DeviceCore

type DeviceCore struct {
	// contains filtered or unexported fields
}

func (*DeviceCore) GetStateGin

func (o *DeviceCore) GetStateGin(c *gin.Context)

func (*DeviceCore) Run

func (o *DeviceCore) Run() error

func (*DeviceCore) SetBrightnessGin

func (o *DeviceCore) SetBrightnessGin(c *gin.Context)

type DummyOutputDevice

type DummyOutputDevice struct {
	// contains filtered or unexported fields
}

func (*DummyOutputDevice) GetID

func (o *DummyOutputDevice) GetID() string

func (*DummyOutputDevice) GetIndex

func (o *DummyOutputDevice) GetIndex() int

func (*DummyOutputDevice) GetStatus

func (o *DummyOutputDevice) GetStatus() datamodel.OutputState

func (*DummyOutputDevice) IsDummy

func (o *DummyOutputDevice) IsDummy() bool

func (*DummyOutputDevice) IsOnline

func (o *DummyOutputDevice) IsOnline() bool

func (*DummyOutputDevice) SetDetectMode

func (o *DummyOutputDevice) SetDetectMode(bool)

func (*DummyOutputDevice) SetEffectIndex

func (o *DummyOutputDevice) SetEffectIndex(newValue int)

func (*DummyOutputDevice) SetEffectIntensity

func (o *DummyOutputDevice) SetEffectIntensity(newValue int)

func (*DummyOutputDevice) SetEffectSpeed

func (o *DummyOutputDevice) SetEffectSpeed(newValue int)

func (*DummyOutputDevice) SetMasterBrightness

func (o *DummyOutputDevice) SetMasterBrightness(int)

func (*DummyOutputDevice) SetPaletteIndex

func (o *DummyOutputDevice) SetPaletteIndex(newValue int)

func (*DummyOutputDevice) SetPrimaryColor

func (o *DummyOutputDevice) SetPrimaryColor(r, g, b int)

func (*DummyOutputDevice) SetRaw

func (o *DummyOutputDevice) SetRaw(string)

func (*DummyOutputDevice) SetSecondaryColor

func (o *DummyOutputDevice) SetSecondaryColor(r, g, b int)

type Engine

type Engine struct {
	Input  *InputCore
	Output *OutputCore

	Device *DeviceCore

	Game *GameCore
}

func NewEngine

func NewEngine(mqttAddr string, mqttPort int, config datamodel.EngineConfig) *Engine

func (*Engine) GetConfigGin

func (o *Engine) GetConfigGin(c *gin.Context)

func (*Engine) GetStateGin

func (o *Engine) GetStateGin(c *gin.Context)

func (*Engine) PutConfigGin

func (o *Engine) PutConfigGin(c *gin.Context)

func (*Engine) Run

func (o *Engine) Run()

type GameCore

type GameCore struct {
	Level *LevelCore
	// contains filtered or unexported fields
}

func (*GameCore) GetConfigGin

func (o *GameCore) GetConfigGin(c *gin.Context)

func (*GameCore) GetStateGin

func (o *GameCore) GetStateGin(c *gin.Context)

func (*GameCore) PutConfigGin

func (o *GameCore) PutConfigGin(c *gin.Context)

type InputCore

type InputCore struct {
	// contains filtered or unexported fields
}

type InputDevice

type InputDevice interface {
	GetID() string
}

type InputInterface

type InputInterface interface {
	GetID() string
	GetIndex() int
	GetValue() bool
	GetStatus() datamodel.InputState
	IsOnline() bool
}

type LevelCore

type LevelCore struct {
	Timer       *TimerCore
	State       *StateCore
	OutputGroup *OutputGroupCore
	Action      *ActionCore
	// contains filtered or unexported fields
}

func (*LevelCore) DeleteConfigGin

func (o *LevelCore) DeleteConfigGin(c *gin.Context)

func (*LevelCore) GetConfigGin

func (o *LevelCore) GetConfigGin(c *gin.Context)

func (*LevelCore) PutConfigGin

func (o *LevelCore) PutConfigGin(c *gin.Context)

func (*LevelCore) Run

func (o *LevelCore) Run() error

type OutputCore

type OutputCore struct {
	// contains filtered or unexported fields
}

func (*OutputCore) GetStateGin

func (o *OutputCore) GetStateGin(c *gin.Context)

func (*OutputCore) SendRawCmdGin

func (o *OutputCore) SendRawCmdGin(c *gin.Context)

func (*OutputCore) SetBrightnessGin

func (o *OutputCore) SetBrightnessGin(c *gin.Context)

func (*OutputCore) SetDetectModeGin

func (o *OutputCore) SetDetectModeGin(c *gin.Context)

func (*OutputCore) SetEffectIndexGin

func (o *OutputCore) SetEffectIndexGin(c *gin.Context)

func (*OutputCore) SetEffectIntensityGin

func (o *OutputCore) SetEffectIntensityGin(c *gin.Context)

func (*OutputCore) SetEffectSpeedGin

func (o *OutputCore) SetEffectSpeedGin(c *gin.Context)

func (*OutputCore) SetPaletteIndexGin

func (o *OutputCore) SetPaletteIndexGin(c *gin.Context)

func (*OutputCore) SetPrimaryColorHexGin

func (o *OutputCore) SetPrimaryColorHexGin(c *gin.Context)

func (*OutputCore) SetSecondaryColorHexGin

func (o *OutputCore) SetSecondaryColorHexGin(c *gin.Context)

type OutputGroup

type OutputGroup struct {
	// contains filtered or unexported fields
}

func (*OutputGroup) GetID

func (o *OutputGroup) GetID() string

func (*OutputGroup) GetIndex

func (o *OutputGroup) GetIndex() int

func (*OutputGroup) GetStatus

func (o *OutputGroup) GetStatus() datamodel.OutputState

func (*OutputGroup) IsDummy

func (o *OutputGroup) IsDummy() bool

func (*OutputGroup) IsOnline

func (o *OutputGroup) IsOnline() bool

func (*OutputGroup) SetDetectMode

func (o *OutputGroup) SetDetectMode(v bool)

func (*OutputGroup) SetEffectIndex

func (o *OutputGroup) SetEffectIndex(newValue int)

func (*OutputGroup) SetEffectIntensity

func (o *OutputGroup) SetEffectIntensity(newValue int)

func (*OutputGroup) SetEffectSpeed

func (o *OutputGroup) SetEffectSpeed(newValue int)

func (*OutputGroup) SetMasterBrightness

func (o *OutputGroup) SetMasterBrightness(newValue int)

func (*OutputGroup) SetPaletteIndex

func (o *OutputGroup) SetPaletteIndex(newValue int)

func (*OutputGroup) SetPrimaryColor

func (o *OutputGroup) SetPrimaryColor(r, g, b int)

func (*OutputGroup) SetRaw

func (o *OutputGroup) SetRaw(parameter string)

func (*OutputGroup) SetSecondaryColor

func (o *OutputGroup) SetSecondaryColor(r, g, b int)

type OutputGroupCore

type OutputGroupCore struct {
	// contains filtered or unexported fields
}

func (*OutputGroupCore) DeleteConfigGin

func (o *OutputGroupCore) DeleteConfigGin(c *gin.Context)

func (*OutputGroupCore) GetByID

func (o *OutputGroupCore) GetByID(id string) (OutputInterface, error)

func (*OutputGroupCore) GetConfigGin

func (o *OutputGroupCore) GetConfigGin(c *gin.Context)

func (*OutputGroupCore) PutConfigGin

func (o *OutputGroupCore) PutConfigGin(c *gin.Context)

func (*OutputGroupCore) SetConfigGin

func (o *OutputGroupCore) SetConfigGin(c *gin.Context)

type OutputInterface

type OutputInterface interface {
	GetID() string
	GetIndex() int
	IsOnline() bool
	GetStatus() datamodel.OutputState
	SetMasterBrightness(int)
	SetEffectIndex(int)
	SetEffectSpeed(int)
	SetEffectIntensity(int)
	SetPaletteIndex(int)
	SetPrimaryColor(int, int, int)
	SetSecondaryColor(int, int, int)
	SetRaw(string)
	SetDetectMode(bool)
	IsDummy() bool
}

type State

type State struct {
	// contains filtered or unexported fields
}

func (*State) DecValue

func (o *State) DecValue(decrement int)

func (*State) DoAction

func (o *State) DoAction(stateAction string, parameter int)

func (*State) GetValue

func (o *State) GetValue() int

func (*State) IncValue

func (o *State) IncValue(increment int)

func (*State) SetValue

func (o *State) SetValue(newValue int)

type StateActionCondition

type StateActionCondition struct {
	// contains filtered or unexported fields
}

type StateCore

type StateCore struct {
	// contains filtered or unexported fields
}

func (*StateCore) GetByID

func (o *StateCore) GetByID(id string) (*State, error)

func (*StateCore) GetConfigGin

func (o *StateCore) GetConfigGin(c *gin.Context)

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

func (*Timer) GetRemainingMs

func (o *Timer) GetRemainingMs() int

func (*Timer) Reset

func (o *Timer) Reset(newDurationMs int)

func (*Timer) Stop

func (o *Timer) Stop()

type TimerCore

type TimerCore struct {
	// contains filtered or unexported fields
}

func (*TimerCore) GetByID

func (o *TimerCore) GetByID(id string) (*Timer, error)

func (*TimerCore) GetConfigGin

func (o *TimerCore) GetConfigGin(c *gin.Context)

type WLEDDevice

type WLEDDevice struct {
	// contains filtered or unexported fields
}

func (*WLEDDevice) GetBaseTopic

func (o *WLEDDevice) GetBaseTopic() string

func (*WLEDDevice) GetID

func (o *WLEDDevice) GetID() string

func (*WLEDDevice) GetInputs

func (o *WLEDDevice) GetInputs() []InputDevice

func (*WLEDDevice) GetOnlineStatus

func (o *WLEDDevice) GetOnlineStatus() string

func (*WLEDDevice) GetOutputs

func (o *WLEDDevice) GetOutputs() []OutputInterface

func (*WLEDDevice) GetStatus

func (o *WLEDDevice) GetStatus() datamodel.DeviceState

func (*WLEDDevice) SetOnlineStatus

func (o *WLEDDevice) SetOnlineStatus(newStatus string)

type WLEDDeviceCommand

type WLEDDeviceCommand struct {
	// contains filtered or unexported fields
}

func (*WLEDDeviceCommand) Send

func (o *WLEDDeviceCommand) Send()

func (*WLEDDeviceCommand) SetBrightness

func (o *WLEDDeviceCommand) SetBrightness(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetEffectIndex

func (o *WLEDDeviceCommand) SetEffectIndex(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetEffectIntensity

func (o *WLEDDeviceCommand) SetEffectIntensity(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetEffectSpeed

func (o *WLEDDeviceCommand) SetEffectSpeed(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetPaletteIndex

func (o *WLEDDeviceCommand) SetPaletteIndex(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetPrimaryBlue

func (o *WLEDDeviceCommand) SetPrimaryBlue(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetPrimaryGreen

func (o *WLEDDeviceCommand) SetPrimaryGreen(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetPrimaryRGB

func (o *WLEDDeviceCommand) SetPrimaryRGB(r, g, b int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetPrimaryRed

func (o *WLEDDeviceCommand) SetPrimaryRed(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetSecondaryBlue

func (o *WLEDDeviceCommand) SetSecondaryBlue(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetSecondaryGreen

func (o *WLEDDeviceCommand) SetSecondaryGreen(newValue int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetSecondaryRGB

func (o *WLEDDeviceCommand) SetSecondaryRGB(r, g, b int) *WLEDDeviceCommand

func (*WLEDDeviceCommand) SetSecondaryRed

func (o *WLEDDeviceCommand) SetSecondaryRed(newValue int) *WLEDDeviceCommand

type WLEDInput

type WLEDInput struct {
	// contains filtered or unexported fields
}

func (*WLEDInput) GetID

func (o *WLEDInput) GetID() string

func (*WLEDInput) GetIndex

func (o *WLEDInput) GetIndex() int

func (*WLEDInput) GetStatus

func (o *WLEDInput) GetStatus() datamodel.InputState

func (*WLEDInput) GetValue

func (o *WLEDInput) GetValue() bool

func (*WLEDInput) IsOnline

func (o *WLEDInput) IsOnline() bool

type WLEDOutput

type WLEDOutput struct {
	// contains filtered or unexported fields
}

func (*WLEDOutput) GetID

func (o *WLEDOutput) GetID() string

func (*WLEDOutput) GetIndex

func (o *WLEDOutput) GetIndex() int

func (*WLEDOutput) GetStatus

func (o *WLEDOutput) GetStatus() datamodel.OutputState

func (*WLEDOutput) IsDummy

func (o *WLEDOutput) IsDummy() bool

func (*WLEDOutput) IsOnline

func (o *WLEDOutput) IsOnline() bool

func (*WLEDOutput) SetDetectMode

func (o *WLEDOutput) SetDetectMode(newState bool)

func (*WLEDOutput) SetEffectIndex

func (o *WLEDOutput) SetEffectIndex(newValue int)

func (*WLEDOutput) SetEffectIntensity

func (o *WLEDOutput) SetEffectIntensity(newValue int)

func (*WLEDOutput) SetEffectSpeed

func (o *WLEDOutput) SetEffectSpeed(newValue int)

func (*WLEDOutput) SetMasterBrightness

func (o *WLEDOutput) SetMasterBrightness(newValue int)

func (*WLEDOutput) SetPaletteIndex

func (o *WLEDOutput) SetPaletteIndex(newValue int)

func (*WLEDOutput) SetPrimaryColor

func (o *WLEDOutput) SetPrimaryColor(r, g, b int)

func (*WLEDOutput) SetRaw

func (o *WLEDOutput) SetRaw(parameter string)

func (*WLEDOutput) SetSecondaryColor

func (o *WLEDOutput) SetSecondaryColor(r, g, b int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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