rclcpp  master
C++ ROS Client Library API
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rclcpp::ClientBase Class Referenceabstract

#include <client.hpp>

Inheritance diagram for rclcpp::ClientBase:
rclcpp::Client< rcl_interfaces::srv::DescribeParameters > rclcpp::Client< rcl_interfaces::srv::GetParameters > rclcpp::Client< rcl_interfaces::srv::GetParameterTypes > rclcpp::Client< rcl_interfaces::srv::ListParameters > rclcpp::Client< rcl_interfaces::srv::SetParameters > rclcpp::Client< rcl_interfaces::srv::SetParametersAtomically > rclcpp::Client< ServiceT >

Public Member Functions

 ClientBase (rclcpp::node_interfaces::NodeBaseInterface *node_base, rclcpp::node_interfaces::NodeGraphInterface::SharedPtr node_graph, const std::string &service_name)
 
virtual ~ClientBase ()
 
const std::stringget_service_name () const
 
rcl_client_tget_client_handle ()
 
const rcl_client_tget_client_handle () const
 
bool service_is_ready () const
 
template<typename RatioT = std::milli>
bool wait_for_service (std::chrono::duration< int64_t, RatioT > timeout=std::chrono::duration< int64_t, RatioT >(-1))
 
virtual std::shared_ptr< void > create_response ()=0
 
virtual std::shared_ptr< rmw_request_id_tcreate_request_header ()=0
 
virtual void handle_response (std::shared_ptr< rmw_request_id_t > request_header, std::shared_ptr< void > response)=0
 

Protected Member Functions

bool wait_for_service_nanoseconds (std::chrono::nanoseconds timeout)
 
rcl_node_tget_rcl_node_handle ()
 
const rcl_node_tget_rcl_node_handle () const
 

Protected Attributes

rclcpp::node_interfaces::NodeGraphInterface::WeakPtr node_graph_
 
std::shared_ptr< rcl_node_tnode_handle_
 
rcl_client_t client_handle_ = rcl_get_zero_initialized_client()
 
std::string service_name_
 

Constructor & Destructor Documentation

◆ ClientBase()

rclcpp::ClientBase::ClientBase ( rclcpp::node_interfaces::NodeBaseInterface node_base,
rclcpp::node_interfaces::NodeGraphInterface::SharedPtr  node_graph,
const std::string service_name 
)

◆ ~ClientBase()

virtual rclcpp::ClientBase::~ClientBase ( )
virtual

Member Function Documentation

◆ get_service_name()

const std::string& rclcpp::ClientBase::get_service_name ( ) const

◆ get_client_handle() [1/2]

rcl_client_t* rclcpp::ClientBase::get_client_handle ( )

◆ get_client_handle() [2/2]

const rcl_client_t* rclcpp::ClientBase::get_client_handle ( ) const

◆ service_is_ready()

bool rclcpp::ClientBase::service_is_ready ( ) const

◆ wait_for_service()

template<typename RatioT = std::milli>
bool rclcpp::ClientBase::wait_for_service ( std::chrono::duration< int64_t, RatioT >  timeout = std::chrono::duration<int64_t, RatioT>(-1))
inline

◆ create_response()

virtual std::shared_ptr<void> rclcpp::ClientBase::create_response ( )
pure virtual

◆ create_request_header()

virtual std::shared_ptr<rmw_request_id_t> rclcpp::ClientBase::create_request_header ( )
pure virtual

◆ handle_response()

virtual void rclcpp::ClientBase::handle_response ( std::shared_ptr< rmw_request_id_t request_header,
std::shared_ptr< void >  response 
)
pure virtual

◆ wait_for_service_nanoseconds()

bool rclcpp::ClientBase::wait_for_service_nanoseconds ( std::chrono::nanoseconds  timeout)
protected

◆ get_rcl_node_handle() [1/2]

rcl_node_t* rclcpp::ClientBase::get_rcl_node_handle ( )
protected

◆ get_rcl_node_handle() [2/2]

const rcl_node_t* rclcpp::ClientBase::get_rcl_node_handle ( ) const
protected

Member Data Documentation

◆ node_graph_

rclcpp::node_interfaces::NodeGraphInterface::WeakPtr rclcpp::ClientBase::node_graph_
protected

◆ node_handle_

std::shared_ptr<rcl_node_t> rclcpp::ClientBase::node_handle_
protected

◆ client_handle_

rcl_client_t rclcpp::ClientBase::client_handle_ = rcl_get_zero_initialized_client()
protected

◆ service_name_

std::string rclcpp::ClientBase::service_name_
protected

The documentation for this class was generated from the following file: