blob: 600ad99cf8aec92cd82c36d0ead52570e35a3301 [file] [log] [blame]
Brian Silvermand0575692015-02-21 16:24:02 -05001#include "aos/common/controls/replay_control_loop.h"
2#include "aos/linux_code/init.h"
3
Brian Silvermanb691f5e2015-08-02 11:37:55 -07004#include "y2015/control_loops/claw/claw.q.h"
Brian Silvermand0575692015-02-21 16:24:02 -05005
6// Reads one or more log files and sends out all the queue messages (in the
7// correct order and at the correct time) to feed a "live" claw process.
8
9int main(int argc, char **argv) {
10 if (argc <= 1) {
11 fprintf(stderr, "Need at least one file to replay!\n");
12 return EXIT_FAILURE;
13 }
14
15 ::aos::InitNRT();
16
Austin Schuh88af0852016-12-04 20:31:32 -080017 ::aos::controls::ControlLoopReplayer<::y2015::control_loops::ClawQueue>
18 replayer(&::y2015::control_loops::claw_queue, "claw");
Brian Silvermand0575692015-02-21 16:24:02 -050019 for (int i = 1; i < argc; ++i) {
20 replayer.ProcessFile(argv[i]);
21 }
22
23 ::aos::Cleanup();
24}