fsVarsCustomSimVarGet
The fsVarsCustomSimVarGet function can be used to get the value of a specific Custom SmmVar.
Syntax
FsVarError fsVarsCustimSimVarGet(
FsCustomSimVardId varId,
FsUnitId unitId,
double* result
);
Parameters
Parameters | Description |
---|---|
varId |
The id of a custom simvar. |
unitId |
The id of an unit (found using fsVarsGetUnitId). |
result |
The value that will receive the value of the CustomSimVar. |
Return Values
The function returns a FsVarError
, 0 means there is no error. In that case, the value of the named variable has been set in result
.
Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsCustomSimVarId varId = fsVarsRegisterCustomSimVar("TOTO", nullptr, FsSimCustomSimVarScopeSim);
double result = 0;
if (fsVarsCustomSimVarGet(varId , unitId, &result) == FS_VAR_ERROR_NONE)
{
// valid
}
else
{
// error
}