RTI Connext Modern C++ API  Version 6.0.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::request::RequesterParams Class Reference

Contains the parameters for creating a rti::request::Requester. More...

#include <RequesterParams.hpp>

Inherits rti::request::detail::EntityParamsWithSetters< ActualEntity >.

Public Member Functions

 RequesterParams (dds::domain::DomainParticipant participant)
 Creates a RequesterParams with the parameters a Requester always needs.
 
RequesterParamsservice_name (const std::string &name)
 The service name that Repliers and Requester use to match and communicate.
 
RequesterParamsrequest_topic_name (const std::string &name)
 Sets a specific request topic name.
 
RequesterParamsreply_topic_name (const std::string &name)
 Sets a specific reply topic name.
 
RequesterParamsdatawriter_qos (const dds::core::optional< dds::pub::qos::DataWriterQos > &qos)
 Sets the quality of service of the request DataWriter.
 
RequesterParamsdatareader_qos (const dds::core::optional< dds::sub::qos::DataReaderQos > &qos)
 Sets the quality of service of the request DataReader.
 
RequesterParamspublisher (dds::pub::Publisher publisher)
 Sets a specific Publisher.
 
RequesterParamssubscriber (dds::sub::Subscriber subscriber)
 Sets a specific Subscriber.
 
RequesterParamsrequest_type (const dds::core::optional< dds::core::xtypes::DynamicType > &type)
 The request type, when DynamicData is used.
 
RequesterParamsreply_type (const dds::core::optional< dds::core::xtypes::DynamicType > &type)
 The reply type, when DynamicData is used.
 
- Public Member Functions inherited from rti::request::detail::EntityParamsWithSetters< ActualEntity >
ActualEntity & service_name (const std::string &name)
 
ActualEntity & request_topic_name (const std::string &name)
 
ActualEntity & reply_topic_name (const std::string &name)
 
ActualEntity & datawriter_qos (const dds::core::optional< dds::pub::qos::DataWriterQos > &qos)
 
ActualEntity & datareader_qos (const dds::core::optional< dds::sub::qos::DataReaderQos > &qos)
 
ActualEntity & request_type (const dds::core::optional< dds::core::xtypes::DynamicType > &type)
 
ActualEntity & reply_type (const dds::core::optional< dds::core::xtypes::DynamicType > &type)
 
ActualEntity & publisher (dds::pub::Publisher publisher)
 
ActualEntity & subscriber (dds::sub::Subscriber subscriber)
 

Detailed Description

Contains the parameters for creating a rti::request::Requester.

See Also
Creating a Requester with optional parameters

Constructor & Destructor Documentation

rti::request::RequesterParams::RequesterParams ( dds::domain::DomainParticipant  participant)
inlineexplicit

Creates a RequesterParams with the parameters a Requester always needs.

In addition to the participant , a Requester needs either:

When dds::core::xtypes::DynamicData is used, RequesterParams::request_type and/or RequesterParams::reply_type are required as well.

The rest of the parameters that can be set in a RequesterParams object are optional.

Parameters
participantThe dds::domain::DomainParticipant this requester uses to join a domain.
See Also
Creating a Requester with optional parameters

Member Function Documentation

RequesterParams& rti::request::RequesterParams::service_name ( const std::string &  name)

The service name that Repliers and Requester use to match and communicate.

A Requester and a Replier need to be configured with the same topic names in order to match.

The service name is used to generate a request topic and a reply topic that the Requester and Replier will use to communicate. For example, the service name "MyService" will be used to create topics named "MyServiceRequest" and "MyServiceReply".

In some cases, the name of these topics is known beforehand or needs to be customized for another reason. The service name can be overridden by setting specific request and reply topic names using RequesterParams::request_topic_name and RequesterParams::reply_topic_name.

RequesterParams& rti::request::RequesterParams::request_topic_name ( const std::string &  name)

Sets a specific request topic name.

The specified topic name will be used, instead of allowing a topic name to be generated based on the RequesterParams::service_name. If that topic already exists, it will be reused.

RequesterParams& rti::request::RequesterParams::reply_topic_name ( const std::string &  name)

Sets a specific reply topic name.

The specified topic name will be used, instead of allowing a topic name to be generated based on the RequesterParams::service_name. If that topic already exists, it will be reused.

RequesterParams& rti::request::RequesterParams::datawriter_qos ( const dds::core::optional< dds::pub::qos::DataWriterQos > &  qos)

Sets the quality of service of the request DataWriter.

See Also
dds::core::QosProvider to access Qos profiles.
RequesterParams& rti::request::RequesterParams::datareader_qos ( const dds::core::optional< dds::sub::qos::DataReaderQos > &  qos)

Sets the quality of service of the request DataReader.

See Also
dds::core::QosProvider to access Qos profiles.
RequesterParams& rti::request::RequesterParams::publisher ( dds::pub::Publisher  publisher)

Sets a specific Publisher.

By default, a Requester uses the DomainParticipant's implicit Publisher. Sometimes a different Publisher may be needed, for example, to use non-default PublisherQos.

RequesterParams& rti::request::RequesterParams::subscriber ( dds::sub::Subscriber  subscriber)

Sets a specific Subscriber.

By default, a Requester uses the DomainParticipant's implicit Subscriber. Sometimes a different Subscriber may be needed, for example, to use non-default SubscriberQos.

RequesterParams& rti::request::RequesterParams::request_type ( const dds::core::optional< dds::core::xtypes::DynamicType > &  type)

The request type, when DynamicData is used.

This is required when the Requester RequestType is dds::core::xtypes::DynamicData. Otherwise this is ignored.

RequesterParams& rti::request::RequesterParams::reply_type ( const dds::core::optional< dds::core::xtypes::DynamicType > &  type)

The reply type, when DynamicData is used.

This is required when the Requester ReplyType is dds::core::xtypes::DynamicData. Otherwise this is ignored.


RTI Connext Modern C++ API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc