The FileLogger2 is a logger that saves the tree as XML and all the transitions. Data is written to file in a separate thread, to minimize latency.
More...
#include <bt_file_logger_v2.h>
|
|
| StatusChangeLogger ()=default |
| | Default constructor for deferred subscription. Call subscribeToTreeChanges() when ready.
|
| |
|
void | subscribeToTreeChanges (TreeNode *root_node) |
| | Subscribe to status changes. Call at end of constructor for deferred subscription.
|
| |
The FileLogger2 is a logger that saves the tree as XML and all the transitions. Data is written to file in a separate thread, to minimize latency.
Format:
- first 4 bytes: size of the XML string (N)
- next N bytes: string containing the XML representing the tree.
- next 8 bytes: first timestamp (microseconds since epoch)
- next: each 9 bytes is a FileLogger2::Transition. See definition.
◆ FileLogger2()
| BT::FileLogger2::FileLogger2 |
( |
const Tree & |
tree, |
|
|
std::filesystem::path const & |
filepath |
|
) |
| |
To correctly read this log with Groot2, you must use the suffix ".btlog". Constructor will throw otherwise.
- Parameters
-
| tree | the tree to log |
| filepath | path of the file where info will be stored |
◆ callback()
◆ flush()
| void BT::FileLogger2::flush |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: