46 lines
901 B
C++
46 lines
901 B
C++
/**
|
|
* 识别结果上传web
|
|
* */
|
|
|
|
#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"
|
|
#include "ToWeb.h"
|
|
|
|
using namespace ai_matrix;
|
|
|
|
class UpDeviceStatusEngine : public ai_matrix::EngineBase
|
|
{
|
|
public:
|
|
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_;
|
|
|
|
// bool upWeb(std::shared_ptr<TrainInfo> pTrainInfo, int retransmission = 0);
|
|
bool getToken();
|
|
|
|
// 获取内存使用百分比
|
|
float getMemUsagePercent();
|
|
|
|
std::string webToken; //授权信息
|
|
|
|
};
|
|
|
|
ENGINE_REGIST(UpDeviceStatusEngine)
|
|
|
|
#endif
|