|
AstraLog-HPC
|
A rule that evaluates a combination of other rules based on logical operators (AND/OR). More...
#include <Rules.hpp>


Public Member Functions | |
| CorrelationRule (const RuleConfig &cfg) | |
| Constructs a CorrelationRule from a configuration object. | |
| std::string | whoAmI () override |
| Returns the rule type name. | |
| int | evaluate (const ResultMap &results) override |
| Evaluates the rule based on the outcomes of its dependency conditions. | |
| const std::vector< std::string > & | getConditions () const |
Public Member Functions inherited from RuleStrategy | |
| virtual int | getConsecutive () const |
| virtual double | getLastValue () |
| virtual void | setConsecutive (int) |
| virtual void | setLastValue (double) |
| virtual bool | hasPrevious () const |
| virtual int | evaluate (const std::variant< double, std::string > &v) |
| Evaluates the rule based on a sensor measurement or error state. | |
| virtual | ~RuleStrategy ()=default |
| Virtual destructor for safe polymorphic deletion. | |
| const std::string & | id () const |
| Gets the unique identifier of the rule. | |
| const std::string & | priority () const |
| Gets the priority level of the rule. | |
Private Attributes | |
| std::string | logic |
| The logical operator ("AND" or "OR"). | |
| std::vector< std::string > | conditions |
| The rule IDs that this rule depends on. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from RuleStrategy | |
| static bool | compare (double left, double right, const std::string &op) |
| A static helper function to perform logical comparisons. | |
Protected Attributes inherited from RuleStrategy | |
| std::string | rule_id |
| The unique identifier for this rule instance. | |
| std::string | rule_priority |
| The execution priority of this rule. | |
A rule that evaluates a combination of other rules based on logical operators (AND/OR).
|
inlineexplicit |
Constructs a CorrelationRule from a configuration object.
| cfg | The configuration containing the logical operator (AND/OR) and a list of condition IDs. |
|
inlineoverridevirtual |
Evaluates the rule based on the outcomes of its dependency conditions.
| results | A map containing the evaluation results of other rules. |
Reimplemented from RuleStrategy.

|
inline |
|
inlineoverridevirtual |
|
private |
The rule IDs that this rule depends on.
|
private |
The logical operator ("AND" or "OR").