Put remote boot UUID in ServerStatistics and RemoteMessage
This makes it so we can see when a remote reboots easily, and gives us a
stepping stone to putting it in the log file header.
RemoteMessage then goes to the logger, so we are ready to teach the
logger how to detect and handle reboots.
Change-Id: I943de46094b60535c92a677b430d6828933b820d
diff --git a/aos/events/event_loop.h b/aos/events/event_loop.h
index bf7381c..3916ce4 100644
--- a/aos/events/event_loop.h
+++ b/aos/events/event_loop.h
@@ -12,6 +12,7 @@
#include "aos/events/channel_preallocated_allocator.h"
#include "aos/events/event_loop_event.h"
#include "aos/events/event_loop_generated.h"
+#include "aos/events/logging/uuid.h"
#include "aos/events/timing_statistics.h"
#include "aos/flatbuffers.h"
#include "aos/ftrace.h"
@@ -473,7 +474,7 @@
class EventLoop {
public:
- EventLoop(const Configuration *configuration);
+ EventLoop(const Configuration *configuration, UUID boot_uuid);
virtual ~EventLoop();
@@ -653,6 +654,9 @@
// range of Context::buffer_index values for this channel.
virtual int NumberBuffers(const Channel *channel) = 0;
+ // Returns the boot UUID.
+ const UUID &boot_uuid() { return boot_uuid_; }
+
protected:
// Sets the name of the event loop. This is the application name.
virtual void set_name(const std::string_view name) = 0;
@@ -732,6 +736,8 @@
// If true, don't send AOS_LOG to /aos
bool skip_logger_ = false;
+ UUID boot_uuid_;
+
private:
virtual pid_t GetTid() = 0;