blob: 339d4d72c52bb2789531b8711e57a2ff1c85e07d [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
Alex Perrycb7da4b2019-08-28 19:35:56 -07009int main(int argc, char **argv) {
10 FLAGS_logtostderr = true;
11 google::InitGoogleLogging(argv[0]);
12 ::gflags::ParseCommandLineFlags(&argc, &argv, true);
13
14 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
Austin Schuh6b9c4152019-11-29 12:45:24 -080015 aos::configuration::ReadConfig("aos/events/pingpong_config.json");
Alex Perrycb7da4b2019-08-28 19:35:56 -070016
17 ::aos::ShmEventLoop event_loop(&config.message());
18
19 aos::Pong ping(&event_loop);
20
21 event_loop.Run();
22
23 ::aos::Cleanup();
24 return 0;
25}