43 lines
849 B
C++
Executable File
43 lines
849 B
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* main for ComponentMonitor
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#include <nglapplication/nglcoreapplication.h>
|
|
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
|
|
|
#include "main_handler.h"
|
|
#include "logger.h"
|
|
#include "settings.h"
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
NGLCoreApplication app(argc, argv);
|
|
|
|
LtsCommandLineParser::LtsCommandLineParser options;
|
|
if (!options.init())
|
|
return -1;
|
|
app.createLogger("CMO", options.exerciseId());
|
|
|
|
ComponentMonitor::Settings::setIniFile(options.iniFile());
|
|
|
|
int iRet = -3;
|
|
{
|
|
std::unique_ptr<ComponentMonitor::MainHandler> mainHandler(new ComponentMonitor::MainHandler);
|
|
|
|
if (!mainHandler->init(options.domainId()))
|
|
return iRet;
|
|
|
|
STARTUP_LOG(app.baseLogger());
|
|
|
|
iRet = app.exec();
|
|
|
|
SHUTDOWN_LOG(app.baseLogger());
|
|
}
|
|
|
|
return iRet;
|
|
}
|