#ifndef __HEPUPLUGHIN_HPP_ #define __HEPUPLUGHIN_HPP_ #include #include #include #include "UtilBase.hpp" #include "Util/util.h" #include "Util/logger.h" #include "Util/TimeTicker.h" #include "Util/NoticeCenter.h" #include "config.hpp" #include "requests.hpp" #include "Hepu.hpp" #include "PluginSubscriber.hpp" #define HEPU_USR "sunwin" #define HEPU_IP "0.0.0.0" #define HEPU_PORT 80 using namespace std; using namespace toolkit; namespace gsd { class HepuPlugin: public PluginSubscriber, public PluginBase { private: HepuPlugin(): PluginBase(){ } public: using Ptr = std::shared_ptr; static std::shared_ptr getPtr(); bool Init(); bool StartTask(); void Destroy(); void HBThrd(); void SendTarget(HepuTarget& HepuTargetMsg); void SendTarget2(HepuTarget2& HepuTargetMsg); bool Alive(); virtual bool RestPlugin(); ~HepuPlugin(){} protected: std::shared_ptr m_hepuClient = nullptr; std::shared_ptr pool = nullptr; bool stop_ = false; }; } #endif