Command Line Interface¶
In general the interface is distributed into a server side and a client. The server runs on the compute that is connected to the sensor and the pump. It executes the commands that are send to it from the client. To access the command type
measure --help
Server Interface¶
To start a server you may use a command similar to this one
measure server start --pump-port /dev/ttyS4 --sensor-port /dev/ttyS11 --storage-directory /your/favorite/dir
All three arguments are essential for starting a server. For finding the specific port on your computer unplug the device and list all ports taken via:
python -m serial.tools.list_ports)
After plugging in the device take a look which port were added using the same command.
server¶
host sensor and pump
server [OPTIONS] COMMAND [ARGS]...
start¶
Start Sensor Server
server start [OPTIONS]
Options
- --pump-port <pump_port>¶
Required port for reaching the pump
- --sensor-port <sensor_port>¶
Required port for reaching the sensor spot
- --storage-directory <storage_directory>¶
Required directory where to store the files for each measurement
Client Interface¶
When interacting with the server you may use the client interface, i.e. you can monitor the current of the sensor via.
measure client monitor --channel 123.456.789.123:50051 --duration 2.5
Monitoring is just one option, all the commands that are provided by the server are:
client¶
Remote control
client [OPTIONS] COMMAND [ARGS]...
monitor¶
Monitor the values produced by the sensor
client monitor [OPTIONS]
Options
- --channel <channel>¶
Required where to find the server, i.e. localhost:50051
- --duration <duration>¶
how many minutes you want to do the monitoring for (default: 1 min)
record¶
Record the values from the sensor and write them to a csv file
client record [OPTIONS]
Options
- --name <name>¶
the name of the measurement that is used for storing the csv file
- --real-glucose <real_glucose>¶
the concentration [g / L] of glucose if known (default: NaN)
- --real-lactate <real_lactate>¶
the concentration [g / L] of lactic acid if known (default: NaN)
- --duration <duration>¶
how many minutes you want to do the recording for (default: 1 min)
- --channel <channel>¶
Required where to find the server, i.e. localhost:50051
start-pump¶
Start pump from the client
client start-pump [OPTIONS]
Options
- --volume <volume>¶
Required desired volume in uL
- --flow-rate <flow_rate>¶
desired flow rate (default: 2000 uL / min)
- --delay <delay>¶
number of seconds to wait before pumping (default: 0s)
- --channel <channel>¶
Required where to find the server, i.e. localhost:50051