Go to the documentation of this file.
58 SqliteLogger(
const Tree& tree, std::filesystem::path
const& file,
bool append =
false);
74 virtual void flush()
override;
77 std::unique_ptr<sqlite::Connection>
db_;
virtual void flush() override
SqliteLogger(const Tree &tree, std::filesystem::path const &file, bool append=false)
To correctly read this log with Groot2, you must use the suffix ".db3". Constructor will throw otherw...
void setAdditionalCallback(ExtraCallback func)
std::thread writer_thread_
ExtraCallback extra_func_
void execSqlStatement(std::string statement)
The SqliteLogger is a logger that will store the tree and all the status transitions in a SQLite data...
Abstract base class for Behavior Tree Nodes.
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
std::chrono::high_resolution_clock::duration Duration
std::unordered_map< const BT::TreeNode *, int64_t > starting_time_
std::deque< Transition > transitions_queue_
static pthread_mutex_t mutex
virtual void callback(Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override
int64_t monotonic_timestamp_
virtual ~SqliteLogger() override
std::condition_variable queue_cv_
std::function< std::string(Duration, const TreeNode &, NodeStatus, NodeStatus)> ExtraCallback
std::unique_ptr< sqlite::Connection > db_