eis/TestProject/DCR/DCR.cc

33 lines
868 B
C++
Raw Normal View History

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