ph_genctlrtrigger PowerHome formula function
Description
Calls the Generic Controller Trigger (Trigger type 26).
Syntax
ph_genctlrtrigger ( id, number, value, dim, command, data, formula, auxvalue )
Argument Description
id The trigger ID to call. Within the Generic Controller Trigger, this is the ID of the controller.
number The trigger number to call. This will be a value from 1 to 256.
value The trigger value to call. This will be a value from 1 to 256.
dim A double representing the dim value. This value will simply be passed to the trigger in the [TEMP2] variable.
command An unsigned long representing the command. This value will be passed to the [TEMP3] variable.
data A long representing the data. This value will be passed to the [TEMP4] variable.
formula A string representing the formula. This value will be passed to the [TEMP5] variable.
auxvalue A string representing the auxillary value. This value will be passed to the [TEMP10] variable.
Return value
Integer. The return value is the binary addition of the four individual trigger calls. This sum consists of 1 if the first check returns no rows, 2 if the second check returns no rows, 4 if the third check returns no rows, and 8 if the fourth check returns no rows.
Usage
This function is very similar to the ph_checktrigger function except that it only calls trigger types of 26 (Generic Controller Trigger). It is provided as a simple interface for controllers and future controller plugins to fire the generic controller trigger. Using a single function call, 4 individual trigger checks will be made. The first will be made for [Any], [Any], the second for [Any], Specific Value, the third for Specific Number, [Any], and the fourth for Specific Number, Specific Value.