42 lines
780 B
C
42 lines
780 B
C
|
|
/**
|
||
|
|
* 识别结果上传web
|
||
|
|
* */
|
||
|
|
|
||
|
|
#ifndef DATATOFTPSRVENGINE_H
|
||
|
|
#define DATATOFTPSRVENGINE_H
|
||
|
|
|
||
|
|
#include "AppCommon.h"
|
||
|
|
#include "Config.h"
|
||
|
|
#include "EngineBase.h"
|
||
|
|
#include "EngineFactory.h"
|
||
|
|
#include "json/json.h"
|
||
|
|
#include "httplib.h"
|
||
|
|
|
||
|
|
using namespace ai_matrix;
|
||
|
|
|
||
|
|
class HttpUpResultEngine : public ai_matrix::EngineBase
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
HttpUpResultEngine();
|
||
|
|
~HttpUpResultEngine();
|
||
|
|
|
||
|
|
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);
|
||
|
|
bool getToken();
|
||
|
|
|
||
|
|
std::string webToken; //授权信息
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
ENGINE_REGIST(HttpUpResultEngine)
|
||
|
|
|
||
|
|
#endif
|