Component of the Event Detector responsible for identifying relevant data.
More...
#include <AnalysisManager.hpp>
|
void | loadRules () |
| Loads all enabled rules into the manager.
|
|
void | loadRule (const std::string &rule_name) |
| Loads a rule into the manager.
|
|
void | togglePeriodicAnalysis (const std::string &rule_name, const bool enable) |
| Toggle periodic analysis for a specific rule.
|
|
void | toggleAnalysisByService (const std::string &rule_name, const bool enable) |
| Toggle service-based analysis for a specific rule.
|
|
bool | isRuleEnabled (const std::string &rule_name) |
| Queries the parameter server to determine whether a rule is enabled.
|
|
double | loadRuleAnalysisPeriod (const std::string &rule_name) |
| Loads analysis interval for a specific rule from the parameter server.
|
|
void | runAnalysis (const std::string &rule_name) |
| Evaluates a single rule.
|
|
Component of the Event Detector responsible for identifying relevant data.
The AnalysisManager analyzes the data buffered in the BufferManager. It is responsible for detecting data-based events. To this end, it evaluates pre-defined rules, implemented by plugins.
Definition at line 50 of file AnalysisManager.hpp.
◆ AnalysisManager()
event_detector::AnalysisManager::AnalysisManager |
( |
EventDetector * |
ed, |
|
|
std::shared_ptr< BufferManager > |
buffer, |
|
|
const double |
default_period |
|
) |
| |
◆ isRuleEnabled()
bool event_detector::AnalysisManager::isRuleEnabled |
( |
const std::string & |
rule_name | ) |
|
|
protected |
Queries the parameter server to determine whether a rule is enabled.
- Parameters
-
rule_name | name of the rule |
- Returns
- bool whether rule is enabled
◆ loadRule()
void event_detector::AnalysisManager::loadRule |
( |
const std::string & |
rule_name | ) |
|
|
protected |
Loads a rule into the manager.
First, checks if a rule is enabled by querying the parameter server. Then creates and configures the rule by passing parameters to the rule. Last, sets up a periodic callback to run rule evaluation.
- Parameters
-
◆ loadRuleAnalysisPeriod()
double event_detector::AnalysisManager::loadRuleAnalysisPeriod |
( |
const std::string & |
rule_name | ) |
|
|
protected |
Loads analysis interval for a specific rule from the parameter server.
- Parameters
-
rule_name | name of the rule |
- Returns
- double analysis interval
◆ loadRules()
void event_detector::AnalysisManager::loadRules |
( |
| ) |
|
|
protected |
Loads all enabled rules into the manager.
First checks if a rule is enabled by querying the parameter server. Then creates and configures the rule by passing parameters to the rule.
◆ runAnalysis()
void event_detector::AnalysisManager::runAnalysis |
( |
const std::string & |
rule_name | ) |
|
|
protected |
Evaluates a single rule.
The rule is evaluted, data is requested, and then this data is passed to the DatabaseInterface for insertion into the database.
- Parameters
-
◆ toggleAnalysis()
void event_detector::AnalysisManager::toggleAnalysis |
( |
const bool |
enable_periodic, |
|
|
const bool |
enable_service |
|
) |
| |
Toggle analysis on/off for all rules.
- Parameters
-
enable_periodic | whether to enable periodic analysis |
enable_service | whether to enable service-based analysis |
◆ toggleAnalysisByService()
void event_detector::AnalysisManager::toggleAnalysisByService |
( |
const std::string & |
rule_name, |
|
|
const bool |
enable |
|
) |
| |
|
protected |
Toggle service-based analysis for a specific rule.
- Parameters
-
rule_name | rule name |
enable | whether to enable service-based analysis |
◆ togglePeriodicAnalysis()
void event_detector::AnalysisManager::togglePeriodicAnalysis |
( |
const std::string & |
rule_name, |
|
|
const bool |
enable |
|
) |
| |
|
protected |
Toggle periodic analysis for a specific rule.
- Parameters
-
rule_name | rule name |
enable | whether to enable periodic analysis |
◆ analysis_timers_
std::map<std::string, rclcpp::TimerBase::SharedPtr> event_detector::AnalysisManager::analysis_timers_ |
|
protected |
◆ buffer_
std::shared_ptr<BufferManager> event_detector::AnalysisManager::buffer_ |
|
protected |
◆ default_period_
double event_detector::AnalysisManager::default_period_ = 1.0 |
|
protected |
◆ ed_
◆ rule_loader_
std::shared_ptr<pluginlib::ClassLoader<AnalysisRule> > event_detector::AnalysisManager::rule_loader_ |
|
protected |
◆ rules_
std::map<std::string, std::shared_ptr<AnalysisRule> > event_detector::AnalysisManager::rules_ |
|
protected |
◆ trigger_services_
std::map<std::string, std::shared_ptr<rclcpp::Service<std_srvs::srv::Empty> > > event_detector::AnalysisManager::trigger_services_ |
|
protected |
services that can be used to trigger rule evaluation, mapped to rule name
Definition at line 166 of file AnalysisManager.hpp.
The documentation for this class was generated from the following file: