qt_pdu_msgq.h 497 B

123456789101112131415161718192021222324252627282930
  1. #ifndef QTMSGQUEUE_H
  2. #define QTMSGQUEUE_H
  3. #include <QObject>
  4. #include <sys/msg.h>
  5. #include "pdu_ctrl.h"
  6. class qt_pdu_msgq : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit qt_pdu_msgq(QObject *parent = nullptr);
  11. signals:
  12. void newMessageReceived(int nCtrlType,const char* msg, int* nvalue,double* fvalue);
  13. public slots:
  14. void startListening();
  15. void stopListening();
  16. void sendResponse(MsgData* pMSGData);
  17. private:
  18. int msgid;
  19. bool running;
  20. };
  21. #endif // QTMSGQUEUE_H