Regular API function

simRunSimulator

Description Runs the simulator. Should be the first and last command run. This will launch the main simulator loop. See also sim.quitSimulator and the section on the main client application.
C/C++
synopsis
simInt simRunSimulator(const simChar* applicationName,simInt options,simVoid(*initCallBack)(),simVoid(*loopCallBack)(),simVoid(*deinitCallBack)())
C/C++
parameters
applicationName: ignored
options: start-up options (combine them with the OR operator)
initCallBack: the call-back address of the initialization routine. The initialization routine will be called just once, and should be used to load plugins for instance. Can be nullptr for the default initialization routine.
loopCallBack: the call-back address of the main simulator loop. That routine is called continuously in a loop, and should react to simulator messages (simGetSimulatorMessage), and handle running simulations. Can be nullptr for the default loop routine.
deinitCallBack: the call-back address of the deinitialization routine. The deinitialization routine will be called just once, before the simulation ends, and should be used to unload plugins for instance. Can be nullptr for the default deinitialization routine.
C/C++
return value
1 if the command was successfull
Lua
synopsis
Lua
parameters
Lua
return values
Python
synopsis