fsVarsRegisterCustomSimVar
NOTE: Deprecated. Use fsVarsRegisterIVar, fsVarsRegisterOVar or fsVarsRegisterZVar instead.
The fsVarsRegisterCustomSimVar function can be used to create a new custom simulation variable.
Syntax
FsCustomSimVarId fsVarsRegisterCustomVar(
const char* name,
const char* componentPath,
eFsSimCustomSimVarScope scope
);
Parameters
| Parameters | Description |
|---|---|
name |
The name of the new variable. |
componentPath |
The path of the component if relevant. nullptr otherwise The path format is : path:to:component or path:to:component@alias.The alias is not mandatory but is recommended for performance issue an to avoid conflicts. |
scope |
The scope of the new custom simvar. |
Return Values
The function returns the right Id associated to the given name. If an error occurred, the function will return -1.
Example
FsCustomSimVarId varId = fsVarsRegisterCustomSimVar("TOTO", nullptr, FsSimCustomSimVarScopeSim);