1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef SMARTLIGHTSERVER_H
- #define SMARTLIGHTSERVER_H
- #include <QTcpServer>
- #include <QDateTime>
- #include <QList>
- #include "smartlightcommthread.h"
- class SmartLightServer : public QTcpServer
- {
- Q_OBJECT
- public:
- explicit SmartLightServer(QObject *parent = nullptr);
- void start();
- void mk_EventList_qry(QString deviceId, quint8 type, quint8 cur, quint8 num);
- void mk_ResetList_qry(QString deviceId, int commandType, int parameterType, int pseq);
- void mk_realtime_qry(QString deviceId, int commandType, int parameterType, int pn, int queryNumber, int startPoint);
- void mk_set_parameters_qry(QString deviceId, int commandType, int parameterType, QString data_list);
- void mk_hisData_qry(QString deviceId, quint16 f_pno, quint16 f_fno, QDateTime t1, QDateTime t2, quint8 sep, quint8 num);
- signals:
- void CommData(QString DeviceID, int dir, QString data);
- void getEAlarm(QString DeviceCode, int erc, int sta, int arg1, int arg2, int arg3, float value, float v2, QString others, QDateTime t);
- void getEAnalogValue(QString DeviceCode, int point, float ave, float rtv, QDateTime t, float maxv, QDateTime maxt, float minv, QDateTime mint);
- void getERealtimeValue(QString DeviceCode, int point, float rtv, QDateTime t);
- public slots:
- void incomingConnection(qintptr socketDescriptor) override;
- void eCommData(QString DeviceID, int dir, QString data);
- void egetEAlarm(QString DeviceCode, int erc, int sta, int arg1, int arg2, int arg3, float value, float v2, QString others, QDateTime t);
- void egetEAnalogValue(QString DeviceCode, int point, float ave, float rtv, QDateTime t, float maxv, QDateTime maxt, float minv, QDateTime mint);
- void egetERealtimeValue(QString DeviceCode, int point, float rtv, QDateTime t);
- void closeThread();
- private:
- QList<SmartLightCommThread *> threadList;
- };
- #endif // SMARTLIGHTSERVER_H
|