rail

package
v0.0.0-...-d0d8caf Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Track

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

Track controls power to the track and holds each of the throttles

func NewTrack

func NewTrack(serial io.ReadWriter) *Track

NewTrack returns a new Track

func (*Track) GetAddresses

func (t *Track) GetAddresses() []int

GetAddresses returns a list of address that have a throttle

func (*Track) GetThrottle

func (t *Track) GetThrottle(address int) *throttle.Throttle

GetThrottle returns a throttle for a given address. It creates one if needed.

func (*Track) IsPowerOn

func (t *Track) IsPowerOn() bool

func (*Track) PowerOff

func (t *Track) PowerOff() error

func (*Track) PowerOn

func (t *Track) PowerOn() error

func (*Track) PowerToggle

func (t *Track) PowerToggle() (bool, error)

Jump to

Keyboard shortcuts

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