/** * @RDE_HEADER@ * main for VulnerabilityStateGenerator * $Id$ * $HeadURL$ * $Author$ * Created by Hannes Baeuerle, SLSE, 2016-08-09 */ #include #include #include #include #include #include #include "main_handler.h" class CmdLineParser : public LtsCommandLineParser::LtsCommandLineParser { public: CmdLineParser() : LtsCommandLineParser() { } }; int main(int argc, char **argv) { NGLCoreApplication app(argc, argv); CmdLineParser options; if (!options.init()) return -1; // Check alle 30 Sekunden app.createLogger("VSG ", "log4cxx_vsg.props"); VulnerabilityStateGenerator::MainHandler mainHandler; NGL::INGLLogger &logger = app.logger("main"); int iRet = -1; if (!mainHandler.init(options.domainId(), options.exerciseId())) { ERROR_LOG(logger) << "Could not init MainHandler\n" << "Please make shure, that the following procs are running:\n" << "svcParticipantManagement -d " << options.domainId() << " -e 0\n" << "svcParticipantManagement -d " << options.domainId() << " -e " << options.exerciseId() << "\n" << "... shutting down"; return iRet; } STARTUP_LOG(logger); iRet = app.exec(); SHUTDOWN_LOG(logger); return iRet; }