Require: IP-Symcon >= 4.4
boolean IPS_SetEventConditionVariableRule (int $EventID, int $ConditionID, int $RuleID, int $VariableID, variant $Value)
EventID | ID of the event to be changed |
ConditionID | ID of the condition that contains the rule |
RuleID | Unique ID for this rule. IDs only need to be unique for this group. |
VariableID | ID of the checked variable |
Value | Value the checked variable is compared to |
If the command succeeds, it returns TRUE, otherwise FALSE.
This function modifies the rule with the ID RuleID for the condition with the ID ConditionID of the event with the ID EventID. The rule compares the variable with the ID VariableID to the value Value according to the comparision operation Comparision. If no rule with the ID RuleID exists yet, it is created.
If VariableID is 0, the rule with the ID RuleID is deleted.
The variable types Boolean and String only support the first two comparison operations.
The value in Value must match the type of the variable with the ID VariableID.
// Create root condition for event with ID 12345
IPS_SetEventCondition(12345, 0, 0, 0);
// Add a rule with ID 2: Variable 23456 < 75
IPS_SetEventConditionVariableRule(12345, 0, 2, 23456, 4, 75);
// Delete rule with ID 2
IPS_SetEventConditionVariableRule(12345, 0, 2, 0, 0, 0);