Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* SystemCaller to set Time and Date
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, NLE, 07-03-2019
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QTcpSocket>
|
||||
#include <QThread>
|
||||
|
||||
#include "tcp_server.h"
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
namespace DateTimeSyncer
|
||||
{
|
||||
|
||||
class SystemCaller : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SystemCaller(QObject *parent = nullptr);
|
||||
~SystemCaller();
|
||||
|
||||
bool init(int tcpPort);
|
||||
|
||||
private slots:
|
||||
// tcp
|
||||
void newConnection();
|
||||
void readTcp();
|
||||
void tcpDisconnected();
|
||||
void handleTcpError(QAbstractSocket::SocketError error);
|
||||
|
||||
private:
|
||||
TcpServer *m_tcpServer;
|
||||
QVector<QTcpSocket *> m_sockets;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} //namespace DateTimeSyncer
|
||||
Reference in new issue
Block a user