From f7fc865d93f8448779d320ce152f0fa44a64fcad Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Mon, 4 Sep 2023 19:06:44 +0100 Subject: New upstream version 0.0.0.67 --- tcpCode.h | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 tcpCode.h (limited to 'tcpCode.h') diff --git a/tcpCode.h b/tcpCode.h new file mode 100644 index 0000000..8d15a05 --- /dev/null +++ b/tcpCode.h @@ -0,0 +1,76 @@ +#include +#include +//#include + +#define CONNECT(sndr, sig, rcvr, slt) connect(sndr, SIGNAL(sig), rcvr, SLOT(slt)) + +class mynet : public QObject +{ + Q_OBJECT + +signals: + + void HLSetPTT(int c); + void startTimer(int Time); + void stopTimer(); + +public: + void start(); + void OpenUDP(); + + +public slots: + void onAGWReadyRead(); + void onKISSSocketStateChanged(QAbstractSocket::SocketState socketState); + void onKISSReadyRead(); + void onAGWSocketStateChanged(QAbstractSocket::SocketState socketState); + void onKISSConnection(); + void MyTimerSlot(); + void onAGWConnection(); + void dropPTT(); + + void displayError(QAbstractSocket::SocketError socketError); + + void sendtoKISS(void * sock, unsigned char * Msg, int Len); + + void HAMLIBdisplayError(QAbstractSocket::SocketError socketError); + void HAMLIBreadyRead(); + void onHAMLIBSocketStateChanged(QAbstractSocket::SocketState socketState); + void ConnecttoHAMLIB(); + void dostartTimer(int Time); + void dostopTimer(); + void doHLSetPTT(int c); + + void readPendingDatagrams(); + void socketError(); + +private: + QTcpServer* tcpServer; + QTcpSocket* tcpClient; + QTcpSocket* tcpServerConnection; + int bytesToWrite; + int bytesWritten; + int bytesReceived; + int TotalBytes; + int PayloadSize; +}; + + +class workerThread : public QThread +{ + Q_OBJECT +signals: + void updateDCD(int, int); + void sendtoTrace(char *, int); + void sendtoKISS(void *, unsigned char *, int); + void openSockets(); + +private: + void run(); +public: + +}; + + + + -- cgit v1.2.3