ph_pictrl PowerHome formula function
Description
Enables the user to control low level functions of a generic plugin
Syntax
ph_pictrl ( id, cmd, type )
Argument Description
id A string representing the ID of the plugin to control.
cmd A string representing the command. Available commands are detailed below.
type An integer value containing additional data used by some commands.
Return value
Long. Returns data dependant upon the requested command type.
Usage
"reinit" will reinitialize a plugin. If the type parameter is 0, PowerHome will first execute the plugins PHPI_Close function (and wait up to 10 seconds for the function to return) followed by unloading and reloading the plugin. Any other value for the type parameter causes PowerHome to bypass the PHPI_Close function and immediately unload and reload the plugin.

"enable" will call the plugin function PHPI_Enable.

"disable" will the the plugin function PHPI_Disable.

"status" will call the plugin function PHPI_Status.

"getbusycnt" will return the number of queued commands for a plugin. Since plugins run in their own thread, multiple command may queue up for a plugin. If the "getbusycnt" never comes down to 0, then the plugin itself may be hung and you may want to "reinit" it.