Make AOS starter print out application version on crashes
This way a journal log parser can unambiguously know what application
crahsed. Note that when an application crashes before it can send a
timing report out (e.g., if it crashes during initialization), this will
not end up helping.
Change-Id: I5217aecc395d2419ed7b622358f213cfd8ecd30f
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/starter/starterd_lib.h b/aos/starter/starterd_lib.h
index 775cdbc..81a4deb 100644
--- a/aos/starter/starterd_lib.h
+++ b/aos/starter/starterd_lib.h
@@ -59,6 +59,10 @@
// limit.
void HandleStateChange();
+ // Called periodically to run through the timing report fetcher and alert all
+ // the Application's to the new messages.
+ void ServiceTimingReportFetcher();
+
void SendStatus();
// Creates a MemoryMappedQueue for the given channel, to pre-allocate shared
@@ -77,6 +81,8 @@
int status_count_ = 0;
const int max_status_count_;
+ aos::Fetcher<aos::timing::Report> timing_report_fetcher_;
+
std::unordered_map<std::string, Application> applications_;
// Lock and list of all the queues. This makes it so we can initialize the