|
AstraLog-HPC
|
Contains the implementation for building the evaluation pipeline. More...
#include <unordered_map>#include <vector>#include <RulesFactory/RuleOrdering.hpp>#include <common/errors.hpp>#include <string>#include <algorithm>#include <iostream>#include <iomanip>
Functions | |
| EvaluationPipeline | buildPipeline (const std::unordered_map< std::string, std::shared_ptr< RuleStrategy > > &ruleMap, const std::vector< RuleConfig > &configs) |
| Builds an evaluation pipeline by organizing and sorting rules. | |
| void | printpipeline (EvaluationPipeline &pipeline) |
| Prints the structure and contents of the given evaluation pipeline for debugging or logging. | |
Contains the implementation for building the evaluation pipeline.
| EvaluationPipeline buildPipeline | ( | const std::unordered_map< std::string, std::shared_ptr< RuleStrategy > > & | ruleMap, |
| const std::vector< RuleConfig > & | configs | ||
| ) |
Builds an evaluation pipeline by organizing and sorting rules.
Categorizes the instantiated rules: correlation rules are separated from primary rules, which are grouped by their target sensor ID and then sorted within each group by execution priority (HIGH > MEDIUM > LOW). Throws astralog::RuleError if a config references an unknown rule id.
| ruleMap | A map associating rule IDs with their corresponding instantiated RuleStrategy objects. |
| configs | A vector of RuleConfig objects containing the metadata for each rule. |

| void printpipeline | ( | EvaluationPipeline & | pipeline | ) |
Prints the structure and contents of the given evaluation pipeline for debugging or logging.
Renders the execution order as an ASCII tree in two stages — primary rules (grouped by sensor, with their priorities) then correlation rules. Empty stages are labelled explicitly.
| pipeline | The EvaluationPipeline object to print. |