调整文件布局,增加mqtt文件

main
Jinhuan 3 months ago
parent cc8ce53abc
commit c10ad02d1a

@ -0,0 +1,5 @@
{
"files.associations": {
"string": "cpp"
}
}

@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cigarette", "Cigarette\Cigarette.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CigaretteSingle", "CigaretteSingle\CigaretteSingle.vcxproj", "{795A8611-044A-46D3-8DD9-13A338925BC4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -21,6 +23,12 @@ Global
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32
{795A8611-044A-46D3-8DD9-13A338925BC4}.Debug|x64.ActiveCfg = Debug|x64
{795A8611-044A-46D3-8DD9-13A338925BC4}.Debug|x86.ActiveCfg = Debug|x64
{795A8611-044A-46D3-8DD9-13A338925BC4}.Debug|x86.Build.0 = Debug|x64
{795A8611-044A-46D3-8DD9-13A338925BC4}.Release|x64.ActiveCfg = Release|x64
{795A8611-044A-46D3-8DD9-13A338925BC4}.Release|x86.ActiveCfg = Release|x64
{795A8611-044A-46D3-8DD9-13A338925BC4}.Release|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -0,0 +1,5 @@
/* This file was generated by qmake with the info from <root>/src/mqtt/mqtt.pro. */
#ifdef __cplusplus /* create empty PCH in C mode */
#include <QtCore/QtCore>
#include <QtNetwork/QtNetwork>
#endif

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -33,6 +33,18 @@
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Header Files\Ui">
<UniqueIdentifier>{473883a5-266b-4c0a-97ce-c07ce50ee349}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Thread">
<UniqueIdentifier>{081898e5-fc92-47a4-9de7-0317588c2c6c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Ui">
<UniqueIdentifier>{045acf89-3551-4318-a690-0f58eaf08f4d}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Thread">
<UniqueIdentifier>{91e6e8fc-6df2-4732-839b-4f873694fc78}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
@ -41,33 +53,6 @@
<ClCompile Include="cigarette.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_cigarette.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_cigarette.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\qrc_cigarette.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="dialogsetuppasswd.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_dialogsetuppasswd.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_dialogsetuppasswd.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="dialogsetup.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_dialogsetup.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_dialogsetup.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="basecamera.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -80,301 +65,169 @@
<ClCompile Include="balluffcamera.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="plcsetup.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_plcsetup.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_plcsetup.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="CaptureThread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_CaptureThread.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_CaptureThread.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="plc_item.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="db_label.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_db_label.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_db_label.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="alarmdialog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_alarmdialog.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_alarmdialog.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="AlarmInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="common.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="debugthread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_debugthread.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_debugthread.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="dialogin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_dialogin.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_dialogin.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="ASyncQueue.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="baslercamera.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_workthread.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_workthread.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="workthread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_CaptureThreadBasler.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_CaptureThreadBasler.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="CaptureThreadBasler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_savethread.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_savethread.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="hikcamera.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_CaptureThreadHIK.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_CaptureThreadHIK.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="CaptureThreadHIK.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PLC\PLCDevice.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="threadSend.cpp">
<ClCompile Include="exportData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_camera_glue.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_camera_glue.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="camera_glue.cpp">
<ClCompile Include="tinyxml2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_change_shift.cpp">
<Filter>Generated Files\Debug</Filter>
<ClCompile Include="Thread\CaptureThread.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_change_shift.cpp">
<Filter>Generated Files\Release</Filter>
<ClCompile Include="Thread\CaptureThreadBasler.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="change_shift.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Thread\CaptureThreadHIK.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_output_statistic.cpp">
<Filter>Generated Files\Debug</Filter>
<ClCompile Include="Thread\Cleanthread.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_output_statistic.cpp">
<Filter>Generated Files\Release</Filter>
<ClCompile Include="Thread\debugthread.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="output_statistic.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Thread\Logthread.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_Logthread.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_Logthread.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="Logthread.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Thread\syncworkthread.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_Cleanthread.cpp">
<Filter>Generated Files\Debug</Filter>
<ClCompile Include="Thread\threadReceive.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_Cleanthread.cpp">
<Filter>Generated Files\Release</Filter>
<ClCompile Include="Thread\threadSend.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="Cleanthread.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Thread\threadSendTCP.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="threadReceive.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Thread\workthread.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_threadReceive.cpp">
<Filter>Generated Files\Debug</Filter>
<ClCompile Include="Ui\alarmdialog.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_threadReceive.cpp">
<Filter>Generated Files\Release</Filter>
<ClCompile Include="Ui\camera_glue.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_exportData.cpp">
<Filter>Generated Files\Debug</Filter>
<ClCompile Include="Ui\change_shift.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_exportData.cpp">
<Filter>Generated Files\Release</Filter>
<ClCompile Include="Ui\dialogin.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="exportData.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Ui\dialogsetup.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="tinyxml2.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Ui\dialogsetuppasswd.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="threadSendTCP.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Ui\output_statistic.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="SyncWorkThread.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Ui\plcsetup.cpp">
<Filter>Source Files\Ui</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_SyncWorkThread.cpp">
<Filter>Source Files</Filter>
<ClCompile Include="Thread\threadSendMqtt.cpp">
<Filter>Source Files\Thread</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="cigarette.h">
<QtMoc Include="cigarette.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="cigarette.ui">
</QtMoc>
<QtUic Include="cigarette.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="cigarette.qrc">
</QtUic>
<QtRcc Include="cigarette.qrc">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="dialogsetuppasswd.hpp">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="dialogsetuppasswd.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="dialogsetup.hpp">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="dialogsetup.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="plcsetup.hpp">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="plcsetup.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="CaptureThread.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="db_label.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="alarmdialog.hpp">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="alarmdialog.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="debugthread.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="dialogin.hpp">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="dialogin.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="workthread.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="CaptureThreadBasler.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="savethread.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="CaptureThreadHIK.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="threadSend.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="camera_glue.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="camera_glue.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="change_shift.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="change_shift.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="output_statistic.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="output_statistic.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="Logthread.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="Cleanthread.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="threadReceive.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="exportData.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="SyncWorkThread.h">
<Filter>Header Files</Filter>
</CustomBuild>
</QtRcc>
<QtMoc Include="db_label.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="exportData.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="Thread\CaptureThread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\CaptureThreadBasler.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\CaptureThreadHIK.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\Cleanthread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\debugthread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\Logthread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\savethread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\syncworkthread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\threadReceive.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Thread\workthread.h">
<Filter>Header Files\Thread</Filter>
</QtMoc>
<QtMoc Include="Ui\alarmdialog.hpp">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\dialogin.hpp">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\dialogsetup.hpp">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\dialogsetuppasswd.hpp">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\plcsetup.hpp">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\camera_glue.h">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\change_shift.h">
<Filter>Header Files\Ui</Filter>
</QtMoc>
<QtMoc Include="Ui\output_statistic.h">
<Filter>Header Files\Ui</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_cigarette.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_dialogsetuppasswd.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_dialogsetup.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="basecamera.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -390,21 +243,12 @@
<ClInclude Include="common.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_plcsetup.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="plc_item.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_alarmdialog.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="AlarmInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_dialogin.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="ASyncQueue.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -417,23 +261,46 @@
<ClInclude Include="PLC\PLCDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_camera_glue.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_change_shift.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_output_statistic.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="tinyxml2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="FtpManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="threadSendTCP.h">
<Filter>Header Files</Filter>
<ClInclude Include="Thread\threadSend.h">
<Filter>Header Files\Thread</Filter>
</ClInclude>
<ClInclude Include="Thread\threadSendTCP.h">
<Filter>Header Files\Thread</Filter>
</ClInclude>
<ClInclude Include="Thread\threadSendMqtt.h">
<Filter>Header Files\Thread</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<QtUic Include="Ui\alarmdialog.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\camera_glue.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\change_shift.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\dialogin.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\dialogsetup.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\dialogsetuppasswd.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\output_statistic.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="Ui\plcsetup.ui">
<Filter>Form Files</Filter>
</QtUic>
</ItemGroup>
</Project>

@ -2,11 +2,16 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\Qt\5.15.2\msvc2019_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(SOLUTIONDIR)runtime%3b$(QTDIR)\bin%3bD:\Qt\5.15.0\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>D:\Qt\5.15.2\msvc2019_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2024-10-04T06:46:34.3746998Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2024-10-04T06:46:35.5916473Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

@ -0,0 +1,81 @@
#include "threadSendMqtt.h"
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <stdio.h>
#include <qtcpsocket.h>
void threadSendMqtt::init(SyncQueue<_MqttSendInfo>* p_TCP_Info_queue, std::string ip_, int port_) {
ip = QString::fromStdString(ip_);
port = port_;
qDebug() << "Mqtt ip:" << ip << "| Mqtt port:" << port;
Local_TCP_Info_queue = p_TCP_Info_queue;
}
void threadSendMqtt::start_work()
{
//start(HighestPriority);
start();
}
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);
//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) {
const QString content = QDateTime::currentDateTime().toString()
+ QLatin1String(" Received Topic: ")
+ topic.name()
+ QLatin1String(" Message: ")
+ message
+ QLatin1Char('\n');
//ui->editLog->insertPlainText(content);
});
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);
return true;
}
void threadSendMqtt::run()
{
if (!connectTCP())
qDebug() << "Mqtt connect error!";
while (isLoop) {
_MqttSendInfo TCPSendInfo;
Local_TCP_Info_queue->take(TCPSendInfo);
num++;
sendData(&TCPSendInfo, num);
}
}
void threadSendMqtt::sendData(_MqttSendInfo* TCPSendInfo, int Num) {
std::string fileName = TCPSendInfo->pics_name + ", " + QString::number(Num).toStdString();
if (m_client->state() == QMqttClient::Connected) {
auto result = m_client->publish(QMqttTopicName("topic"), QString("message").toUtf8(), 0, true);
}
}

@ -0,0 +1,55 @@
#pragma once
#include <QDebug>
#include <QDateTime>
#include <iostream>
#include <QThread>
#include <QtMqtt/qmqttclient.h>
#include "common.h"
#include "SyncQueue.h"
class _MqttSendInfo
{
public:
std::string pics_name;
_MqttSendInfo()
{
pics_name = "";
}
};
class threadSendMqtt : public QThread {
public:
QString ip;
int port;
int num = 0;
threadSendMqtt(QObject* o = nullptr) :QThread(o)
{
isLoop = true;
}
~threadSendMqtt()
{
stop();
_MqttSendInfo TCPSendInfo;
Local_TCP_Info_queue->put(TCPSendInfo);
quit();
wait();
}
void stop();
bool connectTCP();
protected:
void run();
public:
void init(SyncQueue<_MqttSendInfo>* p_TCP_Info_queue, std::string ip_, int port_);
void start_work();
void sendData(_MqttSendInfo* TCPSendInfo, int Num);
public:
SyncQueue<_MqttSendInfo>* Local_TCP_Info_queue;
std::atomic_bool isLoop = { 0 };
QMqttClient* m_client = NULL;
};

@ -68,6 +68,8 @@ SyncQueue<_UDPSendInfo>* UDP_Info_queue;
#ifdef __TCPSend
SyncQueue<_TCPSendInfo>* TCP_Info_queue;
#endif
#ifdef __MqttSend
#endif
bool flag = false;
SyncQueue<_XMLExportDataInfo>* export_XMLData_Info_queue;
#ifdef __ExportData

@ -8,12 +8,13 @@
//#define __DEBUG //debug信息输出功能
//#define __UDPSend //网络发送功能
#define __TCPSend // TCP发送
#define __MqttSend // TCP发送
#define USB_BASLER_NEW_FW //使用basler定制固件
//#define IMM_PROCESS //拍照后立马处理,不等校验信号
//#define IMM_FEED_BACK //处理完后立马反馈,不等校验信号
#define ONE_TIME_SHIFT //错开一拍发送反馈(默认错开两次)
#define AI_WARM_UP //AI识别开始前的热身动作
#define LICENSE_VERIFY //开启license文件校验
//#define LICENSE_VERIFY //开启license文件校验
//CAP_FEED_BACK和DOUBLE_FEED_BACK不要一起开
#if defined (ONE_TIME_SHIFT)
//#define CAP_FEED_BACK //拍照时也检测有没有测试结果,有的话就反馈

@ -36,7 +36,7 @@
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
<QtInstall>5.15.2_msvc2019_64</QtInstall>
<QtInstall>5.15.0</QtInstall>
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>release</QtBuildConfig>
</PropertyGroup>

@ -2,7 +2,7 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtLastBackgroundBuild>2023-05-12T00:20:05.9334497Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2024-04-07T16:40:53.3929255Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtLastBackgroundBuild>2023-05-12T00:20:07.0175398Z</QtLastBackgroundBuild>

Loading…
Cancel
Save