Regular API function


Description Handles a plugin. This function is only available from the Lua API. Plugins, next to their registered custom Lua functions, might need to perform operations on a regular basis and not when called from a threaded script (e.g. for synchronization purposes). They can do it when simHandleModule is called (simOpenModule should however have been called previously). Refer to the messages relayed to plugins for more details. simHandleModule can only be called from the main script and is not available in the C-API. Look at the default main script to get an idea about how to use simOpenModule, simHandleModule and simCloseModule.
C synopsis -
C parameters
C return value
Lua synopsis
(1) number result=simHandleModule(number sim_handle_all,boolean calledInSensingPart)
(2) number result=simHandleModule(string moduleName,boolean calledInSensingPart)
Lua parameters
sim_handle_all: indicates that all plugins should be handled (called)
moduleName: the name of the plugin that should be handled (called)
calledInSensingPart: set to false when called in the "actuation part". Set to true when called in the "sensing part"
Lua return values
result: -1 in case of an error, otherwise result is the number of plugins that executed the command.

All regular API functions on one page