j5.boards package

Module contents

This module contains the boards that we support.

class j5.boards.Board[source]

Bases: object

A collection of hardware that has an implementation.

BOARDS = {}
firmware_version

The firmware version of the board.

static make_all_safe() → None[source]

Make all boards safe.

make_safe() → None[source]

Make all components on this board safe.

name

A human friendly name for this board.

serial_number

The serial number of the board.

static supported_components() → Set[Type[Component]][source]

The types of component supported by this board.

class j5.boards.BoardGroup(backend_class: Type[U])[source]

Bases: typing.Generic

A group of boards that can be accessed.

backend_class

The Backend that this group uses for Boards.

Returns:The backend used to interact with boards.
boards

Get an unordered list of boards in this group.

Returns:unordered list of boards in this group.
classmethod get_board_group(_: Type[T], backend: Type[U]) → j5.boards.board_group.BoardGroup[~T, ~U][T, U][source]

Get the board group with the given types.

Whilst the first parameter value is not actually used in the function, we need it for typing purposes. This is similar to how a ProxyType works in Haskell.

Parameters:backend – The class of backend to get.
Returns:A BoardGroup containing all of the backends of the requested type.
make_safe() → None[source]

Make all of the boards safe.

singular() → T[source]

If there is only a single board in the group, return that board.

Returns:The instance of the only board in the group.
Raises:CommunicationError – Multiple boards were found.
update_boards() → None[source]

Update the boards in this group to see if new boards have been added.