Henry Speiser | e5f05aa | 2022-05-02 21:24:26 -0700 | [diff] [blame^] | 1 | #include "aos/configuration.h" |
| 2 | #include "aos/events/shm_event_loop.h" |
| 3 | #include "aos/init.h" |
| 4 | #include "aos/json_to_flatbuffer.h" |
| 5 | #include "constants_sender_lib.h" |
| 6 | #include "frc971/constants/testdata/constants_data_generated.h" |
| 7 | #include "frc971/constants/testdata/constants_list_generated.h" |
| 8 | #include "gflags/gflags.h" |
| 9 | #include "glog/logging.h" |
| 10 | |
| 11 | DEFINE_string(config, "frc971/constants/testdata/aos_config.json", |
| 12 | "Path to the config."); |
| 13 | DEFINE_string(constants_path, "frc971/constants/testdata/test_constants.json", |
| 14 | "Path to the constant file"); |
| 15 | // This is just a sample binary |
| 16 | int main(int argc, char **argv) { |
| 17 | aos::InitGoogle(&argc, &argv); |
| 18 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 19 | aos::configuration::ReadConfig(FLAGS_config); |
| 20 | aos::ShmEventLoop event_loop(&config.message()); |
| 21 | frc971::constants::ConstantSender<frc971::constants::testdata::ConstantsData, |
| 22 | frc971::constants::testdata::ConstantsList> |
| 23 | constants_sender(&event_loop, FLAGS_constants_path); |
| 24 | event_loop.Run(); |
| 25 | |
| 26 | return 0; |
| 27 | } |