57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
#ifndef Hd_25DCameraVJ_module_H
|
|
#define Hd_25DCameraVJ_module_H
|
|
#include <QtCore/qglobal.h>
|
|
#include <Windows.h>
|
|
#include <time.h>
|
|
#include <QThread>
|
|
#include <QQueue>
|
|
#include <QMutex>
|
|
|
|
#include <subModuleBase.h>
|
|
|
|
using namespace cv;
|
|
using namespace std;
|
|
#pragma execution_character_set("utf-8")
|
|
static bool m_flag = true;
|
|
class MyThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit MyThread(QObject* parent = nullptr) :m_obj(parent) {}
|
|
void run();
|
|
void setFlag(bool r) { m_runFlag = r; };
|
|
private:
|
|
bool m_runFlag = true;
|
|
QObject* m_obj;
|
|
signals:
|
|
|
|
};
|
|
|
|
|
|
class Hd_25DCameraVJ_module :public subModuleBase
|
|
{
|
|
public:
|
|
Hd_25DCameraVJ_module();
|
|
virtual ~Hd_25DCameraVJ_module();
|
|
bool readData(std::vector<cv::Mat>&,QByteArray&, nlohmann::json& json);
|
|
bool writeData(std::vector<cv::Mat>&,QByteArray&, nlohmann::json& json);
|
|
bool initParas(QByteArray&, nlohmann::json& json = nlohmann::json());
|
|
bool run();
|
|
|
|
std::string sTriggerSource;
|
|
private:
|
|
bool softwareTriggerStatus = 0;
|
|
int cameraIndex = 0;
|
|
MyThread* workThread = nullptr;
|
|
|
|
};
|
|
|
|
extern "C"
|
|
{
|
|
Q_DECL_EXPORT Hd_25DCameraVJ_module * create();
|
|
Q_DECL_EXPORT void destory(Hd_25DCameraVJ_module * ptr);
|
|
}
|
|
|
|
#endif // Hd_25DCameraVJ_module_H
|
|
//Hd_25DCameraVJ_module
|