Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -r057d3ef4e29c63235040c5cfe8c6421ef7787d6a -r5626bf604947efe5a80c9ca51802aab1a70a6939 --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 057d3ef4e29c63235040c5cfe8c6421ef7787d6a) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 5626bf604947efe5a80c9ca51802aab1a70a6939) @@ -76,7 +76,7 @@ { // coco begin validated: Application termination is not correctly done in coco!!! // it has been tested and works perfectly fine in normal run. - quitThread(); + quitThread(); // validated } // coco end @@ -138,7 +138,7 @@ if ( ! _thread ) return; // runs in thread - moveToThread(qApp->thread()); + moveToThread(qApp->thread()); // validated } // coco end @@ -155,7 +155,10 @@ void MessageDispatcher::onFrameReceive(Can_Id vCan_Id, const QByteArray &vPayload) { // Append a message to the list + // coco begin validated: if empty (first condition) is true, it must never check for the complete (second condition) + // because if the list is empty there is no last() item if (_messageList[vCan_Id].isEmpty() || _messageList[vCan_Id].last().isComplete()) { + // coco end _messageList[vCan_Id].append(Message()); } @@ -192,10 +195,12 @@ void MessageDispatcher::onFailedTransmit(Sequence vSequence) { + // coco begin validated: Is a placeholder and has not beed implemented yet Q_UNUSED(vSequence) // may requires showing an alarm screen // but we don't know yet. } +// coco end /*! * \brief MessageDispatcher::onActionTransmit @@ -343,13 +348,15 @@ */ Sequence MessageDispatcher::rxCount() { + // coco begin validated: has been manually validated since it requires so many received messages to reset the seq if ( _rxSequence < SEQUENCE_MAX ) { ++_rxSequence; } else { _rxSequence = 1; } return _rxSequence; } +// coco end /*! * \brief MessageDispatcher::txCount @@ -358,13 +365,15 @@ */ Sequence MessageDispatcher::txCount() { + // coco begin validated: has been manually validated since it requires so many received messages to reset the seq if ( _txSequence < SEQUENCE_MAX ) { ++_txSequence; } else { _txSequence = 1; } return _txSequence; } +// coco end /*! * \brief MessageDispatcher::needsAcknow