machine

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispenserMachine

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

func NewDispenserMachine

func NewDispenserMachine(config *DispenserMachineConfig) *DispenserMachine

func (*DispenserMachine) DiagnosticNoise added in v0.2.0

func (m *DispenserMachine) DiagnosticNoise()

func (*DispenserMachine) Start

func (m *DispenserMachine) Start() error

func (*DispenserMachine) Stop

func (m *DispenserMachine) Stop()

func (*DispenserMachine) ToggleBuzzer

func (m *DispenserMachine) ToggleBuzzer(on bool)

func (*DispenserMachine) ToggleMotor

func (m *DispenserMachine) ToggleMotor(on bool)

func (*DispenserMachine) TouchEvents

func (m *DispenserMachine) TouchEvents() <-chan bool

type DispenserMachineConfig added in v0.4.6

type DispenserMachineConfig struct {
	TouchPin  string
	MotorPin  string
	BuzzerPin string
}

type Machine

type Machine interface {
	Start() error
	Stop()
	TouchEvents() <-chan bool
	ToggleMotor(on bool)
	ToggleBuzzer(on bool)
	DiagnosticNoise()
}

type MockMachine

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

func NewMockMachine

func NewMockMachine(listen string) *MockMachine

func (*MockMachine) DiagnosticNoise added in v0.2.0

func (m *MockMachine) DiagnosticNoise()

func (*MockMachine) Start

func (m *MockMachine) Start() error

func (*MockMachine) Stop

func (m *MockMachine) Stop()

func (*MockMachine) ToggleBuzzer

func (m *MockMachine) ToggleBuzzer(on bool)

func (*MockMachine) ToggleMotor

func (m *MockMachine) ToggleMotor(on bool)

func (*MockMachine) TouchEvents

func (m *MockMachine) TouchEvents() <-chan bool

Jump to

Keyboard shortcuts

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