123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- /*
- * @Description:
- * @Version: 1.0
- * @Autor: lishengyin
- * @Date: 2022-04-06 08:46:22
- * @LastEditors: lishengyin
- * @LastEditTime: 2022-06-15 17:00:16
- */
- #ifndef __USERAPP_HPP_
- #define __USERAPP_HPP_
- #include "ins_base.hpp"
- #include "Util/logger.h"
- #include "Util/NoticeCenter.h"
- #include "GetCenter.hpp"
- #include "ProcessingIt.hpp"
- #include "TaskCenter.hpp"
- #include "Disposition.hpp"
- #include "dataTypeList.hpp"
- #include <iostream>
- #include "ins_version.hpp"
- #include "Inspector.hpp"
- #include "Sectorpower.hpp"
- #include <drogon/drogon.h>
- using namespace std;
- using namespace toolkit;
- namespace ins
- {
- class userApp: public Module
- {
- private:
- userApp() : Module("userApp"){
- }
-
- public:
- using Ptr = std::shared_ptr<userApp>;
- /**
- * @description: 创建新的实例
- * @param {*}
- * @return {*}
- */
- static std::shared_ptr<userApp> CreateNew();
- /**
- * @description: 获取ptr
- * @param {*}
- * @return {*}
- */
- static std::shared_ptr<userApp> getPtr();
-
- ~userApp(){this->Destroy();}
- /**
- * @description: 初始化
- * @param {string} Name
- * @return {*}
- */
- int8_t Init(std::string Name);
- /**
- * @description: 初始化
- * @param {*}
- * @return {*}
- */
- int8_t Init() override;
- /**
- * @description: 释放资源
- * @param {*}
- * @return {*}
- */
- void Destroy() override;
- /**
- * @description: 是否正常
- * @param {*}
- * @return {*}
- */
- bool isNormally() override{
- return true;
- }
-
- /**
- * @description: 开始任务
- * @return {*}
- */
- int8_t StartTask();
- private:
- std::string appName = "";
-
- // 配置中心
- Disposition::Ptr m_disposition = nullptr;
- // 数据中心
- GetCenter::Ptr m_getCenter = nullptr;
-
- // 任务中心
- TaskCenter::Ptr m_taskCenter = nullptr;
- };
- } // namespace INS
- #endif
|