CoreDX Data Distribution Service
The High Performance, Small Footprint DDS from Twin Oaks Computing, Inc
com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType > Class Template Reference
Inheritance diagram for com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >:
com.toc.coredx.DDS.rpc.ReplierBase com.toc.coredx.DDS.rpc.RPCEntity

Public Member Functions

 Replier (Class< TReq > treq_clazz, Class< TRep > trep_clazz, ReplierParams r_params)
 
void close ()
 
boolean is_null ()
 
void send_reply (TRep reply, SampleIdentity_t related_request_id)
 
boolean 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)
 
boolean wait_for_requests (Duration_t max_wait)
 
boolean wait_for_requests (int min_count, Duration_t max_wait)
 
boolean take_request (Sample< TReq > request)
 
LoanedSamples< TReq > take_requests (int max_samples)
 
boolean read_request (Sample< TReq > request)
 
LoanedSamples< TReq > read_requests (int max_samples)
 
ReplierParams get_replier_params ()
 
boolean receive_nondata_samples (boolean 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.

Constructor & Destructor Documentation

◆ Replier()

com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.Replier ( Class< TReq >  treq_clazz,
Class< TRep >  trep_clazz,
ReplierParams  r_params 
)

Constructor that accepts ReplierParams configuration.

Member Function Documentation

◆ close()

void com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.close ( )

Release the underlying resources including any DDS entities.

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

Implements com.toc.coredx.DDS.rpc.RPCEntity.

◆ get_replier_params()

ReplierParams com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.get_replier_params ( )

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

◆ get_reply_datawriter()

DataWriterI<TRep> com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.get_reply_datawriter ( )

Access the underlying DataWriter used to send Replies.

◆ get_request_datareader()

DataReaderI<TReq> com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.get_request_datareader ( )

Access the underlying DataReader used to receive Requests.

◆ is_null()

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.is_null ( )

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 com.toc.coredx.DDS.rpc.RPCEntity.

◆ read_request()

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.read_request ( Sample< TReq >  request)

Attempt to access the next request.

This may will block until a request is available.

Return values
trueif able to access a request.
falseotherwise

◆ read_requests()

LoanedSamples<TReq> com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.read_requests ( int  max_samples)

Attempt to access up to 'max_samples' requests.

This call may block if no requests are available.

Return values
collectionof requests

◆ receive_nondata_samples()

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.receive_nondata_samples ( boolean  enable)

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

Not Yet Supported:

◆ receive_request()

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.receive_request ( Sample< TReq >  request,
Duration_t  max_wait 
)

Attempt to access the next request.

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

◆ receive_requests() [1/2]

LoanedSamples<TReq> com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.receive_requests ( Duration_t  max_wait)

Attempt to access any available requests.

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

◆ receive_requests() [2/2]

LoanedSamples<TReq> com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.receive_requests ( int  min_request_count,
int  max_request_count,
Duration_t  max_wait 
)

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.

◆ send_reply()

void com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.send_reply ( TRep  reply,
SampleIdentity_t  related_request_id 
)

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

◆ take_request()

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.take_request ( Sample< TReq >  request)

Attempt to access the next request.

This call will not block.

Return values
trueif able to access a request.
falseotherwise

◆ take_requests()

LoanedSamples<TReq> com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.take_requests ( int  max_samples)

Attempt to access up to 'max_samples' requests.

This call will not block.

Return values
collectionof requests (possibly empty)

◆ wait_for_requests() [1/2]

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.wait_for_requests ( Duration_t  max_wait)

Block until at least one request is available.

This may block for up to 'max_wait'.

◆ wait_for_requests() [2/2]

boolean com.toc.coredx.DDS.rpc.Replier< TReq extends RequestType, TRep extends ReplyType >.wait_for_requests ( int  min_count,
Duration_t  max_wait 
)

Block until at least 'min_count requests available.

This may block for up to 'max_wait'.


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.