Template Class SynchronousServiceClient
Defined in File synchronous_service_client.hpp
Class Documentation
-
template<class ServiceT>
class SynchronousServiceClient Class for handling synchronous service clients in ROS2 without taking care about the spin() method.
Public Types
Public Functions
-
inline SynchronousServiceClient(std::string service_name, as2::Node *node)
Constructor.
- Parameters:
service_name – Name of the service
-
inline bool sendRequest(const RequestT &req, ResponseT &resp, int wait_time = 0)
Send Request synchronously to the service.
- Parameters:
request – Request to be sent to the service
respone – Response received from the service
wait_time – Time to wait for the service to be available in seconds
- Returns:
True if the service was called successfully, false otherwise
Send Request synchronously to the service.
- Parameters:
request – Request to be sent to the service
respone – Response received from the service
wait_time – Time to wait for the service to be available in seconds
- Returns:
True if the service was called successfully, false otherwise
-
inline SynchronousServiceClient(std::string service_name, as2::Node *node)