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:

  1. from the InstanceIdentifier
  2. 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

instance

The instance to find - wildcard for finding all instances is allowed.

Parameters when using InstanceSpecifier

in

instance

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.

notice

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

Thread-safety, Reentrance, Result Delivery