59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
|
|
#include <zad/ZadICEI.h>
|
||
|
|
#include <log4cplus/LOG.h>
|
||
|
|
#include <dao/DbStandardDBAX.h>
|
||
|
|
#include <zad/DataAlarm.h>
|
||
|
|
ZadICEI::ZadICEI()
|
||
|
|
{
|
||
|
|
LOG d("ZadICEI::ZadICEI()");
|
||
|
|
mp_decision = new decision();
|
||
|
|
mp_alarm = new DataAlarm();
|
||
|
|
// mp_auto = new AutoRate();
|
||
|
|
// mp_btele = new BinaryTele(2000,"T_LOV_FDAAITEM");
|
||
|
|
// zhd_proxy = ProxyMag::GetAppICEPrx("baosight/zhd");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
ZadICEI::~ZadICEI()
|
||
|
|
{
|
||
|
|
delete mp_decision;
|
||
|
|
delete mp_alarm;
|
||
|
|
// delete mp_btele;
|
||
|
|
}
|
||
|
|
void baosight::ZadICEI::SendDataShort(::Ice::Int eventNo,
|
||
|
|
const ::Ice::ByteSeq& seq,
|
||
|
|
::Ice::Int length,
|
||
|
|
const Ice::Current& current)
|
||
|
|
{
|
||
|
|
LOG d("ZadICEI::SendDataShort()");
|
||
|
|
d.Info()<<"eventNo:"<<eventNo<<endl;
|
||
|
|
int ret = mp_decision->dispatch(eventNo,seq);
|
||
|
|
d.Info()<<"ret: "<<ret<<endl;
|
||
|
|
if(ret == 0)
|
||
|
|
{
|
||
|
|
DbStandardDBAX().dbCommit();
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
DbStandardDBAX().dbRollback();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
void baosight::ZadICEI::SendDataLong(::Ice::Int eventNo,
|
||
|
|
const ::Ice::ByteSeq& seq,
|
||
|
|
::Ice::Int length,
|
||
|
|
const ::std::string& sender,
|
||
|
|
const ::std::string& reciver,
|
||
|
|
const ::std::string& aditional,
|
||
|
|
const Ice::Current& current)
|
||
|
|
{
|
||
|
|
LOG d("ZadICEI::SendDataLong");
|
||
|
|
int ret = -1;
|
||
|
|
}
|
||
|
|
void baosight::ZadICEI::TimeNotify(::Ice::Int eventNo,
|
||
|
|
const ::Ice::ByteSeq& seq,
|
||
|
|
const Ice::Current& current)
|
||
|
|
{
|
||
|
|
LOG d("ZadICEI::TimeNotify");
|
||
|
|
mp_alarm->baseAlarm();
|
||
|
|
// mp_auto->CenAuto();
|
||
|
|
}
|