CoreDX DDS C# Reference Manual
Public Member Functions | List of all members
Replier< TReq, TRep > Class Template Reference
Inheritance diagram for Replier< TReq, TRep >:
ReplierBase RPCEntity

Public Member Functions

 Replier (ReplierParams r_params)
 
void close ()
 
bool is_null ()
 
void send_reply (TRep reply, SampleIdentity_t related_request_id)
 
bool receive_request (Sample< TReq > request, Duration_t max_wait)
 
LoanedSamples< TReq > receive_requests (Duration_t max_wait)
 
LoanedSamples< TReq > receive_requests (int min_request_count, int max_request_count, Duration_t max_wait)
 
bool wait_for_requests (Duration_t max_wait)
 
bool wait_for_requests (int min_count, Duration_t max_wait)
 
bool take_request (Sample< TReq > request)
 
LoanedSamples< TReq > take_requests (int max_samples)
 
bool read_request (Sample< TReq > request)
 
LoanedSamples< TReq > read_requests (int max_samples)
 
ReplierParams get_replier_params ()
 
bool receive_nondata_samples (bool enable)
 
DataReaderI< TReq > get_request_datareader ()
 
DataWriterI< TRep > get_reply_datawriter ()
 

Detailed Description

A replier receives requests and send replies.

An instance of Replier is configured at the time of construction using ReplierParams, which is a container of configuration parameters such as domain participant, QoS, listeners and more.

Replier allows listener-based and polling-based reception of requests.

SimpleReplierListener and ReplierListener interfaces enable call-back based notification when a request is available. On the other hand, Replier provides functions to allow polling reception of requests.

Type Constraints
TReq :RequestType 
TReq :new() 
TRep :ReplyType 
TRep :new() 

Constructor & Destructor Documentation

Replier ( ReplierParams  r_params)
inline

Constructor that accepts ReplierParams configuration.

Member Function Documentation

void close ( )
inline

Release the underlying resources including any DDS entities.

The RPCEntity will no longer be useful and will not participate in any communication.

Implements RPCEntity.

ReplierParams get_replier_params ( )
inline

Access the ReplierParams values that define the configuration of the Replier.

DataWriterI<TRep> get_reply_datawriter ( )
inline

Access the underlying DataWriter used to send Replies.

DataReaderI<TReq> get_request_datareader ( )
inline

Access the underlying DataReader used to receive Requests.

bool is_null ( )
inline

Indicates if the entity has been 'closed'.

If is_null() is true, then the underlying dds entities have been released and the RPCEntity is no longer useful for operations.

Implements RPCEntity.

bool read_request ( Sample< TReq >  request)
inline

Attempt to access the next request.

This may will block until a request is available.

Return values
trueif able to access a request.
falseotherwise
LoanedSamples<TReq> read_requests ( int  max_samples)
inline

Attempt to access up to 'max_samples' requests.

This call may block if no requests are available.

Return values
collectionof requests
bool receive_nondata_samples ( bool  enable)
inline

Toggle the underlying entities to deliver non-data samples to the application

Not Yet Supported:
bool receive_request ( Sample< TReq >  request,
Duration_t  max_wait 
)
inline

Attempt to access the next request.

This may block for up to 'max_wait' if no request is immediately available.

LoanedSamples<TReq> receive_requests ( Duration_t  max_wait)
inline

Attempt to access any available requests.

This may block for up to 'max_wait' if no requests are immediately available.

LoanedSamples<TReq> receive_requests ( int  min_request_count,
int  max_request_count,
Duration_t  max_wait 
)
inline

Attempt to access up to 'max_request_count' requests.

This may block for up to 'max_wait' if there are not at least 'min_request_count' requests immediately available.

void send_reply ( TRep  reply,
SampleIdentity_t  related_request_id 
)
inline

Sends the provided 'reply' associated with 'related_request_id'.

bool take_request ( Sample< TReq >  request)
inline

Attempt to access the next request.

This call will not block.

Return values
trueif able to access a request.
falseotherwise
LoanedSamples<TReq> take_requests ( int  max_samples)
inline

Attempt to access up to 'max_samples' requests.

This call will not block.

Return values
collectionof requests (possibly empty)
bool wait_for_requests ( Duration_t  max_wait)
inline

Block until at least one request is available.

This may block for up to 'max_wait'.

bool wait_for_requests ( int  min_count,
Duration_t  max_wait 
)
inline

Block until at least 'min_count requests available.

This may block for up to 'max_wait'.


© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.