Index: sources/canbus/messageacknowmodel.h =================================================================== diff -u -r939d1bae9a394697d46ca913a2dc3442bf8ef82f -r1ec7b44e6d1d66460d2da943ff65f3c0c0755d8f --- sources/canbus/messageacknowmodel.h (.../messageacknowmodel.h) (revision 939d1bae9a394697d46ca913a2dc3442bf8ef82f) +++ sources/canbus/messageacknowmodel.h (.../messageacknowmodel.h) (revision 1ec7b44e6d1d66460d2da943ff65f3c0c0755d8f) @@ -29,6 +29,7 @@ /*! * \brief The AcknowModel class * \details This is the private class of the MessageAcknowModel + * which keeps list of the messages require Acknow. * but since Qt doesn't support nested meta objects, * it has been moved out with a meaningful namespace. */ @@ -38,7 +39,7 @@ const int _interval = 1000; // in ms int _timerId = 0; - quint8 _retry = 9; + quint8 _retry = 5; Can_Id _can_Id = Can_Id::eChlid_NONE; Sequence _sequence = 0; @@ -53,9 +54,7 @@ _frameList = vFrameList; } - void start() { - _timerId = startTimer(_interval); - } + void start(); protected: /*! @@ -77,11 +76,30 @@ } signals: + + /*! + * \brief didFramesTransmit + * \details This signal is emitted when the requested Acknow has not been received during the _interval to retry to send message. + * \param vCan_Id - Denali message Can channel + * \param vSequence - Sequence number of the message which requires Acknow + * \param vFrameList - List of the frames to be sent on retries. + */ void didFramesTransmit(Can_Id vCan_Id, Sequence vSequence, const FrameList &vFrameList); // Retry + + /*! + * \brief didFailedTransmit + * \details This signal is emitted when the requested Acknow has not been received after all the _retry times of retries. + * \param vSequence + */ void didFailedTransmit( Sequence vSequence ); // Retry failed }; } + +/*! + * \brief The MessageAcknowModel class + * \details The wrapper class of the AcknowModel which does the thread handling. + */ class MessageAcknowModel : public QObject { Q_OBJECT @@ -110,7 +128,23 @@ void quitThread(); signals: + + /*! + * \brief didFramesTransmit + * \details This signal is the propagation signal to propagate the AcknowModel Message signal of the same name + * when the requested Acknow has not been received during the _interval to retry to send message. + * \param vCan_Id - Denali message Can channel + * \param vSequence - Sequence number of the message which requires Acknow + * \param vFrameList - List of the frames to be sent on retries. + */ void didFramesTransmit(Can_Id vCan_Id, Sequence vSequence, const FrameList &vFrameList); // Retry + + /*! + * \brief didFailedTransmit + * \details This signal is the propagation signal to propagate the AcknowModel Message signal of the same name + * when the requested Acknow has not been received after all the _retry times of retries. + * \param vSequence + */ void didFailedTransmit( Sequence vSequence ); // Retry failed private slots: