Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -r7ed86349cdad43d311f776a69ed54c2023265e53 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 7ed86349cdad43d311f776a69ed54c2023265e53) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -196,7 +196,7 @@ void MessageDispatcher::onFailedTransmit(Sequence vSequence) { - // coco begin validated: Is a placeholder and has not beed implemented yet + // coco begin validated: Is a placeholder and has not been implemented yet emit didFailedTransmit(vSequence); } // coco end @@ -231,7 +231,7 @@ /*! * \brief MessageDispatcher::onAdjustment * \details This method transmits the treatment duration Adjustment Denali message. - * \param vData - Data model contains treatment duration adjustment value in minuts + * \param vData - Data model contains treatment duration adjustment value in minutes * \return void */ void MessageDispatcher::onAdjustment(const AdjustDurationRequestData &vData) @@ -332,10 +332,10 @@ #endif } - // coco begin validated: Has been tested manyally but in this function this can't be false because the message interpreter is doing the same validation. + // coco begin validated: Has been tested manually but in this function this can't 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 can't be built")); // TODO : LOGGINF IMPROVEMENT + LOG_DEBUG(QString("Incorrect Message can't be built")); // TODO : LOGGINFO IMPROVEMENT return; } // coco end @@ -373,7 +373,7 @@ bool MessageDispatcher::buildMessage(Can_Id vCan_Id, const QByteArray &vPayload) { if (vPayload.length() < eLenCanFrame) { - // Each frame has to have exactly 8 (eLenCanFrame) bytes of data and not used bytes should be passed as 00. + // Each frame has to have exactly 8 (eLenCanFrame) bytes of data and unused bytes should be passed as 00. LOG_DEBUG(QString("Incorrect frame length. Exp:%1,got:%2").arg(eLenCanFrame).arg(vPayload.length())); return false; } Index: sources/canbus/messageglobals.h =================================================================== diff -u -r7ed86349cdad43d311f776a69ed54c2023265e53 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/canbus/messageglobals.h (.../messageglobals.h) (revision 7ed86349cdad43d311f776a69ed54c2023265e53) +++ sources/canbus/messageglobals.h (.../messageglobals.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -1,16 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * + * * \file messageglobals.h * \author (last) Peter Lucia * \date (last) 25-Jun-2020 * \author (original) Behrouz NematiPour * \date (original) 06-Dec-2019 - * + * */ #pragma once @@ -172,7 +172,7 @@ eChlid_UI_HD = 0x100, ///< UI => HD [Out] // UI lessens occasionally - eChlid_DG_UI = 0x070, ///< No direct channel has been defined between DG&UI, May be required for logging + eChlid_DG_UI = 0x070, ///< DG => UI eChlid_UI_DG = eChlid_UI_Sync , ///< No direct channel has been defined between DG&UI, May be required for logging }; @@ -193,15 +193,15 @@ // coco begin validated:Has been validated manually. // Since the crc is part of the data and there is no message without crc // initialized flag and data.length() == 0 became the same. - // I preffer too keep it as it is so the initialization would be independent of the data. + // It's been preferred too keep it as it is so the initialization would be independent of the data. return !initialized || !data.length(); // coco end } bool isComplete() { // coco begin validated:Has been validated manually. // Since the crc is part of the data and there is no message without crc // then a message would never be empty. - // I preffer too keep it as it is so the initialization would be independent of the data. + // I prefer too keep it as it is so the initialization would be independent of the data. return !isEmpty() && data.length() == length; // coco end } Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -36,9 +36,9 @@ /*! * \brief MessageInterpreter::notify - * \details Checks and Prepaires the model with the Message Data - * Regarding the type of message logs the message recived. - * Notofies observers by emiting the didActionReceive( < Data > ) signal + * \details Checks and prepares the model with the Message Data + * Regarding the type of message logs the message received. + * Notifies observers by emitting the didActionReceive( < Data > ) signal * \param vMessage - The Denali message * \param vID - The Message ID to be checked against * \param vModel - The appropriate model for the Message Data @@ -55,7 +55,7 @@ tModel.toVariantList(vData); // coco begin validated : Tested manually. This code will never go false // because the isValidMessage is catching errors. - // only is checking here for developer safty if logic has changed. + // only is checking here for developer safety if logic has changed. if ( ! ok ) return false; // coco end emit didActionReceive(tModel.data()); @@ -81,8 +81,8 @@ /*! * \brief MessageInterpreter::isPayloadLenValid - * \details Checks if the Data length has been defined for this type od messsage - * if not logs Undefind Data Length error + * \details Checks if the Data length has been defined for this type of message + * if not logs Undefined Data Length error * if defined checks if the correct length of data is provided for this type of message. * if not logs Incorrect Data Length error * otherwise returns true @@ -104,16 +104,21 @@ return true; } +/*! + * \brief MessageInterpreter::logInvalidLength + * \details Logs invalid data length for the message type vActionId + * \param vActionId - Message Type + */ void MessageInterpreter::logInvalidLength(const Gui::GuiActionType &vActionId) { QString mActionIdHexString = Format::toHexString(vActionId); - LOG_DEBUG(QString("Incorrect data length for trsansmit Message with ID '%1'") + LOG_DEBUG(QString("Incorrect data length for transmit message with ID '%1'") .arg(mActionIdHexString)); } /*! * \brief MessageInterpreter::validateMessage - * \details Validate the messgae by checking its type and data + * \details Validate the message by checking its type and data * \param vMessage - The message * \param vType - The type of the message to be checked against * \return true on valid massage @@ -138,15 +143,15 @@ QString mActionIdHexString = Format::toHexString(vMessage.actionId, false, eLenMessageIDDigits); QString logMessage = tr("Unhandled Message ID (HD)") + '\n' + QString("%1 # %2 %3") - .arg(int(vMessage.can_id), 3, 16, QChar('0')) - .arg(mActionIdHexString) - .arg(QString(vMessage.data.toHex('.'))); + .arg(int(vMessage.can_id), 3, 16, QChar('0')) + .arg(mActionIdHexString) + .arg(QString(vMessage.data.toHex('.'))); LOG_DEBUG(logMessage); } /*! * \brief MessageInterpreter::logReceived - * \details Regarding the type of message logs the message recived. + * \details Regarding the type of message logs the message received. * \param vModel - the MAbstract model type */ void MessageInterpreter::logReceivedMessage(const Model::MAbstract &vModel) @@ -282,7 +287,7 @@ case eChlid_DG_HD : case eChlid_DG_UI : - // case eChlid_DG_Alarm: // commented out for now. Currentlyh there is no message in this category. + // case eChlid_DG_Alarm: // commented out for now. Currently there is no message in this category. case eChlid_DG_Sync : ok = interpretMessage_DG(vMessage, vData); break; default: @@ -387,7 +392,7 @@ case Gui::GuiActionType::ID_DGTemperaturesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGTemperaturesData ); break; case Gui::GuiActionType::ID_DGDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGDebugText ); break; - // unhandles messages: these will only be logged as received message + // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. default: printUnhandled (vMessage); Index: sources/gui/guiglobals.cpp =================================================================== diff -u -r0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -103,7 +103,7 @@ QObject::connect(_viewer, &QQuickView::statusChanged, qApp, [=](QQuickView::Status vStatus) { // coco begin validated: this portion of the code is handling application initialization - // and if not initialized correctly will terminate the applicaiton . + // and if not initialized correctly will terminate the application . // So it had been manually tested. bool ok = vStatus == QQuickView::Ready; if (ok) { Index: sources/gui/guiglobals.h =================================================================== diff -u -r474e5b3680d8acbf0ac79062124352d0b3d43b65 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/gui/guiglobals.h (.../guiglobals.h) (revision 474e5b3680d8acbf0ac79062124352d0b3d43b65) +++ sources/gui/guiglobals.h (.../guiglobals.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -35,7 +35,7 @@ * *** So it has to be converted, each time it is referenced. ***\n * *** Since an enum is a constant value, ***\n * *** There is no point in calculating it on each reference. ***\n - * *** Therefore it is preffered to keep them as constant values ***\n + * *** Therefore it is preferred to keep them as constant values ***\n * *** Exactly as it is going to be shown/used in denali messages ***\n * *** then it can be compared exactly the way it is with no conversion.***\n */ Index: sources/gui/qml/main.qml =================================================================== diff -u -r7c2a96774285bb618946f125763bf7bea7acadd8 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/gui/qml/main.qml (.../main.qml) (revision 7c2a96774285bb618946f125763bf7bea7acadd8) +++ sources/gui/qml/main.qml (.../main.qml) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -101,6 +101,7 @@ _alarm_dialog.visible = false; } } + VPowerOff { id: vPowerOff } VHDOperationMode { id: vHDOperationMode } VTreatmentBloodFlow { id: vTreatmentBloodFlow } Index: sources/model/MAbstract.cpp =================================================================== diff -u -r96d3da12ee7760f0d97fd7c2e9e89e56bcdcf6b1 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/model/MAbstract.cpp (.../MAbstract.cpp) (revision 96d3da12ee7760f0d97fd7c2e9e89e56bcdcf6b1) +++ sources/model/MAbstract.cpp (.../MAbstract.cpp) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -22,8 +22,8 @@ /*! * \brief MAbstract::toVariantList - * \details Currnet values of the model data will be listed in a QVariantList vData. - * It has been mostly been used for debugging with the Generic onAcitonRecived which has the QVariantList as the signal parameter. + * \details Current values of the model data will be listed in a QVariantList vData. + * It has been mostly been used for debugging with the Generic onActionReceived which has the QVariantList as the signal parameter. * \param vData - The output data of the QVariantList */ void MAbstract::toVariantList(QVariantList &vData) const { Index: sources/model/MModel.h =================================================================== diff -u -r7ed86349cdad43d311f776a69ed54c2023265e53 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/model/MModel.h (.../MModel.h) (revision 7ed86349cdad43d311f776a69ed54c2023265e53) +++ sources/model/MModel.h (.../MModel.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -66,7 +66,7 @@ * \endcode * * 3 - MSG Payload Len : - * Add a line in the "messageglobals.h" in paloadLen hash table + * Add a line in the "messageglobals.h" in payloadLen hash table * to define the required payload length of the message * * 4 - Model Implementation : Index: sources/view/vtreatmentadjustmentresponsebase.h =================================================================== diff -u -r96d3da12ee7760f0d97fd7c2e9e89e56bcdcf6b1 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/view/vtreatmentadjustmentresponsebase.h (.../vtreatmentadjustmentresponsebase.h) (revision 96d3da12ee7760f0d97fd7c2e9e89e56bcdcf6b1) +++ sources/view/vtreatmentadjustmentresponsebase.h (.../vtreatmentadjustmentresponsebase.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -22,7 +22,7 @@ #include "vview.h" #include "guiglobals.h" -// forward diclations +// forward declarations class tst_views; // namespace Index: sources/view/vtreatmentadjustmentultrafiltrationconfirm.h =================================================================== diff -u -r7ed86349cdad43d311f776a69ed54c2023265e53 -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/view/vtreatmentadjustmentultrafiltrationconfirm.h (.../vtreatmentadjustmentultrafiltrationconfirm.h) (revision 7ed86349cdad43d311f776a69ed54c2023265e53) +++ sources/view/vtreatmentadjustmentultrafiltrationconfirm.h (.../vtreatmentadjustmentultrafiltrationconfirm.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -1,16 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * + * * \file vtreatmentadjustmentultrafiltrationconfirm.h * \author (last) Behrouz NemaiPour * \date (last) 22-Jun-2020 * \author (original) Behrouz NemaiPour * \date (original) 09-Jun-2020 - * + * */ #pragma once Index: unittests/tst_messaging.h =================================================================== diff -u -r0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c -ree50b509107a743f6133a33371e18646ff9c10b2 --- unittests/tst_messaging.h (.../tst_messaging.h) (revision 0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c) +++ unittests/tst_messaging.h (.../tst_messaging.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -111,7 +111,4 @@ void tst_MessageDispatcher_actionTransmit(); void tst_MessageDispatcher_actionTransmit_Unknown(); - }; - - Index: unittests/tst_models.h =================================================================== diff -u -r0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c -ree50b509107a743f6133a33371e18646ff9c10b2 --- unittests/tst_models.h (.../tst_models.h) (revision 0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c) +++ unittests/tst_models.h (.../tst_models.h) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -28,7 +28,6 @@ explicit tst_models(QObject *parent = nullptr); private slots: - void tst_MTreatmentRanges_data (); void tst_MTreatmentRanges (); @@ -53,7 +52,6 @@ void tst_MAdjustUltrafiltrationConfirmResponse_data (); void tst_MAdjustUltrafiltrationConfirmResponse (); - // - Data Messages void tst_DGROPumpData_data(); void tst_DGROPumpData(); @@ -108,4 +106,3 @@ void tst_MSalineBolusResponse_data(); void tst_MSalineBolusResponse(); }; -