Enable renaming logged locations
This adds two main features:
-Renaming logged locations so that they don't interfere with attempted
replay.
-Using a different (than logged) configuration for the replay so that we
can take advantage of updated schemas or the such.
Change-Id: I81a0da10fd60a32be2e7ea87ffe98d9b3043198c
diff --git a/aos/configuration.h b/aos/configuration.h
index 7bf8203..a078dea 100644
--- a/aos/configuration.h
+++ b/aos/configuration.h
@@ -49,6 +49,16 @@
const Node *node) {
return GetChannel(&config.message(), name, type, application_name, node);
}
+// Convenience wrapper for getting a channel from a specified config if you
+// already have the name/type in a Channel object--this is useful if you Channel
+// object you have does not point to memory within config.
+inline const Channel *GetChannel(const Configuration *config,
+ const Channel *channel,
+ const std::string_view application_name,
+ const Node *node) {
+ return GetChannel(config, channel->name()->string_view(),
+ channel->type()->string_view(), application_name, node);
+}
// Returns the Node out of the config with the matching name, or nullptr if it
// can't be found.