Set NodeEventLoopFactory boot_uuid to logged boot_uuid
Previously, we couldn't replay relogged logfiles because they
did not correctly track the boot uuid from the ServerStatistics message,
which was very unfortunate. Since the goal of replay is to reproduce
the state of the world when we were running, set the simulated boot UUID
to match what was logged.
I still don't seem to be able to fully replay relogged files (see
comments in drivetrain_replay.cc), but I think that those issues are
likely independent of this particular problem and I haven't yet written
a test to conveniently reproduce it.
Change-Id: I121ea4001e6fee7595b4fe1a2b200ffa1ae9bd40
diff --git a/aos/events/logging/logger.h b/aos/events/logging/logger.h
index 4213066..4b83654 100644
--- a/aos/events/logging/logger.h
+++ b/aos/events/logging/logger.h
@@ -460,6 +460,16 @@
true) != nullptr;
}
+ // Returns true if the channel exists on the node and was logged.
+ template <typename T>
+ bool HasLoggedChannel(std::string_view name, const Node *node = nullptr) {
+ const Channel *channel = configuration::GetChannel(logged_configuration(), name,
+ T::GetFullyQualifiedName(), "", node,
+ true);
+ if (channel == nullptr) return false;
+ return channel->logger() != LoggerConfig::NOT_LOGGED;
+ }
+
SimulatedEventLoopFactory *event_loop_factory() {
return event_loop_factory_;
}