fsVarsRegisterIVar
The fsVarsRegisterIVar function can be used to get or create an IVar.
Syntax
FsIVarId fsVarsRegisterIVar(
const char* name,
const char* componentPath,
FsObjectId target
);
Parameters
| Parameters | Description |
|---|---|
name |
The name of the new variable. |
componentPath |
The path of the component. The path format is:
or
Note that the alias is not mandatory but is recommended for performance issue and to avoid conflicts. |
target |
The ID of the object from which the variable is being retrieved. Possible targets are:
Default: |
Return Values
The function returns the ID associated with the given name. If the given name has already been registered, the function will return the ID of the existing IVar. If an error occurred, the function will return FS_VAR_INVALID_ID.
Remarks
IVar are local to an instrument, regardless of which component registered it. Essentially it will be registered on the root component, and accessible to all children of the root component (so the whole instrument).
Example
FsIVarId iVarId = fsVarsRegisterIVar("TOTO", "LIGHTING");
Related Topics