#include <service.hpp>
◆ ServiceBase()
◆ ~ServiceBase()
virtual rclcpp::ServiceBase::~ServiceBase |
( |
| ) |
|
|
virtual |
◆ get_service_name()
const char* rclcpp::ServiceBase::get_service_name |
( |
| ) |
|
Return the name of the service.
- Returns
- The name of the service.
◆ get_service_handle() [1/2]
Return the rcl_service_t service handle in a std::shared_ptr.
This handle remains valid after the Service is destroyed. The actual rcl service is not finalized until it is out of scope everywhere.
◆ get_service_handle() [2/2]
Return the rcl_service_t service handle in a std::shared_ptr.
This handle remains valid after the Service is destroyed. The actual rcl service is not finalized until it is out of scope everywhere.
◆ take_type_erased_request()
bool rclcpp::ServiceBase::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.
This type erased version of
- See also
- Service::take_request() is useful when using the service in a type agnostic way with methods like ServiceBase::create_request(), ServiceBase::create_request_header(), and ServiceBase::handle_request().
- Parameters
-
[out] | request_out | The type erased pointer 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()
◆ create_request_header()
◆ handle_request()
◆ exchange_in_use_by_wait_set_state()
bool rclcpp::ServiceBase::exchange_in_use_by_wait_set_state |
( |
bool |
in_use_state | ) |
|
Exchange the "in use by wait set" state for this service.
This is used to ensure this service is not used by multiple wait sets at the same time.
- Parameters
-
[in] | in_use_state | the new state to exchange into the state, true indicates it is now in use by a wait set, and false is that it is no longer in use by a wait set. |
- Returns
- the previous state.
◆ get_rcl_node_handle() [1/2]
rcl_node_t* rclcpp::ServiceBase::get_rcl_node_handle |
( |
| ) |
|
|
protected |
◆ get_rcl_node_handle() [2/2]
const rcl_node_t* rclcpp::ServiceBase::get_rcl_node_handle |
( |
| ) |
const |
|
protected |
◆ node_handle_
◆ service_handle_
◆ owns_rcl_handle_
bool rclcpp::ServiceBase::owns_rcl_handle_ = true |
|
protected |
◆ in_use_by_wait_set_
std::atomic<bool> rclcpp::ServiceBase::in_use_by_wait_set_ {false} |
|
protected |
The documentation for this class was generated from the following file: