Documentation
IPS_SetEventConditionVariableStaticRule
Require: IP-Symcon >= 6.1
boolean IPS_SetEventConditionVariableStaticRule (int $EventID, int $ConditionID, int $RuleID, int $VariableID, int $Comparison, variant $Value)
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 |
|
||||||||||||||
Value | Value the checked variable is 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 Value 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 < 75
IPS_SetEventConditionVariableStaticRule(12345, 0, 2, 23456, 4, 75);
// Delete rule with ID 2
IPS_SetEventConditionVariableStaticRule(12345, 0, 2, 0, 0, 0);