1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/examples/qqtudpexample/kongzhiqiudpprotocol.h

47 lines
2.1 KiB
C
Raw Normal View History

2018-05-26 14:49:18 +08:00
#ifndef KONGZHIQIUDPPROTOCOL_H
#define KONGZHIQIUDPPROTOCOL_H
2018-05-26 14:49:18 +08:00
#include <qqtprotocol.h>
#include <qqtcore.h>
#include <kongzhiqiudpmessage.h>
#include <cedianudpserver.h>
2018-05-26 14:49:18 +08:00
class KongzhiqiUdpProtocol : public QQtProtocol
{
Q_OBJECT
public:
2018-05-26 14:49:18 +08:00
explicit KongzhiqiUdpProtocol ( QObject* parent = nullptr );
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-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-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-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-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-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 );
signals:
public slots:
};
2018-05-26 14:49:18 +08:00
KongzhiqiUdpProtocol* kongzhiqiUdpServer ( QObject* parent = 0 );
#endif // KONGZHIQIUDPPROTOCOL_H