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