Index: sources/canbus/MessageAcknowModel.h =================================================================== diff -u -rfc329c788fe9453983072bee937ccbc95b4ed6e4 -r922463c555493a51ea20744a95dd62976adaf0f9 --- sources/canbus/MessageAcknowModel.h (.../MessageAcknowModel.h) (revision fc329c788fe9453983072bee937ccbc95b4ed6e4) +++ sources/canbus/MessageAcknowModel.h (.../MessageAcknowModel.h) (revision 922463c555493a51ea20744a95dd62976adaf0f9) @@ -120,10 +120,28 @@ QThread *_thread = nullptr; bool _init = false; + const int _interval = 1000; // in ms + bool _checkin = false; + +protected: + void timerEvent(QTimerEvent *) override { + if ( _checkin ) + emit didCheckIn(); + } + public slots: bool init(); bool init(QThread &vThread); + /*! + * \brief doStartCheckIn + * \details emits the first check-in signal and sets the check-in flag to start the check-in + */ + void doStartCheckIn() { + emit didCheckIn(); + _checkin = true; + } + private slots: void quit(); @@ -134,6 +152,11 @@ void quitThread(); signals: + /*! + * \brief didCheckIn + * \details This signal is emitted on each interval (1s) to notify MessageDispatcher to send a Check-In + */ + void didCheckIn(); /*! * \brief didFramesTransmit