Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -rccba568494c6b7214116f818a0ac89d0fa3ba81b -r11560b63360025c294edabc6f5f6da97ad1f20c3 --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision ccba568494c6b7214116f818a0ac89d0fa3ba81b) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 11560b63360025c294edabc6f5f6da97ad1f20c3) @@ -75,11 +75,8 @@ */ void MessageDispatcher::quit() { - // disabled coco begin validated: Application termination is not correctly done in coco!!! - // it has been tested and works perfectly fine in normal run. quitThread(); // validated } -// disabled coco end /*! * \brief Message Handler connections definition @@ -137,15 +134,11 @@ */ void MessageDispatcher::quitThread() { - // disabled coco begin validated: Application termination is not correctly done in coco!!! - // it has been tested and works perfectly fine in normal run. - if ( ! _thread ) return; // runs in thread moveToThread(qApp->thread()); // validated } -// disabled coco end /*! * \brief MessageDispatcher::onFrameReceive @@ -160,10 +153,8 @@ void MessageDispatcher::onFrameReceive(Can_Id vCan_Id, const QByteArray &vPayload) { // Append a message to the list - // disabled 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()) { - // disabled coco end _messageList[vCan_Id].append(Message()); } @@ -205,10 +196,8 @@ */ void MessageDispatcher::onFailedTransmit(Sequence vSequence) { - // disabled coco begin validated: Is a placeholder and has not been implemented yet emit didFailedTransmit(vSequence); } -// disabled coco end /*! * \brief MessageDispatcher::onActionTransmit @@ -353,21 +342,6 @@ onActionTransmit(GuiActionType::ID_AlarmVolumeSetReq, mData); } -/*! - * \brief MessageDispatcher::onAdjustment - * \details This method transmits the Alarm Acknowledge Request message. - * \param vData - Data model contains the user acknowledge request information. - * \return void - */ -/* // disabled coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. -void MessageDispatcher::onAdjustment(const AlarmClearedConditionRequestData &vData) -{ - QVariantList mData; - mData += vData.alarmID; - onActionTransmit(GuiActionType::ID_AlarmClearedConditionReq, mData); -} -// disabled coco end */ - /** * \details This method transmits the Saline Bolus Adjustment Denali message. * \param vData - Data model contains treatment Saline Bolus adjustment state. @@ -894,13 +868,11 @@ #endif } - // disabled coco begin validated: Has been tested manually but in this function this cannot be false because the message interpreter is doing the same validation. // still checking here in case the logic has changed therefore buildFrame should still validate the message for developer safety. if ( ! _builder.buildFrames(vActionId, mData, frameList, mSequence) ) { LOG_DEBUG(QString("Incorrect Message cannot be built")); // TODO : LogInfo Improvement return; } - // disabled coco end if (mNeedsAcknow) { // NOTE : here vSequence should be used which is not negative // because when we get the Acknow it is not the negative @@ -1027,12 +999,10 @@ checkAcknowTransmit(vMessage, srcText); // then if needs acknow send it immediately. } - // disabled coco begin validated: Has been validated manually. If MessageInterpreter::interpretMessage fails, this also returns false if ( _interpreter.interpretMessage( vMessage, mData ) ) { ok = true; emit didActionReceive(vMessage.actionId, mData); } - // disabled coco end _messageList[vMessage.can_id].removeLast(); return ok; @@ -1045,15 +1015,13 @@ */ Sequence MessageDispatcher::rxCount() { - // disabled 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; } -// disabled coco end /*! * \brief MessageDispatcher::txCount @@ -1062,15 +1030,13 @@ */ Sequence MessageDispatcher::txCount() { - // disabled 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; } -// disabled coco end /*! * \brief MessageDispatcher::needsAcknow @@ -1093,12 +1059,16 @@ { bool ok = true; switch(vCan_Id) { // list if the channels UI shall not Ack - case eChlid_HD_DG : // 0x008, ///< HD => DG - case eChlid_DG_HD : // 0x010, ///< DG => HD - case eDialin_HD : // 0x400, ///< dialin => HD - case eHD_Dialin : // 0x401, ///< HD => dialin - case eDialin_DG : // 0x402, ///< dialin => DG - case eDG_Dialin : // 0x403, ///< DG => dialin + case eChlid_TD_DD : + case eChlid_DD_TD : + case eChlid_DD_FP : + case eChlid_FP_DD : + case eDialin_TD : + case eTD_Dialin : + case eDialin_DD : + case eDD_Dialin : + case eDialin_FP : + case eFP_Dialin : ok = false; break; default: break;