Opposed to StartFindService()
this version is a single find request.
It is a synchronous call. FindService()
returns once the search is complete, providing a list of matching service instances.
There are two ways the function can find service instances:
- from the
InstanceIdentifier
- from the
InstanceSpecifier
Syntax
//Find service from InstanceIdentifier
ServiceHandleContainer<HandleType> FindService(InstanceIdentifier instance)
//Find service from InstanceSpecifier
ServiceHandleContainer<HandleType> FindService(InstanceSpecifier const & instance)
Parameters when using InstanceIdentifier
in |
| The instance to find - wildcard for finding all instances is allowed. |
Parameters when using InstanceSpecifier
in |
| The instance specifier for which a matching service instance should be searched. |
Returns
FindServiceHandles
The returned handles can then be used to create a service proxy instance.

Note: Those handles shall be released before the runtime is destroyed. They cannot be stored in variables with longer life period than the application's main()
. If not followed, it's not guaranteed that the communication middleware is shut down properly and may lead to segmentation fault.
Precondition
- The
InstanceSpecifier
(instance)
orInstanceIdentifier (instance)
must be configured. - Runtime has been initialized.
Thread-safety, Reentrance, Result Delivery
- Threadsafe : FALSE
- Reentrant : FALSE
- Synchronous : TRUE