CLI Examples
Supply Nets
Power supply Nets can be controlled using thelager supply command.
Set voltage and protection thresholds (note: this does not enable output):
Battery Nets
Some programmable power supplies support battery simulation. These can be controlled using thelager battery command.
Set the simulated battery’s state of charge (SOC):
Debug Nets
Debugger nets (e.g. J-Link) can be used to flash firmware, erase memory, and inspect devices. Flash a hex file to your device:DEBUG_NET is the name of your debug net. You can also use a default debug net if configured.
Programmatic Control with Python
For more complex automation or integration into test frameworks, you can use the Lager Python SDK to perform the same operations programmatically. The following example shows how to write a Python script using the Net API:-
Create a Python script. Save the following code to a file named
flash.py: -
Execute the script with Lager. Use the
lager pythoncommand to run the script in the Lager Box environment, ensuring it has access to the connected hardware.
For detailed Python API documentation, see the Python Reference section.

