51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
|
|
#include <TestProject/DCR/DCR_icei.h>
|
|
#include <common/L2Event.h>
|
|
#include <dao/DbStandardDBAX.h>
|
|
#include <string>
|
|
#include <thread>
|
|
|
|
DCRICEI::DCRICEI() {
|
|
this->logger_ = std::make_unique<LOG>("DCR_icei");
|
|
snaps_ptr_ = std::make_unique<SnapShot>();
|
|
}
|
|
|
|
DCRICEI::~DCRICEI() {}
|
|
|
|
void baosight::DCRICEI::SendDataShort(::Ice::Int eventNo,
|
|
const ::Ice::ByteSeq& seq,
|
|
::Ice::Int length,
|
|
const Ice::Current& current) {
|
|
logger_->Info() << "DCRICEI::SendDataShort:" << endl;
|
|
}
|
|
|
|
void baosight::DCRICEI::SendDataLong(
|
|
::Ice::Int eventNo, const ::Ice::ByteSeq& seq, ::Ice::Int length,
|
|
const ::std::string& sender, const ::std::string& receiver,
|
|
const ::std::string& additional, const Ice::Current& current) {}
|
|
|
|
void baosight::DCRICEI::TimeNotify(::Ice::Int eventNo,
|
|
const ::Ice::ByteSeq& seq,
|
|
const Ice::Current& current) {
|
|
if (snaps_ptr_ != nullptr) {
|
|
// logger_->Debug() << "DCR,ihd is conneced:" << snaps_ptr_->is_connected()
|
|
// << "-----1----" << endl;
|
|
// logger_->Debug() << "DCR,ihd is conneced:" << snaps_ptr_->to_connect()
|
|
// << endl;
|
|
// logger_->Debug() << "DCR,ihd is conneced:" << snaps_ptr_->is_connected()
|
|
// << endl;
|
|
// snaps_ptr_->update_data(2020);
|
|
// logger_->Debug() << "snaps_ptr_->GetTagIDs:" << endl;
|
|
logger_->Debug() << "eventNo:" << eventNo
|
|
<< ",DCR,ihd is conneced:" << snaps_ptr_->to_connect()
|
|
<< endl;
|
|
|
|
if (eventNo > CMemVar::Const()->event_eis_end ||
|
|
eventNo < CMemVar::Const()->event_eis_start) {
|
|
logger_->Error() << "eventNo Error!---" << eventNo << std::endl;
|
|
return;
|
|
}
|
|
|
|
snaps_ptr_->update_data(eventNo);
|
|
}
|
|
} |