hardware

package
v0.0.0-...-309e10c Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

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