tortoise

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

Documentation

Index

Constants

View Source
const (

	//MaxNumberAttachableMainControllerBoards is the limit of boards that one driver can control from one computer. This number is arbitrailily decided
	MaxNumberAttachableMainControllerBoards uint = 8
	//DefaultThrowTime is the default time that tortoise driver board will active the motor for to throw a turnout
	DefaultThrowTime time.Duration = time.Second * 2
)

Variables

This section is empty.

Functions

func NewPiTortoiseControllerDriver

func NewPiTortoiseControllerDriver() (piDriver hardware.Driver, err error)

func NewPiTortoiseControllerDriverWithSPIDevPath

func NewPiTortoiseControllerDriverWithSPIDevPath(txDevPath, rxDevPath string) (hardware.Driver, error)

Types

type MockHardwareDriver

type MockHardwareDriver interface {
	hardware.Driver
	SetRXData([]byte)
	SetOutputForTx(io.Writer)
}

func NewMockTortoiseControllerDriver

func NewMockTortoiseControllerDriver() MockHardwareDriver

func NewMockTortoiseControllerDriverWithExternalRXTrigger

func NewMockTortoiseControllerDriverWithExternalRXTrigger(trig chan time.Time) MockHardwareDriver

type TurnoutNotAvailableError

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

func (*TurnoutNotAvailableError) Error

func (this *TurnoutNotAvailableError) Error() string

type TurnoutRequestNilError

type TurnoutRequestNilError struct {
}

func (*TurnoutRequestNilError) Error

func (this *TurnoutRequestNilError) Error() string

Jump to

Keyboard shortcuts

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