Add NodeEventLoopFactory
This lets us create event loops on separate nodes which can't
communicate with each other. Next step is to add a message proxy
between them, then teach the logger to replay onto multiple nodes.
Change-Id: I06b2836365aea13d696535c52a78ca0c862a7b1e
diff --git a/aos/events/event_loop_param_test.h b/aos/events/event_loop_param_test.h
index ea5fd3d..4f24d78 100644
--- a/aos/events/event_loop_param_test.h
+++ b/aos/events/event_loop_param_test.h
@@ -90,17 +90,17 @@
flatbuffer_ = FlatbufferDetachedBuffer<Configuration>(
JsonToFlatbuffer(json, Configuration::MiniReflectTypeTable()));
- my_node_ = my_node;
+ my_node_ = configuration::GetNode(&flatbuffer_.message(), my_node);
}
- std::string_view my_node() const { return my_node_; }
+ const Node *my_node() const { return my_node_; }
const Configuration *configuration() { return &flatbuffer_.message(); }
private:
FlatbufferDetachedBuffer<Configuration> flatbuffer_;
- std::string my_node_;
+ const Node *my_node_ = nullptr;
};
class AbstractEventLoopTestBase
@@ -134,7 +134,7 @@
const Configuration *configuration() { return factory_->configuration(); }
- std::string_view my_node() const { return factory_->my_node(); }
+ const Node *my_node() const { return factory_->my_node(); }
// Ends the given event loop at the given time from now.
void EndEventLoop(EventLoop *loop, ::std::chrono::milliseconds duration) {