SDK docs menu

API reference

Generated from the docstrings of hardlabs-sdk 0.3.0.

Core

Client
Your HardLabs account, and the boards you can open with it.
Board
A simulated board, and your session on it.
Part
One part of the board, by its schematic reference designator.
Memory
One of the board's memory chips (an F-RAM, an EEPROM, a SPI NOR), as the firmware sees it now.
SerialBridge
One of the board's serial ports, open on this computer.

Data types

Control
Something you can do to the board, as returned by Board.controls.
Reading
A value one of the board's panels shows, as returned by Board.readings.
Line
One line the firmware printed on a console.
Image
One firmware image, or what one memory chip holds, for Board.start.
UnitTestReport
The results of a test binary's run, from Board.run_unit_tests.
TestCase
One test's result in a UnitTestReport.

Errors

HardLabsError
The API refused a request or couldn't answer it.
ConsoleTimeout
Expected console output didn't appear within the simulated time allowed.
SimulationStopped
Simulated time stopped advancing: the simulation is no longer running.

Functions

Functions
Functions the package exports.

Testing tools

pytest plugin
Installing hardlabs-sdk registers a pytest plugin. It adds the fixtures, the marker and the command-line options below. It signs in only when a test asks for the board.
Command line
python -m hardlabs_sdk boots a board for tools you run yourself, and lists the boards you can open.