blob: fa5e7c1d1dee13f3bfe8d16d02108e54985d59a7 [file] [log] [blame]
Austin Schuhe84c3ed2019-12-14 15:29:48 -08001#include "aos/events/shm_event_loop.h"
2#include "aos/init.h"
3#include "aos/network/message_bridge_server_lib.h"
4#include "gflags/gflags.h"
5#include "glog/logging.h"
6
7DEFINE_string(config, "multinode_pingpong_config.json", "Path to the config.");
8
9namespace aos {
10namespace message_bridge {
11
12int Main() {
13 aos::FlatbufferDetachedBuffer<aos::Configuration> config =
14 aos::configuration::ReadConfig(FLAGS_config);
15
16 aos::ShmEventLoop event_loop(&config.message());
17
18 MessageBridgeServer app(&event_loop);
19
20 // TODO(austin): Track which messages didn't make it in time and need to be
21 // logged locally and forwarded.
22
23 event_loop.Run();
24
25 return EXIT_SUCCESS;
26}
27
28} // namespace message_bridge
29} // namespace aos
30
31int main(int argc, char **argv) {
32 aos::InitGoogle(&argc, &argv);
33
34 return aos::message_bridge::Main();
35}