Compare commits

..

2 Commits

@ -1,5 +1,5 @@
#include "CaptureThread.h"
#include "common.h"
#if defined (BALLUFF_SUPPORT)
#include "exportData.h"
extern bool g_debug_mode; //相机调试模式,工作模式必须停止状态才能打开
@ -164,3 +164,4 @@ int CaptureThread::getPendingRequestNr(void)
requestPendingForDisplay_ = INVALID_ID;
return result;
}
#endif

@ -2,6 +2,8 @@
#ifndef CaptureThreadH
#define CaptureThreadH CaptureThreadH
//-----------------------------------------------------------------------------
#include "common.h"
#if defined (BALLUFF_SUPPORT)
#include "balluffcamera.h"
#include <QThread>
#include <QMutex>
@ -16,7 +18,6 @@
#include <apps/Common/qtIncludeEpilogue.h>
#include <opencv2/opencv.hpp>
#include "common.h"
extern SingleCamInfoStruct SingleCamInfo[NumberOfSupportedCameras];
extern int work_camera_nums;
@ -264,5 +265,6 @@ public:
}
};
#endif
//-----------------------------------------------------------------------------
#endif // CaptureThreadH

@ -1,7 +1,7 @@
#include "CaptureThreadBasler.h"
#if defined (BASLER_SUPPORT)
#include <QtWidgets/QApplication>
#include "PLCDevice.h"
#include "common.h"
#include <qdebug.h>
#include <exportData.h>
extern SyncQueue<_XMLExportDataInfo>* export_XMLData_Info_queue;
@ -205,3 +205,4 @@ void CaptureThreadBasler::ioTimeout()
pDev_->UserOutputValue.SetValue(false);
}
#endif

@ -2,6 +2,8 @@
#ifndef CaptureThreadBaslerH
#define CaptureThreadBaslerH CaptureThreadBaslerH
//-----------------------------------------------------------------------------
#include "common.h"
#if defined (BASLER_SUPPORT)
#include "baslercamera.h"
#include <QThread>
#include <QMutex>
@ -10,7 +12,6 @@
#include "SyncQueue.h"
#include "ASyncQueue.h"
#include "common.h"
#include <opencv2/opencv.hpp>
extern bool g_debug_mode;
@ -385,4 +386,5 @@ public:
}
};
#endif
#endif // CaptureThreadBasler

@ -1,7 +1,7 @@
#include "CaptureThreadHIK.h"
#if defined (HIK_SUPPORT)
#include <QtWidgets/QApplication>
#include "PLCDevice.h"
#include "common.h"
#include <windows.h>
#include "exportData.h"
extern bool g_debug_mode; //相机调试模式,工作模式必须停止状态才能打开
@ -324,3 +324,4 @@ void CaptureThreadHIK::process(void)
}
}
//-----------------------------------------------------------------------------
#endif

@ -2,8 +2,9 @@
#ifndef CaptureThreadHIKH
#define CaptureThreadHIKH CaptureThreadHIKH
//-----------------------------------------------------------------------------
#include "hikcamera.h"
#include "common.h"
#if defined (HIK_SUPPORT)
#include "hikcamera.h"
#include <QThread>
#include <QMutex>
#include <functional>
@ -104,4 +105,5 @@ private:
volatile bool boTerminated_;
QMutex lock_;
};
#endif
#endif // CaptureThreadHIKH

@ -11,8 +11,8 @@ void threadReceive::stop()
{
isLoop = false;
BOOL bDontLinger = FALSE;
mSocket->abort();
filemSocket->abort();
mSocket.abort();
filemSocket.abort();
// wait();
}
@ -20,27 +20,25 @@ void threadReceive::init(std::string IP, int port)
{
ip = QString::fromStdString(IP);
mSocket = new QUdpSocket(this);
mSocket->bind(port + NumberOfSupportedCameras * 2 + 1, QUdpSocket::ShareAddress);
connect(mSocket, &QUdpSocket::readyRead, this, &threadReceive::processPendingDatagram);
mSocket.bind(port + NumberOfSupportedCameras * 2 + 1, QUdpSocket::ShareAddress);
connect(&mSocket, &QUdpSocket::readyRead, this, &threadReceive::processPendingDatagram);
filemSocket = new QUdpSocket(this);
filemSocket->bind(port + NumberOfSupportedCameras * 2 + 2, QUdpSocket::ShareAddress);
connect(filemSocket, &QUdpSocket::readyRead, this, &threadReceive::fileprocessPendingDatagram);
filemSocket.bind(port + NumberOfSupportedCameras * 2 + 2, QUdpSocket::ShareAddress);
connect(&filemSocket, &QUdpSocket::readyRead, this, &threadReceive::fileprocessPendingDatagram);
}
void threadReceive::processPendingDatagram()
{
// 拥有等待的数据报
while (mSocket->hasPendingDatagrams())
while (mSocket.hasPendingDatagrams())
{
QByteArray datagram;
// 让datagram的大小为等待处理的数据报的大小这样才能接收到完整的数据
datagram.resize(mSocket->pendingDatagramSize());
datagram.resize(mSocket.pendingDatagramSize());
// 接收数据报将其存放到datagram中
mSocket->readDatagram(datagram.data(), datagram.size());
mSocket.readDatagram(datagram.data(), datagram.size());
QString data = datagram;
emit sendMsgToCigratte(data);
@ -52,14 +50,14 @@ void threadReceive::fileprocessPendingDatagram()
QString filename;
std::fstream file;
// 拥有等待的数据报
while (filemSocket->hasPendingDatagrams())
while (filemSocket.hasPendingDatagrams())
{
QByteArray datagram;
// 让datagram的大小为等待处理的数据报的大小这样才能接收到完整的数据
datagram.resize(filemSocket->pendingDatagramSize());
datagram.resize(filemSocket.pendingDatagramSize());
// 接收数据报将其存放到datagram中
filemSocket->readDatagram(datagram.data(), datagram.size());
filemSocket.readDatagram(datagram.data(), datagram.size());
QString data = datagram;
QString str = data.mid(0, 4);

@ -40,6 +40,6 @@ signals:
public:
std::atomic_bool isLoop = { 0 };
QUdpSocket* mSocket;
QUdpSocket* filemSocket;
QUdpSocket mSocket;
QUdpSocket filemSocket;
};

@ -1,8 +1,5 @@
#include "threadSendMqtt.h"
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <stdio.h>
#include <qtcpsocket.h>
// 相关头文件
#include <QFile> // 文件操作
@ -27,25 +24,19 @@ void threadSendMqtt::stop()
{
isLoop = false;
wait();
delete m_client;
}
bool threadSendMqtt::connectTCP() {
m_client = new QMqttClient(this);
m_client->setHostname(ip);
m_client->setPort(port);
//m_client->setUsername(userName);
//m_client->setPassword(userPassword);
m_client->connectToHost();
//connect(m_client, &QMqttClient::stateChanged, this, &MainWindow::updateLogStateChange);
connect(m_client, &QMqttClient::connected, this, [this](void) {qDebug() << "Mqtt connected";});
connect(m_client, &QMqttClient::disconnected, this, [this](void) {qDebug() << "Mqtt disconnected"; });
connect(m_client, SIGNAL(messageSent(qint32)), this, SLOT(MQTT_DATASEND_SUCCESS(qint32)));//消息发送成功提示的槽函数绑定
connect(m_client, &QMqttClient::messageReceived, this, [this](const QByteArray &message, const QMqttTopicName &topic) {
bool threadSendMqtt::connectMqtt() {
connect(&m_client, &QMqttClient::connected, this, [this](void) {
qDebug() << "Mqtt connected";
});
connect(&m_client, &QMqttClient::disconnected, this, [this](void) {
qDebug() << "Mqtt disconnected";
});
connect(&m_client, &QMqttClient::errorChanged, this, [this](QMqttClient::ClientError error) {
qDebug() << error;
});
connect(&m_client, &QMqttClient::messageReceived, this, [this](const QByteArray &message, const QMqttTopicName &topic) {
const QString content = QDateTime::currentDateTime().toString()
+ QLatin1String(" Received Topic: ")
+ topic.name()
@ -54,30 +45,40 @@ bool threadSendMqtt::connectTCP() {
+ QLatin1Char('\n');
//ui->editLog->insertPlainText(content);
});
connect(m_client, &QMqttClient::pingResponseReceived, this, [this]() {
connect(&m_client, &QMqttClient::pingResponseReceived, this, [this]() {
const QString content = QDateTime::currentDateTime().toString()
+ QLatin1String(" PingResponse")
+ QLatin1Char('\n');
//ui->editLog->insertPlainText(content);
});
//connect(ui->lineEditHost, &QLineEdit::textChanged, m_client, &QMqttClient::setHostname);
//connect(ui->spinBoxPort, QOverload<int>::of(&QSpinBox::valueChanged), this, &MainWindow::setClientPort);
qDebug() << m_client.state();
if (m_client.state() == QMqttClient::Disconnected)
{
m_client.setHostname("192.168.3.6");
m_client.setClientId("123");
m_client.setPort(1883);
//m_client.setUsername(userName);
//m_client.setPassword(userPassword);
m_client.connectToHost();
}
return true;
}
void threadSendMqtt::run()
{
if (!connectTCP())
qDebug() << m_client.state();
if (!connectMqtt())
qDebug() << "Mqtt connect error!";
while (isLoop) {
_MqttSendInfo TCPSendInfo;
qDebug() << m_client.error();
qDebug() << m_client.state();
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
/*_MqttSendInfo TCPSendInfo;
Local_MQTT_Info_queue->take(TCPSendInfo);
num++;
sendData(&TCPSendInfo, num);
sendData(&TCPSendInfo, num);*/
}
}
@ -89,9 +90,9 @@ void threadSendMqtt::sendData(_MqttSendInfo* TCPSendInfo, int Num) {
addressObject["country"] = "USA";
if (m_client->state() == QMqttClient::Connected) {
if (m_client.state() == QMqttClient::Connected) {
QJsonDocument jsonDoc(addressObject);
QByteArray jsonBytes = jsonDoc.toJson();
auto result = m_client->publish(QMqttTopicName("topic"), jsonBytes, 0, true);
auto result = m_client.publish(QMqttTopicName("topic"), jsonBytes, 0, true);
}
}

@ -39,7 +39,7 @@ public:
wait();
}
void stop();
bool connectTCP();
bool connectMqtt();
protected:
void run();
@ -52,5 +52,5 @@ public:
public:
SyncQueue<_MqttSendInfo>* Local_MQTT_Info_queue;
std::atomic_bool isLoop = { 0 };
QMqttClient* m_client = NULL;
QMqttClient m_client;
};

@ -1,4 +1,5 @@
#include "balluffcamera.h"
#if defined (BALLUFF_SUPPORT)
#include <algorithm> // for std::find_if
#include <iostream>
#include <thread>
@ -20,3 +21,4 @@ int BalluffCamera::Enumerate()
{
return devMgr.deviceCount();
}
#endif

@ -1,4 +1,6 @@
#pragma once
#include "common.h"
#if defined (BALLUFF_SUPPORT)
#include "SyncQueue.h"
#include "basecamera.h"
//#include <mvIMPACT_CPP/mvIMPACT_acquire.h>
@ -18,3 +20,4 @@ public:
static mvIMPACT::acquire::DeviceManager devMgr;
static bool license_pass;
};
#endif

@ -1,4 +1,5 @@
#include "baslercamera.h"
#if defined (BASLER_SUPPORT)
#include <algorithm> // for std::find_if
#include <iostream>
#include <thread>
@ -43,3 +44,4 @@ int BaslerCamera::Enumerate()
}
return n_basler_cam;
}
#endif

@ -1,4 +1,6 @@
#pragma once
#include "common.h"
#if defined (BASLER_SUPPORT)
#include "SyncQueue.h"
#include "basecamera.h"
#include <pylon/PylonIncludes.h>
@ -30,3 +32,4 @@ public:
public:
static Pylon::DeviceInfoList_t devices;
};
#endif

@ -35,19 +35,22 @@ AlgJd alg_test;//test AI算法
QThread* pThread[NumberOfSupportedCameras];
int work_camera_nums;
#if defined (BALLUFF_SUPPORT)
//巴鲁夫相机相关
CaptureThread* pCaptureThread[NumberOfSupportedCameras];
FunctionInterface* pFI[NumberOfSupportedCameras];
mvIMPACT::acquire::GenICam::AcquisitionControl* pAC[NumberOfSupportedCameras];
#endif
#if defined (BASLER_SUPPORT)
//巴斯勒相机相关
CaptureThreadBasler* pBaslerCaptureThread[NumberOfSupportedCameras];
Pylon::CBaslerUniversalInstantCamera* BaslerCamHandle[NumberOfSupportedCameras];
#endif
#if defined (HIK_SUPPORT)
//海康相机相关
void* HIKCamHandle[NumberOfSupportedCameras];
CaptureThreadHIK* pHIKCaptureThread[NumberOfSupportedCameras];
#endif
SyncQueue<std::pair<std::string, cv::Mat>>* g_save_queue; //图片保存队列
#ifdef SYNC_CAMERA
ImageSyncArr g_image_sync_arr;
@ -531,18 +534,24 @@ Cigarette::Cigarette(QWidget* parent)
for (int i = 0; i < NumberOfSupportedCameras; i++)
{
if (SingleCamInfo[i].Detect && SingleCamInfo[i].IsOpen) {
#if defined (BALLUFF_SUPPORT)
if (SingleCamInfo[i].CamClass == BalluffClassID) {
if (pCaptureThread[i])
while (!pCaptureThread[i]->Ready)Sleep(10);
}
else if (SingleCamInfo[i].CamClass == BaslerClassID) {
#endif
#if defined (BASLER_SUPPORT)
if (SingleCamInfo[i].CamClass == BaslerClassID) {
if (pBaslerCaptureThread[i])
while (!pBaslerCaptureThread[i]->Ready)Sleep(10);
}
else if (SingleCamInfo[i].CamClass == HIKClassID) {
#endif
#if defined (HIK_SUPPORT)
if (SingleCamInfo[i].CamClass == HIKClassID) {
if (pHIKCaptureThread[i])
while (!pHIKCaptureThread[i]->Ready)Sleep(10);
}
#endif
}
}
@ -579,6 +588,7 @@ void Cigarette::start_work()
for (int i = 0; i < NumberOfSupportedCameras; i++)
{
if (SingleCamInfo[i].Detect && SingleCamInfo[i].IsOpen) {
#if defined (BALLUFF_SUPPORT)
if (SingleCamInfo[i].CamClass == BalluffClassID) {
if (pCaptureThread[i])
{
@ -588,7 +598,9 @@ void Cigarette::start_work()
pCaptureThread[i]->p_shooted_queue->clear();
}
}
else if (SingleCamInfo[i].CamClass == BaslerClassID) {
#endif
#if defined (BASLER_SUPPORT)
if (SingleCamInfo[i].CamClass == BaslerClassID) {
if (pBaslerCaptureThread[i])
{
pBaslerCaptureThread[i]->p_result_queue->clear();
@ -597,7 +609,9 @@ void Cigarette::start_work()
pBaslerCaptureThread[i]->p_shooted_queue->clear();
}
}
else if (SingleCamInfo[i].CamClass == HIKClassID) {
#endif
#if defined (HIK_SUPPORT)
if (SingleCamInfo[i].CamClass == HIKClassID) {
if (pHIKCaptureThread[i])
{
pHIKCaptureThread[i]->p_result_queue->clear();
@ -606,6 +620,7 @@ void Cigarette::start_work()
pHIKCaptureThread[i]->p_shooted_queue->clear();
}
}
#endif
}
}
@ -742,9 +757,9 @@ void Cigarette::Exit()
}
qApp->quit();
this->close();
#if defined (BASLER_SUPPORT)
Pylon::PylonTerminate();
#endif
}
//停止工作按钮
@ -2926,6 +2941,7 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
{
if (OpenOrClose == OPEN && !SingleCamInfo[Num].IsOpen)
{
#if defined (BALLUFF_SUPPORT)
if (SingleCamInfo[Num].CamClass == BalluffClassID)
{
qDebug() << "open for balluff";
@ -3021,7 +3037,9 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
}
return false;
}
else if (SingleCamInfo[Num].CamClass == BaslerClassID)
#endif
#if defined (BASLER_SUPPORT)
if (SingleCamInfo[Num].CamClass == BaslerClassID)
{
qDebug() << "open for basler";
try
@ -3142,7 +3160,9 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
}
return false;
}
else if (SingleCamInfo[Num].CamClass == HIKClassID)
#endif
#if defined (HIK_SUPPORT)
if (SingleCamInfo[Num].CamClass == HIKClassID)
{
qDebug() << "open for hik";
int nRet = MV_OK;
@ -3262,9 +3282,11 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
}
return false;
}
#endif
}
else if (OpenOrClose == CLOSE && SingleCamInfo[Num].IsOpen)
{
#if defined (BALLUFF_SUPPORT)
if (SingleCamInfo[Num].CamClass == BalluffClassID)
{
qDebug() << "close for balluff";
@ -3294,7 +3316,9 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
SingleCamInfo[Num].IsOpen = false;
return true;
}
else if (SingleCamInfo[Num].CamClass == BaslerClassID)
#endif
#if defined (BASLER_SUPPORT)
if (SingleCamInfo[Num].CamClass == BaslerClassID)
{
qDebug() << "close for basler";
disconnect(pThread[Num], SIGNAL(started()), pBaslerCaptureThread[Num], SLOT(process()));
@ -3322,7 +3346,9 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
SingleCamInfo[Num].IsOpen = false;
return true;
}
else if (SingleCamInfo[Num].CamClass == HIKClassID)
#endif
#if defined (HIK_SUPPORT)
if (SingleCamInfo[Num].CamClass == HIKClassID)
{
qDebug() << "close for hik";
void* camhandle;
@ -3351,6 +3377,7 @@ bool Cigarette::ControlCamOpenOrClose(int Num, bool OpenOrClose)
SingleCamInfo[Num].IsOpen = false;
return true;
}
#endif
}
return false;
}
@ -3361,12 +3388,15 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct* TempSingleCamInfoStruct, b
//这些厂商相机枚举时候会过滤别的厂商相机,单独枚举
int basler_cnt = 0;
int filtered = 0;
#if defined (BASLER_SUPPORT)
filtered = BaslerCamera::Enumerate();
Pylon::CInstantCameraArray cameras(filtered);
Pylon::CTlFactory& tlFactory = Pylon::CTlFactory::GetInstance();
#endif
for (int i = 0; i < min(filtered, NumberOfSupportedCameras); i++)
{
#if defined (BASLER_SUPPORT)
SingleCamInfoStruct CamInfo;
//cameras[i].Attach(tlFactory.CreateDevice(BaslerCamera::devices[i]));
//Pylon::String_t selectedAction = ::GenICam::gcstring("Action");
@ -3390,11 +3420,13 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct* TempSingleCamInfoStruct, b
TempSingleCamInfo.push_back(CamInfo);
basler_cnt++;
//}
#endif
}
//这些厂商相机可以互相枚举但是Enumerate都要执行里面会初始化一些全局信息
int hik_cnt = 0;
int unfiltered = 0;
#if defined (HIK_SUPPORT)
unfiltered = HIKCamera::Enumerate();
for (int i = 0; i < min(unfiltered, NumberOfSupportedCameras); i++)
{
@ -3456,8 +3488,10 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct* TempSingleCamInfoStruct, b
hik_cnt++;
}
}
#endif
int balluff_cnt = 0;
#if defined (BALLUFF_SUPPORT)
unfiltered = BalluffCamera::Enumerate();
for (int i = 0; i < min(unfiltered, NumberOfSupportedCameras); i++)
{
@ -3484,7 +3518,7 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct* TempSingleCamInfoStruct, b
}
}
}
#endif
if (showinfo) {
std::cout << "Camera Count:\t" << TempSingleCamInfo.size() << std::endl;
if (balluff_cnt)std::cout << "Balluff Count:\t" << balluff_cnt << std::endl;
@ -3520,6 +3554,7 @@ void Cigarette::EnableDebugMode()
{
if (SingleCamInfo[i].IsOpen && SingleCamInfo[i].Detect)
{
#if defined (BALLUFF_SUPPORT)
if (SingleCamInfo[i].CamClass == BalluffClassID)
{
//设置帧率=10fps
@ -3528,7 +3563,9 @@ void Cigarette::EnableDebugMode()
//关闭外触发
pAC[i]->triggerMode.writeS("Off");
}
else if (SingleCamInfo[i].CamClass == HIKClassID)
#endif
#if defined (HIK_SUPPORT)
if (SingleCamInfo[i].CamClass == HIKClassID)
{
int nRet = MV_OK;
MV_CC_SetFrameRate(HIKCamHandle[i], 10.0);
@ -3538,7 +3575,9 @@ void Cigarette::EnableDebugMode()
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerMode", MV_TRIGGER_MODE_OFF);
if (nRet) { std::cout << "can not set Hik's TriggerMode" << std::endl; }
}
else if (SingleCamInfo[i].CamClass == BaslerClassID)
#endif
#if defined (BASLER_SUPPORT)
if (SingleCamInfo[i].CamClass == BaslerClassID)
{
bool nRet = false;
nRet = BaslerCamHandle[i]->AcquisitionFrameRate.TrySetValue(10);
@ -3556,6 +3595,7 @@ void Cigarette::EnableDebugMode()
if (!nRet) { std::cout << "can not set Basler's TriggerMode_Off" << std::endl; }
#endif
}
#endif
}
}
g_debug_mode = true;
@ -3567,6 +3607,7 @@ void Cigarette::DisableDebugMode()
{
if (SingleCamInfo[i].IsOpen && SingleCamInfo[i].Detect)
{
#if defined (BALLUFF_SUPPORT)
if (SingleCamInfo[i].CamClass == BalluffClassID)
{
//设置帧率
@ -3575,7 +3616,9 @@ void Cigarette::DisableDebugMode()
pAC[i]->triggerSource.writeS("Line4");
pAC[i]->triggerActivation.writeS("RisingEdge");
}
else if (SingleCamInfo[i].CamClass == HIKClassID)
#endif
#if defined (HIK_SUPPORT)
if (SingleCamInfo[i].CamClass == HIKClassID)
{
int nRet = MV_OK;
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerMode", MV_TRIGGER_MODE_ON);
@ -3592,7 +3635,9 @@ void Cigarette::DisableDebugMode()
nRet = MV_CC_SetBoolValue(HIKCamHandle[i], "AcquisitionFrameRateEnable", false);
if (nRet) { std::cout << "can not set Hik's AcquisitionFrameRateEnable" << std::endl; }
}
else if (SingleCamInfo[i].CamClass == BaslerClassID)
#endif
#if defined (BASLER_SUPPORT)
if (SingleCamInfo[i].CamClass == BaslerClassID)
{
bool nRet = false;
#ifndef USB_BASLER_NEW_FW
@ -3608,6 +3653,7 @@ void Cigarette::DisableDebugMode()
nRet = BaslerCamHandle[i]->AcquisitionFrameRateEnable.TrySetValue(false);
if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRateEnable" << std::endl; }
}
#endif
}
}
g_debug_mode = false;
@ -3687,11 +3733,13 @@ void Cigarette::record_output_statistic(qint64 quantity, int Kick[NumberOfSuppor
last_shift = shift;
}
#ifdef __MQTTSend
void Cigarette::MqttMsgSend()
{
_MqttSendInfo MqttSendInfo;
MQTT_Info_queue->put(MqttSendInfo);
}
#endif
#ifdef __UDPSend
void Cigarette::recMsgFromUdp(QString data)

@ -10,8 +10,13 @@
#define CLEAR_THREAD //定时清理线程
//#define __UDPSend //网络发送功能
//#define __TCPSend // TCP发送
#define __MQTTSend // MQTT发送
//#define __MQTTSend // MQTT发送
#define BASLER_SUPPORT
#if defined (BASLER_SUPPORT)
#define USB_BASLER_NEW_FW //使用basler定制固件
#endif
#define HIK_SUPPORT
#define BALLUFF_SUPPORT
//#define IMM_PROCESS //拍照后立马处理,不等校验信号
//#define IMM_FEED_BACK //处理完后立马反馈,不等校验信号
#define ONE_TIME_SHIFT //错开一拍发送反馈(默认错开两次)

@ -1,4 +1,5 @@
#include "hikcamera.h"
#if defined (HIK_SUPPORT)
#include <algorithm>
#include <iostream>
#include <thread>
@ -36,3 +37,4 @@ int HIKCamera::Enumerate()
}
}
#endif

@ -1,4 +1,6 @@
#pragma once
#include "common.h"
#if defined (HIK_SUPPORT)
#include "SyncQueue.h"
#include "basecamera.h"
#include "MvCameraControl.h"
@ -18,3 +20,4 @@ public:
static MV_CC_DEVICE_INFO_LIST stDeviceList;
};
#endif
Loading…
Cancel
Save