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 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 9 | int 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 Schuh | 6b9c415 | 2019-11-29 12:45:24 -0800 | [diff] [blame^] | 15 | aos::configuration::ReadConfig("aos/events/pingpong_config.json"); |
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 | |
| 23 | ::aos::Cleanup(); |
| 24 | return 0; |
| 25 | } |