|Home > Iris APIs > Resources API|
A resource is either a parameter or a register. Parameters allow you to parameterize an instance, either at startup, these are called init-time parameters, or at run-time. Registers represent a piece of state of an instance that can be read and might be modifiable.
Clients first query a list of the available resources of an instance by calling
In the Resources API, each resource is uniquely identified by an opaque resource id. The
resource_write() functions accept lists of resource ids to allow efficient reading and writing of multiple resources.
Clients typically inspect the meta information of the
ResourceInfo objects returned by
resource_getList() and extract the resource ids of the resources they are interested in. These are the
ResourceInfo fields that are typically used to discover or filter resources:
tags.isPcand other tags
To access resources by name or by
canonicalRn, clients typically build maps from
names to resource ids or from
canonicalRns to resource ids, because the
resource_write() functions only accept resource ids.
Clients can also query resource groups by calling
resource_getListOfResourceGroups(). This function returns lists of resource ids that are suitable for reading or writing all resources of a group.
Target instances can expose zero or more resources. Target instances that expose no resources must either return
E_function_not_supported_by_instance for all
resource_*() functions or
resource_getList() must return an empty list.
$PVLIB_HOME/Iris/Examples/Client/Register/ contains an example client application that demonstrates how to use this API.