interface xdc.runtime.IInstance |
|
|
|
Common instance params
Every module's instance parameter structure contains a pointer to an
IInstance.Params structure named instance. So, every instance
parameter defined in this interface may optionally be set when
creating (or constructing) any module's instances.
interface IInstance { ...
instance: ...
interface IInstance {
instance:
per-instance config parameters
}
#include <xdc/runtime/IInstance.h>
per-instance object types
per-instance config parameters
per-instance object types |
|
typedef struct IInstance_Object *IInstance_Handle;
// Client reference to an abstract instance object
per-instance config parameters |
|
XDCscript usage |
meta-domain |
var params = new IInstance.Params;
// Instance config-params object
params.name = String null;
// Name of the instance
typedef struct IInstance_Params {
// Instance config-params structure
String name;
// Name of the instance
} IInstance_Params;
config IInstance.name // per-instance |
|
Name of the instance
config String name = null;
DETAILS
It is possible to "bind" a name to each instance of any module
at the time the instance is created (or constructed).
ModA_Params params;
ModA_Params_init(¶ms);
params.instance->name = "myInstance";
ModA_create(¶ms, NULL);
The name field must be assigned a pointer to a buffer that persists
as long as the instance that it names exists. Only a reference to
the name is retained in the instance, the name is not copied to a
secondary buffer.
If instances have been configured to not support names, it is still
possible to assign to the instance.name field of the parameter
structure (as shown above). However, the pointer is not retained
and methods that normally return an instance's name will return
NULL instead.
generated on Tue, 01 Sep 2009 00:36:15 GMT