Pull multi-node timestamp estimation into a class
There is enough code there and enough interactions to justify an
interface. Put it behind an interface to make it much more clear and
easier to enforce what updates when and with what guarentees.
This should provide no functional change.
Change-Id: Idd2c1849c2641df828c26860c61e238f47d87f9e
diff --git a/aos/configuration.h b/aos/configuration.h
index d10d16d..a7eff21 100644
--- a/aos/configuration.h
+++ b/aos/configuration.h
@@ -83,6 +83,9 @@
// can't be found.
const Node *GetNode(const Configuration *config, std::string_view name);
const Node *GetNode(const Configuration *config, const Node *node);
+// Returns the node with the provided index. This works in both a single and
+// multi-node world.
+const Node *GetNode(const Configuration *config, size_t node_index);
// Returns a matching node, or nullptr if the provided node is nullptr and we
// are in a single node world.
const Node *GetNodeOrDie(const Configuration *config, const Node *node);