RTI Connext C++ API  Version 5.1.0
connext::RequesterParams Class Reference

Contains the parameters for creating a connext::Requester. More...

Inherits connext::details::EntityParams.

Public Member Functions

 RequesterParams (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.
 
RequesterParamsqos_profile (const std::string &qos_library_name, const std::string &qos_profile_name)
 Sets a QoS profile for the entities in this requester.
 
RequesterParamsdatawriter_qos (const DDS_DataWriterQos &qos)
 Sets the quality of service of the request DataWriter.
 
RequesterParamsdatareader_qos (const DDS_DataReaderQos &qos)
 Sets the quality of service of the request DataReader.
 
RequesterParamspublisher (DDSPublisher *publisher)
 Sets a specific Publisher.
 
RequesterParamssubscriber (DDSSubscriber *subscriber)
 Sets a specific Subscriber.
 
RequesterParamsrequest_type_support (TypeSupport *type_support)
 Sets the type support for the request type.
 
RequesterParamsreply_type_support (TypeSupport *type_support)
 Sets the type support for the reply type.
 

Detailed Description

Contains the parameters for creating a connext::Requester.

See Also
Creating a Requester with optional parameters

Constructor & Destructor Documentation

connext::RequesterParams::RequesterParams ( DomainParticipant participant)
explicit

Creates a RequesterParams with the parameters a Requester always needs.

In addition to the parameters this constructor takes, a Requester needs either:

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

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

Member Function Documentation

RequesterParams& connext::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 request_topic_name and reply_topic_name.

RequesterParams& connext::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 service_name.

RequesterParams& connext::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 service_name.

RequesterParams& connext::RequesterParams::qos_profile ( const std::string &  qos_library_name,
const std::string &  qos_profile_name 
)

Sets a QoS profile for the entities in this requester.

Specifies an XML QoS profile that will be used to configure the quality of service of a Requester's underlying request DataWriter and reply DataReader.

Within that profile, the DataWriter QoS in <datawriter_qos> will be used to configure the request DataWriter and the DataReader.

Alternatively, you can set the QoS using the DataWriterQos and DataReaderQos objects (connext::RequesterParams::datawriter_qos, connext::RequesterParams::datareader_qos).

Parameters
qos_library_nameThe name of the QoS library
qos_profile_nameThe name of the QoS profile inside the QoS library
See Also
Configuring Request-Reply QoS profiles
Configuring QoS Profiles with XML
RequesterParams& connext::RequesterParams::datawriter_qos ( const DDS_DataWriterQos qos)

Sets the quality of service of the request DataWriter.

See Also
qos_profile
RequesterParams& connext::RequesterParams::datareader_qos ( const DDS_DataReaderQos qos)

Sets the quality of service of the request DataReader.

See Also
qos_profile
RequesterParams& connext::RequesterParams::publisher ( DDSPublisher 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& connext::RequesterParams::subscriber ( DDSSubscriber 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& connext::RequesterParams::request_type_support ( TypeSupport type_support)

Sets the type support for the request type.

This parameter is required when TReq is DynamicData.

In all other cases, this parameter is ignored and the singleton Requester<TReq, TRep>::RequestTypeSupport is used instead.

See Also
DDSDynamicDataTypeSupport
RequesterParams& connext::RequesterParams::reply_type_support ( TypeSupport type_support)

Sets the type support for the reply type.

This parameter is required when TRep is DynamicData.

In all other cases, this parameter is ignored and the singleton Requester<TReq, TRep>::ReplyTypeSupport is used instead.

See Also
DDSDynamicDataTypeSupport

RTI Connext C++ API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc