8#include "PicoScenesCommons.hxx"
9#include "ModularPicoScenesFrame.hxx"
31 static std::shared_ptr<FrameDumper>
getInstance(
const std::string &dumperName,
bool withoutTime =
false);
49 int dumpData(
const uint8_t *buffer,
const size_t msg_len);
56 void dumpData(
const std::vector<uint8_t> &buffer);
88 std::string dumpFilePath{};
90 bool sessionFinished{};
93 static std::map<std::string, std::shared_ptr<FrameDumper>> instanceMap;
96 static std::map<std::string, std::shared_ptr<std::mutex>> mutexMap;
104 FrameDumper(
const std::string &prefix,
bool withoutTime =
false);
Class for dumping PicoScenes frames to files.
int dumpData(const uint8_t *buffer, const size_t msg_len)
Dump raw data buffer to file.
void dumpRxFrame(const ModularPicoScenesRxFrame &rxFrame)
Dump a PicoScenes RX frame to file.
static std::shared_ptr< FrameDumper > getInstance(const std::string &dumperName, bool withoutTime=false)
Get or create a dumper instance with the specified name.
static std::shared_ptr< FrameDumper > getInstanceWithoutTime(const std::string &dumperName)
Get or create a dumper instance without timestamp in filename.
void finishCurrentSession()
Finish current dump session.
void dumpData(const std::vector< uint8_t > &buffer)
Dump vector data to file.
static void finishAllSessions()
Finish all active dump sessions.
~FrameDumper()
Destructor.