2018-05-26 14:49:18 +08:00
|
|
|
|
#ifndef KONGZHIQIUDPPROTOCOL_H
|
2018-01-27 22:14:00 +08:00
|
|
|
|
#define KONGZHIQIUDPPROTOCOL_H
|
|
|
|
|
|
2018-05-26 14:49:18 +08:00
|
|
|
|
#include <qqtprotocol.h>
|
2018-01-27 22:14:00 +08:00
|
|
|
|
#include <qqtcore.h>
|
|
|
|
|
#include <kongzhiqiudpmessage.h>
|
|
|
|
|
#include <cedianudpserver.h>
|
|
|
|
|
|
2018-05-26 14:49:18 +08:00
|
|
|
|
class KongzhiqiUdpProtocol : public QQtProtocol
|
2018-01-27 22:14:00 +08:00
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2018-05-26 14:49:18 +08:00
|
|
|
|
explicit KongzhiqiUdpProtocol ( QObject* parent = nullptr );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
virtual ~KongzhiqiUdpProtocol() {}
|
|
|
|
|
//起动命令
|
2018-05-26 14:49:18 +08:00
|
|
|
|
void sendStartMessage ( const QHostAddress& address, quint16 port, const KongzhiqiUdpMessage& st );
|
|
|
|
|
void sendStartMessage ( const QHostAddress& address, quint16 port, const QByteArray msg );
|
|
|
|
|
void sendStartMessage ( const QNetworkDatagram& dg );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
//停机命令
|
2018-05-26 14:49:18 +08:00
|
|
|
|
void sendStopMessage ( const QHostAddress& address, quint16 port, const KongzhiqiUdpMessage& st );
|
|
|
|
|
void sendStopMessage ( const QHostAddress& address, quint16 port, const QByteArray msg );
|
|
|
|
|
void sendStopMessage ( const QNetworkDatagram& dg );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
//频率调节命令
|
2018-05-26 14:49:18 +08:00
|
|
|
|
void sendFreMessage ( const QHostAddress& address, quint16 port, const KongzhiqiUdpMessage& st );
|
|
|
|
|
void sendFreMessage ( const QHostAddress& address, quint16 port, const QByteArray msg );
|
|
|
|
|
void sendFreMessage ( const QNetworkDatagram& dg );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
//励磁调节命令
|
2018-05-26 14:49:18 +08:00
|
|
|
|
void sendVolMessage ( const QHostAddress& address, quint16 port, const KongzhiqiUdpMessage& st );
|
|
|
|
|
void sendVolMessage ( const QHostAddress& address, quint16 port, const QByteArray msg );
|
|
|
|
|
void sendVolMessage ( const QNetworkDatagram& dg );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
//并网命令
|
2018-05-26 14:49:18 +08:00
|
|
|
|
void sendSynMessage ( const QHostAddress& address, quint16 port, const KongzhiqiUdpMessage& st );
|
|
|
|
|
void sendSynMessage ( const QHostAddress& address, quint16 port, const QByteArray msg );
|
|
|
|
|
void sendSynMessage ( const QNetworkDatagram& dg );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
//解列命令
|
2018-05-26 14:49:18 +08:00
|
|
|
|
void sendStepoutMessage ( const QHostAddress& address, quint16 port, const KongzhiqiUdpMessage& st );
|
|
|
|
|
void sendStepoutMessage ( const QHostAddress& address, quint16 port, const QByteArray msg );
|
|
|
|
|
void sendStepoutMessage ( const QNetworkDatagram& dg );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
};
|
|
|
|
|
|
2018-05-26 14:49:18 +08:00
|
|
|
|
KongzhiqiUdpProtocol* kongzhiqiUdpServer ( QObject* parent = 0 );
|
2018-01-27 22:14:00 +08:00
|
|
|
|
|
|
|
|
|
#endif // KONGZHIQIUDPPROTOCOL_H
|