Documentation
IPS_SetEventConditionVariableDynamicRule
Require: IP-Symcon >= 6.1
boolean IPS_SetEventConditionVariableDynamicRule (int $EventID, int $ConditionID, int $RuleID, int $VariableID, int $Comparison, int $CompareVariableID)
Parameters
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 |
||||||||||||||
Comparison |
|
||||||||||||||
CompareVariableID | ID of the variable that the value should be compared to |
Returns
If the command succeeds, it returns TRUE, otherwise FALSE.
Description
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 of variable with the ID CompareVariableID according to the comparison operation Comparison. 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.
Example
// Create root condition for event with ID 12345
IPS_SetEventCondition(12345, 0, 0, 0);
// Add a rule with ID 2: Variable 23456 < Variable 34567
IPS_SetEventConditionVariableDynamicRule(12345, 0, 2, 23456, 4, 34567);
// Delete rule with ID 2
IPS_SetEventConditionVariableDynamicRule(12345, 0, 2, 0, 0, 0);