Allow renaming logged channels for replay
If we change an application to use a new channel for an existing
message, we need a way to support replaying old logs through it.
RenameLoggedChannel() provides an API to map the original channel to
the new one, updating the logged configuration as needed.
Since global maps for the new channel need not follow the same patterns
as the old one, any relevant maps must be specified by the user.
Change-Id: I68e9d2fe16bceaa60972a3f762f955e583c80255
Signed-off-by: Sanjay Narayanan <sanjay.narayanan@bluerivertech.com>
diff --git a/aos/events/ping_lib.h b/aos/events/ping_lib.h
index 0b83d52..fec6c45 100644
--- a/aos/events/ping_lib.h
+++ b/aos/events/ping_lib.h
@@ -2,6 +2,7 @@
#define AOS_EVENTS_PING_LIB_H_
#include <chrono>
+#include <string_view>
#include "aos/events/event_loop.h"
#include "aos/events/ping_generated.h"
@@ -12,7 +13,7 @@
// Class which sends out a Ping message every X ms, and times the response.
class Ping {
public:
- Ping(EventLoop *event_loop);
+ Ping(EventLoop *event_loop, std::string_view channel_name = "/test");
void set_quiet(bool quiet) { quiet_ = quiet; }