29 lines
594 B
C++
29 lines
594 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <memory>
|
|
|
|
class WeldSeamTCPProtocol : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit WeldSeamTCPProtocol(QObject* parent = nullptr);
|
|
~WeldSeamTCPProtocol() override;
|
|
|
|
bool StartServer(uint16_t port);
|
|
void StopServer();
|
|
bool IsConnected() const;
|
|
void SendMessage(const QString& message);
|
|
|
|
signals:
|
|
void ConnectionChanged(bool connected);
|
|
void DataReceived(const QString& data);
|
|
void StartScanRequested();
|
|
void StopScanRequested();
|
|
|
|
private:
|
|
class Impl;
|
|
std::unique_ptr<Impl> m_impl;
|
|
};
|