Commit e95764be authored by Alessio Netti's avatar Alessio Netti
Browse files

Analytics: refactoring of Analyzers to Operators

- Make clean might be required
parent 33252803
......@@ -4,7 +4,7 @@ include ../config.mk
CXXFLAGS += -DBOOST_NETWORK_ENABLE_HTTPS -I../common/include -I$(DCDBDEPLOYPATH)/include -I$(DCDBDEPLOYPATH)/include/opencv4
LIBS = -L../lib -L$(DCDBDEPLOYPATH)/lib/ -ldl -lboost_system -lboost_thread -lboost_log_setup -lboost_log -lboost_regex -lpthread -rdynamic
ANALYZERS = aggregator regressor job_aggregator testeranalyzer filesink smucngperfanalyzer
OPERATORS = aggregator regressor job_aggregator testeroperator filesink smucngperf
ifeq ($(OS),Darwin)
BACNET_PORT = bsd
......@@ -16,47 +16,47 @@ else
LIBFLAGS = -shared -Wl,-soname,
PLUGINFLAGS = -fPIC
endif
ANALYZER_LIBS = $(foreach p,$(ANALYZERS),libdcdbanalyzer_$(p).$(LIBEXT))
OPERATOR_LIBS = $(foreach p,$(OPERATORS),libdcdboperator_$(p).$(LIBEXT))
all: $(ANALYZER_LIBS)
all: $(OPERATOR_LIBS)
debug: CXXFLAGS += -DDEBUG
debug: all
clean:
rm -f $(ANALYZER_LIBS) $(shell find . -name "*.o")
rm -f $(OPERATOR_LIBS) $(shell find . -name "*.o")
rm -f ../common/src/sensornavigator.o
$(OBJS) : %.o : %.cpp
install_analyzer: $(ANALYZER_LIBS)
install_operator: $(OPERATOR_LIBS)
install $^ $(DCDBDEPLOYPATH)/lib/
install_conf: $(foreach p,$(ANALYZERS),config/$(p).conf)
install_conf: $(foreach p,$(OPERATORS),config/$(p).conf)
install -m 644 $^ $(DCDBDEPLOYPATH)/etc/
install: install_analyzer
install: install_operator
@echo "Done with installation."
@echo "====================================="
@echo "To copy the configuration files type:"
@echo " > make install_conf"
analyzers/%.o: CXXFLAGS+= $(PLUGINFLAGS)
operators/%.o: CXXFLAGS+= $(PLUGINFLAGS)
../common/src/sensornavigator.o: CXXFLAGS+= $(PLUGINFLAGS)
libdcdbanalyzer_aggregator.$(LIBEXT): analyzers/aggregator/AggregatorAnalyzer.o analyzers/aggregator/AggregatorConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/AggregatorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_regressor.$(LIBEXT): analyzers/regressor/RegressorAnalyzer.o analyzers/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_regressor.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
libdcdbanalyzer_job_aggregator.$(LIBEXT): analyzers/aggregator/AggregatorAnalyzer.o analyzers/aggregator/JobAggregatorAnalyzer.o analyzers/aggregator/JobAggregatorConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_job_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/JobAggregatorOperator.o operators/aggregator/JobAggregatorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_testeranalyzer.$(LIBEXT): analyzers/testeranalyzer/TesterAnalyzer.o analyzers/testeranalyzer/TesterAnalyzerConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_testeroperator.$(LIBEXT): operators/testeroperator/TesterOperator.o operators/testeroperator/TesterOperatorConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_filesink.$(LIBEXT): analyzers/filesink/FilesinkAnalyzer.o analyzers/filesink/FilesinkConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_filesink.$(LIBEXT): operators/filesink/FilesinkOperator.o operators/filesink/FilesinkConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
libdcdbanalyzer_smucngperfanalyzer.$(LIBEXT): analyzers/smucngperfanalyzer/SMUCNGPerfAnalyzer.o analyzers/smucngperfanalyzer/SMUCNGPerfConfigurator.o ../common/src/sensornavigator.o
libdcdboperator_smucngperf.$(LIBEXT): operators/smucngperf/SMUCNGPerfOperator.o operators/smucngperf/SMUCNGPerfConfigurator.o ../common/src/sensornavigator.o
$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
This diff is collapsed.
......@@ -2,14 +2,14 @@ global {
mqttPrefix /test
}
template_analyzer def1 {
template_operator def1 {
interval 1000
minValues 3
duplicate false
streaming true
}
analyzer tes1 {
operator tes1 {
default def1
window 2000
relative false
......@@ -32,7 +32,7 @@ relative false
}
analyzer tes2 {
operator tes2 {
default def1
interval 1500
relative true
......
//================================================================================
// Name : JobAnalyzerConfiguratorTemplate.h
// Name : JobOperatorConfiguratorTemplate.h
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description : Template that implements a configurator for Job analyzer plugins.
// Description : Template that implements a configurator for Job operator plugins.
//================================================================================
//================================================================================
......@@ -25,99 +25,97 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#ifndef PROJECT_JOBANALYZERCONFIGURATORTEMPLATE_H
#define PROJECT_JOBANALYZERCONFIGURATORTEMPLATE_H
#ifndef PROJECT_JOBOPERATORCONFIGURATORTEMPLATE_H
#define PROJECT_JOBOPERATORCONFIGURATORTEMPLATE_H
#include "AnalyzerConfiguratorTemplate.h"
#include "JobAnalyzerTemplate.h"
#include "OperatorConfiguratorTemplate.h"
#include "JobOperatorTemplate.h"
/**
* @brief Template that implements a configurator for Job analyzer plugins.
* @brief Template that implements a configurator for Job operator plugins.
*
* @details This template expands the standard AnalyzerConfiguratorTemplate,
* @details This template expands the standard OperatorConfiguratorTemplate,
* with very few changes to accomodate the different design of job
* analyzers.
* operators.
*
* @ingroup analyzer
* @ingroup operator
*/
template <class Analyzer, class SBase = SensorBase>
class JobAnalyzerConfiguratorTemplate : virtual public AnalyzerConfiguratorTemplate<Analyzer, SBase> {
template <class Operator, class SBase = SensorBase>
class JobOperatorConfiguratorTemplate : virtual public OperatorConfiguratorTemplate<Operator, SBase> {
// Verifying the types of input classes
static_assert(std::is_base_of<SensorBase, SBase>::value, "SBase must derive from SensorBase!");
static_assert(std::is_base_of<AnalyzerInterface, Analyzer>::value, "Analyzer must derive from AnalyzerInterface!");
static_assert(std::is_base_of<OperatorInterface, Operator>::value, "Operator must derive from OperatorInterface!");
protected:
// For readability
using A_Ptr = std::shared_ptr<Analyzer>;
using O_Ptr = std::shared_ptr<Operator>;
public:
/**
* @brief Class constructor
*/
JobAnalyzerConfiguratorTemplate() : AnalyzerConfiguratorTemplate<Analyzer, SBase>() {}
JobOperatorConfiguratorTemplate() : OperatorConfiguratorTemplate<Operator, SBase>() {}
/**
* @brief Copy constructor is not available
*/
JobAnalyzerConfiguratorTemplate(const JobAnalyzerConfiguratorTemplate&) = delete;
JobOperatorConfiguratorTemplate(const JobOperatorConfiguratorTemplate&) = delete;
/**
* @brief Assignment operator is not available
*/
JobAnalyzerConfiguratorTemplate& operator=(const JobAnalyzerConfiguratorTemplate&) = delete;
JobOperatorConfiguratorTemplate& operator=(const JobOperatorConfiguratorTemplate&) = delete;
/**
* @brief Class destructor
*/
virtual ~JobAnalyzerConfiguratorTemplate() {}
virtual ~JobOperatorConfiguratorTemplate() {}
protected:
/**
* @brief Instantiates all necessary units for a single (job) analyzer
* @brief Instantiates all necessary units for a single (job) operator
*
* When using job analyzers, the only unit that is always instantiated is ALWAYS the template
* unit, similarly to ordinary analyzers in on-demand mode. Such unit then is used at runtime,
* When using job operators, the only unit that is always instantiated is ALWAYS the template
* unit, similarly to ordinary operators in on-demand mode. Such unit then is used at runtime,
* even in streaming mode, to build dynamically all appropriate units for jobs that are
* currently running in the system.
*
* @param an The analyzer whose units must be created
* @param op The operator whose units must be created
* @param protoInputs The vector of prototype input sensors
* @param protoOutputs The vector of prototype output sensors
* @param inputMode Input mode to be used (selective, all or all_recursive)
* @return True if successful, false otherwise
*/
virtual bool readUnits(Analyzer& an, std::vector<shared_ptr<SBase>>& protoInputs, std::vector<shared_ptr<SBase>>& protoOutputs, inputMode_t inputMode) {
// Forcing the job analyzer to not be duplicated
an.setDuplicate(false);
virtual bool readUnits(Operator& op, std::vector<shared_ptr<SBase>>& protoInputs, std::vector<shared_ptr<SBase>>& protoOutputs, inputMode_t inputMode) {
// Forcing the job operator to not be duplicated
op.setDuplicate(false);
vector <shared_ptr<UnitTemplate<SBase>>> *units = NULL;
try {
units = this->_unitGen.generateUnits(protoInputs, protoOutputs, inputMode,
MQTTChecker::formatTopic(this->_mqttPrefix) + MQTTChecker::formatTopic(an.getMqttPart()),
true, an.getRelaxed());
units = this->_unitGen.generateUnits(protoInputs, protoOutputs, inputMode, op.getMqttPart(), true, op.getRelaxed());
}
catch (const std::exception &e) {
LOG(error) << this->_analyzerName << " " << an.getName() << ": Error when creating template job unit: " << e.what();
LOG(error) << this->_operatorName << " " << op.getName() << ": Error when creating template job unit: " << e.what();
delete units;
return false;
}
if(units->size() > 1) {
LOG(error) << this->_analyzerName << " " << an.getName() << ": Invalid job template unit, please check your configuration!";
LOG(error) << this->_operatorName << " " << op.getName() << ": Invalid job template unit, please check your configuration!";
delete units;
return false;
}
shared_ptr<UnitTemplate<SBase>> jobUnit = units->at(0);
delete units;
an.clearUnits();
op.clearUnits();
//if(!this->constructSensorTopics(*jobUnit, an))
//if(!this->constructSensorTopics(*jobUnit, op))
// return false;
if (this->unit(*jobUnit)) {
an.addToUnitCache(jobUnit);
op.addToUnitCache(jobUnit);
LOG(debug) << " Template job unit " + jobUnit->getName() + " generated.";
} else {
LOG(error) << " Template job unit " << jobUnit->getName() << " did not pass the final check!";
......@@ -130,4 +128,4 @@ protected:
boost::log::sources::severity_logger<boost::log::trivial::severity_level> lg;
};
#endif //PROJECT_JOBANALYZERCONFIGURATORTEMPLATE_H
#endif //PROJECT_JOBOPERATORCONFIGURATORTEMPLATE_H
//================================================================================
// Name : JobAnalyzerTemplate.h
// Name : JobOperatorTemplate.h
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description : Template implementing features needed by Analyzers.
// Description : Template implementing features needed by Operators.
//================================================================================
//================================================================================
......@@ -25,22 +25,22 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#ifndef PROJECT_JOBANALYZERTEMPLATE_H
#define PROJECT_JOBANALYZERTEMPLATE_H
#ifndef PROJECT_JOBOPERATORTEMPLATE_H
#define PROJECT_JOBOPERATORTEMPLATE_H
#include "AnalyzerTemplate.h"
#include "OperatorTemplate.h"
/**
* @brief Template that implements features needed by Job Analyzers and
* complying to AnalyzerInterface.
* @brief Template that implements features needed by Job Operators and
* complying to OperatorInterface.
*
* @details This template is derived from AnalyzerTemplate, and is adjusted to
* @details This template is derived from OperatorTemplate, and is adjusted to
* simplify job-related computations.
*
* @ingroup analyzer
* @ingroup operator
*/
template <typename S>
class JobAnalyzerTemplate : virtual public AnalyzerTemplate<S> {
class JobOperatorTemplate : virtual public OperatorTemplate<S> {
// The template shall only be instantiated for classes which derive from SensorBase
static_assert(is_base_of<SensorBase, S>::value, "S must derive from SensorBase!");
......@@ -55,10 +55,10 @@ public:
/**
* @brief Class constructor
*
* @param name Name of the analyzer
* @param name Name of the operator
*/
JobAnalyzerTemplate(const string name) :
AnalyzerTemplate<S>(name),
JobOperatorTemplate(const string name) :
OperatorTemplate<S>(name),
_jobDataVec(nullptr) {
_unitAccess.store(false);
......@@ -69,8 +69,8 @@ public:
* @brief Copy constructor
*
*/
JobAnalyzerTemplate(const JobAnalyzerTemplate& other) :
AnalyzerTemplate<S>(other),
JobOperatorTemplate(const JobOperatorTemplate& other) :
OperatorTemplate<S>(other),
_jobDataVec(nullptr) {
_unitAccess.store(false);
......@@ -81,8 +81,8 @@ public:
* @brief Assignment operator
*
*/
JobAnalyzerTemplate& operator=(const JobAnalyzerTemplate& other) {
AnalyzerTemplate<S>::operator=(other);
JobOperatorTemplate& operator=(const JobOperatorTemplate& other) {
OperatorTemplate<S>::operator=(other);
_jobDataVec = nullptr;
this->_dynamic = true;
return *this;
......@@ -91,20 +91,20 @@ public:
/**
* @brief Class destructor
*/
virtual ~JobAnalyzerTemplate() {
virtual ~JobOperatorTemplate() {
if(_jobDataVec)
delete _jobDataVec;
}
/**
* @brief Returns the units of this analyzer
* @brief Returns the units of this operator
*
* The units returned by this method are of the UnitInterface type. The actual units, in their
* derived type, are used internally. This type of analyzer employs dynamic units that are
* derived type, are used internally. This type of operator employs dynamic units that are
* generated at runtime: as such, an internal unit lock is acquired upon calling this method,
* and must later be released through the releaseUnits() method.
*
* @return The vector of UnitInterface objects of this analyzer
* @return The vector of UnitInterface objects of this operator
*/
virtual vector<UnitPtr>& getUnits() override {
// Spinlock to regulate access to units - normally innocuous
......@@ -122,17 +122,17 @@ public:
}
/**
* @brief Initializes this analyzer
* @brief Initializes this operator
*
* @param io Boost ASIO service to be used
*/
virtual void init(boost::asio::io_service& io) override { AnalyzerInterface::init(io); }
virtual void init(boost::asio::io_service& io) override { OperatorInterface::init(io); }
/**
* @brief Performs an on-demand compute task
*
* Unlike the protected computeAsync and compute methods, computeOnDemand allows to interactively
* perform data analytics queries on the analyzer, which must have the _streaming attribute set
* perform data analytics queries on the operator, which must have the _streaming attribute set
* to false. A unit is generated on the fly, corresponding to the input node given as input,
* and results are returned in the form of a map.
*
......@@ -143,7 +143,7 @@ public:
map<string, reading_t> outMap;
if( !this->_streaming ) {
try {
// Getting exclusive access to the analyzer
// Getting exclusive access to the operator
while( this->_onDemandLock.exchange(true) ) {}
uint32_t jobId = MQTTChecker::topicToJob(node);
if(_jobDataVec)
......@@ -166,7 +166,7 @@ public:
}
}
} else
throw std::runtime_error("Analyzer " + this->_name + ": cannot retrieve job data!");
throw std::runtime_error("Operator " + this->_name + ": cannot retrieve job data!");
} catch(const exception& e) {
this->_onDemandLock.store(false);
throw;
......@@ -192,20 +192,20 @@ public:
if(!found)
throw std::domain_error("Job " + node + " does not belong to the domain of " + this->_name + "!");
} else
throw std::runtime_error("Analyzer " + this->_name + ": not available for on-demand query!");
throw std::runtime_error("Operator " + this->_name + ": not available for on-demand query!");
return outMap;
}
protected:
using AnalyzerTemplate<S>::compute;
using OperatorTemplate<S>::compute;
/**
* @brief Data analytics (job) computation logic
*
* This method contains the actual logic used by the analyzed, and is automatically called by
* the computeAsync method. This variant of the compute() method defined in AnalyzerTemplate also
* includes a job data structure in its list of arguments, and is specialized for job analyzers.
* the computeAsync method. This variant of the compute() method defined in OperatorTemplate also
* includes a job data structure in its list of arguments, and is specialized for job operators.
*
* @param unit Shared pointer to unit to be processed
* @param jobData Job data structure
......@@ -216,7 +216,7 @@ protected:
* @brief This method encapsulates all logic to generate and manage job units
*
* The algorithm implemented in this method is very similar to that used in computeOnDemand in
* AnalyzerTemplate, and it is used to manage job units both in on-demand and streaming mode. The
* OperatorTemplate, and it is used to manage job units both in on-demand and streaming mode. The
* internal unit cache is used to store recent job units. Moreover, the job data returned by the
* QueryEngine is converted to a format compatible with the UnitGenerator.
*
......@@ -227,18 +227,18 @@ protected:
string jobTopic = MQTTChecker::jobToTopic(jobData.jobId);
U_Ptr jobUnit = nullptr;
if(!this->_unitCache)
throw std::runtime_error("Initialization error in analyzer " + this->_name + "!");
throw std::runtime_error("Initialization error in operator " + this->_name + "!");
if (this->_unitCache->count(jobTopic)) {
jobUnit = this->_unitCache->at(jobTopic);
if(!this->_streaming)
LOG(debug) << "Analyzer " << this->_name << ": cache hit for unit " << jobTopic << ".";
LOG(debug) << "Operator " << this->_name << ": cache hit for unit " << jobTopic << ".";
} else {
if (!this->_unitCache->count(SensorNavigator::templateKey))
throw std::runtime_error("No template unit in analyzer " + this->_name + "!");
throw std::runtime_error("No template unit in operator " + this->_name + "!");
if(!this->_streaming)
LOG(debug) << "Analyzer " << this->_name << ": cache miss for unit " << jobTopic << ".";
LOG(debug) << "Operator " << this->_name << ": cache miss for unit " << jobTopic << ".";
U_Ptr uTemplate = this->_unitCache->at(SensorNavigator::templateKey);
shared_ptr<SensorNavigator> navi = this->_queryEngine.getNavigator();
UnitGenerator<S> unitGen(navi);
......@@ -274,10 +274,10 @@ protected:
* @brief Performs a compute task
*
* This method is tasked with scheduling the next compute task, and invoking the internal
* compute() method, which encapsulates the real logic of the analyzer. The compute method
* is automatically called over units as required by the Analyzer's configuration.
* compute() method, which encapsulates the real logic of the operator. The compute method
* is automatically called over units as required by the operator's configuration.
*
* In the case of job analyzers, this method will also automatically retrieve the list of jobs
* In the case of job operators, this method will also automatically retrieve the list of jobs
* that were running in the last interval. One unit for each of them is instantiated (or
* retrieved from the local unit cache, if available) and then the compute phase starts.
*
......@@ -286,7 +286,7 @@ protected:
if(this->_delayInterval > 0) {
sleep(this->_delayInterval);
this->_delayInterval = 0;
LOG(info) << "Analyzer " + this->_name + ": starting computation after delayed start!";
LOG(info) << "Operator " + this->_name + ": starting computation after delayed start!";
}
try {
......@@ -325,16 +325,16 @@ protected:
_tempUnits.clear();
}
else
LOG(error) << "Analyzer " + this->_name + ": cannot retrieve job data!";
LOG(error) << "Operator " + this->_name + ": cannot retrieve job data!";
} catch(const exception& e) {
LOG(error) << "Analyzer " + this->_name + ": internal error " + e.what() + " during computation!";
LOG(error) << "Operator " + this->_name + ": internal error " + e.what() + " during computation!";
_unitAccess.store(false);
}
if (this->_timer && this->_keepRunning) {
this->_timer->expires_at(timestamp2ptime(this->nextReadingTime()));
this->_pendingTasks++;
this->_timer->async_wait(bind(&JobAnalyzerTemplate::computeAsync, this));
this->_timer->async_wait(bind(&JobOperatorTemplate::computeAsync, this));
}
this->_pendingTasks--;
}
......@@ -351,4 +351,4 @@ protected:
};
#endif //PROJECT_JOBANALYZERTEMPLATE_H
#endif //PROJECT_JOBOPERATORTEMPLATE_H
//================================================================================
// Name : AnalyzerConfiguratorInterface.h
// Name : OperatorConfiguratorInterface.h
// Author : Alessio Netti
// Contact : info@dcdb.it
// Copyright : Leibniz Supercomputing Centre
// Description : Interface to configurators for data analyzer plugins.
// Description : Interface to configurators for operator plugins.
//================================================================================
//================================================================================
......@@ -25,44 +25,44 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
#ifndef PROJECT_ANALYZERCONFIGURATORINTERFACE_H
#define PROJECT_ANALYZERCONFIGURATORINTERFACE_H
#ifndef PROJECT_OPERATORCONFIGURATORINTERFACE_H
#define PROJECT_OPERATORCONFIGURATORINTERFACE_H
#include <string>
#include <vector>
#include "QueryEngine.h"
#include "AnalyzerInterface.h"
#include "OperatorInterface.h"
#include "globalconfiguration.h"
/**
* @brief Interface to configurators for data analyzer plugins
* @brief Interface to configurators for operator plugins
*
* @details This interface is the one exposed outside of the .dll library
* containing a plugin. Classes implementing this interface must
* perform configuration and instantiation of Analyzers objects, which
* perform configuration and instantiation of Operator objects, which
* are made accessible externally.
*
* @ingroup analyzer
* @ingroup operator
*/
class AnalyzerConfiguratorInterface {
class OperatorConfiguratorInterface {
public:
/**
* @brief Class constructor
*/
AnalyzerConfiguratorInterface() {}
OperatorConfiguratorInterface() {}
/**
* @brief Class destructor
*/
virtual ~AnalyzerConfiguratorInterface() {}
virtual ~OperatorConfiguratorInterface() {}
/**
* @brief Reads a config file and instantiates analyzers
* @brief Reads a config file and instantiates operators
*
* This method will read the config file to which the input path points, and instantiate analyzer
* This method will read the config file to which the input path points, and instantiate operator
* objects accordingly. This method must be implemented in derived classes.
*
* @param cfgPath Path of the input config file
......@@ -73,7 +73,7 @@ public:
/**
* @brief Repeats the configuration of the plugin
*
* This method will stop and clear all analyzers that were created, and repeats the configuration,
* This method will stop and clear all operators that were created, and repeats the configuration,
* by reading the file once again. This method must be implemented in derived classes.
*
* @return True if successful, false otherwise
......@@ -83,14 +83,14 @@ public:
/**
* @brief Clears the plugin configuration
*
* This method will stop and clear all analyzers that were created, returning the plugin to its
* This method will stop and clear all operators that were created, returning the plugin to its
* uninitialized state.
*
*/
virtual void clearConfig() = 0;
/**
* @brief Sets a structure containing global settings to be used during analyzer creation This
* @brief Sets a structure containing global settings to be used during operator creation This
* method must be implemented in derived classes.
*
*
......@@ -99,14 +99,14 @@ public:
virtual void setGlobalSettings(const pluginSettings_t& pluginSettings) = 0;
/**
* @brief Returns a vector of analyzers
* @brief Returns a vector of operators
*
* This method will return the internal vector of AnalyzerInterface objects, granting access
* This method will return the internal vector of OperatorInterface objects, granting access
* to their units and output sensors. This method must be implemented in derived classes.
*
* @return a vector of pointers to AnalyzerInterface objects
* @return a vector of pointers to OperatorInterface objects
*/
virtual std::vector<AnalyzerPtr>& getAnalyzers() = 0;
virtual std::vector<OperatorPtr>& getOperators() = 0;
/**
* @brief Prints the current plugin configuration
......@@ -122,9 +122,9 @@ protected:
};
// Typedefs for readable usage of create() and destroy() methods, required for dynamic libraries
typedef AnalyzerConfiguratorInterface* an_create_t();
typedef void