Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | #include "aos/configuration.h" |
Austin Schuh | 6b9c415 | 2019-11-29 12:45:24 -0800 | [diff] [blame] | 2 | #include "aos/events/ping_generated.h" |
| 3 | #include "aos/events/pong_generated.h" |
| 4 | #include "aos/events/pong_lib.h" |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 5 | #include "aos/events/shm_event_loop.h" |
| 6 | #include "aos/init.h" |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 7 | #include "glog/logging.h" |
| 8 | |
Austin Schuh | 5d89cf5 | 2019-12-28 16:27:42 -0800 | [diff] [blame] | 9 | DEFINE_string(config, "aos/events/pingpong_config.json", "Path to the config."); |
| 10 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 11 | int main(int argc, char **argv) { |
Austin Schuh | bb08ad9 | 2020-12-08 20:16:40 -0800 | [diff] [blame^] | 12 | aos::InitGoogle(&argc, &argv); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 13 | |
| 14 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
Austin Schuh | 5d89cf5 | 2019-12-28 16:27:42 -0800 | [diff] [blame] | 15 | aos::configuration::ReadConfig(FLAGS_config); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 16 | |
| 17 | ::aos::ShmEventLoop event_loop(&config.message()); |
| 18 | |
| 19 | aos::Pong ping(&event_loop); |
| 20 | |
| 21 | event_loop.Run(); |
| 22 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 23 | return 0; |
| 24 | } |