fsVarsGetBVarId
The fsVarsGetBVarId function can be used to get the FsBVarId of a specific BVar using its name and its preset.
Syntax
FsBVarId fsVarsGetBVarId(
const char* bVarName,
bool callable,
FsObjectId target
);
Parameters
| Parameters | Description |
|---|---|
bVarName |
The name of the |
callable |
A boolean indicating if the BVar can be called. |
target |
The ID of the object from which the variable is being retrieved. Possible targets are:
Default: |
Return Values
The function returns the correct ID associated to the given name. If an error occurred, the function will return FS_VAR_INVALID_ID.
Example
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT", false); // valid in DA62
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT", true); // NOT valid in DA62, this preset is not callable
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT_TOGGLE", false); // valid in DA62
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT_TOGGLE", true); // valid in DA62
FsBVarId BVarId = fsVarsGetAVarId("toto"); // NOT valid in DA62, doesn't exists