You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.0 KiB

#include "kernelModule.h"
#ifdef USE_MYSQL
#include "MySQL_dataBinder.h"
#else
#include "SQLite_dataBinder.h"
#endif
// Not registered for events here: the derived module's members are not built yet. The module factory
// calls attachEvents() once the module is constructed; each module calls detachEvents() first thing in
// its destructor.
kernelModule::kernelModule(uint32_t id, KERNEL_MODULE_TYPE type) :
basicEventHandler(false),
basicEngine()
{
m_pLog = basicLogCollection::getInstance();
#ifdef USE_MYSQL
m_pDBC = mysqlDBC::getInstance();
#else
m_pDBC = sqliteDBC::getInstance();
#endif
// m_pKernel = argusKernel::getInstance();
m_eType = type;
m_nDBID = id;
m_bDetached = false;
m_bEnabled = false;
m_nDBAUXID = 0;
// Clear Events flags
if (m_pDBC)
{
DBC_MODULE_DATA * tData = NULL;
tData = m_pDBC->getModuleData(m_nDBID);
if (tData)
{
m_nDBAUXID = tData->aux_id;
m_bEnabled = tData->enabled;
free(tData);
};
};
for (int i = 0; i < EVT_COUNT; i++)
{
m_bEvtFlags[i] = false;
}
}
kernelModule::~kernelModule() {}