blob: e86cedc3749c0419e76fa1ed7486b6b8e57d3068 [file] [log] [blame]
John Park33858a32018-09-28 23:05:48 -07001#include "aos/controls/replay_control_loop.h"
John Park398c74a2018-10-20 21:17:39 -07002#include "aos/init.h"
Brian Silverman17f503e2015-08-02 18:17:18 -07003
4#include "y2014/control_loops/shooter/shooter.q.h"
5
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" shooter 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
Brian Silvermanb601d892015-12-20 18:24:38 -050017 ::aos::controls::ControlLoopReplayer<::y2014::control_loops::ShooterQueue>
18 replayer(&::y2014::control_loops::shooter_queue, "shooter");
Brian Silverman17f503e2015-08-02 18:17:18 -070019 for (int i = 1; i < argc; ++i) {
20 replayer.ProcessFile(argv[i]);
21 }
22
23 ::aos::Cleanup();
24}