Import
Core Classes
| Class | Description | Import |
|---|---|---|
Step | Factory test step base class | from lager.factory import Step, run |
PersistentCache | Data persistence between test runs | from lager.cache import PersistentCache |
binaries | Execute custom binaries | from lager.binaries import run_custom_binary |
Net | Core class for managing hardware connections | from lager import Net, NetType |
debug | Device debug and flash operations | from lager.debug import connect_jlink |
RTT | Real-Time Terminal communication | from lager.core import RTT |
usb_hub | USB device power control | from lager.usb_hub import enable, disable, toggle |
Dexarm | Robotic arm control | from lager.arm.rotrics import Dexarm |
Central | BLE scanning and connection | from lager.ble import Central, Client |
BlufiClient | ESP32 WiFi provisioning | from lager.blufi import BlufiClient |
Net Types
The SDK supports various net types for different hardware:| NetType | Description | Hardware |
|---|---|---|
NetType.PowerSupply | Programmable power supply | Rigol DP800, Keithley, Keysight |
NetType.PowerSupply2Q | Two-quadrant supply (solar sim) | EA PSI/EL series |
NetType.Battery | Battery simulator | Keithley 2281S |
NetType.ELoad | Electronic load | Rigol DL3000 |
NetType.Analog | Oscilloscope analog input | Rigol MSO5000 |
NetType.Logic | Logic analyzer input | Rigol MSO5000 |
NetType.Waveform | Waveform generator | Rigol MSO5000 |
NetType.GPIO | Digital I/O | LabJack T7 |
NetType.ADC | Analog-to-digital converter | LabJack T7 |
NetType.DAC | Digital-to-analog converter | LabJack T7 |
NetType.Thermocouple | Temperature sensor | Phidget |
NetType.Rotation | Rotary encoder | Phidget |
NetType.WattMeter | Power meter | Yocto-Watt |
NetType.UART | Serial communication | USB Serial |
NetType.Debug | Debug probe | J-Link, pyOCD |
NetType.Arm | Robotic arm | Rotrics Dexarm |
NetType.Usb | USB port control | Acroname, YKUSH |
NetType.Wifi | WiFi module | Lager Box WiFi |
NetType.Actuate | Actuator control | Dexarm actuator |
Quick Start
List Available Nets
Control a Power Supply
Read an ADC
Control GPIO
Flash Firmware
USB Power Control
Complete Example
API Reference
Core Classes
| Page | Description |
|---|---|
| Factory Test Framework | Step-based production test sequences |
| Persistent Cache | Data persistence between test runs |
| Custom Binaries | Execute custom binaries on the Lager Box |
| Net | Hardware net management and core operations |
| Debug | Device flashing, reset, and debug control |
| RTT | Real-Time Terminal communication |
| USB | USB device power control |
Power & Simulation
| Page | Description |
|---|---|
| Power Supply | Programmable power supply control |
| Battery | Battery simulation and testing |
| Solar | Solar panel simulation |
| Electronic Load | Electronic load control |
| Watt Meter | Power measurement |
Measurement
| Page | Description |
|---|---|
| Scope | Oscilloscope waveform capture and measurements |
| Logic Analyzer | Digital signal capture and protocol decode |
| ADC | Analog-to-digital conversion |
| Thermocouple | Temperature measurement |
I/O & Communication
Utilities
Error Handling
Notes
- Always call
disable()when finished with power-related nets - Simple nets (GPIO, ADC, DAC) don’t require
enable()/disable()calls - Complex nets (PowerSupply, Battery, Analog) require
enable()before use - Net names must match those configured in the Lager system
- Use try/except blocks for robust error handling

