Functions
ros_ign_image::testing Namespace Reference

Functions

void compareTestMsg (const ignition::msgs::Header &_msg)
 Compare a message with the populated for testing. More...
 
void compareTestMsg (const ignition::msgs::Image &_msg)
 Compare a message with the populated for testing. More...
 
void compareTestMsg (const sensor_msgs::Image &_msg)
 Compare a message with the populated for testing. More...
 
void compareTestMsg (const std_msgs::Header &_msg)
 Compare a message with the populated for testing. More...
 
void createTestMsg (ignition::msgs::Header &_msg)
 Ignition::msgs test utils. More...
 
void createTestMsg (ignition::msgs::Image &_msg)
 Create a message used for testing. More...
 
void createTestMsg (sensor_msgs::Image &_msg)
 Create a message used for testing. More...
 
void createTestMsg (std_msgs::Header &_msg)
 ROS test utils. More...
 
template<class Rep , class Period >
void waitUntilBoolVar (bool &_boolVar, const std::chrono::duration< Rep, Period > &_sleepEach, const int _retries)
 Wait until a boolean variable is set to true for a given number of times. More...
 
template<class Rep , class Period >
void waitUntilBoolVarAndSpin (bool &_boolVar, const std::chrono::duration< Rep, Period > &_sleepEach, const int _retries)
 Wait until a boolean variable is set to true for a given number of times. This function calls ros::spinOnce each iteration. More...
 

Function Documentation

◆ compareTestMsg() [1/4]

void ros_ign_image::testing::compareTestMsg ( const ignition::msgs::Header _msg)

Compare a message with the populated for testing.

Parameters
[in]_msgThe message to compare.

Definition at line 159 of file test_utils.h.

◆ compareTestMsg() [2/4]

void ros_ign_image::testing::compareTestMsg ( const ignition::msgs::Image &  _msg)

Compare a message with the populated for testing.

Parameters
[in]_msgThe message to compare.

Definition at line 201 of file test_utils.h.

◆ compareTestMsg() [3/4]

void ros_ign_image::testing::compareTestMsg ( const sensor_msgs::Image &  _msg)

Compare a message with the populated for testing.

Parameters
[in]_msgThe message to compare.

Definition at line 126 of file test_utils.h.

◆ compareTestMsg() [4/4]

void ros_ign_image::testing::compareTestMsg ( const std_msgs::Header _msg)

Compare a message with the populated for testing.

Parameters
[in]_msgThe message to compare.

Definition at line 97 of file test_utils.h.

◆ createTestMsg() [1/4]

void ros_ign_image::testing::createTestMsg ( ignition::msgs::Header _msg)

Ignition::msgs test utils.

Create a message used for testing.

Parameters
[out]_msgThe message populated.

Definition at line 145 of file test_utils.h.

◆ createTestMsg() [2/4]

void ros_ign_image::testing::createTestMsg ( ignition::msgs::Image &  _msg)

Create a message used for testing.

Parameters
[out]_msgThe message populated.

Definition at line 186 of file test_utils.h.

◆ createTestMsg() [3/4]

void ros_ign_image::testing::createTestMsg ( sensor_msgs::Image &  _msg)

Create a message used for testing.

Parameters
[out]_msgThe message populated.

Definition at line 110 of file test_utils.h.

◆ createTestMsg() [4/4]

void ros_ign_image::testing::createTestMsg ( std_msgs::Header _msg)

ROS test utils.

Create a message used for testing.

Parameters
[out]_msgThe message populated.

Definition at line 87 of file test_utils.h.

◆ waitUntilBoolVar()

template<class Rep , class Period >
void ros_ign_image::testing::waitUntilBoolVar ( bool &  _boolVar,
const std::chrono::duration< Rep, Period > &  _sleepEach,
const int  _retries 
)

Wait until a boolean variable is set to true for a given number of times.

Parameters
[inout] _boolVar The bool variable.
[in]_sleepEachTime duration to wait between each retry.
[in]_retriesThe number of retries.

E.g.: using namespace std::chrono_literals; waitUntilBoolVar(myVar, 1ms, 10);

Definition at line 44 of file test_utils.h.

◆ waitUntilBoolVarAndSpin()

template<class Rep , class Period >
void ros_ign_image::testing::waitUntilBoolVarAndSpin ( bool &  _boolVar,
const std::chrono::duration< Rep, Period > &  _sleepEach,
const int  _retries 
)

Wait until a boolean variable is set to true for a given number of times. This function calls ros::spinOnce each iteration.

Parameters
[inout] _boolVar The bool variable.
[in]_sleepEachTime duration to wait between each retry.
[in]_retriesThe number of retries.

E.g.: using namespace std::chrono_literals; waitUntilBoolVar(myVar, 1ms, 10);

Definition at line 67 of file test_utils.h.



ros_ign_image
Author(s):
autogenerated on Sat Mar 11 2023 04:02:19