boardsapi

package
v0.0.0-...-afa3a06 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boarder

type Boarder interface {
	ConfigurationOperations
	GobotDevices() []gobot.Device
	GetPinNumbers() boardpin.PinNumbers
	ReadValue(boardPinNr uint8) (uint8, error)
	WriteValue(boardPinNr uint8, value uint8) (err error)
}

Boarder is an interface for interact with a board

type BoardsAPI

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

BoardsAPI is the main object for API access

func NewBoardsAPI

func NewBoardsAPI(adaptor i2c.Connector) *BoardsAPI

NewBoardsAPI creates a new API access

func (*BoardsAPI) AddBoard

func (bi *BoardsAPI) AddBoard(boardRecipe boardrecipe.Ingredients) (err error)

AddBoard creates a new board using recipe and add to list

func (*BoardsAPI) GetFreePins

func (bi *BoardsAPI) GetFreePins(boardID string) (freePins boardpin.PinNumbers)

GetFreePins gets all not used board pins

func (*BoardsAPI) GetInputPin

func (bi *BoardsAPI) GetInputPin(boardID string, boardPinNr uint8) (boardPin *boardpin.Input, err error)

GetInputPin gets an board pin to use for read values

func (*BoardsAPI) GetOutputPin

func (bi *BoardsAPI) GetOutputPin(boardID string, boardPinNr uint8) (boardPin *boardpin.Output, err error)

GetOutputPin gets an board pin to use for write values

func (*BoardsAPI) GetUsedPins

func (bi *BoardsAPI) GetUsedPins(boardID string) (usedPins boardpin.PinNumbers)

GetUsedPins gets all not used board pins

func (*BoardsAPI) GobotDevices

func (bi *BoardsAPI) GobotDevices() []gobot.Device

GobotDevices gets all gobot devices of all boards

func (*BoardsAPI) RemoveBoard

func (bi *BoardsAPI) RemoveBoard(boardID string)

RemoveBoard remove board from list

func (*BoardsAPI) ShowAllConfigs

func (bi *BoardsAPI) ShowAllConfigs()

ShowAllConfigs prints all information of all boards

func (*BoardsAPI) ShowAllUsedInputs

func (bi *BoardsAPI) ShowAllUsedInputs()

ShowAllUsedInputs list all used inputs of all boards

func (*BoardsAPI) ShowAvailableBoards

func (bi *BoardsAPI) ShowAvailableBoards()

ShowAvailableBoards list all created boards

func (*BoardsAPI) String

func (bi *BoardsAPI) String() string

type BoardsMap

type BoardsMap map[string]Boarder

BoardsMap is the list of already created boards

func (BoardsMap) String

func (bm BoardsMap) String() (toString string)

type ConfigurationOperations

type ConfigurationOperations interface {
	ShowBoardConfig()
}

ConfigurationOperations is an interface for interact with configuration part

Jump to

Keyboard shortcuts

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