67 lines
1.3 KiB
C++
67 lines
1.3 KiB
C++
#include <zdp/ZdpICEI.h>
|
|
#include <log4cplus/LOG.h>
|
|
#include <dao/DbStandardDBAX.h>
|
|
#include <common/L2Event.h>
|
|
#include <common/typedefL1.h>
|
|
#include <dao/MaterialInfo.h>
|
|
#include <glob/GlobMem.h>
|
|
|
|
|
|
ZdpICEI::ZdpICEI()
|
|
{
|
|
LOG d("ZdpICEI::ZdpICEI()");
|
|
p_dproc = new DataProcess();
|
|
}
|
|
|
|
ZdpICEI::~ZdpICEI()
|
|
{
|
|
LOG d("ZdpICEI::~ZdpICEI()");
|
|
|
|
delete p_dproc;
|
|
p_dproc = NULL;
|
|
|
|
}
|
|
|
|
void baosight::ZdpICEI::SendDataShort(::Ice::Int eventNo,
|
|
const ::Ice::ByteSeq& seq,
|
|
::Ice::Int length,
|
|
const Ice::Current& current)
|
|
{
|
|
LOG d("ZdpICEI::SendDataShort()");
|
|
// d.Info()<<"eventNo:"<<eventNo<<endl;
|
|
|
|
// d.DebugHex((void*)&seq[0],seq.size());
|
|
int ret = p_dproc->dispatch(eventNo,seq);
|
|
|
|
|
|
if (ret < 0)
|
|
{
|
|
//DbStandardDBAX().dbRollback();
|
|
d.Error()<<"To deal with failure!\n"<<endl;
|
|
}
|
|
else
|
|
{
|
|
//DbStandardDBAX().dbCommit();
|
|
d.Info()<<"Processing is complete\n"<<endl;
|
|
}
|
|
}
|
|
|
|
void baosight::ZdpICEI::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)
|
|
{
|
|
}
|
|
|
|
void baosight::ZdpICEI::TimeNotify(::Ice::Int eventNo,
|
|
const ::Ice::ByteSeq& seq,
|
|
const Ice::Current& current)
|
|
{
|
|
LOG d("ZdpICEI::TimeNotify");
|
|
|
|
p_dproc->dispatch(eventNo,seq);
|
|
}
|