2024-09-27 15:54:45 +08:00
|
|
|
#ifndef Hd_LogicDll_module_H
|
2024-09-27 14:31:22 +08:00
|
|
|
#define Hd_LogicDll_module_H
|
|
|
|
|
|
|
|
|
|
#include <QtCore/qglobal.h>
|
|
|
|
|
|
|
|
|
|
#include<opencv2/opencv.hpp>
|
|
|
|
|
#include <opencv.hpp>
|
|
|
|
|
#include <QByteArray>
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
#include<iostream>
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
#include <QThread>
|
|
|
|
|
|
|
|
|
|
#include "Logic_processtask.h"
|
|
|
|
|
#include "base_Logic.h"
|
|
|
|
|
|
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
|
|
|
|
|
|
class Hd_LogicDll_module : public base_Logic
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
2024-09-27 15:54:45 +08:00
|
|
|
//对外接口
|
2024-09-27 14:31:22 +08:00
|
|
|
public:
|
|
|
|
|
explicit Hd_LogicDll_module();
|
|
|
|
|
~Hd_LogicDll_module();
|
|
|
|
|
|
|
|
|
|
bool setJsonObject(QJsonObject);
|
|
|
|
|
bool checkJsonObject(QJsonObject, QString&);
|
|
|
|
|
bool initTask();
|
|
|
|
|
bool startTask();
|
|
|
|
|
bool stopTask();
|
|
|
|
|
bool exitTask();
|
|
|
|
|
bool restartTask();
|
|
|
|
|
bool get_sendImgStruct(QQueue< sendImgStruct>&);
|
|
|
|
|
|
|
|
|
|
bool sendPLC(QString cmd);
|
|
|
|
|
bool reLoadJsonSetParameter(QStringList moduleKeyList);
|
|
|
|
|
|
2024-09-27 15:54:45 +08:00
|
|
|
//内部使用
|
2024-09-27 14:31:22 +08:00
|
|
|
private:
|
|
|
|
|
Logic_processtask* my_task;
|
|
|
|
|
QMutex* sendImgStructMutex = nullptr;
|
|
|
|
|
//QQueue< sendImgStruct> queue_sendImgStruct;
|
|
|
|
|
void check_LsendImgStruct();
|
|
|
|
|
//bool check_cmeraCfg();
|
|
|
|
|
//QJsonObject loadJsonCfg(QString);
|
|
|
|
|
|
2024-09-27 15:54:45 +08:00
|
|
|
//对外接口
|
2024-09-27 14:31:22 +08:00
|
|
|
signals:
|
|
|
|
|
void Logic_sendTcpStatus(bool);
|
|
|
|
|
void Logic_writeData(QString, QString, QString, QByteArray);
|
|
|
|
|
void Logic_cameraDisconnect(QString msg, bool status);
|
|
|
|
|
void Logic_CommunicationDisconnect(QString msg, bool status);
|
|
|
|
|
private slots:
|
|
|
|
|
void processtask_sendTcpStatus(bool flag);
|
2024-09-30 15:36:39 +08:00
|
|
|
void processtask_writeData(QString key, QString cameraName, QString snInfo, QByteArray byteArray);
|
2024-09-27 14:31:22 +08:00
|
|
|
void processtask_cameraDisconnect(QString msg, bool status);
|
|
|
|
|
void processtask_CommunicationDisconnect(QString msg, bool status);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
|
{
|
|
|
|
|
Q_DECL_EXPORT Hd_LogicDll_module* create();
|
|
|
|
|
Q_DECL_EXPORT void destory(Hd_LogicDll_module* ptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // Hd_LogicDll_module_H
|