oxitopemu¶
The oxitopemu utility emulates an OxiTop OC110 device, or at least the serial port data retrieval portion anyway. This utility is of niche interest; it is intended for developers wishing to work on OxiTopped without having to have an actual OC110 to hand.
Synopsis¶
$ oxitopemu [options] bottles-xml
Description¶
-
--version
¶
show program’s version number and exit
-
-h
,
--help
¶
show this help message and exit
-
-q
,
--quiet
¶
produce less console output
-
-v
,
--verbose
¶
produce more console output
-
-l
LOGFILE
,
--log-file
=LOGFILE
¶ log messages to the specified file
-
-P
,
--pdb
¶
run under PDB (debug mode)
-
-p
PORT
,
--port
=PORT
¶ specify the port which the OxiTop Data Logger is connected to. This will be something like /dev/ttyUSB0 on Linux or COM1 on Windows. Default: /dev/ttyUSB0
-
-t
TIMEOUT
,
--timeout
=TIMEOUT
¶ specify the number of seconds to wait for data from the serial port. Default: 3
-
-d
,
--daemon
¶
if specified, start the emulator as a background daemon
Usage and Notes¶
Simply install the emulator on a small machine with a serial port (personally I
use a RaspberryPi with a USB to Serial adapter), then use a null-modem
between the machine running the client and the machine running the emulator. A
default set of bottle definitions in XML format is included in the package as
example.xml
under the main package’s installation directory.
If you have the python-daemon package installed (it’s included in the dependencies of the Linux packages, and is bundled with the Windows installer) you can run the emulator in daemon mode.
The main purpose of the emulator is to test the applications in a setting with
a “real” serial interface. For testing command compatibility, there is no need
to use oxitopemu directly; the emulation code is used internally by each of
the clients when the TEST
port is specified. In this case, an emulated
null-modem is used to connect the emulation code to the client.