Log, replay, and solve with transmit timestamps

Now that we have our fancy new transmit timestamps, we can use them to
solve our original ambiguous replay problem.  Add them to the logfile
header, read them back, and use them in all the sorting code.  We also
want to test the contents carefully to make sure that they get logged
correctly.

Change-Id: I8a284a9d70fab406bf69efd7ca7f7ab4e213a861
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/events/logging/logfile_utils.h b/aos/events/logging/logfile_utils.h
index ff48898..d781a20 100644
--- a/aos/events/logging/logfile_utils.h
+++ b/aos/events/logging/logfile_utils.h
@@ -441,6 +441,7 @@
       realtime_clock::time_point realtime_sent_time, uint32_t queue_index,
       std::optional<monotonic_clock::time_point> monotonic_remote_time,
       std::optional<realtime_clock::time_point> realtime_remote_time,
+      monotonic_clock::time_point monotonic_remote_transmit_time,
       std::optional<uint32_t> remote_queue_index,
       monotonic_clock::time_point monotonic_timestamp_time,
       bool has_monotonic_timestamp_time, absl::Span<const uint8_t> span)
@@ -450,6 +451,7 @@
         queue_index(queue_index),
         monotonic_remote_time(monotonic_remote_time),
         realtime_remote_time(realtime_remote_time),
+        monotonic_remote_transmit_time(monotonic_remote_transmit_time),
         remote_queue_index(remote_queue_index),
         monotonic_timestamp_time(monotonic_timestamp_time),
         has_monotonic_timestamp_time(has_monotonic_timestamp_time),
@@ -469,6 +471,7 @@
   std::optional<aos::monotonic_clock::time_point> monotonic_remote_time;
 
   std::optional<realtime_clock::time_point> realtime_remote_time;
+  aos::monotonic_clock::time_point monotonic_remote_transmit_time;
   std::optional<uint32_t> remote_queue_index;
 
   // This field is defaulted in the flatbuffer, so we need to store both the
@@ -546,6 +549,8 @@
   BootTimestamp monotonic_remote_time;
   realtime_clock::time_point realtime_remote_time = realtime_clock::min_time;
 
+  BootTimestamp monotonic_remote_transmit_time;
+
   BootTimestamp monotonic_timestamp_time;
 
   std::shared_ptr<UnpackedMessageHeader> data;