2025-07-25 00:29:52 +08:00
|
|
|
#pragma once
|
2025-06-05 11:30:12 +08:00
|
|
|
#include <iostream>
|
|
|
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
|
#include <opencv2/core.hpp>
|
|
|
|
|
#include <opencv2/imgproc.hpp>
|
|
|
|
|
#include <QByteArray>
|
2025-07-25 00:29:52 +08:00
|
|
|
#include <QObject>
|
2025-11-16 19:29:29 +08:00
|
|
|
#include <QMutex>
|
|
|
|
|
|
2026-04-26 12:25:13 +08:00
|
|
|
class dsModuleBase : public QObject
|
2025-06-05 11:30:12 +08:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool init_flag; //是否初始化,false,true
|
|
|
|
|
bool status = true; //相机状态(判断相机是否断开连接)
|
|
|
|
|
std::string paras; //传输数据
|
|
|
|
|
cv::Mat m_mat; //传输图片
|
|
|
|
|
std::string moduleName; //模块名称
|
|
|
|
|
public:
|
2025-07-25 00:29:52 +08:00
|
|
|
dsModuleBase() {}
|
|
|
|
|
virtual ~dsModuleBase() {}
|
|
|
|
|
virtual bool readData(std::vector<cv::Mat>&,QByteArray&){return true;}
|
|
|
|
|
virtual bool writeData(std::vector<cv::Mat>&,QByteArray&){return true;}
|
|
|
|
|
virtual bool initParas(QByteArray&){return true;}
|
2025-06-05 11:30:12 +08:00
|
|
|
virtual bool run() {return true;}
|
2026-04-26 12:25:13 +08:00
|
|
|
virtual bool checkStatus() { return true; };
|
2025-06-05 11:30:12 +08:00
|
|
|
};
|
|
|
|
|
|
2025-07-25 00:29:52 +08:00
|
|
|
class rpcModuleBase : public QObject
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool init_flag; //是否初始化,false,true
|
|
|
|
|
bool status = true; //相机状态(判断相机是否断开连接)
|
|
|
|
|
std::string paras; //传输数据
|
|
|
|
|
cv::Mat m_mat; //传输图片
|
|
|
|
|
std::string moduleName; //模块名称
|
|
|
|
|
public:
|
|
|
|
|
rpcModuleBase() {}
|
|
|
|
|
virtual ~rpcModuleBase() {}
|
|
|
|
|
virtual bool readData(std::vector<cv::Mat>&, QByteArray&) { return true; }
|
|
|
|
|
virtual bool writeData(std::vector<cv::Mat>&, QByteArray&) { return true; }
|
|
|
|
|
virtual bool initParas(QByteArray&) { return true; }
|
|
|
|
|
virtual bool run() { return true; }
|
|
|
|
|
};
|
2025-06-05 11:30:12 +08:00
|
|
|
|
2025-08-15 16:36:54 +08:00
|
|
|
class cameraModuleBase : public QObject
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
bool init_flag; //是否初始化,false,true
|
|
|
|
|
bool status = true; //相机状态(判断相机是否断开连接)
|
|
|
|
|
std::string paras; //传输数据
|
|
|
|
|
cv::Mat m_mat; //传输图片
|
|
|
|
|
std::string moduleName; //模块名称
|
|
|
|
|
public:
|
|
|
|
|
cameraModuleBase() {}
|
|
|
|
|
virtual ~cameraModuleBase() {}
|
|
|
|
|
virtual bool captrue(std::vector<cv::Mat>&, QByteArray&) { return true; }
|
|
|
|
|
virtual bool writeData(std::vector<cv::Mat>&, QByteArray&) { return true; }
|
|
|
|
|
virtual bool initParas(QByteArray&) { return true; }
|
|
|
|
|
};
|