nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
client.hpp File Reference

rclcpp::Client<S> — the arena-registered (callback-style) service client, and Client<S>::SharedPtr = rclcpp::ClientHandle<S>. More...

#include <cstdint>
#include <cstddef>
#include "rclcpp/detail/callback_context.hpp"
#include "rclcpp/client_handle.hpp"
#include "rclcpp/detail/config.hpp"
#include "rclcpp/detail/entity_name.hpp"
#include "rclcpp/logging.hpp"
#include "rclcpp/result.hpp"
#include "rclcpp/size_bound.hpp"
#include "rclcpp/detail/nros_cpp_ffi.h"
#include "rclcpp/detail/driven_future.hpp"
#include "rclcpp/qos.hpp"
#include "rclcpp/node.hpp"
Include dependency graph for client.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Client< S >

Namespaces

namespace  rclcpp

Typedefs

typedef void(* nros_cpp_service_response_callback_t) (const uint8_t *data, size_t len, void *ctx)

Functions

nros_cpp_ret_t nros_cpp_service_client_register (const nros_cpp_node_t *node, const char *service_name, const char *type_name, const char *type_hash, nros_cpp_qos_t qos, nros_cpp_service_response_callback_t callback, void *context, uint8_t sched_context, size_t *out_handle_id)
* RCLCPP_TRY (client.async_send_request(req))
* RCLCPP_TRY (handle.async_send_request(req))
* RCLCPP_TRY (node.create_client(client, "/add_two_ints", &on_response))

Variables

*rclcpp::Client< AddTwoInts > client
**auto handle = node.create_client<AddTwoInts>("/add_two_ints", &on_response)

Detailed Description

rclcpp::Client<S> — the arena-registered (callback-style) service client, and Client<S>::SharedPtr = rclcpp::ClientHandle<S>.

The FUTURE-style client — caller-owned storage, send_request() / call() / wait_for_service() — is rclcpp::PollClient<S> in rclcpp/polling_client.hpp since phase-456 W9. See there for why the two are separate types.

Typedef Documentation

◆ nros_cpp_service_response_callback_t

typedef void(* nros_cpp_service_response_callback_t) (const uint8_t *data, size_t len, void *ctx)

Function Documentation

◆ nros_cpp_service_client_register()

nros_cpp_ret_t nros_cpp_service_client_register ( const nros_cpp_node_t * node,
const char * service_name,
const char * type_name,
const char * type_hash,
nros_cpp_qos_t qos,
nros_cpp_service_response_callback_t callback,
void * context,
uint8_t sched_context,
size_t * out_handle_id )

◆ RCLCPP_TRY() [1/3]

* RCLCPP_TRY ( client. async_send_requestreq)

◆ RCLCPP_TRY() [2/3]

* RCLCPP_TRY ( handle. async_send_requestreq)

◆ RCLCPP_TRY() [3/3]

* RCLCPP_TRY ( node. create_clientclient, "/add_two_ints", &on_response)

Variable Documentation

◆ client

* rclcpp::Client<AddTwoInts> client

◆ handle

* * auto handle = node.create_client<AddTwoInts>("/add_two_ints", &on_response)