Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BT::FileLogger2 Class Reference

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>

Inheritance diagram for BT::FileLogger2:
Inheritance graph
[legend]

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
 
FileLogger2operator= (const FileLogger2 &other)=delete
 
FileLogger2operator= (FileLogger2 &&other)=default
 
virtual ~FileLogger2 () override
 
- Public Member Functions inherited from BT::StatusChangeLogger
bool enabled () const
 
void enableTransitionToIdle (bool enable)
 
StatusChangeLoggeroperator= (const StatusChangeLogger &other)=delete
 
StatusChangeLoggeroperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FileLogger2() [1/3]

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
treethe tree to log
filepathpath of the file where info will be stored

Definition at line 27 of file bt_file_logger_v2.cpp.

◆ FileLogger2() [2/3]

BT::FileLogger2::FileLogger2 ( const FileLogger2 other)
delete

◆ FileLogger2() [3/3]

BT::FileLogger2::FileLogger2 ( FileLogger2 &&  other)
default

◆ ~FileLogger2()

BT::FileLogger2::~FileLogger2 ( )
overridevirtual

Definition at line 71 of file bt_file_logger_v2.cpp.

Member Function Documentation

◆ callback()

void BT::FileLogger2::callback ( Duration  timestamp,
const TreeNode node,
NodeStatus  prev_status,
NodeStatus  status 
)
overridevirtual

Implements BT::StatusChangeLogger.

Definition at line 79 of file bt_file_logger_v2.cpp.

◆ flush()

void BT::FileLogger2::flush ( )
overridevirtual

Implements BT::StatusChangeLogger.

Definition at line 93 of file bt_file_logger_v2.cpp.

◆ operator=() [1/2]

FileLogger2& BT::FileLogger2::operator= ( const FileLogger2 other)
delete

◆ operator=() [2/2]

FileLogger2& BT::FileLogger2::operator= ( FileLogger2 &&  other)
default

◆ writerLoop()

void BT::FileLogger2::writerLoop ( )
private

Definition at line 98 of file bt_file_logger_v2.cpp.

Member Data Documentation

◆ _p

std::unique_ptr<PImpl> BT::FileLogger2::_p
private

Definition at line 60 of file bt_file_logger_v2.h.


The documentation for this class was generated from the following files:


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:18