123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #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);
- bool Alive();
- virtual bool RestPlugin();
- ~HepuPlugin(){}
- protected:
- std::shared_ptr<Hepu> m_hepuClient = nullptr;
- std::shared_ptr<ThreadPool> pool = nullptr;
- bool stop_ = false;
- };
- }
- #endif
|