NOTE
Deprecated. Use fsVarsRegisterIVar, fsVarsRegisterOVarorfsVarsRegisterZVarinstead.

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
ParametersDescription
name

The name of the new variable.

componentPathThe 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.

scopeThe 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);