blob: 9162567df1569ede7b5ecc2ea2519263daa90501 [file] [log] [blame]
Philipp Schrader790cb542023-07-05 21:06:52 -07001#include "glog/logging.h"
2
Alex Perrycb7da4b2019-08-28 19:35:56 -07003#include "aos/configuration.h"
Austin Schuh6b9c4152019-11-29 12:45:24 -08004#include "aos/events/ping_generated.h"
5#include "aos/events/pong_generated.h"
6#include "aos/events/pong_lib.h"
Alex Perrycb7da4b2019-08-28 19:35:56 -07007#include "aos/events/shm_event_loop.h"
8#include "aos/init.h"
Alex Perrycb7da4b2019-08-28 19:35:56 -07009
Austin Schuh67afe522022-09-16 15:41:52 -070010DEFINE_string(config, "pingpong_config.json", "Path to the config.");
Austin Schuh5d89cf52019-12-28 16:27:42 -080011
Alex Perrycb7da4b2019-08-28 19:35:56 -070012int main(int argc, char **argv) {
Austin Schuhbb08ad92020-12-08 20:16:40 -080013 aos::InitGoogle(&argc, &argv);
James Kuszmaul762e8692023-07-31 14:57:53 -070014 aos::EventLoop::SetDefaultVersionString("pong_version");
Alex Perrycb7da4b2019-08-28 19:35:56 -070015
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
Alex Perrycb7da4b2019-08-28 19:35:56 -070025 return 0;
26}