hardware

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SwitchMachineAdded           = 0
	SwitchMachineRemoved         = 1
	SwitchMachinePositionChanged = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	//Start checking for updates
	Start(DriverEventListener)
	UpdateSwitchMachine(switchmachine.State)
	io.Closer
}

type DriverEvent

type DriverEvent interface {
	Type() DriverEventType
	Id() switchmachine.Id
	//Could be nil
	State() switchmachine.State
}

func NewSwitchMachineAddedEvent

func NewSwitchMachineAddedEvent(id switchmachine.Id, state switchmachine.State) DriverEvent

func NewSwitchMachinePositionChangedEvent

func NewSwitchMachinePositionChangedEvent(id switchmachine.Id, state switchmachine.State) DriverEvent

func NewSwitchMachineRemovedEvent

func NewSwitchMachineRemovedEvent(id switchmachine.Id) DriverEvent

type DriverEventListener

type DriverEventListener interface {
	HandleDriverEvent(DriverEvent)
}

type DriverEventType

type DriverEventType uint8

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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