Refactor out GetApplication for reuse
No need to duplicate the logic elsewhere.
Change-Id: I86dcc716ca9a8c0e587d4c43ad8f09d8a01ea2c6
diff --git a/aos/configuration.h b/aos/configuration.h
index 78522b6..88af5fe 100644
--- a/aos/configuration.h
+++ b/aos/configuration.h
@@ -152,6 +152,12 @@
std::vector<const Node *> TimestampNodes(const Configuration *config,
const Node *my_node);
+// Returns the application for the provided node and name if it exists, or
+// nullptr if it does not exist on this node.
+const Application *GetApplication(const Configuration *config,
+ const Node *my_node,
+ std::string_view application_name);
+
// TODO(austin): GetSchema<T>(const Flatbuffer<Configuration> &config);
} // namespace configuration