|Home > Iris APIs > Instance registry, instance discovery, and interface discovery API > 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 route requests and responses to
instanceRegistry_registerInstance() must be called as a request, not as a notification. When it is called as a notification, the call is ignored and no instance is registered. Instances must call it before calling any other Iris function because their instance id must be included in all request ids. When calling it, instances do not yet have an instance id assigned, so they cannot set their instance id in 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 5.20.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.