Replayer for FabMo flight recordings of G2 traffic.
This is a script for replaying G2 "flight logs" to help reproduce timing sensitive issues that are observed with the G2 firmware for debugging and test.
Flight logs are JSON formatted log files that record the traffic with a G2 session. They are produced by the FabMo Engine The format is currently sort of a moving target, but broadly includes a timestamp, channel, and message contents for every message sent to or recieved from the motion system.
You need node.js. You can just npm install
to pull the node dependencies.
To use on the command line:
node main.js --control=/dev/ttyUSB0 filename.json
--control
specifies the control channel (or only channel for the case of single-serial-port replays)
--data
specifies the data channel.
--skip
specifies an optional time rage to skip. (See below)
--quick
cuts any time interval with no transmission that is larger than 3 seconds down to 1 second. (Removing huge gaps with no information)
Because these replays are used to reproduce time-sensitive issue, often sessions need to be "fiddled with" for quite awhile before the artifact under study is observed. You can skip a single block of time by specifying the start and end times (milliseconds) at the command line: --skip=1000:1500
would skip all of the transactions between 1000 and 1500 ms, for example.
Flight reports are generated by the FabMo engine when the system log level is set to g2
- full flight logs are kept in memory (unbounded in size, so be careful) and written to disk when the process exits. The most recent flight report is written in the same directory as the logs, and is called g2-flight-log.json