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>
Classes | |
struct | PImpl |
struct | Transition |
Public Member Functions | |
void | callback (Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override |
FileLogger2 (const FileLogger2 &other)=delete | |
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. More... | |
FileLogger2 (FileLogger2 &&other)=default | |
void | flush () override |
FileLogger2 & | operator= (const FileLogger2 &other)=delete |
FileLogger2 & | operator= (FileLogger2 &&other)=default |
virtual | ~FileLogger2 () override |
Public Member Functions inherited from BT::StatusChangeLogger | |
bool | enabled () const |
void | enableTransitionToIdle (bool enable) |
StatusChangeLogger & | operator= (const StatusChangeLogger &other)=delete |
StatusChangeLogger & | operator= (StatusChangeLogger &&other)=default |
void | setEnabled (bool enabled) |
void | setTimestampType (TimestampType type) |
bool | showsTransitionToIdle () const |
StatusChangeLogger (const StatusChangeLogger &other)=delete | |
StatusChangeLogger (StatusChangeLogger &&other)=default | |
StatusChangeLogger (TreeNode *root_node) | |
virtual | ~StatusChangeLogger ()=default |
Private Member Functions | |
void | writerLoop () |
Private Attributes | |
std::unique_ptr< PImpl > | _p |
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:
Definition at line 23 of file bt_file_logger_v2.h.
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.
tree | the tree to log |
filepath | path of the file where info will be stored |
Definition at line 27 of file bt_file_logger_v2.cpp.
|
delete |
|
default |
|
overridevirtual |
Definition at line 71 of file bt_file_logger_v2.cpp.
|
overridevirtual |
Implements BT::StatusChangeLogger.
Definition at line 79 of file bt_file_logger_v2.cpp.
|
overridevirtual |
Implements BT::StatusChangeLogger.
Definition at line 93 of file bt_file_logger_v2.cpp.
|
delete |
|
default |
|
private |
Definition at line 98 of file bt_file_logger_v2.cpp.
|
private |
Definition at line 60 of file bt_file_logger_v2.h.