RTI Connext Modern C++ API  Version 6.1.0

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. More...
 
RequesterParamsservice_name (const std::string &name)
 The service name that Repliers and Requester use to match and communicate. More...
 
RequesterParamsrequest_topic_name (const std::string &name)
 Sets a specific request topic name. More...
 
RequesterParamsreply_topic_name (const std::string &name)
 Sets a specific reply topic name. More...
 
RequesterParamsdatawriter_qos (const dds::core::optional< dds::pub::qos::DataWriterQos > &qos)
 Sets the quality of service of the request DataWriter. More...
 
RequesterParamsdatareader_qos (const dds::core::optional< dds::sub::qos::DataReaderQos > &qos)
 Sets the quality of service of the request DataReader. More...
 
RequesterParamspublisher (dds::pub::Publisher publisher)
 Sets a specific Publisher. More...
 
RequesterParamssubscriber (dds::sub::Subscriber subscriber)
 Sets a specific Subscriber. More...
 
RequesterParamsrequest_type (const dds::core::optional< dds::core::xtypes::DynamicType > &type)
 The request type, when DynamicData is used. More...
 
RequesterParamsreply_type (const dds::core::optional< dds::core::xtypes::DynamicType > &type)
 The reply type, when DynamicData is used. More...
 

Detailed Description

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

See also
Creating a Requester with optional parameters

Constructor & Destructor Documentation

◆ RequesterParams()

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

References datareader_qos(), datawriter_qos(), publisher(), reply_topic_name(), reply_type(), request_topic_name(), request_type(), service_name(), and subscriber().

Member Function Documentation

◆ service_name()

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.

Referenced by RequesterParams().

◆ request_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.

Referenced by RequesterParams().

◆ reply_topic_name()

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.

Referenced by RequesterParams().

◆ datawriter_qos()

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.

Referenced by RequesterParams().

◆ datareader_qos()

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.

Referenced by RequesterParams().

◆ publisher()

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.

Referenced by RequesterParams().

◆ subscriber()

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.

Referenced by RequesterParams().

◆ request_type()

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.

Referenced by RequesterParams().

◆ reply_type()

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.

Referenced by RequesterParams().