RTI Connext .Net APIs
Version 5.2.3
|
Allows receiving requests and sending replies. More...
Inherits AlreadyDisposedHelper< QueueReplier< TReq, TRep >>, and IDisposable.
Inherited by RTI.Connext.Queuing.QueueReplier< TReq, TRep >.ReplierConsumerListenerAdapter, and RTI.Connext.Queuing.QueueReplier< TReq, TRep >.ReplierProducerListenerAdapter.
Public Member Functions | |
QueueReplier (QueueReplierParams< TReq, TRep > parameters) | |
Creates a Replier with parameters. | |
QueueReplier (DomainParticipant participant, String requestQueueTopicName, String sharedSubscriber, TypeSupport requestQueueTypeSupport, TypeSupport replyQueueTypeSupport) | |
Creates a QueueReplier with the minimum set of parameters. | |
void | SendReply (TRep sample, SampleInfo relatedRequestInfo) |
Sends a reply for a previous request. | |
void | SendReply (WriteSample< TRep > sample, SampleInfo relatedRequestInfo) |
Sends a reply for a previous request. | |
bool | WaitForAcknowledgements (Duration_t maxWait) |
Blocks the calling thread until all replies written by this QueueReplier are acknowledged by Queuing Service, or until a timeout occurs. | |
bool | WaitForAcknowledgements (SampleIdentity_t identity, Duration_t maxWait) |
Blocks the calling thread until the reply identified by identity is acknowledged by Queuing Service, or until a timeout occurs. | |
bool | HasMatchingReplySharedReaderQueue () |
Checks whether or not this QueueReplier has matched with at least one reply SharedReaderQueue. | |
bool | HasMatchingRequestSharedReaderQueue () |
WriteSample< TRep > | CreateReplySample () |
Creates a WriteSample for sending replies. | |
WriteSample< TRep > | CreateReplySample (TRep data) |
Creates a WriteSample for sending replies. | |
bool | ReceiveRequest (Sample< TReq > request, Duration_t maxWait) |
Waits for a request and copies its contents into a Sample. | |
IList< Sample< TReq > > | ReceiveRequests (IList< Sample< TReq >> requests, int maxCount, Duration_t maxWait) |
Waits for multiple requests and copies them into a list. | |
IList< Sample< TReq > > | ReceiveRequests (IList< Sample< TReq >> requests, int minCount, int maxCount, Duration_t maxWait) |
Waits for multiple requests and copies them into a list. | |
LoanedSamples< TReq > | ReceiveRequests (Duration_t maxWait) |
Waits for multiple requests and provides a loaned container to access them. | |
LoanedSamples< TReq > | ReceiveRequests (int minCount, int maxCount, Duration_t maxWait) |
Waits for multiple requests and provides a loaned container to access them. | |
bool | TakeRequest (Sample< TReq > request) |
Copies the contents of a request into a Sample. | |
LoanedSamples< TReq > | TakeRequests () |
Provides a loaned container to access the existing requests. | |
LoanedSamples< TReq > | TakeRequests (int maxCount) |
Provides a loaned container to access the existing requests. | |
IList< Sample< TReq > > | TakeRequests (IList< Sample< TReq >> requests, int maxCount) |
Copies existing requests into a list. | |
bool | ReadRequest (Sample< TReq > request) |
Copies the contents of a request into a Sample. | |
LoanedSamples< TReq > | ReadRequests () |
Provides a loaned container from which you can access the existing requests. | |
LoanedSamples< TReq > | ReadRequests (int maxCount) |
Provides a loaned container from which you can access the existing requests. | |
IList< Sample< TReq > > | ReadRequests (IList< Sample< TReq >> requests, int maxCount) |
Copies existing requests into a list. | |
bool | WaitForRequests (Duration_t maxWait) |
Waits for requests. | |
bool | WaitForRequests (int minCount, Duration_t maxWait) |
Waits for requests. | |
void | AcknowledgeAll (bool isPositiveAck) |
Acknowledges all previously accessed requests. | |
void | AcknowledgeRequest (SampleInfo sampleInfo, bool isPositiveAck) |
Explicitly acknowledges a single request. | |
void | SendAvailability (ConsumerAvailabilityParams_t parameters) |
Sends an availability sample with the specified parameters. The availability applies to the reply queue. | |
Sample< TReq > | CreateRequestSample () |
Creates a Sample for receiving requests. | |
Sample< TReq > | CreateRequestSample (TReq data) |
Creates a Sample for receiving requests. | |
Static Public Member Functions | |
static WriteParams_t | GetWriteParamsForRelatedRequest (WriteParams_t parameters, SampleInfo relatedRequestInfo) |
Properties | |
TypedDataWriter< TRep > | Writer [get] |
Retrieves the underlying DDS::DataWriter used to send replies. | |
GUID_t | Guid [get] |
Returns the GUID of this QueueReplier. | |
TypedDataReader< TReq > | Reader [get] |
Retrieves the underlying DDS::DataReader used to receive requests. | |
QueueProducer< TRep > | Producer [get] |
Retrieves the underlying DDS::DataWriter. | |
QueueConsumer< TReq > | Consumer [get] |
Retrieves the underlying DDS::DataReader. | |
Allows receiving requests and sending replies.
A QueueReplier is a component suited for the queuing request-reply use case. A QueueReplier plays the role of a request QueueConsumer and reply QueueProducer.
A QueueReplier is an entity that allows you to receive requests from a request SharedReaderQueue and send replies to a reply SharedReaderQueue, which are hosted by Queuing Service.
To communicate with the SharedReaderQueues, the QueueReplier 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 Replier with parameters.
params | All the parameters that configure this QueueReplier See RTI::Connext::Queuing::QueueReplierParams<TReq,TRep> for the list of required parameters. |
One | of the Standard Return Codes |
|
inline |
Creates a QueueReplier with the minimum set of parameters.
participant | The DomainParticipant this replier uses to join a DDS domain |
requestQueueTopicName | The request queue topic name as specified in a Queuing Service SharedReaderQueue configuration. See RTI::Connext::Queuing::QueueReplierParams<TReq,TRep>::SetRequestQueueTopicName |
sharedSubscriberName | The name of the SharedSubscriber in a Queuing Service that hosts the queue. See RTI::Connext::Queuing::QueueReplierParams<TReq,TRep>::SetSharedSubscriberName |
requestQueueTypeSupport | The type support for type TReq |
replyQueueTypeSupport | The type support for type TRep |
One | of the Standard Return Codes |
|
inlinestatic |
|
inline |
Sends a reply for a previous request.
The related request identity can be retrieved from an existing request sample (RTI::Connext::Infrastructure::Sample<T>).
reply | The reply to be sent |
relatedRequestId | The identity of a previously received request |
One | of the Standard Return Codes |
|
inline |
Sends a reply for a previous request.
Allows you to set custom parameters for writing a reply.
Contrary to the RTI::Connext::Queuing::QueueRequester<TReq,TRep>, where retrieving the sample identity for correlation is common, on the QueueReplier side using a WriteSample is only necessary when the default write parameters need to be overridden, and SendReply(TRep, SampleIdentity_t) may be used if that is not necessary.
|
inline |
Blocks the calling thread until all replies written by this QueueReplier are acknowledged by Queuing Service, or until a timeout occurs.
|
inline |
Blocks the calling thread until the reply identified by identity is acknowledged by Queuing Service, or until a timeout occurs.
|
inline |
Checks whether or not this QueueReplier has matched with at least one reply SharedReaderQueue.
|
inline |
|
inline |
Creates a WriteSample for sending replies.
|
inline |
Creates a WriteSample for sending replies.
|
inline |
Waits for a request and copies its contents into a Sample.
|
inline |
Waits for multiple requests and copies them into a list.
|
inline |
Waits for multiple requests and copies them into a list.
|
inline |
Waits for multiple requests and provides a loaned container to access them.
|
inline |
Waits for multiple requests and provides a loaned container to access them.
|
inline |
Copies the contents of a request into a Sample.
|
inline |
Provides a loaned container to access the existing requests.
|
inline |
Provides a loaned container to access the existing requests.
|
inline |
Copies existing requests into a list.
|
inline |
Copies the contents of a request into a Sample.
This operation is equivalent to , except the sample remains in the QueueReplier and can be read or taken again.
|
inline |
Provides a loaned container from which you can access the existing requests.
This operation is equivalent to RTI::Connext::Queuing::QueueReplier<TReq,TRep>::TakeRequests(), except the sample remains in the QueueReplier and can be read or taken again.
|
inline |
Provides a loaned container from which you can access the existing requests.
This operation is equivalent to RTI::Connext::Queuing::QueueReplier<TReq,TRep>::TakeRequests(int), except the sample remains in the QueueReplier and can be read or taken again.
|
inline |
Copies existing requests into a list.
This operation is equivalent to , except the sample remains in the QueueReplier and can be read or taken again.
|
inline |
Waits for requests.
|
inline |
Waits for requests.
|
inline |
Acknowledges all previously accessed requests.
|
inline |
Explicitly acknowledges a single request.
|
inline |
Sends an availability sample with the specified parameters. The availability applies to the reply queue.
|
inline |
Creates a Sample for receiving requests.
|
inline |
Creates a Sample for receiving requests.
|
get |
Retrieves the underlying DDS::DataWriter used to send replies.
|
get |
Returns the GUID of this QueueReplier.
The QueueReplier's GUID is the same GUID of both underlying QueueProducer and QueueConsumer.
|
get |
Retrieves the underlying DDS::DataReader used to receive requests.
|
get |
Retrieves the underlying DDS::DataWriter.
|
get |
Retrieves the underlying DDS::DataReader.