Documentation ¶
Overview ¶
Package hardware provides a basic interface for interacting with hardware Due to the wide range of hardware available,
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hal ¶
type Hal interface { Init() SetLogger(entry *log.Entry) SetEventHandler(handler func(interface{})) IsAvailable() bool }
Hal (Hardware Abstraction Layer) provides access to hardware functionalities SetEventHandler is used to configure the handler for events emitted by the hardware layer. The type of events received varies depending on the hardware layer, so the handler will have to take care of checking the type of the received event. Init should be used to perform any required initialisations of the Hardware. Both SetEventHandler and Init will be called during the node initialisation.
type VirtualHardwareLayer ¶
type VirtualHardwareLayer struct{}
func NewVirtualHardwareLayer ¶
func NewVirtualHardwareLayer() *VirtualHardwareLayer
func (VirtualHardwareLayer) Init ¶
func (v VirtualHardwareLayer) Init()
func (VirtualHardwareLayer) IsAvailable ¶
func (v VirtualHardwareLayer) IsAvailable() bool
func (VirtualHardwareLayer) SetEventHandler ¶
func (v VirtualHardwareLayer) SetEventHandler(_ func(interface{}))
func (VirtualHardwareLayer) SetLogger ¶
func (v VirtualHardwareLayer) SetLogger(_ *log.Entry)
Directories ¶
Path | Synopsis |
---|---|
This file exists to have a valid package, even when building without the hardware tag
|
This file exists to have a valid package, even when building without the hardware tag |
Click to show internal directories.
Click to hide internal directories.