blob: a0b23ce0b86330f0571e4908a4211191e3118966 [file] [log] [blame]
Philipp Schrader790cb542023-07-05 21:06:52 -07001#include "gflags/gflags.h"
2#include "glog/logging.h"
3
Henry Speisere5f05aa2022-05-02 21:24:26 -07004#include "aos/configuration.h"
5#include "aos/events/shm_event_loop.h"
6#include "aos/init.h"
7#include "aos/json_to_flatbuffer.h"
Philipp Schrader790cb542023-07-05 21:06:52 -07008#include "frc971/constants/constants_sender_lib.h"
Henry Speisere5f05aa2022-05-02 21:24:26 -07009#include "frc971/constants/testdata/constants_data_generated.h"
10#include "frc971/constants/testdata/constants_list_generated.h"
Henry Speisere5f05aa2022-05-02 21:24:26 -070011
12DEFINE_string(config, "frc971/constants/testdata/aos_config.json",
13 "Path to the config.");
14DEFINE_string(constants_path, "frc971/constants/testdata/test_constants.json",
15 "Path to the constant file");
16// This is just a sample binary
17int main(int argc, char **argv) {
18 aos::InitGoogle(&argc, &argv);
19 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
20 aos::configuration::ReadConfig(FLAGS_config);
21 aos::ShmEventLoop event_loop(&config.message());
22 frc971::constants::ConstantSender<frc971::constants::testdata::ConstantsData,
23 frc971::constants::testdata::ConstantsList>
24 constants_sender(&event_loop, FLAGS_constants_path);
25 event_loop.Run();
26
27 return 0;
28}