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

#include <bt_file_logger.h>

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

Public Member Functions

virtual void callback (Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override
 
 FileLogger (TreeNode *root_node, const char *filename, uint16_t buffer_size=10)
 
virtual void flush () override
 
virtual ~FileLogger () override
 
- Public Member Functions inherited from BT::StatusChangeLogger
bool enabled () const
 
void enableTransitionToIdle (bool enable)
 
void setEnabled (bool enabled)
 
void seTimestampType (TimestampType type)
 
bool showsTransitionToIdle () const
 
 StatusChangeLogger (TreeNode *root_node)
 
virtual ~StatusChangeLogger ()=default
 

Private Attributes

std::vector< SerializedTransitionbuffer_
 
bool buffer_max_size_
 
std::ofstream file_os_
 
std::chrono::high_resolution_clock::time_point start_time
 

Detailed Description

Definition at line 11 of file bt_file_logger.h.

Constructor & Destructor Documentation

BT::FileLogger::FileLogger ( BT::TreeNode root_node,
const char *  filename,
uint16_t  buffer_size = 10 
)

Definition at line 6 of file bt_file_logger.cpp.

BT::FileLogger::~FileLogger ( )
overridevirtual

Definition at line 31 of file bt_file_logger.cpp.

Member Function Documentation

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

Implements BT::StatusChangeLogger.

Definition at line 37 of file bt_file_logger.cpp.

void BT::FileLogger::flush ( )
overridevirtual

Implements BT::StatusChangeLogger.

Definition at line 57 of file bt_file_logger.cpp.

Member Data Documentation

std::vector<SerializedTransition> BT::FileLogger::buffer_
private

Definition at line 28 of file bt_file_logger.h.

bool BT::FileLogger::buffer_max_size_
private

Definition at line 30 of file bt_file_logger.h.

std::ofstream BT::FileLogger::file_os_
private

Definition at line 24 of file bt_file_logger.h.

std::chrono::high_resolution_clock::time_point BT::FileLogger::start_time
private

Definition at line 26 of file bt_file_logger.h.


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


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sun Feb 3 2019 03:14:33