|Home > Iris APIs > Instance registry, instance discovery, and interface discovery > Registering instances|
The global function
instanceRegistry_registerInstance() registers a new instance in the global instance registry and assigns an instance id,
instId, to it.
A call to this function to register instance
foo.bar, has the following
foo.barand a unique
instIdis assigned to it, which the function returns. The list of all registered instances can be queried using
instIdto determine where to route requests and responses that are targeted at
instanceRegistry_registerInstance() must be called as a request, not as a notification. When it is called as a notification, this call is ignored and no instance is registered.
Instances must call this function before calling any other Iris function because their instance id must be included in any request ids. When calling this function, instances do not yet have an instance id assigned, so they cannot fill their instance id into bits[63:32] of the request id. Instead, they set bits[63:32] of the request id to zero. The caller can freely choose bits[31:0], as for normal requests.
IrisSupportLiblibrary normally takes care of constructing request objects for you, so unless you are implementing your own library, you do not need to create request ids yourself.
The following restrictions apply to registering instances:
IrisInterfacecan send the
See 4.18.3 Unregistering instances for restrictions on unregistering instances.
The hierarchy does not indicate dependencies. Children do not depend on the presence of their parents. So, the following actions are valid:
component.foo.barwithout having registered
component.foo.bar, assuming both have previously been registered.