Files
eUi/include/subModuleBase.h
T

57 lines
2.1 KiB
C++
Raw Normal View History

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>
class dsModuleBase
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;}
};
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; }
};