1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #ifndef __HEPUPLUGHIN_HPP_
- #define __HEPUPLUGHIN_HPP_
- #include <iostream>
- #include <ctime>
- #include <chrono>
- #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<HepuPlugin>, public PluginBase
- {
- private:
- HepuPlugin(): PluginBase(){
- }
- public:
- using Ptr = std::shared_ptr<HepuPlugin>;
- static std::shared_ptr<HepuPlugin> 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<Hepu> m_hepuClient = nullptr;
- std::shared_ptr<ThreadPool> pool = nullptr;
- bool stop_ = false;
- };
- }
- #endif
|