Public Member Functions | |
void | bind (const std::string &instance_name) |
Bind the ServiceProxy to service(s) with the provided 'instance_name'. More... | |
void | unbind () |
Undo any previous 'bind()' operation. More... | |
bool | is_bound () const |
Indicates if the ServiceProxy is currently bound to a particular instance_name. | |
std::string | get_bound_instance_name () const |
Provides the instance_name to which the ServiceProxy is currently bound. | |
std::vector< std::string > | get_discoverd_service_instances () const |
Access a list of instance_names that have been discovered by the ServiceProxy. More... | |
std::vector< std::string > | get_discovered_service_instances () const |
Access a list of instance_names that have been discovered by the ServiceProxy. More... | |
uint32_t | get_discovered_service_count () const |
Access the number of service instances that have been discovered by the ServiceProxy. More... | |
void | wait_for_service () |
Block until any service is discovered. | |
ReturnCode_t | wait_for_service (const DDS::Duration_t &maxWait) |
Block up to 'maxWait' until any service is discovered. More... | |
void | wait_for_service (std::string instanceName) |
Wait for a service with matching 'instanceName' to be discovered. | |
ReturnCode_t | wait_for_service (const DDS::Duration_t &maxWait, std::string instanceName) |
Block up to 'maxWait' until a service matching 'instanceNmae' is discovered. More... | |
void | wait_for_services (uint32_t count) |
Block until at least 'count' services have been discovered. | |
ReturnCode_t | wait_for_services (const DDS::Duration_t &maxWait, uint32_t count) |
Block until at least 'count' services have been discovered or 'maxWait' time elapses. More... | |
void | wait_for_services (const std::vector< std::string > &instanceNames) |
Block until discovering a service for each of the listed 'instanceNames'. | |
ReturnCode_t | wait_for_services (const DDS::Duration_t &maxWait, const std::vector< std::string > &instanceNames) |
Block until discovering a service for each of the listed 'instanceNames', or 'maxWait' elapses. More... | |
Public Member Functions inherited from DDS::rpc::RPCEntity | |
void | close () |
Release the underlying resources including any DDS entities. More... | |
bool | is_null () const |
Indicates if the entity has been 'closed'. More... | |
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.
void DDS::rpc::ServiceProxy::bind | ( | const std::string & | instance_name | ) |
Bind the ServiceProxy to service(s) with the provided 'instance_name'.
The ServiceProxy will communicate only with services that have a matching 'instance_name'.
std::vector<std::string> DDS::rpc::ServiceProxy::get_discoverd_service_instances | ( | ) | const |
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. This routine is provided because the spec contains a typo in the method name (discoverd).
uint32_t DDS::rpc::ServiceProxy::get_discovered_service_count | ( | ) | const |
Access the number of service instances that have been discovered by the ServiceProxy.
The returned number is a snapshot in time of the currently known services.
std::vector<std::string> DDS::rpc::ServiceProxy::get_discovered_service_instances | ( | ) | const |
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.
void DDS::rpc::ServiceProxy::unbind | ( | ) |
Undo any previous 'bind()' operation.
After this, the ServiceProxy will communicate with any known services.
ReturnCode_t DDS::rpc::ServiceProxy::wait_for_service | ( | const DDS::Duration_t & | maxWait | ) |
Block up to 'maxWait' until any service is discovered.
RETCODE_TIMEOUT | : If the maxWait time passes without discovering a service. |
ReturnCode_t DDS::rpc::ServiceProxy::wait_for_service | ( | const DDS::Duration_t & | maxWait, |
std::string | instanceName | ||
) |
Block up to 'maxWait' until a service matching 'instanceNmae' is discovered.
RETCODE_TIMEOUT | : If the maxWait time passes without discovering a service. |
ReturnCode_t DDS::rpc::ServiceProxy::wait_for_services | ( | const DDS::Duration_t & | maxWait, |
uint32_t | count | ||
) |
Block until at least 'count' services have been discovered or 'maxWait' time elapses.
RETCODE_TIMEOUT | : If the maxWait time passes without discovering 'count' services. |
ReturnCode_t DDS::rpc::ServiceProxy::wait_for_services | ( | const DDS::Duration_t & | maxWait, |
const std::vector< std::string > & | instanceNames | ||
) |
Block until discovering a service for each of the listed 'instanceNames', or 'maxWait' elapses.
RETCODE_TIMEOUT | : If the maxWait time passes without discovering the specified services. |