Coordinates the loading of rules, processing of data batches, and writing of results.
More...
#include <RunEngine.hpp>
|
| | Engine (const std::string &output_path, const std::string &alarms_path, const std::string &stateful_path, const std::string &step_diff_path) |
| | Constructs an Engine with explicit output file paths.
|
| |
| void | loadRules (const std::string &path) |
| | Loads the evaluation rules from the specified path and initializes the RulesFactory.
|
| |
| size_t | get_num_sensors (const std::string &path) |
| | Retrieves the total number of sensors configured in the system.
|
| |
| void | run (const std::string &batch_path, size_t num_sensors) |
| | Processes a batch of data points received from the collector/validator.
|
| |
Coordinates the loading of rules, processing of data batches, and writing of results.
◆ Engine()
| Engine::Engine |
( |
const std::string & |
output_path, |
|
|
const std::string & |
alarms_path, |
|
|
const std::string & |
stateful_path, |
|
|
const std::string & |
step_diff_path |
|
) |
| |
|
inline |
Constructs an Engine with explicit output file paths.
- Parameters
-
| output_path | Path where valid data will be written. |
| alarms_path | Path where alarms will be written. |
| stateful_path | Path to the stateful-rule cross-batch state file. |
| step_diff_path | Path to the step-difference cross-batch state file. |
◆ get_num_sensors()
| size_t Engine::get_num_sensors |
( |
const std::string & |
path | ) |
|
Retrieves the total number of sensors configured in the system.
- Parameters
-
| path | The file path to the configuration or data source used to determine the sensor count. |
- Returns
- The total number of sensors as a size_t.
- Exceptions
-
◆ loadRules()
| void Engine::loadRules |
( |
const std::string & |
path | ) |
|
|
inline |
Loads the evaluation rules from the specified path and initializes the RulesFactory.
- Parameters
-
| path | The file or directory path containing the rules configuration. |
◆ run()
| void Engine::run |
( |
const std::string & |
batch_path, |
|
|
size_t |
num_sensors |
|
) |
| |
Processes a batch of data points received from the collector/validator.
- Note
- The batch is expected to be read from the location where it is copied via SCP.
- Parameters
-
| batch_path | The file path of the incoming data batch to process. |
| num_sensors | The number of sensors involved in the current execution. |
- Exceptions
-
| astralog::ConfigError | if the rules are not properly loaded or if the batch size is not a multiple of the number of sensors. |
◆ current_batch
| Batch Engine::current_batch |
|
private |
The internal batch of data currently being processed.
◆ evaluator
| std::unique_ptr<Evaluate> Engine::evaluator |
|
private |
Component responsible for evaluating data against the loaded rules.
◆ outputManager
Manager handling the file streams for results and alarms.
◆ rulesFactory
Factory responsible for creating and managing rule strategies.
The documentation for this class was generated from the following files: