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

◆ advertiseHaltService()

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

Definition at line 80 of file pilz_manipulator_mock.h.

◆ advertiseHoldService()

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

Definition at line 68 of file pilz_manipulator_mock.h.

◆ advertiseRecoverService()

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

Definition at line 86 of file pilz_manipulator_mock.h.

◆ advertiseServices()

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.

◆ advertiseUnholdService()

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

Definition at line 74 of file pilz_manipulator_mock.h.

◆ haltCb_internal()

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.

◆ holdCb_internal()

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.

◆ MOCK_METHOD2() [1/4]

ManipulatorMock::MOCK_METHOD2 ( holdCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)

◆ MOCK_METHOD2() [2/4]

ManipulatorMock::MOCK_METHOD2 ( unholdCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)

◆ MOCK_METHOD2() [3/4]

ManipulatorMock::MOCK_METHOD2 ( haltCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)

◆ MOCK_METHOD2() [4/4]

ManipulatorMock::MOCK_METHOD2 ( recoverCb  ,
bool(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &resp)   
)

◆ recoverCb_internal()

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.

◆ unholdCb_internal()

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

◆ halt_srv_

ros::ServiceServer ManipulatorMock::halt_srv_
private

Definition at line 63 of file pilz_manipulator_mock.h.

◆ hold_srv_

ros::ServiceServer ManipulatorMock::hold_srv_
private

Definition at line 61 of file pilz_manipulator_mock.h.

◆ recover_srv_

ros::ServiceServer ManipulatorMock::recover_srv_
private

Definition at line 64 of file pilz_manipulator_mock.h.

◆ unhold_srv_

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 Sat Apr 4 2020 03:17:18