#include #include #include #include #include ZmqcICEI::ZmqcICEI() { LOG d("ZmqcICEI::ZmqcICEI()"); d.Info() << "start!" << endl; ConfigMag configmag("CRGS"); string server = configmag.ReadProperty("activemq", "server"); d.Info() << "server:" << server << endl; activemq::library::ActiveMQCPP::initializeLibrary(); // Handle tHDL = new // ConsumerMQ("failover:(tcp://10.10.67.237:61616)","/queue/reAlarm",0,"baosight/zinit"); // Handle tHDL3 = // new ConsumerMQ(server, "/queue/"+string(CMemVar::Const()->UnitNo)+"_staParams", 0, "baosight/eqpstats"); // IceUtil::ThreadControl tTC3 = tHDL3->start(); // Handle tHDL = // new ConsumerMQ(server, "/queue/"+string(CMemVar::Const()->UnitNo)+"_timeset", 0, "baosight/zinit"); // IceUtil::ThreadControl tTC = tHDL->start(); Handle tHDL4 = new ConsumerMQ(server, "/queue/"+string(CMemVar::Const()->UnitNo)+"_invokeModel", 0, "baosight/eqpalg-task"); IceUtil::ThreadControl tTC4 = tHDL4->start(); Handle tHDL2 = new ConsumerMQ(server, "/queue/"+string(CMemVar::Const()->UnitNo)+"_eqpalg", 0, "baosight/eqpalg-mon"); IceUtil::ThreadControl tTC2 = tHDL2->start(); Handle tHDL1 = new ConsumerMQ(server, "/queue/"+string(CMemVar::Const()->UnitNo)+"_repair", false, "baosight/eqpm"); IceUtil::ThreadControl tTC1 = tHDL1->start(); } ZmqcICEI::~ZmqcICEI() { LOG d("ZmqcICEI::~ZmqcICEI()"); activemq::library::ActiveMQCPP::shutdownLibrary(); } void ZmqcICEI::SendDataShort(::Ice::Int eventNo, const ::Ice::ByteSeq &seq, ::Ice::Int length, const Ice::Current ¤t) { LOG d("ZmqcICEI::SendDataShort()"); d.Info() << "eventNo:" << eventNo << " message" << endl; ; } void ZmqcICEI::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 ¤t) {} void ZmqcICEI::TimeNotify(::Ice::Int eventNo, const ::Ice::ByteSeq &seq, const Ice::Current ¤t) { LOG d("ZmqcICEI::TimeNotify()"); }