Program Listing for File client.h
↰ Return to documentation for file (include/rcl/client.h
)
// Copyright 2016 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef RCL__CLIENT_H_
#define RCL__CLIENT_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/service_type_support_struct.h"
#include "rcl/allocator.h"
#include "rcl/event_callback.h"
#include "rcl/macros.h"
#include "rcl/node.h"
#include "rcl/publisher.h"
#include "rcl/service_introspection.h"
#include "rcl/time.h"
#include "rcl/visibility_control.h"
#include "rmw/types.h"
typedef struct rcl_client_impl_s rcl_client_impl_t;
typedef struct rcl_client_s
{
rcl_client_impl_t * impl;
} rcl_client_t;
typedef struct rcl_client_options_s
{
rmw_qos_profile_t qos;
rcl_allocator_t allocator;
} rcl_client_options_t;
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_client_t
rcl_get_zero_initialized_client(void);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_client_init(
rcl_client_t * client,
const rcl_node_t * node,
const rosidl_service_type_support_t * type_support,
const char * service_name,
const rcl_client_options_t * options);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_client_fini(rcl_client_t * client, rcl_node_t * node);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_client_options_t
rcl_client_get_default_options(void);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_send_request(const rcl_client_t * client, const void * ros_request, int64_t * sequence_number);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_take_response_with_info(
const rcl_client_t * client,
rmw_service_info_t * request_header,
void * ros_response);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_take_response(
const rcl_client_t * client,
rmw_request_id_t * request_header,
void * ros_response);
RCL_PUBLIC
RCL_WARN_UNUSED
const char *
rcl_client_get_service_name(const rcl_client_t * client);
RCL_PUBLIC
RCL_WARN_UNUSED
const rcl_client_options_t *
rcl_client_get_options(const rcl_client_t * client);
RCL_PUBLIC
RCL_WARN_UNUSED
rmw_client_t *
rcl_client_get_rmw_handle(const rcl_client_t * client);
RCL_PUBLIC
bool
rcl_client_is_valid(const rcl_client_t * client);
RCL_PUBLIC
RCL_WARN_UNUSED
const rmw_qos_profile_t *
rcl_client_request_publisher_get_actual_qos(const rcl_client_t * client);
RCL_PUBLIC
RCL_WARN_UNUSED
const rmw_qos_profile_t *
rcl_client_response_subscription_get_actual_qos(const rcl_client_t * client);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_client_set_on_new_response_callback(
const rcl_client_t * client,
rcl_event_callback_t callback,
const void * user_data);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_client_configure_service_introspection(
rcl_client_t * client,
rcl_node_t * node,
rcl_clock_t * clock,
const rosidl_service_type_support_t * type_support,
const rcl_publisher_options_t publisher_options,
rcl_service_introspection_state_t introspection_state);
#ifdef __cplusplus
}
#endif
#endif // RCL__CLIENT_H_