RTI Connext Modern C++ API  Version 6.1.0
dds::rpc::ClientEndpoint< Request, Reply > Class Template Reference

<<reference-type>> Manages the DDS entities required to make remote function calls. More...

#include <dds/rpc/ClientEndpoint.hpp>

Inheritance diagram for dds::rpc::ClientEndpoint< Request, Reply >:
dds::core::Reference< detail::ClientEndpointImpl< Request, Reply > > rpc_example::RobotControlClient

Public Types

using RequestType = Request
 The type used to make function calls. More...
 
using ReplyType = Reply
 The type used to receive the results of function calls. More...
 

Public Member Functions

 ClientEndpoint (const ClientParams &params)
 Creates a new ClientEndpoint. More...
 
void close ()
 Destroyes the underlying requester and other resources. More...
 
bool closed () const
 Whether this instance has been closed already. More...
 
void wait_for_service (const dds::core::Duration &maxWait)
 Waits for one or more services to be discovered. More...
 
void wait_for_service ()
 Waits for one or more services to be discovered for an unlimited period of time. More...
 
dds::pub::DataWriter< RequestTyperequest_datawriter () const
 Accesses the underlying DataWriter that sends the requests (function calls) More...
 
dds::sub::DataReader< ReplyTypereply_datareader () const
 Accesses the underlying DataReader that receives the replies (return values from the function calls) More...
 

Detailed Description

template<typename Request, typename Reply>
class dds::rpc::ClientEndpoint< Request, Reply >

<<reference-type>> Manages the DDS entities required to make remote function calls.

This class is always the base of a concrete client, such as rpc_example::RobotControlClient.

Member Typedef Documentation

◆ RequestType

template<typename Request , typename Reply >
using dds::rpc::ClientEndpoint< Request, Reply >::RequestType = Request

The type used to make function calls.

◆ ReplyType

template<typename Request , typename Reply >
using dds::rpc::ClientEndpoint< Request, Reply >::ReplyType = Reply

The type used to receive the results of function calls.

Constructor & Destructor Documentation

◆ ClientEndpoint()

template<typename Request , typename Reply >
dds::rpc::ClientEndpoint< Request, Reply >::ClientEndpoint ( const ClientParams params)
inlineexplicit

Creates a new ClientEndpoint.

Member Function Documentation

◆ close()

template<typename Request , typename Reply >
void dds::rpc::ClientEndpoint< Request, Reply >::close ( )
inline

Destroyes the underlying requester and other resources.

Any operation after close() throws dds::core::AlreadyClosedError

◆ closed()

template<typename Request , typename Reply >
bool dds::rpc::ClientEndpoint< Request, Reply >::closed ( ) const
inline

Whether this instance has been closed already.

◆ wait_for_service() [1/2]

template<typename Request , typename Reply >
void dds::rpc::ClientEndpoint< Request, Reply >::wait_for_service ( const dds::core::Duration maxWait)
inline

Waits for one or more services to be discovered.

Parameters
maxWaitThe maximum time to wait, after which dds::core::TimeoutError is thrown.

◆ wait_for_service() [2/2]

template<typename Request , typename Reply >
void dds::rpc::ClientEndpoint< Request, Reply >::wait_for_service ( )
inline

Waits for one or more services to be discovered for an unlimited period of time.

◆ request_datawriter()

template<typename Request , typename Reply >
dds::pub::DataWriter<RequestType> dds::rpc::ClientEndpoint< Request, Reply >::request_datawriter ( ) const
inline

Accesses the underlying DataWriter that sends the requests (function calls)

Returns
The DataWriter

◆ reply_datareader()

template<typename Request , typename Reply >
dds::sub::DataReader<ReplyType> dds::rpc::ClientEndpoint< Request, Reply >::reply_datareader ( ) const
inline

Accesses the underlying DataReader that receives the replies (return values from the function calls)

Returns
The DataReader