#include <service.hpp>
|
| Service (std::shared_ptr< rcl_node_t > node_handle, const std::string &service_name, AnyServiceCallback< ServiceT > any_callback, rcl_service_options_t &service_options) |
| Default constructor. More...
|
|
| Service (std::shared_ptr< rcl_node_t > node_handle, std::shared_ptr< rcl_service_t > service_handle, AnyServiceCallback< ServiceT > any_callback) |
| Default constructor. More...
|
|
| Service (std::shared_ptr< rcl_node_t > node_handle, rcl_service_t *service_handle, AnyServiceCallback< ServiceT > any_callback) |
| Default constructor. More...
|
|
| Service ()=delete |
|
virtual | ~Service () |
|
bool | take_request (typename ServiceT::Request &request_out, rmw_request_id_t &request_id_out) |
| Take the next request from the service. More...
|
|
std::shared_ptr< void > | create_request () override |
|
std::shared_ptr< rmw_request_id_t > | create_request_header () override |
|
void | handle_request (std::shared_ptr< rmw_request_id_t > request_header, std::shared_ptr< void > request) override |
|
void | send_response (std::shared_ptr< rmw_request_id_t > req_id, std::shared_ptr< typename ServiceT::Response > response) |
|
void | send_response (rmw_request_id_t &req_id, typename ServiceT::Response &response) |
|
| ServiceBase (std::shared_ptr< rcl_node_t > node_handle) |
|
virtual | ~ServiceBase () |
|
const char * | get_service_name () |
| Return the name of the service. More...
|
|
std::shared_ptr< rcl_service_t > | get_service_handle () |
| Return the rcl_service_t service handle in a std::shared_ptr. More...
|
|
std::shared_ptr< const rcl_service_t > | get_service_handle () const |
| Return the rcl_service_t service handle in a std::shared_ptr. More...
|
|
bool | take_type_erased_request (void *request_out, rmw_request_id_t &request_id_out) |
| Take the next request from the service as a type erased pointer. More...
|
|
bool | exchange_in_use_by_wait_set_state (bool in_use_state) |
| Exchange the "in use by wait set" state for this service. More...
|
|
◆ CallbackType
template<typename ServiceT >
◆ CallbackWithHeaderType
template<typename ServiceT >
◆ Service() [1/4]
template<typename ServiceT >
Default constructor.
The constructor for a Service is almost never called directly. Instead, services should be instantiated through the function rclcpp::create_service().
- Parameters
-
[in] | node_handle | NodeBaseInterface pointer that is used in part of the setup. |
[in] | service_name | Name of the topic to publish to. |
[in] | any_callback | User defined callback to call when a client request is received. |
[in] | service_options | options for the subscription. |
◆ Service() [2/4]
template<typename ServiceT >
Default constructor.
The constructor for a Service is almost never called directly. Instead, services should be instantiated through the function rclcpp::create_service().
- Parameters
-
[in] | node_handle | NodeBaseInterface pointer that is used in part of the setup. |
[in] | service_handle | service handle. |
[in] | any_callback | User defined callback to call when a client request is received. |
◆ Service() [3/4]
template<typename ServiceT >
Default constructor.
The constructor for a Service is almost never called directly. Instead, services should be instantiated through the function rclcpp::create_service().
- Parameters
-
[in] | node_handle | NodeBaseInterface pointer that is used in part of the setup. |
[in] | service_handle | service handle. |
[in] | any_callback | User defined callback to call when a client request is received. |
◆ Service() [4/4]
template<typename ServiceT >
◆ ~Service()
template<typename ServiceT >
◆ take_request()
template<typename ServiceT >
Take the next request from the service.
- See also
- ServiceBase::take_type_erased_request().
- Parameters
-
[out] | request_out | The reference to a service request object into which the middleware will copy the taken request. |
[out] | request_id_out | The output id for the request which can be used to associate response with this request in the future. |
- Returns
- true if the request was taken, otherwise false.
- Exceptions
-
◆ create_request()
template<typename ServiceT >
◆ create_request_header()
template<typename ServiceT >
◆ handle_request()
template<typename ServiceT >
◆ send_response() [1/2]
template<typename ServiceT >
◆ send_response() [2/2]
template<typename ServiceT >
The documentation for this class was generated from the following file: