#ifndef NETWORK_H #define NETWORK_H #include #include #include #include #include #include #include #include #include class NetComm : public QObject { Q_OBJECT public: NetComm(QObject *p = nullptr); STREAM_PACKET LedOkMakeStreamPacket(int iComType,int iLen,unsigned char *ucBuf,QString str); static DWORD WINAPI send(void *); void JieXiQJsonObjectOfLedCardInfo(const QJsonObject &subObj,const QString &strIp); void JieXiQJsonObjectOfLedCardInfoOld(const QString &strId,const QString &strIp); QList LedCardList; QTimer mUdpTimer; QUdpSocket mUdpSocket; signals: void addLedCard(LedCard *); void ClearHeartbeatFlagByUdp(LedCard *); public slots: void RestoreLedCardIpByUdpCmd(); private: QString m_strCardId; qint32 m_iWidth; LedCard *m_pLedCard; int m_port = 31296; }; extern NetComm *gUdp; #endif // NETWORK_H