ph_picmd PowerHome formula function
Description
Sends a command to a Generic PowerHome Plugin Control using the standard plugin interface function of phpi_command.
Syntax
ph_picmd ( timeout, id, cmd, data1, data2, data3, data4 )
Argument Description
timeout The length of time in seconds to wait for the plugin to return a value. Use a value of 0 to wait indefinately. Use a negative number to not wait for a return value (post the function call).
id The ID of the PowerHome Plugin.
cmd A long representing the command number.
data1 A long representing the Data 1 value.
data2 A long representing the Data 2 value.
data3 A string representing the Data 3 value.
data4 A string representing the Data 4 value.
Return value
String. Returns the value returned from the Plugin's phpi_command function. Returns empty string if the plugin is not valid or you passed a negative number for the timeout. Returns "*ERROR - PLUGIN TIMEOUT" if the plugin did not return a value before your timeout expired.
Usage
Use this function for general communication with a Generic PowerHome Plugin. This function is a direct passthru to the phpi_command function required by the PowerHome Generic Plugin Interface. Implementation of the cmd and data1 thru data4 parameters is dependent upon the indivdual plugin.