Public Member Functions | Private Member Functions | Private Attributes | List of all members
ManipulatorMock Class Reference

Mocks the ROS Api of the manipulator relevant for stopping and holding. More...

#include <pilz_manipulator_mock.h>

Public Member Functions

void advertiseHaltService (ros::NodeHandle nh, std::string halt_service_name)
 
void advertiseHoldService (ros::NodeHandle nh, std::string hold_service_name)
 
void advertiseRecoverService (ros::NodeHandle nh, std::string recover_service_name)
 
void advertiseServices (ros::NodeHandle nh, std::string hold_service_name, std::string unhold_service_name, std::string halt_service_name, std::string recover_service_name)
 
void advertiseUnholdService (ros::NodeHandle nh, std::string unhold_service_name)
 
 MOCK_METHOD2 (holdCb, bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp))
 
 MOCK_METHOD2 (unholdCb, bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp))
 
 MOCK_METHOD2 (haltCb, bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp))
 
 MOCK_METHOD2 (recoverCb, bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp))
 

Private Member Functions

bool haltCb_internal (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)
 
bool holdCb_internal (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)
 
bool recoverCb_internal (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)
 
bool unholdCb_internal (std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)
 

Private Attributes

ros::ServiceServer halt_srv_
 
ros::ServiceServer hold_srv_
 
ros::ServiceServer recover_srv_
 
ros::ServiceServer unhold_srv_
 

Detailed Description

Mocks the ROS Api of the manipulator relevant for stopping and holding.

prbt_hardware_support::PilzRunPermittedModbusAdapterNode relies on 4 advertised services for its functionality. For easy testing these services are advertised by this Gmock supported Mock class.

Definition at line 34 of file pilz_manipulator_mock.h.

Member Function Documentation

void ManipulatorMock::advertiseHaltService ( ros::NodeHandle  nh,
std::string  halt_service_name 
)

Definition at line 80 of file pilz_manipulator_mock.h.

void ManipulatorMock::advertiseHoldService ( ros::NodeHandle  nh,
std::string  hold_service_name 
)

Definition at line 68 of file pilz_manipulator_mock.h.

void ManipulatorMock::advertiseRecoverService ( ros::NodeHandle  nh,
std::string  recover_service_name 
)

Definition at line 86 of file pilz_manipulator_mock.h.

void ManipulatorMock::advertiseServices ( ros::NodeHandle  nh,
std::string  hold_service_name,
std::string  unhold_service_name,
std::string  halt_service_name,
std::string  recover_service_name 
)

Definition at line 116 of file pilz_manipulator_mock.h.

void ManipulatorMock::advertiseUnholdService ( ros::NodeHandle  nh,
std::string  unhold_service_name 
)

Definition at line 74 of file pilz_manipulator_mock.h.

bool ManipulatorMock::haltCb_internal ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  resp 
)
private

Definition at line 104 of file pilz_manipulator_mock.h.

bool ManipulatorMock::holdCb_internal ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  resp 
)
private

Definition at line 92 of file pilz_manipulator_mock.h.

ManipulatorMock::MOCK_METHOD2 ( holdCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)
ManipulatorMock::MOCK_METHOD2 ( unholdCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)
ManipulatorMock::MOCK_METHOD2 ( haltCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)
ManipulatorMock::MOCK_METHOD2 ( recoverCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)
bool ManipulatorMock::recoverCb_internal ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  resp 
)
private

Definition at line 110 of file pilz_manipulator_mock.h.

bool ManipulatorMock::unholdCb_internal ( std_srvs::Trigger::Request &  req,
std_srvs::Trigger::Response &  resp 
)
private

Definition at line 98 of file pilz_manipulator_mock.h.

Member Data Documentation

ros::ServiceServer ManipulatorMock::halt_srv_
private

Definition at line 63 of file pilz_manipulator_mock.h.

ros::ServiceServer ManipulatorMock::hold_srv_
private

Definition at line 61 of file pilz_manipulator_mock.h.

ros::ServiceServer ManipulatorMock::recover_srv_
private

Definition at line 64 of file pilz_manipulator_mock.h.

ros::ServiceServer ManipulatorMock::unhold_srv_
private

Definition at line 62 of file pilz_manipulator_mock.h.


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


prbt_hardware_support
Author(s):
autogenerated on Tue Feb 2 2021 03:50:18