12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef ALARMCHANNEL_H
- #define ALARMCHANNEL_H
- #include <QObject>
- #include <QTcpSocket>
- class SuObject {
- public:
- explicit SuObject(QString iotId="", QString istId="", quint16 type=0){
- IoTId = iotId;
- ISTId = istId;
- DevType = type;
- }
- QString iotId(){
- return IoTId;
- }
- QString istId(){
- return ISTId;
- }
- quint16 type(){
- return DevType;
- }
- private:
- QString IoTId;
- QString ISTId;
- quint16 DevType;
- };
- class AlarmChannel : public QObject
- {
- Q_OBJECT
- public:
- explicit AlarmChannel(QObject *parent = 0, QString ip="", quint16 port=0, QString termId="", QString termKey="");
-
- signals:
- void getData(QString data);
- void SoClose();
- public slots:
- void onConnected();
- void onTextMessageReceived();
- void onStatusChanged(QAbstractSocket::SocketState sta);
-
- private:
- QTcpSocket *so;
- QString Ip;
- quint16 Port;
- QString TermId;
- QString TermKey;
- };
- #endif // ALARMCHANNEL_H
|