4.2 Instances

JSON RPC 2.0 is a procedural interface, not an object-oriented interface. However, Iris extends it so that functions can be called on specific instances.

It achieves this by using the following extensions:

instId argument
All instance-specific functions have an instId argument, which identifies the instance that the function operates on. This argument is always named instId. It is used by framework components to route requests and notifications to their destination. This is similar to the this pointer in C++ or the self argument in Python. Callers must first query the list of instances using instanceRegistry_getList() from the global instance, whose instId is zero, to get the id of another instance.
Instance-specific request id
The request id contains the instance id of the caller in bits[63:32]. The request id is a NumberU64, for all requests. It is used by framework components to route responses from the callee back to the caller.

All instances in a system, for example components, plug-ins, remote clients, and framework instances, can discover and communicate symmetrically with all other instances in the system.

All instances register themselves in a central instance registry, which assigns instance ids. See 5.20 Instance registry, instance discovery, and interface discovery API for details about the instance registry.

Instances can implement a subset of, or even a superset of, the functions that are defined in the Iris APIs. Instances that do not support a specific function must return E_function_not_supported_by_instance for that function. See 5.20.5 Interface discovery for more information.

Few Iris functions do not have an instId argument. These functions apply globally rather than to a single instance, for example, instanceRegistry_registerInstance(). However, most functions are instance-specific.

Global functions are implemented by the global instance, which has the pre-defined instance id of zero. Specifying an instId argument of zero is equivalent to specifying no instId argument at all. For more details, see 5.3 instId argument.

Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.