Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputEvent ¶
An InputEvent holds board input event.
type InputEventConsumer ¶
type InputEventConsumer interface { // Prepare() error Consume(event InputEvent) Shutdown() }
InputEventConsumer can consume InputEvent
type InputEventProducer ¶
type InputEventProducer interface { Produce(inputEventChannel chan InputEvent) Shutdown() }
InputEventProducer is waiting for hardware event and push then in the chan.
type MockedHardware ¶
type MockedHardware struct {
// contains filtered or unexported fields
}
A MockedHardware uses keyboard input instead of electronic dart board.
func NewMockedHardware ¶
func NewMockedHardware() *MockedHardware
NewMockedHardware create a new NewMockedHardware.
func (*MockedHardware) Produce ¶
func (mock *MockedHardware) Produce(inputEventChannel chan InputEvent)
Produce is the event-loop responsible of producing the InputEvent based on keyboard input.
func (*MockedHardware) Shutdown ¶
func (mock *MockedHardware) Shutdown()
Shutdown release all the resources.
type WiredHardware ¶
type WiredHardware struct {
// contains filtered or unexported fields
}
WiredHardware is actually listening for hardware events.
func NewWiredHardware ¶
func NewWiredHardware(runCalibration bool) *WiredHardware
NewWiredHardware create a new NewWiredHardware.
func (*WiredHardware) Produce ¶
func (hardware *WiredHardware) Produce(inputEventChannel chan InputEvent)
Produce is the main event-loop reading the hardware matrix and producing InputEvent.
func (*WiredHardware) Shutdown ¶
func (hardware *WiredHardware) Shutdown()
Shutdown releases all the GPIO pins.