Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pilz_modbus_client_test::PilzModbusClientTests Class Reference

Test if PilzModbusClient correctly publishes ROS-Modbus messages. More...

Inheritance diagram for pilz_modbus_client_test::PilzModbusClientTests:
Inheritance graph
[legend]

Public Member Functions

void SetUp () override
 

Protected Member Functions

 MOCK_METHOD1 (modbus_read_cb, void(const ModbusMsgInStampedConstPtr &msg))
 

Protected Attributes

ros::NodeHandle nh_
 
ros::AsyncSpinner spinner_ { 2 }
 
ros::Subscriber subscriber_
 

Detailed Description

Test if PilzModbusClient correctly publishes ROS-Modbus messages.

It subscribes to the topic of the test object with a mocked callback function. The actual client needed by the test object is replaced by a mock object.

Definition at line 121 of file unittest_pilz_modbus_client.cpp.

Member Function Documentation

◆ MOCK_METHOD1()

pilz_modbus_client_test::PilzModbusClientTests::MOCK_METHOD1 ( modbus_read_cb  ,
void(const ModbusMsgInStampedConstPtr &msg  
)
protected

◆ SetUp()

void pilz_modbus_client_test::PilzModbusClientTests::SetUp ( )
override

Definition at line 134 of file unittest_pilz_modbus_client.cpp.

Member Data Documentation

◆ nh_

ros::NodeHandle pilz_modbus_client_test::PilzModbusClientTests::nh_
protected

Definition at line 129 of file unittest_pilz_modbus_client.cpp.

◆ spinner_

ros::AsyncSpinner pilz_modbus_client_test::PilzModbusClientTests::spinner_ { 2 }
protected

Definition at line 128 of file unittest_pilz_modbus_client.cpp.

◆ subscriber_

ros::Subscriber pilz_modbus_client_test::PilzModbusClientTests::subscriber_
protected

Definition at line 127 of file unittest_pilz_modbus_client.cpp.


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


prbt_hardware_support
Author(s):
autogenerated on Wed Nov 25 2020 03:10:38