Add GetNodesWithTag
This makes tags much easier to work with. It is common to want to find
all the matching nodes for a tag/function.
Change-Id: Ibe2876fc825dea1ffee5686f7e40dce85ebc8793
diff --git a/aos/configuration.h b/aos/configuration.h
index 5579334..7383a1a 100644
--- a/aos/configuration.h
+++ b/aos/configuration.h
@@ -96,6 +96,11 @@
// in a single node world.)
std::vector<const Node *> GetNodes(const Configuration *config);
+// Returns a vector of the nodes in the config with the provided tag. If this
+// is a single-node world, we assume that all tags match.
+std::vector<const Node *> GetNodesWithTag(const Configuration *config,
+ std::string_view tag);
+
// Returns the node index for a node. Note: will be faster if node is a pointer
// to a node in config, but is not required.
int GetNodeIndex(const Configuration *config, const Node *node);