Changeset 152 in pacpusframework for branches


Ignore:
Timestamp:
Aug 1, 2013, 10:45:50 AM (11 years ago)
Author:
Marek Kurdej
Message:

Major update.
Renamed: addInput -> addInputs, addOutput -> addOutputs and made pure virtual (=0).
Transformed macro definitions into template methods: ADD_INPUT -> ComponentBase::addInput, ADD_OUTPUT -> ComponentBase::addOutput, GET_INPUT -> ComponentBase::getTypedInput, GET_OUTPUT -> ComponentBase::getTypedOutput.
Fixed: added public/protected set/get methods in ComponentBase, made member fields private.

Location:
branches/2.0-beta1
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0-beta1/include/Pacpus/DbitePlayer/DbtPlyEngine.h

    r89 r152  
    9191
    9292protected:
     93    virtual void addInputs();
     94    virtual void addOutputs();
     95
    9396    /// @todo Documentation
    9497    virtual void startActivity();
  • branches/2.0-beta1/include/Pacpus/DbitePlayer/DbtPlyTrigger.h

    r89 r152  
    5555
    5656protected:
     57    virtual void addInputs();
     58    virtual void addOutputs();
     59
    5760    /// @todo Documentation
    5861    virtual void startActivity();
  • branches/2.0-beta1/include/Pacpus/DbitePlayer/DbtPlyUserInterface.h

    r89 r152  
    7373    /// Displays the current time of the player.
    7474    void displayTime(road_time_t time);
     75   
     76protected:
     77    virtual void addInputs();
     78    virtual void addOutputs();
    7579
    7680private:
  • branches/2.0-beta1/include/Pacpus/PacpusTools/PacpusSerialPort.h

    r122 r152  
    2020namespace pacpus {
    2121
    22 class PacpusSerialPort : public QObject, public ComponentBase
     22class PacpusSerialPort
     23    : public QObject
     24    , public ComponentBase
    2325{
    2426    Q_OBJECT
    2527   
    2628public:
    27 
    28     typedef enum { ASCII, BINARY } DataMode;
     29    typedef enum {
     30        ASCII,
     31        BINARY
     32    } DataMode;
    2933
    3034    PacpusSerialPort(QString name);
     
    3640    ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
    3741
    38     void addInput();
    39     void addOutput();
     42    virtual void addInputs();
     43    virtual void addOutputs();
    4044    void processInputFrame(const QByteArray &);
    4145
    42 private Q_SLOTS :
     46private Q_SLOTS:
    4347    void readData();
    4448
    4549private:
    46 
    4750    QThread       thread_;
    4851
     
    6871
    6972    bool log;
    70 
    71 
    7273};
    7374
  • branches/2.0-beta1/include/Pacpus/kernel/ComponentBase.h

    r138 r152  
    3838class ComponentManager;
    3939
     40template <typename T, class C>
     41class InputInterface;
     42
     43template <typename T, class C>
     44class OutputInterface;
     45
    4046/** ComponentBase
    4147 * @brief Base class of a Pacpus component.
     
    4450{
    4551    friend class ComponentManager;
     52
    4653public:
    4754    /**
     
    8794     * @return Name of the component.
    8895     */
     96    QString name() const;
    8997    QString getName() const;
    9098
    91     InputInterfaceBase * getInput(QString) const;
    92 
    93     OutputInterfaceBase * getOutput(QString) const;
     99    InputInterfaceBase * getInput(QString name) const;
     100
     101    OutputInterfaceBase * getOutput(QString name) const;
    94102
    95103protected:
     
    115123    // virtual QString getType() = 0;
    116124
    117     virtual void addInput();
    118 
    119     virtual void addOutput();
     125    virtual void addInputs() = 0;
     126    virtual void addOutputs() = 0;
     127
     128protected:
     129    typedef QMap<QString, InputInterfaceBase *> InputsMap;
     130    typedef QMap<QString, OutputInterfaceBase *> OutputsMap;
     131
     132    // TODO: use std::function<void (const DataType &)>
     133    // TODO: use std::mem_fun<void (const DataType &)>
     134    template <typename DataType, class ComponentType, typename Function>
     135    void addInput(const char * name, Function function)
     136    {
     137        typedef InputInterface<DataType, ComponentType> InputType;
     138        InputType * connection = new InputType(name, dynamic_cast<ComponentType *>(this), function);
     139        inputs().insert(name, connection);
     140    }
     141
     142    template <typename DataType, class ComponentType>
     143    void addOutput(const char * name)
     144    {
     145        typedef OutputInterface<DataType, ComponentType> OutputType;
     146        OutputType * connection = new OutputType(name, dynamic_cast<ComponentType *>(this));
     147        outputs().insert(name, connection);
     148    }
     149
     150    template <typename DataType, class ComponentType>
     151    InputInterface<DataType, ComponentType> *
     152        getTypedInput(const char * name) const
     153    {
     154        return dynamic_cast<InputInterface<DataType, ComponentType> *>(getInput(name));
     155    }
     156
     157    template <typename DataType, class ComponentType>
     158    OutputInterface<DataType, ComponentType> *
     159        getTypedOutput(const char * name) const
     160    {
     161        return dynamic_cast<OutputInterface<DataType, ComponentType> *>(getOutput(name));
     162    }
     163
     164    bool isActive() const;
     165    void setActive(bool isActive);
     166    bool isRecording() const;
     167    void setRecording(bool isRecording);
     168
     169    InputsMap & inputs();
     170    const InputsMap & inputs() const;
     171    OutputsMap & outputs();
     172    const OutputsMap & outputs() const;
     173
     174    COMPONENT_CONFIGURATION configurationState() const;
     175    void setConfigurationState(COMPONENT_CONFIGURATION state);
     176
     177    const XmlComponentConfig xmlParameters() const;
    120178   
    121 protected:
    122     /// The XML node that is got in the configureComponent method
    123     XmlComponentConfig param;
    124 
    125     /// the name of the component. It is this one in the XML config file
    126     QString componentName;
    127 
    128     /// is the component is recording data?
    129     bool recording;
    130 
    131     /// provided for compatibility with old DBITE framework
    132     bool THREAD_ALIVE;
    133 
    134     /// is the component active?
    135     bool mIsActive;
    136 
    137     /// a pointer to the manager of components
    138     ComponentManager * mgr;
    139 
    140     QMap<QString, InputInterfaceBase *> input;
    141     QMap<QString, OutputInterfaceBase *> output;
    142 
    143     /// a pointer to an optional widget
    144     QWidget *   ui;
    145 
    146179private:
    147180    /// called by the ComponentManager to start the component
     
    151184    int stopComponent();
    152185
     186private:
     187    /// The XML node that is got in the configureComponent method
     188    XmlComponentConfig param;
     189
     190    /// the name of the component. It is this one in the XML config file
     191    QString m_componentName;
     192   
     193    /// is the component active?
     194    volatile bool m_isActive;
     195
     196    /// is the component is recording data?
     197    bool m_isRecording;
     198
     199    /// a pointer to the manager of components
     200    ComponentManager * m_manager;
     201
     202    InputsMap m_inputs;
     203    OutputsMap m_outputs;
     204
     205    /// a pointer to an optional widget
     206    QWidget * m_ui;
     207
    153208    /// store the state of the component
    154     COMPONENT_STATE componentState_;
     209    COMPONENT_STATE m_componentState;
    155210
    156211    /// is the component configured (ie configureComponent method was called)
    157     COMPONENT_CONFIGURATION configuration_;
     212    COMPONENT_CONFIGURATION m_configurationState;
    158213};
    159214
    160 
    161215} // pacpus
    162216
  • branches/2.0-beta1/include/Pacpus/kernel/InputOutputBase.h

    r148 r152  
    9696{
    9797    Q_OBJECT
     98
    9899protected:
    99100    InputInterfaceBase(QString name, ComponentBase * component, QObject * parent = 0)
  • branches/2.0-beta1/include/Pacpus/kernel/InputOutputInterface.h

    r148 r152  
    1212#include <QByteArray>
    1313
    14 #define ADD_INPUT(name,ComponentType, DataType, functionName)  input.insert(name,new InputInterface<DataType,ComponentType> (name,this,&ComponentType::functionName))
    15 #define ADD_OUTPUT(name,ComponentType, DataType)      output.insert(name,new OutputInterface<DataType,ComponentType> (name,this))
    16 
    17 #define GET_OUTPUT(name,ComponentType, DataType) dynamic_cast<OutputInterface<DataType,ComponentType> *> (output.value(name))
    18 #define GET_INPUT(name,ComponentType, DataType) dynamic_cast<InputInterface<DataType,ComponentType> *> (input.value(name))
     14//#define ADD_INPUT(name, ComponentType, DataType, functionName) \
     15//    inputs().insert((name), new InputInterface<DataType, ComponentType> ((name), this, &ComponentType::functionName))
     16//#define ADD_OUTPUT(name, ComponentType, DataType) \
     17//    outputs().insert((name), new OutputInterface<DataType, ComponentType> ((name), this))
     18
     19//#define GET_INPUT(name, ComponentType, DataType) \
     20//    dynamic_cast<InputInterface<DataType, ComponentType> *> (input.value(name))
     21//#define GET_OUTPUT(name, ComponentType, DataType) \
     22//    dynamic_cast<OutputInterface<DataType, ComponentType> *> (output.value(name))
    1923
    2024namespace pacpus {
    2125
    22 template <class T, class C>
     26template <typename T, class C>
    2327class InputInterface
    2428    : public InputInterfaceBase
     
    2630public:
    2731    InputInterface(QString name, C * component, void (C::*m)(const T&))
    28         : InputInterfaceBase(name,component,component)
     32        : InputInterfaceBase(name, component, component)
    2933        , method(m)
    3034    {}
     
    140144};
    141145
    142 template <class T, class C>
     146template <typename T, class C>
    143147class OutputInterface : public OutputInterfaceBase
    144148{
  • branches/2.0-beta1/src/DBITEPlayerLib/DbtPlyEngine.cpp

    r89 r152  
    2323DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyEngine");
    2424
    25 static const string kPropertyDataDirectory = "datadir";
    26 
    27 static const string kPropertyLoggerConfiguration = "log-config-file";
    28 
    29 static const string kPropertyReplayMode = "replay_mode";
    30 static const string kPropertyReplayModeLastData = "1";
    31 static const string kPropertyReplayModeAllData = "2";
     25static const char * kPropertyDataDirectory = "datadir";
     26
     27static const char * kPropertyLoggerConfiguration = "log-config-file";
     28
     29static const char * kPropertyReplayMode = "replay_mode";
     30static const char * kPropertyReplayModeLastData = "1";
     31static const char * kPropertyReplayModeAllData = "2";
    3232
    3333typedef float SpeedType;
     
    6363}
    6464
     65void DbtPlyEngine::addInputs()
     66{
     67    // empty: no inputs
     68}
     69
     70void DbtPlyEngine::addOutputs()
     71{
     72    // empty: no outputs
     73}
     74
    6575////////////////////////////////////////////////////////////////////////////////
    6676/// Returns the directory where the data are stored.
     
    103113    int i = 0;
    104114
    105     while (THREAD_ALIVE) {
     115    while (isActive()) {
    106116        tNow_ = road_time();
    107117        float elapsedTime = tNow_ - lastTNow_;
     
    145155/// Configuration method of the engine
    146156/// called automatically by the component manager
    147 ComponentBase::COMPONENT_CONFIGURATION DbtPlyEngine::configureComponent(XmlComponentConfig /*config*/)
     157ComponentBase::COMPONENT_CONFIGURATION DbtPlyEngine::configureComponent(XmlComponentConfig config)
    148158{
    149159    // datadir
    150     dataDir_ = param.getProperty(kPropertyDataDirectory.c_str());
    151     LOG_INFO("property " << kPropertyDataDirectory.c_str() << "=\""
     160    dataDir_ = config.getProperty(kPropertyDataDirectory);
     161    LOG_INFO("property " << kPropertyDataDirectory << "=\""
    152162             << dataDir_ << "\"");
    153163    if (dataDir_.isNull()) {
    154         LOG_FATAL("The data directory '" << componentName << "' is invalid or unavailable!");
     164        LOG_FATAL("The data directory '" << name() << "' is invalid or unavailable!");
    155165    }
    156166
     
    162172    ////////////////////////////////////////////////////////////////////////////////
    163173    // logger configuration
    164     QString loggerConfig = param.getProperty(kPropertyLoggerConfiguration.c_str());
    165     LOG_INFO("property " << kPropertyLoggerConfiguration.c_str() << "=\""
     174    QString loggerConfig = config.getProperty(kPropertyLoggerConfiguration);
     175    LOG_INFO("property " << kPropertyLoggerConfiguration << "=\""
    166176             << loggerConfig << "\"");
    167177    if (!loggerConfig.isNull()) {
     
    172182    ////////////////////////////////////////////////////////////////////////////////
    173183    // Replay Mode
    174     QString replayModeValue = param.getProperty(kPropertyReplayMode.c_str());
    175     LOG_INFO("property " << kPropertyReplayMode.c_str() << "=\""
     184    QString replayModeValue = config.getProperty(kPropertyReplayMode);
     185    LOG_INFO("property " << kPropertyReplayMode << "=\""
    176186             << replayModeValue << "\"");
    177187    if (replayModeValue.isNull()) {
    178         LOG_INFO("property " << kPropertyReplayMode.c_str() << " unset."
     188        LOG_INFO("property " << kPropertyReplayMode << " unset."
    179189                 << " Set to default = 1.");
    180190        replayMode_ = PlayModeLastData;
     
    185195            replayMode_ = PlayModeAllData;
    186196        } else {
    187             LOG_WARN("unknown " << kPropertyReplayMode.c_str() << " '" << replayModeValue << "'."
     197            LOG_WARN("unknown " << kPropertyReplayMode << " '" << replayModeValue << "'."
    188198                     << " Set to default = 1.");
    189199            replayMode_ = PlayModeLastData;
     
    200210    LOG_INFO("Starting...");
    201211
    202     THREAD_ALIVE = true;
     212    setActive(true);
    203213    start();
    204214}
     
    210220    LOG_TRACE("stopping activity...");
    211221
    212     THREAD_ALIVE = false;
     222    setActive(false);
    213223}
    214224
  • branches/2.0-beta1/src/DBITEPlayerLib/DbtPlyFileManager.cpp

    r141 r152  
    2121DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyFileManager");
    2222
    23 const string kPropertyVerbose = "verbose";
     23const char * kPropertyVerbose = "verbose";
    2424const int kPropertyVerboseDefaultValue = 1;
    2525
    26 const string kPropertyDbiteFileName = "dbt";
     26const char * kPropertyDbiteFileName = "dbt";
    2727
    2828// It is the maximum time elapsed between the computation of the tDbt and the data replay in microseconds
     
    3131////////////////////////////////////////////////////////////////////////////////
    3232/// Constructor.
    33 DbtPlyFileManager::DbtPlyFileManager(QString name):ComponentBase(name)
     33DbtPlyFileManager::DbtPlyFileManager(QString name)
     34    : ComponentBase(name)
    3435{
    3536    LOG_TRACE("constructor");
     
    8586    /////////////////////////////////////////
    8687    {
    87         QString verbose = param.getProperty(kPropertyVerbose.c_str());
     88        QString verbose = config.getProperty(kPropertyVerbose);
    8889        if (verbose.isNull()) {
    8990            LOG_INFO("property " << kPropertyVerbose << " not set."
     
    103104
    104105    /////////////////////////////////////////
    105     dbtProperty_ = param.getProperty(kPropertyDbiteFileName.c_str());
    106     mShowGui = param.getProperty("ui").toInt();
     106    dbtProperty_ = config.getProperty(kPropertyDbiteFileName);
     107    mShowGui = config.getProperty("ui").toInt();
    107108    mDbtDataPath = mEngine->getDataDir();
    108109
     
    180181void DbtPlyFileManager::displayUI()
    181182{
    182     LOG_WARN("component '" << componentName << "' has no user interface. Please set ui property to 0 in your XML configuration");
     183    LOG_WARN("component '" << name() << "' has no user interface. Please set ui property to 0 in your XML configuration");
    183184}
    184185
     
    300301    deltaTDbtTab_[(deltaTDbtTabLoop_++)%1000] = deltaT;
    301302    if (deltaT > kMaxPendingTimeFromEngineMicrosecs) {
    302         LOG_WARN(componentName << ": data not replayed: elapsed time since engine notification too big:" << deltaT << "us");
     303        LOG_WARN(name() << ": data not replayed: elapsed time since engine notification too big:" << deltaT << "us");
    303304        return;
    304305    }
  • branches/2.0-beta1/src/DBITEPlayerLib/DbtPlyTrigger.cpp

    r89 r152  
    2121    , mEngine(NULL)
    2222{
    23     THREAD_ALIVE = false;
    2423}
    2524
    2625DbtPlyTrigger::~DbtPlyTrigger()
    2726{
     27}
     28
     29void DbtPlyTrigger::addInputs()
     30{
     31    // empty: no inputs
     32}
     33
     34void DbtPlyTrigger::addOutputs()
     35{
     36    // empty: no outputs
    2837}
    2938
     
    4655void DbtPlyTrigger::startActivity()
    4756{   
    48     THREAD_ALIVE = true;
    4957    start();
    5058}
     
    5260void DbtPlyTrigger::stopActivity()
    5361{
    54     THREAD_ALIVE = false;
    5562}
    5663
     
    6269#endif
    6370
    64     while(THREAD_ALIVE) {
     71    while(isActive()) {
    6572        if (mEngine->isPlaying()) {
    6673            Q_EMIT triggerSig();
  • branches/2.0-beta1/src/DBITEPlayerLib/DbtPlyUserInterface.cpp

    r89 r152  
    4848}
    4949
     50void DbtPlyUserInterface::addInputs()
     51{
     52    // empty: no inputs
     53}
     54
     55void DbtPlyUserInterface::addOutputs()
     56{
     57    // empty: no outputs
     58}
     59
    5060////////////////////////////////////////////////////////////////////////////////
    5161ComponentBase::COMPONENT_CONFIGURATION DbtPlyUserInterface::configureComponent(XmlComponentConfig /*config*/)
  • branches/2.0-beta1/src/PacpusLib/ComponentBase.cpp

    r120 r152  
    1313DECLARE_STATIC_LOGGER("pacpus.core.ComponentBase");
    1414
    15 ComponentBase::ComponentBase(const QString& name)
    16   : componentName(name)
    17   , recording(true)
    18   , THREAD_ALIVE(true)
    19   , mIsActive(false)
    20   , mgr(NULL)
    21   , componentState_(NOT_MONITORED)
    22   , ui(NULL)
     15ComponentBase::ComponentBase(const QString& componentName)
     16  : m_componentName(componentName)
     17  , m_isActive(false)
     18  , m_isRecording(true)
     19  , m_manager(NULL)
     20  , m_ui(NULL)
     21  , m_componentState(NOT_MONITORED)
    2322{
    2423    LOG_TRACE("constructor");
    2524    // Get a pointer on the instance of ComponentManager.
    26     mgr = ComponentManager::getInstance();
    27     LOG_INFO("component " << componentName << " was created");
     25    m_manager = ComponentManager::getInstance();
     26    LOG_INFO("component " << name() << " was created");
    2827}
    2928
     
    3332}
    3433
     34bool ComponentBase::isActive() const
     35{
     36    return m_isActive;
     37}
     38
     39void ComponentBase::setActive(bool isActive)
     40{
     41    m_isActive = isActive;
     42}
     43
     44bool ComponentBase::isRecording() const
     45{
     46    return m_isRecording;
     47}
     48
     49void ComponentBase::setRecording(bool isRecording)
     50{
     51    m_isRecording = isRecording;
     52}
     53
     54const XmlComponentConfig ComponentBase::xmlParameters() const
     55{
     56    return param;
     57}
     58
    3559int ComponentBase::startComponent()
    3660{
    37     if (mIsActive)
    38       return false;
    39      
    40     mIsActive = true;
     61    if (isActive()) {
     62        LOG_DEBUG("component already started, cannot (re-)start");
     63        return false;
     64    }
     65
     66    setActive(true);
    4167    startActivity();
    4268   
     
    4672int ComponentBase::stopComponent()
    4773{
    48     if (!mIsActive)
    49       return false;
    50 
    51     mIsActive = false;
     74    if (!isActive()) {
     75        LOG_DEBUG("component already stopped, cannot (re-)stop");
     76        return false;
     77    }
     78   
     79    setActive(false);
    5280    stopActivity();
    5381   
     
    5785void ComponentBase::setState(const COMPONENT_STATE state)
    5886{
    59     componentState_ = state;
     87    m_componentState = state;
    6088}
    6189
     
    6391ComponentBase::COMPONENT_STATE ComponentBase::getState()
    6492{
    65     COMPONENT_STATE state = componentState_;
    66     if (ComponentBase::NOT_MONITORED != componentState_) {
    67         componentState_ = ComponentBase::MONITOR_NOK;
     93    COMPONENT_STATE state = m_componentState;
     94    if (ComponentBase::NOT_MONITORED != m_componentState) {
     95        m_componentState = ComponentBase::MONITOR_NOK;
    6896    }
    6997    return state;
    7098}
    7199
     100ComponentBase::COMPONENT_CONFIGURATION ComponentBase::configurationState() const
     101{
     102    return m_configurationState;
     103}
     104
     105void ComponentBase::setConfigurationState(COMPONENT_CONFIGURATION state)
     106{
     107    m_configurationState = state;
     108}
     109
    72110bool ComponentBase::isConfigured() const
    73111{
    74     return configuration_ == CONFIGURED_OK;
     112    return (m_configurationState == CONFIGURED_OK);
     113}
     114
     115QString ComponentBase::name() const
     116{
     117    return m_componentName;
    75118}
    76119
    77120QString ComponentBase::getName() const
    78121{
    79      return componentName;
     122    return m_componentName;
     123}
     124
     125ComponentBase::InputsMap & ComponentBase::inputs()
     126{
     127    return m_inputs;
     128}
     129
     130const ComponentBase::InputsMap & ComponentBase::inputs() const
     131{
     132    return m_inputs;
     133}
     134
     135ComponentBase::OutputsMap & ComponentBase::outputs()
     136{
     137    return m_outputs;
     138}
     139
     140const ComponentBase::OutputsMap & ComponentBase::outputs() const
     141{
     142    return m_outputs;
    80143}
    81144
    82145InputInterfaceBase * ComponentBase::getInput(QString inputName) const
    83146{
    84 
    85     if(input.contains(inputName))
    86         return input[inputName];
    87     else {
    88         LOG_WARN("Component " << componentName << " does not containt input " << inputName);
    89         return NULL;
     147    if (inputs().contains(inputName)) {
     148        return inputs()[inputName];
    90149    }
     150    LOG_WARN("Component " << name() << " does not contain input " << inputName);
     151    return NULL;
    91152}
    92153
     
    97158        LOG_INFO("Key : " << keys[i])*/;
    98159
    99     if(output.contains(outputName))
    100         return output[outputName];
    101     else {
    102         LOG_WARN("Component " << componentName << " does not containt output " << outputName);
    103         return NULL;
     160    if (outputs().contains(outputName)) {
     161        return outputs()[outputName];
    104162    }
     163    LOG_WARN("Component " << name() << " does not containt output " << outputName);
     164    return NULL;
    105165}
    106 
    107 void ComponentBase::addInput()
    108 {
    109 
    110 }
    111 
    112 void ComponentBase::addOutput()
    113 {
    114 
    115 }
  • branches/2.0-beta1/src/PacpusLib/ComponentManager.cpp

    r146 r152  
    254254        } else {
    255255            component->param.localCopy(cfg.qDomElement());
    256             component->configuration_ = component->configureComponent(cfg);
     256            component->setConfigurationState(component->configureComponent(cfg));
    257257        }
    258258    } // for
     
    267267            LOG_WARN("component '" << componentName << "' does not exist");
    268268        } else {
    269            // Pacpus 2.0 : add input and output
    270             component->addInput();
    271             component->addOutput();
    272 
    273             if (component->configuration_ == ComponentBase::CONFIGURATION_DELAYED) {
     269           // Pacpus 2.0 : add inputs and outputs
     270            component->addInputs();
     271            component->addOutputs();
     272
     273            if (ComponentBase::CONFIGURATION_DELAYED == component->configurationState()) {
    274274                LOG_DEBUG("try to configure component '" << componentName << "'");
    275275
    276276                // copy locally the config parameters of the component
    277277                component->param.localCopy(cfg.qDomElement());
    278                 component->configuration_ = component->configureComponent(cfg);
     278                component->setConfigurationState(component->configureComponent(cfg));
    279279            }
    280280
    281             if (component->configuration_ == ComponentBase::CONFIGURED_OK) {
     281            if (ComponentBase::CONFIGURED_OK == component->configurationState()) {
    282282                --componentsToConfigureCount;
    283283            } else {
     
    286286                          << ". It was not configured, please review your configuration and/or your component"
    287287                          );
    288                 component->configuration_ = ComponentBase::CONFIGURED_FAILED;
     288                component->setConfigurationState(ComponentBase::CONFIGURED_FAILED);
    289289            }
    290290        }
Note: See TracChangeset for help on using the changeset viewer.