mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
ErrorPublisherTest Class Reference
+ Inheritance diagram for ErrorPublisherTest:
+ Collaboration diagram for ErrorPublisherTest:

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
void createPublisher (const rclcpp::Rate &rate=rclcpp::Rate(50.0))
 Create the ErrorPublisher with a fast publish rate for testing.
 
bool waitForMessages (size_t count, double timeout_s=3.0)
 Spin the node until at least count messages are received or timeout.
 
std::vector< mrs_msgs::msg::ErrorgraphElement > getReceivedMessages ()
 Get a copy of received messages.
 
void clearReceivedMessages ()
 Clear received messages.
 

Protected Attributes

rclcpp::Node::SharedPtr node_
 
rclcpp::Clock::SharedPtr clock_
 
std::unique_ptr< ErrorPublisherpublisher_
 
rclcpp::Subscription< mrs_msgs::msg::ErrorgraphElement >::SharedPtr sub_
 
std::mutex mtx_
 
std::vector< mrs_msgs::msg::ErrorgraphElement > received_msgs_
 

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