24 #ifndef OMG_DDS_RPC_FUNCTION_CALL_HH 25 #define OMG_DDS_RPC_FUNCTION_CALL_HH 27 #include <dds/request_reply.hh> 51 template <
class Iface>
52 struct interface_traits
54 typedef Iface InterfaceType;
55 typedef typename Iface::ProxyType ProxyType;
56 typedef typename Iface::RequestType RequestType;
57 typedef typename Iface::ReplyType ReplyType;
63 class Exception :
public std::exception
69 Exception(
const char *msg);
71 virtual ~Exception()
throw();
72 virtual void raise()
const = 0;
106 ServiceParams & service_name(
const std::string &service_name);
110 ServiceParams & instance_name(
const std::string &instance_name);
114 ServiceParams & request_topic_name(
const std::string &req_topic);
118 ServiceParams & reply_topic_name(
const std::string &rep_topic);
122 ServiceParams & datawriter_qos(dds_entity_traits::DataWriterQos qos);
126 ServiceParams & datareader_qos(dds_entity_traits::DataReaderQos qos);
130 ServiceParams & publisher(dds_entity_traits::Publisher publisher);
134 ServiceParams & subscriber(dds_entity_traits::Subscriber subscriber);
138 ServiceParams & domain_participant(dds_entity_traits::DomainParticipant part);
143 std::string service_name()
const;
147 std::string instance_name()
const;
151 std::string request_topic_name()
const;
155 std::string reply_topic_name()
const;
159 dds_entity_traits::DataWriterQos datawriter_qos()
const;
163 dds_entity_traits::DataReaderQos datareader_qos()
const;
167 dds_entity_traits::Publisher publisher()
const;
171 dds_entity_traits::Subscriber subscriber()
const;
175 dds_entity_traits::DomainParticipant domain_participant()
const;
207 std::string instance_name);
216 ClientParams & service_name(
const std::string &service_name);
220 ClientParams & instance_name(
const std::string &instance_name);
224 ClientParams & request_topic_name(
const std::string &req_topic);
228 ClientParams & reply_topic_name(
const std::string &rep_topic);
232 ClientParams & datawriter_qos(
const dds_entity_traits::DataWriterQos & qos);
236 ClientParams & datareader_qos(
const dds_entity_traits::DataReaderQos & qos);
240 ClientParams & publisher(dds_entity_traits::Publisher publisher);
244 ClientParams & subscriber(dds_entity_traits::Subscriber subscriber);
248 ClientParams & domain_participant(dds_entity_traits::DomainParticipant part);
253 const std::string service_name()
const;
257 const std::string instance_name()
const;
261 const std::string request_topic_name()
const;
265 const std::string reply_topic_name()
const;
269 const dds_entity_traits::DataWriterQos datawriter_qos()
const;
273 const dds_entity_traits::DataReaderQos datareader_qos()
const;
277 dds_entity_traits::Publisher publisher()
const;
281 dds_entity_traits::Subscriber subscriber()
const;
285 dds_entity_traits::DomainParticipant domain_participant()
const;
291 std::string _instance_name;
310 template <
class Impl>
314 typedef rpc_entity_traits::ServiceEndpoint * VendorDependent;
324 template <
class TReq>
325 typename dds_type_traits<TReq>::DataReader get_request_datareader()
const;
329 template <
class TRep>
330 typename dds_type_traits<TRep>::DataWriter get_reply_datawriter()
const;
352 VendorDependent get_impl()
const;
382 template <
class TReq>
383 typename dds_type_traits<TReq>::DataWriter get_request_datawriter()
const;
387 template <
class TRep>
388 typename dds_type_traits<TRep>::DataReader get_reply_datareader()
const;
401 #if defined(CDX_HAS_RPC_SERVER) 417 ServerParams(
const ServerParams & other);
418 ServerParams & operator = (
const ServerParams & that);
419 ServerParams & default_service_params(
const ServiceParams & service_params);
423 typedef rpc_entity_traits::ServerParams * VendorDependent;
424 VendorDependent impl_;
427 VendorDependent get_impl()
const;
446 typedef rpc_entity_traits::Server * VendorDependent;
450 explicit Server(
const ServerParams & server_params);
454 VendorDependent get_impl()
const;
462 template <
class TReq>
463 typename dds_type_traits<TReq>::DataWriter
466 return (
typename dds_type_traits<TReq>::DataWriter)
467 ((VendorDependent)this->impl_)->get_req_dw( );
470 template <
class TRep>
471 typename dds_type_traits<TRep>::DataReader
474 return (
typename dds_type_traits<TRep>::DataReader)
475 ((VendorDependent)this->impl_)->get_rep_dr( );
Definition: function_call.hh:44
ServiceStatus
Definition: function_call.hh:44
dds_type_traits< TRep >::DataReader get_reply_datareader() const
Access the DataReader used to receive TRep replies.
Definition: function_call.hh:472
dds_type_traits< TReq >::DataWriter get_request_datawriter() const
Access the DataWriter used to send TReq requests.
Definition: function_call.hh:464
Used to pass configuration parameters when constructing a Service.
Definition: function_call.hh:87
Used to pass configuration parameters when constructing a Client.
Definition: function_call.hh:195
Definition: function_call.hh:306
Definition: function_call.hh:46
ClientEndpoint()
Default constructor.
Definition: function_call.hh:377
Provides the DDS infrastructure.
Definition: dds_builtin_basic.hh:28
Definition: function_call.hh:369
ServiceProxy.
Definition: request_reply.hh:224
RPCEntity is a base abstract class.
Definition: request_reply.hh:176
Used to pass configuration parameters when constructing a Requester.
Definition: request_reply.hh:862
DDS::rpc::ClientParams get_client_params()
Access the ClientParams defining the configuration of this ClientEndpoint.
Definition: function_call.hh:393
Definition: function_call.hh:45
Used to pass configuration parameters when constructing a Replier.
Definition: request_reply.hh:1016
The Duration_t structure contains data to define a time duration.
Definition: dds_builtin.hh:45