RTI Connext .Net APIs
Version 5.2.0
|
Allows sending requests and receiving replies. More...
Inherits AlreadyDisposedHelper< QueueRequester< TReq, TRep >>, and IDisposable.
Inherited by RTI.Connext.Queuing.QueueRequester< TReq, TRep >.RequesterConsumerListenerAdapter, and RTI.Connext.Queuing.QueueRequester< TReq, TRep >.RequesterProducerListenerAdapter.
Public Member Functions | |
QueueRequester (QueueRequesterParams< TReq, TRep > parameters) | |
Creates a QueueRequester with parameters. | |
QueueRequester (DomainParticipant participant, String requestQueueTopicName, String sharedSubscriber, TypeSupport requestQueueTypeSupport, TypeSupport replyQueueTypeSupport) | |
Creates a QueueRequester with the minimum set of parameters. | |
void | SendRequest (TReq request) |
Sends a request. | |
void | SendRequest (WriteSample< TReq > request) |
Sends a request and gets back information about it that allows correlation with future replies. | |
bool | WaitForAcknowledgements (Duration_t maxWait) |
Blocks the calling thread until all requests written by this QueueRequester are acknowledged Queuing Service, or until a timeout occurs. | |
bool | WaitForAcknowledgements (SampleIdentity_t identity, Duration_t maxWait) |
Blocks the calling thread until the request identified by identity is acknowledged by Queuing Service, or until a timeout occurs. | |
bool | HasMatchingRequestSharedReaderQueue () |
Checks whether this QueueRequester has matched with at least one request SharedReaderQueue. | |
bool | HasMatchingReplySharedReaderQueue () |
Checks whether this QueueRequester has matched with at least one reply SharedReaderQueue. | |
WriteSample< TReq > | CreateRequestSample () |
Creates a WriteSample for sending requests. | |
WriteSample< TReq > | CreateRequestSample (TReq data) |
Creates a WriteSample for sending requests. | |
bool | ReceiveReply (Sample< TRep > reply, Duration_t maxWait) |
Waits for a reply and copies its contents into a Sample. | |
IList< Sample< TRep > > | ReceiveReplies (IList< Sample< TRep >> replies, int maxCount, Duration_t maxWait) |
Waits for multiple replies and copies them into a list. | |
IList< Sample< TRep > > | ReceiveReplies (IList< Sample< TRep >> replies, int minCount, int maxCount, Duration_t maxWait) |
Waits for multiple replies and copies them into a list. | |
LoanedSamples< TRep > | ReceiveReplies (Duration_t maxWait) |
Waits for multiple replies and provides a loaned container to access them. | |
LoanedSamples< TRep > | ReceiveReplies (int minCount, int maxCount, Duration_t maxWait) |
Waits for multiple replies and provides a loaned container to access them. | |
bool | WaitForReplies (Duration_t maxWait) |
Waits for replies to any request. | |
bool | WaitForReplies (int minCount, Duration_t maxWait) |
Waits for replies to any request. | |
bool | WaitForReplies (int minCount, Duration_t maxWait, SampleIdentity_t relatedRequestId) |
Waits for replies to a specific request. | |
bool | TakeReply (Sample< TRep > reply) |
Copies the contents of a reply into a Sample. | |
bool | TakeReply (Sample< TRep > reply, SampleIdentity_t relatedRequestId) |
Copies the contents of a reply for a specific request. | |
LoanedSamples< TRep > | TakeReplies () |
Provides a loaned container from which you can access the existing replies. | |
LoanedSamples< TRep > | TakeReplies (int maxCount) |
Provides a loaned container from which you can access the existing replies. | |
IList< Sample< TRep > > | TakeReplies (IList< Sample< TRep >> replies, int maxCount) |
Copies existing replies into a list. | |
LoanedSamples< TRep > | TakeReplies (SampleIdentity_t relatedRequestId) |
Provides a loaned container from which you can access the existing replies for a specific request. | |
LoanedSamples< TRep > | TakeReplies (int maxCount, SampleIdentity_t relatedRequestId) |
Provides a loaned container to access the existing replies for a specific request. | |
IList< Sample< TRep > > | TakeReplies (IList< Sample< TRep >> replies, int maxCount, SampleIdentity_t relatedRequestId) |
Copies existing replies for a specific request into a list. | |
bool | ReadReply (Sample< TRep > reply) |
Copies the contents of a reply into a Sample. | |
LoanedSamples< TRep > | ReadReplies () |
Provides a loaned container from which you can access the existing replies. | |
LoanedSamples< TRep > | ReadReplies (int maxCount) |
Provides a loaned container from which you can access the existing replies. | |
IList< Sample< TRep > > | ReadReplies (IList< Sample< TRep >> replies, int maxCount) |
Copies existing replies into a list. | |
bool | ReadReply (Sample< TRep > reply, SampleIdentity_t relatedRequestId) |
Copies the contents of a reply for a specific request. | |
LoanedSamples< TRep > | ReadReplies (SampleIdentity_t relatedRequestId) |
Provides a loaned container from which you can access the existing replies for a specific request. | |
LoanedSamples< TRep > | ReadReplies (int maxCount, SampleIdentity_t relatedRequestId) |
Provides a loaned container from which you can access the existing replies for a specific request. | |
IList< Sample< TRep > > | ReadReplies (IList< Sample< TRep >> replies, int maxCount, SampleIdentity_t relatedRequestId) |
Copies existing replies for a specific request into a list. | |
void | AcknowledgeAll (bool isPositiveAck) |
Acknowledges all previously accessed replies. | |
void | AcknowledgeReply (SampleInfo sampleInfo, bool isPositiveAck) |
Explicitly acknowledges a single reply. | |
void | SendAvailability (ConsumerAvailabilityParams_t parameters) |
Sends the availability status of the QueueConsumer receiving samples from the reply SharedReaderQueue to Queuing Service. | |
Sample< TRep > | CreateReplySample () |
Creates a Sample for getting replies. | |
Sample< TRep > | CreateReplySample (TRep data) |
Creates a Sample for getting replies. | |
Properties | |
TypedDataWriter< TReq > | Writer [get] |
Retrieves the underlying DDS::DataWriter used to send requests. | |
GUID_t | Guid [get] |
Returns the GUID of this QueueRequester. | |
TypedDataReader< TRep > | Reader [get] |
Retrieves the underlying DDS::DataReader used to receive replies. | |
QueueProducer< TReq > | Producer [get] |
Retrieves the underlying RTI::Connext::Queuing::QueueProducer<T>. | |
QueueConsumer< TRep > | Consumer [get] |
Retrieves the underlying RTI::Connext::Queuing::QueueConsumer<T>. | |
Allows sending requests and receiving replies.
A QueueRequester is a component suited for the queuing request-reply use case. A QueueRequester plays the role of a request QueueProducer and reply QueueConsumer.
A QueueRequester is the entity that allows sending requests to a a request SharedReaderQueue and receiving replies from a reply SharedReaderQueue.
To communicate with the SharedReaderQueues the QueueRequester creates two topics. The first topic corresponds to the request SharedReaderQueue topic and the second topic to the reply SharedReaderQueue topic.
Valid types for these topics (TReq
and TRep
) are: those generated by the rtiddsgen code generator, the DDS built-in types, and DynamicData
.
For example:
TReq | The data type for the request SharedReaderQueue topic |
TRep | The data type for the reply SharedReaderQueue topic |
TReq | : | class | |
TReq | : | global | |
TReq | : | DDS.ICopyable<TReq> | |
TReq | : | new() | |
TRep | : | class | |
TRep | : | global | |
TRep | : | DDS.ICopyable<TRep> | |
TRep | : | new() |
|
inline |
Creates a QueueRequester with parameters.
params | All the parameters that configure this QueueRequester. See RTI::Connext::Queuing::QueueRequesterParams<TReq,TRep> for the list of mandatory parameters. |
One | of the Standard Return Codes |
|
inline |
Creates a QueueRequester with the minimum set of parameters.
participant | The DomainParticipant this requester uses to join a DDS domain |
requestQueueTopicName | The request queue topic name as specified in a Queuing Service SharedReaderQueue configuration. See RTI::Connext::Queuing::QueueRequesterParams<TReq,TRep>::SetRequestQueueTopicName |
sharedSubscriberName | The name of the SharedSubscriber in a Queuing Service that hosts the queue. See RTI::Connext::Queuing::QueueRequesterParams<TReq,TRep>::SetSharedSubscriberName |
requestQueueTypeSupport | The type support for type TReq |
replyQueueTypeSupport | The type support for type TRep |
One | of the Standard Return Codes |
|
inline |
Sends a request.
. If a future reply needs to be correlated to exactly this request, use RTI::Connext::Queuing::QueueRequester<TReq,TRep>::SendRequest(WriteSample<TReq>).
request | The request to be sent |
One | of the Standard Return Codes |
|
inline |
Sends a request and gets back information about it that allows correlation with future replies.
After calling this operation, the sample contains valid metadata information associated with the request sent.
The metadata field Source GUID of the parameters is always modified to contain the value of this QueueRequester's GUID.
request | <<inout>> Contains the sample and optional write parameters. If this call ends succesfully, RTI::Connext::Infrastructure::WriteSample<T> contains valid metadata information associated to the request sent. |
One | of the Standard Return Codes ; RTI::Connext::Queuing::Infrastructure::NoMatchingQueueException if by the time this operation is called there is not a single matching SharedReaderQueue. |
|
inline |
Blocks the calling thread until all requests written by this QueueRequester are acknowledged Queuing Service, or until a timeout occurs.
|
inline |
Blocks the calling thread until the request identified by identity is acknowledged by Queuing Service, or until a timeout occurs.
|
inline |
Checks whether this QueueRequester has matched with at least one request SharedReaderQueue.
|
inline |
Checks whether this QueueRequester has matched with at least one reply SharedReaderQueue.
|
inline |
Creates a WriteSample for sending requests.
|
inline |
Creates a WriteSample for sending requests.
|
inline |
Waits for a reply and copies its contents into a Sample.
|
inline |
Waits for multiple replies and copies them into a list.
|
inline |
Waits for multiple replies and copies them into a list.
|
inline |
Waits for multiple replies and provides a loaned container to access them.
|
inline |
Waits for multiple replies and provides a loaned container to access them.
|
inline |
Waits for replies to any request.
|
inline |
Waits for replies to any request.
|
inline |
Waits for replies to a specific request.
This operation is analogous to WaitForReplies(int,Duration_t), except this operation waits for replies for a specific request.
minCount | Minimum number of replies for the related request that need to be available for this operation to unblock. |
maxWait | Maximum wait time after which this operation unblocks, regardless of how many replies are available. |
relatedRequestId | The identity of a request previously sent by this QueueRequester |
One | of the Standard Return Codes |
|
inline |
Copies the contents of a reply into a Sample.
|
inline |
Copies the contents of a reply for a specific request.
This operation is analogous to TakeReply(Sample<TRep>), except the reply corresponds to a specific request.
reply | The sample where a reply is copied into |
relatedRequestId | The identity of a request previously sent by this QueueRequester |
reply
remain unchanged, except DDS::SampleInfo::valid_data becomes false.
|
inline |
Provides a loaned container from which you can access the existing replies.
|
inline |
Provides a loaned container from which you can access the existing replies.
|
inline |
Copies existing replies into a list.
|
inline |
Provides a loaned container from which you can access the existing replies for a specific request.
This operation is equivalent to using TakeReplies(int,SampleIdentity_t) with max_count=DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED
|
inline |
Provides a loaned container to access the existing replies for a specific request.
This operation is analogous to TakeReplies(int), except the replies this operation provides correspond to a specific request.
maxCount | The maximum number of samples that are taken at a time. The special value DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED may be used. |
relatedRequestId | The identity of a request previously sent by this QueueRequester |
|
inline |
Copies existing replies for a specific request into a list.
This operation is analogous to TakeReplies(IList<Sample<TRep>>,int), except the replies correspond to a specific request.
replies | The list where the samples should be copied, or null to create a new List. |
maxCount | The maximum number of samples that are taken at a time. The special value DDS::ResourceLimitsQosPolicy::LENGTH_UNLIMITED may be used. |
relatedRequestId | The identity of a request previously sent by this QueueRequester |
replies
if it is not null. Otherwise it returns a new List
.
|
inline |
Copies the contents of a reply into a Sample.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReply(Sample<TRep>), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Provides a loaned container from which you can access the existing replies.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReplies(), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Provides a loaned container from which you can access the existing replies.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReplies(int), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Copies existing replies into a list.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReplies(IList<Sample<TRep>>,int), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Copies the contents of a reply for a specific request.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReply(Sample<TRep>,SampleIdentity_t), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Provides a loaned container from which you can access the existing replies for a specific request.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReplies(int,SampleIdentity_t), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Provides a loaned container from which you can access the existing replies for a specific request.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReplies(int,SampleIdentity_t), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Copies existing replies for a specific request into a list.
This operation is equivalent to RTI::Connext::Queuing::QueueRequester<TReq,TRep>::TakeReplies(IList<Sample<TRep>>,int,SampleIdentity_t), except the sample remains in the QueueRequester and can be read or taken again.
|
inline |
Acknowledges all previously accessed replies.
|
inline |
Explicitly acknowledges a single reply.
|
inline |
Sends the availability status of the QueueConsumer receiving samples from the reply SharedReaderQueue to Queuing Service.
|
inline |
Creates a Sample for getting replies.
|
inline |
Creates a Sample for getting replies.
|
get |
Retrieves the underlying DDS::DataWriter used to send requests.
|
get |
Returns the GUID of this QueueRequester.
The QueueRequester's GUID is the same GUID of both the underlying QueueProducer and QueueConsumer.
The GUID of the QueueRequester is also used by Queuing Service to correlate the replies the QueueRequester produces. Replies are only delivered to the QueueRequester that generated the related request.
|
get |
Retrieves the underlying DDS::DataReader used to receive replies.
|
get |
Retrieves the underlying RTI::Connext::Queuing::QueueProducer<T>.
|
get |
Retrieves the underlying RTI::Connext::Queuing::QueueConsumer<T>.