33 lines
868 B
C++
33 lines
868 B
C++
#include <TestProject/RNG/RNG.h>
|
|
#include <TestProject/RNG/RNG_icei.h>
|
|
#include <glob/GlobDefine.h>
|
|
#include <utility/IniProperty.h>
|
|
#include <memory>
|
|
#include <string>
|
|
#include "mix_cc/debug/pre_define.h"
|
|
|
|
using namespace baosight;
|
|
|
|
RNG::RNG() { logger_ = std::make_unique<LOG>("RNG"); }
|
|
|
|
RNG::~RNG() {}
|
|
|
|
int RNG::start() {
|
|
logger_->Info() << "-------RNG::start-------" << std::endl;
|
|
con_mag_ = std::make_shared<ConnectionMag>();
|
|
con_mag_->dbLogin();
|
|
try {
|
|
auto module_name = name();
|
|
RNG_server = new RNGICEI();
|
|
this->add(string("baosight/") + name(), RNG_server);
|
|
} catch (::Ice::LocalException& e) {
|
|
logger_->Error() << "Can not add baosight/RNG, error: " << e << endl;
|
|
return (-1);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
// PACE_SERVER_INSTALL(RNG) //应用程序主入口,传入参数为定义的类名
|
|
PACE_PLATFORM_SERVER_INSTALL(RNG, APPVERSION);
|