Train_RFID_Linux/engine/HttpEngine/UpDeviceStatusEngine.h

46 lines
901 B
C
Raw Normal View History

/**
* web
* */
2024-07-27 08:12:26 +00:00
#ifndef HTTPUPRESULTENGINE_H
#define HTTPUPRESULTENGINE_H
#include "AppCommon.h"
#include "Config.h"
#include "EngineBase.h"
#include "EngineFactory.h"
#include "json/json.h"
#include "httplib.h"
2024-07-27 08:12:26 +00:00
#include "ToWeb.h"
using namespace ai_matrix;
2024-07-27 08:12:26 +00:00
class UpDeviceStatusEngine : public ai_matrix::EngineBase
{
public:
2024-07-27 08:12:26 +00:00
UpDeviceStatusEngine();
~UpDeviceStatusEngine();
APP_ERROR Init() override;
APP_ERROR DeInit() override;
APP_ERROR Process() override;
private:
std::string strPort0_;
ai_matrix::BaseConfig baseConfig_;
ai_matrix::HttpServerConfig httpServerConfig_;
2024-07-27 08:12:26 +00:00
// bool upWeb(std::shared_ptr<TrainInfo> pTrainInfo, int retransmission = 0);
bool getToken();
2024-07-27 08:12:26 +00:00
// 获取内存使用百分比
float getMemUsagePercent();
std::string webToken; //授权信息
};
2024-07-27 08:12:26 +00:00
ENGINE_REGIST(UpDeviceStatusEngine)
#endif