Class for dumping PicoScenes frames to files.
More...
#include <FrameDumper.hxx>
|
| int | dumpData (const uint8_t *buffer, const size_t msg_len) |
| | Dump raw data buffer to file.
|
| |
| void | dumpData (const std::vector< uint8_t > &buffer) |
| | Dump vector data to file.
|
| |
| void | dumpRxFrame (const ModularPicoScenesRxFrame &rxFrame) |
| | Dump a PicoScenes RX frame to file.
|
| |
| void | finishCurrentSession () |
| | Finish current dump session.
|
| |
| | ~FrameDumper () |
| | Destructor.
|
| |
|
| 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.
|
| |
| static void | finishAllSessions () |
| | Finish all active dump sessions.
|
| |
Class for dumping PicoScenes frames to files.
This class implements a singleton pattern for managing frame dumps. It provides functionality to:
- Create named dumper instances
- Write frame data to files
- Manage dump sessions
- Support concurrent access through thread-safe operations
Definition at line 22 of file FrameDumper.hxx.
◆ ~FrameDumper()
| FrameDumper::~FrameDumper |
( |
| ) |
|
Destructor.
Ensures proper cleanup by finishing the current session
◆ dumpData() [1/2]
| void FrameDumper::dumpData |
( |
const std::vector< uint8_t > & |
buffer | ) |
|
Dump vector data to file.
- Parameters
-
| buffer | Vector containing data to dump |
◆ dumpData() [2/2]
| int FrameDumper::dumpData |
( |
const uint8_t * |
buffer, |
|
|
const size_t |
msg_len |
|
) |
| |
Dump raw data buffer to file.
- Parameters
-
| buffer | Pointer to data buffer |
| msg_len | Length of data in bytes |
- Returns
- 0 on success
- Exceptions
-
| std::runtime_error | If file cannot be opened for writing |
◆ dumpRxFrame()
| void FrameDumper::dumpRxFrame |
( |
const ModularPicoScenesRxFrame & |
rxFrame | ) |
|
Dump a PicoScenes RX frame to file.
- Parameters
-
| rxFrame | Reference to the frame to dump |
◆ finishAllSessions()
| static void FrameDumper::finishAllSessions |
( |
| ) |
|
|
static |
Finish all active dump sessions.
Static method to close all open dumper instances
◆ finishCurrentSession()
| void FrameDumper::finishCurrentSession |
( |
| ) |
|
Finish current dump session.
Closes the file and cleans up resources for this dumper instance
◆ getInstance()
| static std::shared_ptr< FrameDumper > FrameDumper::getInstance |
( |
const std::string & |
dumperName, |
|
|
bool |
withoutTime = false |
|
) |
| |
|
static |
Get or create a dumper instance with the specified name.
- Parameters
-
| dumperName | Name identifier for the dumper |
| withoutTime | If true, omits timestamp from filename (default: false) |
- Returns
- Shared pointer to the dumper instance
◆ getInstanceWithoutTime()
| static std::shared_ptr< FrameDumper > FrameDumper::getInstanceWithoutTime |
( |
const std::string & |
dumperName | ) |
|
|
static |
Get or create a dumper instance without timestamp in filename.
- Parameters
-
| dumperName | Name identifier for the dumper |
- Returns
- Shared pointer to the dumper instance
The documentation for this class was generated from the following file: