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_lib.h" |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 3 | #include "aos/events/shm_event_loop.h" |
| 4 | #include "aos/init.h" |
| 5 | #include "aos/json_to_flatbuffer.h" |
| 6 | #include "gflags/gflags.h" |
| 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) { |
Austin Schuh | 32fd5a7 | 2019-12-01 22:20:26 -0800 | [diff] [blame^] | 10 | aos::InitGoogle(&argc, &argv); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 11 | |
| 12 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
Austin Schuh | 6b9c415 | 2019-11-29 12:45:24 -0800 | [diff] [blame] | 13 | aos::configuration::ReadConfig("aos/events/pingpong_config.json"); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 14 | |
Austin Schuh | 32fd5a7 | 2019-12-01 22:20:26 -0800 | [diff] [blame^] | 15 | aos::ShmEventLoop event_loop(&config.message()); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 16 | |
| 17 | aos::Ping ping(&event_loop); |
| 18 | |
| 19 | event_loop.Run(); |
| 20 | |
Austin Schuh | 32fd5a7 | 2019-12-01 22:20:26 -0800 | [diff] [blame^] | 21 | aos::Cleanup(); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 22 | return 0; |
| 23 | } |