#include #include #include #include #include ProxyTestICEI::ProxyTestICEI() { this->logger_ = std::make_unique("ProxyTest_icei"); string proxyName = "baosight/pyml"; send2pyml_ = ProxyMag::GetAppICEPrx(proxyName); // send2pyml_ = // ProxyMag::GetAppICEPrx("baosight/pyml:tcp -h 192.1.130.25 -p 12011"); } ProxyTestICEI::~ProxyTestICEI() {} void baosight::ProxyTestICEI::SendDataShort(::Ice::Int eventNo, const ::Ice::ByteSeq& seq, ::Ice::Int length, const Ice::Current& current) { if (eventNo == 13) { logger_->Debug() << "Test:" << eventNo << ",size:" << seq.size() << endl; } // string data(seq.begin(), seq.end()); logger_->Info() << "ProxyTestICEI::SendDataShort:" << endl; // send2pyml_->SendDataShort(eventNo, seq, length); // logger_->Info() << "ProxyTestICEI::SendDataShort 结束!" << endl; } void baosight::ProxyTestICEI::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::ProxyTestICEI::TimeNotify(::Ice::Int eventNo, const ::Ice::ByteSeq& seq, const Ice::Current& current) { logger_->Debug() << "ProxyTest" << endl; // string proxyName = "baosight/ptest1"; // string keyValue = "ProxyTest 2 baosight/ptest1!"; // int length = keyValue.size(); // ::Ice::ByteSeq sendData((unsigned char*)keyValue.c_str(), // (unsigned char*)keyValue.c_str() + length); // ProxyMag::GetAppICEPrx(proxyName)->SendDataShort(eventNo, sendData, // sendData.size()); }