interface_power - bruno-beloff/scs_dev GitHub Wiki
docs > software repositories > scs_dev > commands > device control
DESCRIPTION
The interface_power utility is used to simultaneously switch on and off the power to the following peripherals:
- GPS
- OPC
- NDIR
- modem (2G only on Praxis/Urban, all modems on Praxis/OPCube)
- integrated gas sensor interface (digital side only)
- LED
Note that not all interface board types are able to switch off all of these subsystems. Where switching is not possible, no operation is performed, and no exception is raised.
LED control is direct - it bypasses the led_controller process, if running. This enables LED control in service stop situations, where led_controller service may already have stopped. If the ENABLE_ALL flag is used, the LED is set to amber.
The utility supports a switch of any combination of peripherals, or all peripherals. Note that, in the case of 'all' the modem is not included.
SYNOPSIS
interface_power.py { [-g ENABLE] [-p ENABLE] [-m ENABLE] [-n ENABLE] [-o ENABLE] | ENABLE_ALL } [-v]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-g GASES, --gases=GASES | switch gas sensors ON (1) or OFF (0) |
-p GPS, --gps=GPS | switch GPS receiver ON (1) or OFF (0) |
-m MODEM, --modem=MODEM | switch modem ON (1) or OFF (0) |
-n NDIR, --ndir=NDIR | switch NDIR sensor ON (1) or OFF (0) |
-o OPC, --opc=OPC | switch particulate sensor ON (1) or OFF (0) |
-l LED, --led=LED | set the LED to the given colour |
-v, --verbose | report narrative to stderr |
EXAMPLES
All peripherals (except modem):
./interface_power.py 0
OPC only:
./interface_power.py -o 0
SEE ALSO
scs_dev/led
scs_dev/led_controller
scs_dev/modem_power