Add a "configuration" channel to MCAP files for foxglove

This is helpful for doing certain types of analysis where you might want
to, e.g., correlate channel indices to a channel name/type (e.g., for
analyzing sent-too-fast errors or for using the ReplayTiming
message implemented by I471fefd96a4d043766b54dd4488726e24926a95f).

Change-Id: Ic68026be58205607a2099ccfd7547187989ec26c
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/util/mcap_logger.h b/aos/util/mcap_logger.h
index 5ae6413..d7409fb 100644
--- a/aos/util/mcap_logger.h
+++ b/aos/util/mcap_logger.h
@@ -95,7 +95,8 @@
   void WriteDataEnd();
   void WriteSchema(const uint16_t id, const aos::Channel *channel);
   void WriteChannel(const uint16_t id, const uint16_t schema_id,
-                    const aos::Channel *channel);
+                    const aos::Channel *channel,
+                    std::string_view override_name = "");
   void WriteMessage(uint16_t channel_id, const Channel *channel,
                     const Context &context, std::ostream *output);
   void WriteChunk();
@@ -154,6 +155,13 @@
       message_indices_;
   // ChunkIndex's for all fully written Chunks.
   std::vector<ChunkIndex> chunk_indices_;
+
+  // Metadata associated with the fake "configuration" channel that we create in
+  // order to ensure that foxglove extensions/users have access to the full
+  // configuration.
+  uint16_t configuration_id_ = 0;
+  FlatbufferDetachedBuffer<Channel> configuration_channel_;
+  FlatbufferDetachedBuffer<Configuration> configuration_;
 };
 }  // namespace aos
 #endif  // AOS_UTIL_MCAP_LOGGER_H_