Files
ds-628/BaseModules/Hd_LogicDll_module/struct.h
T

96 lines
3.1 KiB
C++
Raw Normal View History

2024-09-27 15:54:45 +08:00
#ifndef STRUCT_H
2024-09-27 14:31:22 +08:00
#define STRUCT_H
#include "qobject.h"
#include "qapplication.h"
#include "qjsonobject.h"
#include "qjsonarray.h"
#include "qjsondocument.h"
#include "QLibrary.h"
#include "QMetaType.h"
#include "QDateTime.h"
#include "QThread.h"
#include "QMutex.h"
#include "QDebug.h"
#include "QQueue.h"
#include "QMap.h"
#include "QDir.h"
#include <QJsonParseError>
//#include "qimage.h"
#include "qtimer.h"
#include <Windows.h>
#include "qmessagebox.h"
#include "Logic_hdataprocess.h"
#pragma execution_character_set("utf-8")
typedef Base* (*CreateFunction)();
typedef void (*ReleaseFunction)(Base* animal);
typedef struct {
QString m_stationKey;
//QString key; // 相机名称
QString module_key; // 相机key,或者算法key
QString moduleName; // 模块名称
QString task_thread_index = "-1";// 存储当前算法属于那个任务线程
QByteArray m_initByte; // 传递初始化参数
Base *module_ptr = nullptr; // 存储模块指针
ReleaseFunction destory_ptr; // 释放
QJsonArray ConfigArray; //配置文件
}MyModule;
typedef struct {
QString name = ""; // key 示例:camera1
QString retFlag=""; // 判断结果 Camera 表示图片 AI表示 结果信息:
QString cameraName = ""; // key 示例:camera1
QString algorithmName = "";// 算法名称
QString taskName = ""; // 任务名
QString snInfo = "";
QString sendNgInfo = ""; // -3 工位上检测到前面几个算法有NG后,做的反馈信息
cv::Mat mat;
QByteArray byteArray = "";
2024-09-27 14:31:22 +08:00
}dataPack;
typedef struct {
QString key; // 示例:camera1_0
QVector<QString> plc_commond_vector; // 算法模块使用的变量
QVector<QString> vector_algorithm_unusual_feedback_plcpos; // 异常反馈信息
QVector<QString> vector_algorithm_usual_feedback_plcpos; // 结果正常反馈信息
}send_algorithm_result;
// 创建存储图片的结构体
typedef struct {
QString key; // 相机名称 示例: camera1
QQueue<std::vector<cv::Mat>> camera_queue; // 相机图片数据
}cameraPack;
//extern bool check_send_resultA_flag;
//extern bool check_send_resultB_flag;
//extern QString mv_trigger_signal;
//内容为配置文件read_sn_startpos;注意访问加锁
//extern QQueue<QString> read_sn_start_data_queue;
extern QQueue<dataPack> ImageDataPack;
extern QQueue<QByteArray> writeCommondPack; // 写入plc命令
extern QMap<QString,HStationData*> station_list; // 工站列表
//extern QString trigger_signal_condition_name; // 根据触发信号作为算法的触发条件
//结果SN容器,Logic_myiothread添加,Logic_hdataintegration判断执行条件
//extern ResultSnData* resultSnData;
//extern int ccd1;
//extern int ccd2;
//extern int ccd3;
//extern int ccd4;
//extern int ccd5;
//extern int ccd6;
//extern int ccd7;
//extern int ccd8;
//extern int ccd9;
//extern int ccd10;
//extern int ccd11;
#endif // STRUCT_H