blob: 581d04f15c2b26ce900ec6eadc7589b95e426328 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001#include "aos/configuration.h"
Austin Schuh6b9c4152019-11-29 12:45:24 -08002#include "aos/events/ping_generated.h"
3#include "aos/events/pong_generated.h"
4#include "aos/events/pong_lib.h"
Alex Perrycb7da4b2019-08-28 19:35:56 -07005#include "aos/events/shm_event_loop.h"
6#include "aos/init.h"
Alex Perrycb7da4b2019-08-28 19:35:56 -07007#include "glog/logging.h"
8
Austin Schuh5d89cf52019-12-28 16:27:42 -08009DEFINE_string(config, "aos/events/pingpong_config.json", "Path to the config.");
10
Alex Perrycb7da4b2019-08-28 19:35:56 -070011int main(int argc, char **argv) {
12 FLAGS_logtostderr = true;
13 google::InitGoogleLogging(argv[0]);
14 ::gflags::ParseCommandLineFlags(&argc, &argv, true);
15
16 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
Austin Schuh5d89cf52019-12-28 16:27:42 -080017 aos::configuration::ReadConfig(FLAGS_config);
Alex Perrycb7da4b2019-08-28 19:35:56 -070018
19 ::aos::ShmEventLoop event_loop(&config.message());
20
21 aos::Pong ping(&event_loop);
22
23 event_loop.Run();
24
25 ::aos::Cleanup();
26 return 0;
27}