The Groot2Publisher is used to create an interface between your BT.CPP executor and Groot2. More...
#include <groot2_publisher.h>
Classes | |
struct | PImpl |
Public Member Functions | |
Groot2Publisher (const BT::Tree &tree, unsigned server_port=1667) | |
Groot2Publisher (const Groot2Publisher &other)=delete | |
Groot2Publisher (Groot2Publisher &&other)=default | |
std::chrono::milliseconds | maxHeartbeatDelay () const |
Groot2Publisher & | operator= (const Groot2Publisher &other)=delete |
Groot2Publisher & | operator= (Groot2Publisher &&other)=default |
void | setMaxHeartbeatDelay (std::chrono::milliseconds delay) |
setMaxHeartbeatDelay is used to tell the publisher when a connection with Groot2 should be cancelled, if no heartbeat is received. More... | |
~Groot2Publisher () override | |
![]() | |
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 Types | |
using | Position = Monitor::Hook::Position |
Private Member Functions | |
void | callback (Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override |
void | enableAllHooks (bool enable) |
void | flush () override |
std::vector< uint8_t > | generateBlackboardsDump (const std::string &bb_list) |
Monitor::Hook::Ptr | getHook (Position pos, uint16_t node_uid) |
void | heartbeatLoop () |
bool | insertHook (Monitor::Hook::Ptr breakpoint) |
void | removeAllHooks () |
bool | removeHook (Position pos, uint16_t node_uid) |
void | serverLoop () |
bool | unlockBreakpoint (Position pos, uint16_t node_uid, NodeStatus result, bool remove) |
void | updateStatusBuffer () |
Private Attributes | |
std::unique_ptr< PImpl > | _p |
Static Private Attributes | |
static std::set< unsigned > | used_ports |
static std::mutex | used_ports_mutex |
The Groot2Publisher is used to create an interface between your BT.CPP executor and Groot2.
An inter-process communication mechanism allows the two processes to communicate through a TCP port. The user should provide the port to be used in the constructor.
Definition at line 19 of file groot2_publisher.h.
|
private |
Definition at line 24 of file groot2_publisher.h.
BT::Groot2Publisher::Groot2Publisher | ( | const BT::Tree & | tree, |
unsigned | server_port = 1667 |
||
) |
Definition at line 107 of file groot2_publisher.cpp.
|
override |
Definition at line 175 of file groot2_publisher.cpp.
|
delete |
|
default |
|
overrideprivatevirtual |
Implements BT::StatusChangeLogger.
Definition at line 199 of file groot2_publisher.cpp.
|
private |
Definition at line 481 of file groot2_publisher.cpp.
|
overrideprivatevirtual |
Implements BT::StatusChangeLogger.
Definition at line 227 of file groot2_publisher.cpp.
|
private |
Definition at line 518 of file groot2_publisher.cpp.
|
private |
Definition at line 696 of file groot2_publisher.cpp.
|
private |
Definition at line 497 of file groot2_publisher.cpp.
|
private |
Definition at line 539 of file groot2_publisher.cpp.
std::chrono::milliseconds BT::Groot2Publisher::maxHeartbeatDelay | ( | ) | const |
Definition at line 170 of file groot2_publisher.cpp.
|
delete |
|
default |
|
private |
Definition at line 670 of file groot2_publisher.cpp.
|
private |
Definition at line 632 of file groot2_publisher.cpp.
|
private |
Definition at line 232 of file groot2_publisher.cpp.
void BT::Groot2Publisher::setMaxHeartbeatDelay | ( | std::chrono::milliseconds | delay | ) |
setMaxHeartbeatDelay is used to tell the publisher when a connection with Groot2 should be cancelled, if no heartbeat is received.
Default is 5000 ms
Definition at line 165 of file groot2_publisher.cpp.
|
private |
Definition at line 598 of file groot2_publisher.cpp.
|
private |
|
private |
Definition at line 72 of file groot2_publisher.h.
|
staticprivate |
Definition at line 22 of file groot2_publisher.h.
|
staticprivate |
Definition at line 21 of file groot2_publisher.h.