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

Public Member Functions

void close ()
 
bool is_null ()
 
void bind (String i_name)
 
void unbind ()
 
bool is_bound ()
 
String get_bound_instance_name ()
 
List< String > get_discovered_service_instances ()
 
ReturnCode_t wait_for_service ()
 
ReturnCode_t wait_for_service (Duration_t maxWait)
 
ReturnCode_t wait_for_service (String instanceName)
 
ReturnCode_t wait_for_service (Duration_t max_wait, String instanceName)
 
ReturnCode_t wait_for_services (uint count)
 
ReturnCode_t wait_for_services (Duration_t max_wait, uint count)
 
ReturnCode_t wait_for_services (List< String > instanceNames)
 
ReturnCode_t wait_for_services (Duration_t max_wait, List< String > instanceNames)
 

Detailed Description

ServiceProxy

ServiceProxy class defines type-independent operations for Requester and the Client. For example, binding to a specific instance, waiting for an instance to discover, closing the service, and more. ServiceProxy shall not be instantiated directly.

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

Member Function Documentation

void bind ( String  i_name)
inline

Bind the ServiceProxy to service(s) with the provided 'instance_name'.

The ServiceProxy will communicate only with services that have a matching 'instance_name'.

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.

String get_bound_instance_name ( )
inline

Provides the instance_name to which the ServiceProxy is currently bound.

List<String> get_discovered_service_instances ( )
inline

Access a list of instance_names that have been discovered by the ServiceProxy.

The returned list is a snapshot in time of the currently known services.

bool is_bound ( )
inline

Indicates if the ServiceProxy is currently bound to a particular instance_name.

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.

void unbind ( )
inline

Undo any previous 'bind()' operation.

After this, the ServiceProxy will communicate with any known services.

ReturnCode_t wait_for_service ( )
inline

Block until any service is discovered.

Return values
RETCODE_OK: When matched with requested service[s].
ReturnCode_t wait_for_service ( Duration_t  maxWait)
inline

Block up to 'maxWait' until any service is discovered.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering a service.
ReturnCode_t wait_for_service ( String  instanceName)
inline

Wait for a service with matching 'instanceName' to be discovered.

Return values
RETCODE_OK: When matched with requested service[s].
ReturnCode_t wait_for_service ( Duration_t  max_wait,
String  instanceName 
)
inline

Block up to 'maxWait' until a service matching 'instanceNmae' is discovered.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering a service.
ReturnCode_t wait_for_services ( uint  count)
inline

Block until at least 'count' services have been discovered.

Return values
RETCODE_OK: When matched with requested service[s].
ReturnCode_t wait_for_services ( Duration_t  max_wait,
uint  count 
)
inline

Block until at least 'count' services have been discovered or 'maxWait' time elapses.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering 'count' services.
ReturnCode_t wait_for_services ( List< String >  instanceNames)
inline

Block until discovering a service for each of the listed 'instanceNames'.

Return values
RETCODE_OK: When matched with requested service[s].
ReturnCode_t wait_for_services ( Duration_t  max_wait,
List< String >  instanceNames 
)
inline

Block until discovering a service for each of the listed 'instanceNames', or 'maxWait' elapses.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering the specified services.

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