Index: denali.pro =================================================================== diff -u -r604a782b50c9fc749c3bd71485e285c1070f1e01 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- denali.pro (.../denali.pro) (revision 604a782b50c9fc749c3bd71485e285c1070f1e01) +++ denali.pro (.../denali.pro) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -52,12 +52,6 @@ common/MsgDefs.h \ \ # Main sources/main.h \ - sources/model/MTreatmentParameters.h \ - sources/model/MTreatmentParametersResp.h \ - sources/storage/filesaver.h \ - sources/model/MDGDebugText.h \ - sources/model/MHDDebugText.h \ - sources/storage/DriveWatcher.h \ sources/Threads.h \ sources/MainTimer.h \ sources/ApplicationPost.h \ @@ -67,6 +61,11 @@ sources/model/MModel.h \ sources/model/MAbstract.h \ sources/model/MPowerOff.h \ + sources/model/MEndTreatmentResponse.h \ + sources/model/MStartTreatmentResponse.h \ + sources/model/MTreatmentParametersResp.h \ + sources/model/MDGDebugText.h \ + sources/model/MHDDebugText.h \ \ # ---------- Models - Alarm sources/model/hd/alarm/MAlarmCleared.h \ sources/model/hd/alarm/MAlarmTriggered.h \ @@ -89,6 +88,7 @@ sources/model/hd/data/MTreatmentStatesData.h \ sources/model/hd/data/MHDOperationModeData.h \ sources/model/hd/data/MTreatmentSalineData.h \ + sources/model/hd/data/MPrimingData.h \ \ # ---------- Models - DG - Data sources/model/dg/data/MDGDrainPumpData.h \ sources/model/dg/data/MDGHeatersData.h \ @@ -113,10 +113,13 @@ sources/gui/GuiView.h \ sources/gui/GuiController.h \ \ # ---------- Views ---------- - sources/view/VCreateTreatment.h \ + sources/view/VTreatmentCreate.h \ + sources/view/VTreatmentEnd.h \ + sources/view/VTreatmentBegin.h \ sources/view/VEventSpy.h \ sources/view/VView.h \ sources/view/VPowerOff.h \ + sources/view/VPriming.h \ \ # ---------- Views - Alarm sources/view/hd/alarm/VAlarmStatus.h \ \ # ---------- Views - HD - Adjustment - In-Treatment @@ -152,6 +155,8 @@ sources/storage/StorageGlobals.h \ sources/storage/Logger.h \ sources/storage/FileHandler.h \ + sources/storage/FileSaver.h \ + sources/storage/DriveWatcher.h \ \ # Utility sources/utility/crc.h \ sources/utility/format.h \ @@ -164,8 +169,6 @@ \ # common \ # Main main.cpp \ - sources/model/MTreatmentParameters.cpp \ - sources/model/MTreatmentParametersResp.cpp \ sources/Threads.cpp \ sources/MainTimer.cpp \ sources/ApplicationPost.cpp \ @@ -174,6 +177,11 @@ \ # ---------- Models ---------- sources/model/MAbstract.cpp \ sources/model/MPowerOff.cpp \ + sources/model/MHDDebugText.cpp \ + sources/model/MEndTreatmentResponse.cpp \ + sources/model/MStartTreatmentResponse.cpp \ + sources/model/MTreatmentParametersResp.cpp \ + sources/model/MDGDebugText.cpp \ \ # ---------- Models - Alarm sources/model/hd/alarm/MAlarmCleared.cpp \ sources/model/hd/alarm/MAlarmTriggered.cpp \ @@ -187,7 +195,6 @@ sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustPressuresLimitsResponse.cpp \ \ # ---------- Models - HD - Data - sources/model/MHDDebugText.cpp \ sources/model/hd/data/MTreatmentTimeData.cpp \ sources/model/hd/data/MTreatmentFlowsData.cpp \ sources/model/hd/data/MTreatmentOutletFlowData.cpp \ @@ -196,8 +203,8 @@ sources/model/hd/data/MTreatmentStatesData.cpp \ sources/model/hd/data/MHDOperationModeData.cpp \ sources/model/hd/data/MTreatmentSalineData.cpp \ + sources/model/hd/data/MPrimingData.cpp \ \ # ---------- Models - DG - Data - sources/model/MDGDebugText.cpp \ sources/model/dg/data/MDGDrainPumpData.cpp \ sources/model/dg/data/MDGHeatersData.cpp \ sources/model/dg/data/MDGLoadCellReadingsData.cpp \ @@ -220,9 +227,12 @@ sources/gui/GuiView.cpp \ sources/gui/GuiController.cpp \ \ # ---------- Views ---------- + sources/view/VTreatmentCreate.cpp \ + sources/view/VTreatmentEnd.cpp \ + sources/view/VTreatmentBegin.cpp \ sources/view/VEventSpy.cpp \ + sources/view/VPriming.cpp \ sources/view/VPowerOff.cpp \ - sources/view/VCreateTreatment.cpp \ \ # ---------- Views - Alarm sources/view/hd/alarm/VAlarmStatus.cpp \ \ # ---------- Views - HD - Adjustment - In-Treatment @@ -259,7 +269,7 @@ sources/storage/FileHandler.cpp \ sources/storage/Logger.cpp \ sources/storage/DriveWatcher.cpp \ - sources/storage/filesaver.cpp \ + sources/storage/FileSaver.cpp \ \ # Utility sources/utility/crc.cpp \ sources/utility/format.cpp \ @@ -404,7 +414,7 @@ # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin +else: unix:!android: target.path = /home/root !isEmpty(target.path): INSTALLS += target DISTFILES += \ Index: denali.pro.user =================================================================== diff -u -re58be51c4aa52938af250db3ee579e98de08542c -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- denali.pro.user (.../denali.pro.user) (revision e58be51c4aa52938af250db3ee579e98de08542c) +++ denali.pro.user (.../denali.pro.user) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -1176,7 +1176,7 @@ denali Qt4ProjectManager.Qt4RunConfiguration:/home/denali/Projects/application/denali.pro - + -q -u -l 3768 false true Index: denali.qrc =================================================================== diff -u -rc1474e48907082e10a2eb03adf40f0acd4af9a63 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- denali.qrc (.../denali.qrc) (revision c1474e48907082e10a2eb03adf40f0acd4af9a63) +++ denali.qrc (.../denali.qrc) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -32,6 +32,8 @@ resources/images/Wave-Minus.png resources/images/Wave-Plus.png resources/images/microsd.png + resources/images/check.png + resources/images/checkCircle.png resources/images/OffGray.png resources/images/Done.png @@ -63,8 +65,10 @@ sources/gui/qml/components/ProgressCircle.qml sources/gui/qml/components/Slider.qml sources/gui/qml/components/SliderCreateTreatment.qml + sources/gui/qml/components/ConfirmTreatmentTable.qml + sources/gui/qml/components/ConfirmTreatmentSubTable.qml sources/gui/qml/components/SliderDoubleCreateTreatment.qml - sources/gui/qml/components/RectSelectCreateTreatment.qml + sources/gui/qml/components/GridSelection.qml sources/gui/qml/components/TopMenuBarCreateTreatment.qml sources/gui/qml/components/ProgressBarEx.qml sources/gui/qml/components/CloseButton.qml @@ -76,7 +80,10 @@ sources/gui/qml/components/ImageWave.qml sources/gui/qml/components/ImageClock.qml sources/gui/qml/components/ImageLogoDDarkTransparent.qml + sources/gui/qml/components/PrimingTimer.qml + sources/gui/qml/components/ConfirmTreatmentTableEntry.qml sources/gui/qml/components/DebugDataColumn.qml + sources/gui/qml/components/CheckListItem.qml sources/gui/qml/components/RangeSlider.qml Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r0583a63307936f09e184dfe16acca25f9e3fd81c -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 0583a63307936f09e184dfe16acca25f9e3fd81c) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -364,6 +364,22 @@ onActionTransmit(GuiActionType::ID_AdjustSalineReq, mData); } +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Pressures Limits Adjustment Denali message. + * \param vData - Data model contains treatment Pressures Limits adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustPressuresLimitsRequestData &vData) +{ + QVariantList mData; + mData += vData.mArterialLimitLow ; + mData += vData.mArterialLimitHigh; + mData += vData.mVenousLimitLow ; + mData += vData.mVenousLimitHigh ; + onActionTransmit(GuiActionType::ID_AdjustPressuresLimitsReq, mData); +} + /** * \details This method transmits the Treatment Parameter request message. * \param vData - Data model contains treatment parameter adjustment data structure Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r604a782b50c9fc749c3bd71485e285c1070f1e01 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 604a782b50c9fc749c3bd71485e285c1070f1e01) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -1,5 +1,5 @@ /*! - * + * * 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 @@ -74,10 +74,17 @@ {Gui::GuiActionType::ID_AlarmStatus , 4 * 4 + 2 }, // 4 parameters each 4bytes + 1 parameter 2bytes {Gui::GuiActionType::ID_AlarmTriggered , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AlarmCleared , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AlarmSilenceReq , 5 * 4 }, // 5 parameters each 4bytes - {Gui::GuiActionType::ID_AlarmSilenceRsp , 5 * 4 }, // 5 parameters each 4bytes + {Gui::GuiActionType::ID_AlarmSilenceReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AlarmUserAckReq , 1 * 4 }, // 1 parameter each 4bytes // ---- + {Gui::GuiActionType::ID_StartTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_StartTreatmentRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_ConfirmTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_EndTreatmentReq , 0 }, + {Gui::GuiActionType::ID_EndTreatmentRsp , 0 }, + + // ---- {Gui::GuiActionType::ID_TreatmentRanges , 6 * 4 }, // 6 parameters each 4bytes {Gui::GuiActionType::ID_TreatmentStates , 3 * 4 }, // 3 parameters each 4bytes @@ -110,6 +117,8 @@ {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp , 5 * 4 }, // ---- + {Gui::GuiActionType::ID_PrimingData , 3 * 4 }, // 3 parameters each 4bytes + // ---- {Gui::GuiActionType::ID_AdjustSalineReq , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustSalineRsp , 3 * 4 }, // 3 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -rde5d54c6f66a8276fae1cb4bbdfe7902535cfa93 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision de5d54c6f66a8276fae1cb4bbdfe7902535cfa93) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -144,9 +144,9 @@ 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); } @@ -187,6 +187,7 @@ vPayload.clear(); int length = vData.length(); + LOG_EVENT(QString("%0").arg(vActionId)); switch (vActionId) { // notice we are in transmit mode case Gui::GuiActionType::ID_Acknow: // len: 0, can have zero len break; // No data, Just registered @@ -259,20 +260,41 @@ LOG_EVENT(AlarmSilenceRequestData::toString(vData)); break; - case Gui::GuiActionType::ID_CreateTreatmentReq: { + case Gui::GuiActionType::ID_AlarmUserAckReq: if ( ! length ) { logInvalidLength(vActionId); return false; } vPayload = Format::fromVariant(vData); - MAdjustTreatmentParametersRequest params; - params.fromVariantList(vData); - LOG_EVENT(params.toString()); - } break; + LOG_EVENT(AlarmAcknowledgeRequestData::toString(vData)); + break; - default: { + case Gui::GuiActionType::ID_StartTreatmentReq: + if ( ! length ) { logInvalidLength(vActionId); return false; } + vPayload = Format::fromVariant(vData); + LOG_EVENT(StartTreatmentRequestData::toString(vData)); + break; + + case Gui::GuiActionType::ID_ConfirmTreatmentReq: + if ( ! length ) { logInvalidLength(vActionId); return false; } + vPayload = Format::fromVariant(vData); + LOG_EVENT(ConfirmTreatmentRequestData::toString(vData)); + break; + + case Gui::GuiActionType::ID_EndTreatmentReq: + if ( length != 0 ) { logInvalidLength(vActionId); return false; } + vPayload = Format::fromVariant(vData); + LOG_EVENT(EndTreatmentRequestData::toString(vData)); + break; + + case Gui::GuiActionType::ID_CreateTreatmentReq: + if ( ! length ) { logInvalidLength(vActionId); return false; } + vPayload = Format::fromVariant(vData); + LOG_EVENT(AdjustTreatmentParametersRequestData::toString(vData)); + break; + + default: QString mActionIdHexString = Format::toHexString(vActionId); LOG_DEBUG(mSenderID + tr("Unknown transmit Message with ID '%1'").arg(mActionIdHexString)); ok = false; - } break; - + break; } return ok; } @@ -339,6 +361,7 @@ case Gui::GuiActionType::ID_TreatmentRanges : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentRanges ); break; case Gui::GuiActionType::ID_PressureOcclusion : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PressureOcclusion ); break; case Gui::GuiActionType::ID_TreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentStates ); break; + case Gui::GuiActionType::ID_PrimingData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PrimingData ); break; case Gui::GuiActionType::ID_Saline : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Saline ); break; // ----- Events @@ -351,6 +374,7 @@ case Gui::GuiActionType::ID_AlarmStatus : ok = alarmStatus (vMessage, vData); break; // TODO : implement notify<>() case Gui::GuiActionType::ID_AlarmTriggered : ok = alarmTriggered (vMessage, vData); break; // TODO : implement notify<>() case Gui::GuiActionType::ID_AlarmCleared : ok = alarmCleared (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_CreateTreatmentRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_CreateTreatmentRsp ); break; // Adjustment Response Messages case Gui::GuiActionType::ID_AdjustDurationRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDurationRsp ); break; @@ -363,11 +387,12 @@ case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // TODO : implement notify<>() case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); break; // TODO : implement notify<>() - case Gui::GuiActionType::ID_CreateTreatmentRsp : ok = createTreatmentRespData (vMessage, vData); break; - // unhandles messages: these will only be logged as received message + case Gui::GuiActionType::ID_StartTreatmentRsp : ok = notify (vMessage, vData, Gui::GuiActionType::ID_StartTreatmentRsp ); break; + case Gui::GuiActionType::ID_EndTreatmentRsp : ok = notify (vMessage, vData, Gui::GuiActionType::ID_EndTreatmentRsp ); break; + // unhandles messages: these will only be logged as received message // there has nothing been defined for these messages. - default : printUnhandled (vMessage ); break; + default : printUnhandled (vMessage ); break; } return ok; @@ -573,24 +598,3 @@ return ok; } - -/*! - * \brief MessageInterpreter::createTreatmentRespData - * Checks the validity of the create treatment response data. - * \param vMessage - The message - * \param vData - the output data - * \return true if ok, false otherwise - */ -bool MessageInterpreter::createTreatmentRespData(const Message &vMessage, QVariantList &vData) { - bool ok = false; - if ( ! isValidMessage(vMessage, Gui::GuiActionType::ID_CreateTreatmentRsp) ) return ok; - - Model::MTreatmentParametersResponse mData; - ok = mData.fromByteArray(vMessage.data); - LOG_DATUM(mData.toString()); - - mData.toVariantList(vData); - emit didActionReceive(mData.data()); - - return ok; -} Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r53134008481fd775533e8988b7436f2f75e47336 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 53134008481fd775533e8988b7436f2f75e47336) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -58,6 +58,7 @@ #include "VTreatmentAdjustmentUltrafiltrationEdit.h" #include "VTreatmentAdjustmentUltrafiltrationConfirm.h" #include "VTreatmentAdjustmentSaline.h" +#include "VTreatmentAdjustmentPressuresLimits.h" namespace Gui { MainView *_viewer = nullptr; Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r604a782b50c9fc749c3bd71485e285c1070f1e01 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 604a782b50c9fc749c3bd71485e285c1070f1e01) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -1,5 +1,5 @@ /*! - * + * * 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 @@ -86,17 +86,24 @@ ID_TreatmentStates = 0x0F00, // 15 ID_Saline = 0x2F00, // 47 - ID_AlarmStatus = 0x0200, - ID_AlarmTriggered = 0x0300, - ID_AlarmCleared = 0x0400, - ID_CreateTreatmentReq = 0x3500, // 53 - Not implemented yet on FW side - ID_CreateTreatmentRsp = 0x3600, // 54 - Not implemented yet on FW side + ID_AlarmStatus = 0x0200, + ID_AlarmTriggered = 0x0300, + ID_AlarmCleared = 0x0400, + ID_AlarmUserAckReq = 0x3F00, // 63 + ID_AlarmSilenceReq = 0x3200, // 50 - ID_AlarmSilenceReq = 0x3200, // 50 - Not implemented yet on FW side - ID_AlarmSilenceRsp = 0x0000, // Needs to be removed. + ID_CreateTreatmentReq = 0x3500, // 53 + ID_CreateTreatmentRsp = 0x3600, // 54 + ID_StartTreatmentReq = 0x3800, // 56 + ID_StartTreatmentRsp = 0x3900, // 57 + ID_ConfirmTreatmentReq = 0x3A00, // 58 + ID_EndTreatmentReq = 0x3C00, // 60 + ID_EndTreatmentRsp = 0x3D00, // 61 - ID_HDOperationModeData = 0x2500, // 37 + ID_PrimingData = 0x4300, // 67 + ID_HDOperationModeData = 0x2500, // 37 + ID_DGROPumpData = 0x1F00, // 31 ID_DGPressuresData = 0x2000, // 32 ID_DGDrainPumpData = 0x2400, // 36 Index: sources/gui/qml/components/RangeRect.qml =================================================================== diff -u -r9d8a60eb984003d3f7814cbe507b1b37f519bc80 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 9d8a60eb984003d3f7814cbe507b1b37f519bc80) +++ sources/gui/qml/components/RangeRect.qml (.../RangeRect.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -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 RangeRect.qml * \author (last) Peter Lucia * \date (last) 06-Oct-2020 * \author (original) Behrouz NematiPour * \date (original) 24-Jan-2020 - * + * */ // Qt @@ -26,9 +26,9 @@ Rectangle { id: _root signal clicked(var vMouseEvent) signal dragged(var vMouseEvent) - signal pressChanged() + signal released(var vMouseEvent) + signal pressed(var vMouseEvent) - property int decimal : 0 property real minimum : 0 ///< minimum value of the range property real maximum : 0 ///< maximum value of the range @@ -90,12 +90,14 @@ onPositionChanged: { _root.dragged(mouse) } - onClicked: { _root.clicked(mouse) } - onPressedChanged: { - _root.pressChanged(); + onReleased: { + _root.released(mouse) } + onPressed: { + _root.pressed(mouse) + } } } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -rb62ab443e75b76a91e35aca6ba2efd84e7199602 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision b62ab443e75b76a91e35aca6ba2efd84e7199602) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -23,77 +23,82 @@ * whcih is going to be used in the project */ QtObject { - readonly property color backgroundMain : "#1A344D" - readonly property color backgroundButtonNormal : "Transparent" - readonly property color backgroundButtonSelect : "#438FEB" - readonly property color backgroundButtonSelectDark : "#214773" - readonly property color backgroundDialog : "#254670" - readonly property color backgroundMenu : "#14314C" - readonly property color backgroundMainMenu : "#0D2639" - readonly property color backgroundDottedMenu : "#64809D" - readonly property color backgroundSlider : "#195187" + readonly property color red : "#c53b33" // red + readonly property color white : "white" // white + readonly property color transparent : "Transparent" // No Color - readonly property color backgroundUltrafiltrationButton : "#31568F" - readonly property color textValueUltrafiltrationButtonFg : "#98aec2" + readonly property color separatorLine : "#5f809d" + readonly property color backgroundMain : "#1A344D" + readonly property color backgroundButtonNormal : transparent + readonly property color backgroundButtonSelect : "#438FEB" + readonly property color backgroundButtonSelectDark : "#214773" + readonly property color backgroundDialog : "#254670" + readonly property color backgroundMenu : "#14314C" + readonly property color backgroundMainMenu : "#0D2639" + readonly property color backgroundDottedMenu : "#64809D" + readonly property color backgroundSlider : "#195187" + readonly property color backgroundUltrafiltrationButton : "#31568F" + readonly property color textValueUltrafiltrationButtonFg: "#98aec2" - readonly property color backgroundRangeRect : "#3e546e" - readonly property color highlightProgressBar : "#3d8eef" - readonly property color highlightMedProgressBar : "#1b2b3e" - readonly property color textProgressBar : "#88a3c5" + readonly property color backgroundRangeRect : "#3e546e" + readonly property color highlightProgressBar : "#3d8eef" + readonly property color highlightMedProgressBar : "#1b2b3e" + readonly property color textProgressBar : "#88a3c5" - readonly property color textRangeMarker : "white" - readonly property color rangeMarker : "white" - readonly property color rangeMarkerShort : "#9fb6d1" + readonly property color textRangeMarker : white + readonly property color rangeMarker : white + readonly property color rangeMarkerShort : "#9fb6d1" readonly property color textMain : "#FCFCFC" readonly property color textButton : "#FCFCFC" //"#E8E8E8" readonly property color textDisableButton : "#607A91" readonly property color textTickMark : "#438FEB" - readonly property color textInvalid : "red" + readonly property color textInvalid : red readonly property color borderButton : "#4290EC" //K:D //"#438FEB" readonly property color borderButtonUnselected : "#53667d" readonly property color borderDisableButton : "#607A91" readonly property color boderSeparatorLine : "#476982" - readonly property color borderDialog : "transparent" // different colors for different displays // "#D01A344D" // "#D00F0F0F" //"#F51A344D" + readonly property color borderDialog : transparent // different colors for different displays // "#D01A344D" // "#D00F0F0F" //"#F51A344D" - readonly property color touchTextAreaTitle : "#a0b6d0" + readonly property color touchTextAreaTitle : "#a0b6d0" - readonly property color textTextRectTitle : "#ffffff" - readonly property color textTextRectLabel : "#e8e8e8" - readonly property color textTextRectExtra : "#708795" + readonly property color textTextRectTitle : white + readonly property color textTextRectLabel : "#e8e8e8" + readonly property color textTextRectExtra : "#708795" - readonly property color line : "#094266" + readonly property color line : "#094266" - readonly property color pressuresText : "white" - readonly property color pressuresArterialBar : "#31bcdb" - readonly property color pressuresVenousBar : "#c568ed" + readonly property color pressuresText : white + readonly property color pressuresArterialBar : "#31bcdb" + readonly property color pressuresVenousBar : "#c568ed" + readonly property color pressuresOutOfRaneBg : red - readonly property color fluidText : "white" - readonly property color fluidValue : "white" - readonly property color fluidUnit : "#708795" + readonly property color fluidText : white + readonly property color fluidValue : white + readonly property color fluidUnit : "#708795" - readonly property color textNotificationNoneBg : "white" - readonly property color textNotificationNoneFg : "#1b2b3e" + readonly property color textNotificationNoneBg : white + readonly property color textNotificationNoneFg : "#1b2b3e" - readonly property color textNotificationLowBg : "#f5a623" // ? - readonly property color textNotificationLowFg : "white" // ? + readonly property color textNotificationLowBg : "#f5a623" // ? + readonly property color textNotificationLowFg : white // ? - readonly property color textNotificationMedBg : "#f5a623" // ? - readonly property color textNotificationMedFg : "white" // ? + readonly property color textNotificationMedBg : "#f5a623" // ? + readonly property color textNotificationMedFg : white // ? - readonly property color textNotificationHighBg : "#c53b33" // red - readonly property color textNotificationHighFg : "white" + readonly property color textNotificationHighBg : red + readonly property color textNotificationHighFg : white - readonly property color alarmTopBarHighBg : "#831913" - readonly property color alarmTopBarHighFg : "white" + readonly property color alarmTopBarHighBg : "#831913" + readonly property color alarmTopBarHighFg : white - readonly property color alarmTopBarMedBg : "#db8f00" - readonly property color alarmTopBarMedFg : "white" + readonly property color alarmTopBarMedBg : "#db8f00" + readonly property color alarmTopBarMedFg : white - readonly property color alarmTopBarLowBg : "#db8f00" - readonly property color alarmTopBarLowFg : "white" + readonly property color alarmTopBarLowBg : "#db8f00" + readonly property color alarmTopBarLowFg : white readonly property color createTrProfileID : "#ffbb44" @@ -105,6 +110,6 @@ readonly property color createTreatmentNotReady : "#1f4974" readonly property color createTreatmentReady : "#438FEB" readonly property color createTreatmentTextNotReady : "#507090" - readonly property color createTreatmentTextReady : "white" - readonly property color createTreatmentInvalidParam : "red" + readonly property color createTreatmentTextReady : white + readonly property color createTreatmentInvalidParam : red } Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -rb61d8a3e01fef66eee8095c9cddf835d9bb32b66 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision b61d8a3e01fef66eee8095c9cddf835d9bb32b66) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -40,6 +40,7 @@ readonly property int fontPixelRangeRectText : 14 readonly property int fontPixelPresseuresText : 22 + readonly property int fontPixelPresseuresLabel : 34 readonly property int fontPixelFluidText : 22 readonly property int fontPixelFluidValue : 32 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rb62ab443e75b76a91e35aca6ba2efd84e7199602 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision b62ab443e75b76a91e35aca6ba2efd84e7199602) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -48,9 +48,8 @@ readonly property int touchRectHeight : 85 //K:D //70 readonly property int touchRectRadius : 45 + readonly property int titleBottomPadding : 25 - readonly property int titleBottomPadding : 25 - readonly property int columnSpacing : 25 //K:D //20 readonly property int dialogMargin : mainMenuHeight * 2 @@ -87,6 +86,8 @@ readonly property int topBarMenuHeight : 100 readonly property int sliderCircleDiameter : 25 + readonly property int pressuresProgressbarWidth : 725 + readonly property int gridSelectionButtonHeight : 100 readonly property int gridSelectionButtonWidth : 375 @@ -116,12 +117,48 @@ // ---------- < PRS > Related Section ---------- // Min/Max - readonly property int bloodFlowMin : 100 - readonly property int bloodFlowMax : 500 + readonly property int bloodFlowMin : 100 + readonly property int bloodFlowMax : 500 // Resolutions - readonly property int bloodFlowResolution : 25 - readonly property int dialysateFlowResolution : 50 - readonly property int durationResolution : 15 // PRS346 + readonly property int bloodFlowResolution : 25 + readonly property int dialysateFlowResolution : 50 + readonly property int durationResolution : 15 // PRS346 + + // Inline Blood Pressures + // - Artrial + // - Artrial - Entire pressure value range + readonly property int arterialValueMin : -400; ///< PRS362 const + readonly property int arterialValueMax : +600; ///< PRS362 const + // - Artrial - Adjust pressure limit range and manufacturing default - Low + readonly property int arterialLimitLowMin : -300; ///< PRS354 const + // ref to Model // arterialLimitLowMin : -300; ///< PRS354 default \ref MAdjustPressuresLimitsReq + readonly property int arterialLimitLowMax : +200; ///< PRS354 const + // - Artrial - Adjust pressure limit range and manufacturing default - High + readonly property int arterialLimitHighMin : -300; ///< PRS355 const + // ref to Model // arterialLimitHighMin : +100; ///< PRS355 default \ref MAdjustPressuresLimitsReq + readonly property int arterialLimitHighMax : +200; ///< PRS355 const + // - Artrial - Adjust pressure limit resolution + readonly property int arterialLimitStep : +10; ///< PRS354,PRS355 // has to be the same since it's on the same line scale + readonly property int arterialLimitGap : +30; + + // - Venous + // - Venous - Entire pressure value range + readonly property int venousValueMin : -100; ///< PRS361 const + readonly property int venousValueMax : +700; ///< PRS361 const + // - Venous - Adjust pressure limit range and manufacturing default - Low + readonly property int venousLimitLowMin : -100; ///< PRS356 const + // ref to Model // venousLimitLowDef : -100; ///< PRS356 default \ref MAdjustPressuresLimitsReq + readonly property int venousLimitLowMax : +600; ///< PRS356 const + // - Venous - Adjust pressure limit range and manufacturing default - High + readonly property int venousLimitHighMin : +100; ///< PRS357 const + // ref to Model // venousLimitHighDef : +400; ///< PRS357 default \ref MAdjustPressuresLimitsReq + readonly property int venousLimitHighMax : +600; ///< PRS357 const + // - Venous - Adjust pressure limit resolution + readonly property int venousLimitStep : +10; ///< PRS356,PRS357 // has to be the same since it's on the same line scale + readonly property int venousLimitGap : +30; + + readonly property string notSetVariableText : "__" + // Units // - Ultrafiltration readonly property string unitTextUltrafiltrationVolume : qsTr("(L)") @@ -133,9 +170,9 @@ readonly property string unitTextBloodPressure : qsTr("mmHg") readonly property string unitTextHeartBeat : qsTr("BPM" ) // - Fluid - readonly property string unitTextSaline : qsTr("mL") - readonly property string unitTextHeparin : qsTr("mL") + readonly property string unitTextFluid : qsTr("mL") + readonly property string unitTextSaline : unitTextFluid + readonly property string unitTextHeparin : unitTextFluid // - Create Treatment - readonly property string unitTextBPMeasurementInterval : qsTr("min") - + readonly property string unitTextBPMeasurementInterval : qsTr("min") } Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r53134008481fd775533e8988b7436f2f75e47336 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 53134008481fd775533e8988b7436f2f75e47336) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -91,7 +91,6 @@ width: parent.width text: qsTr("Device Settings") - } Diagnostics { @@ -111,4 +110,3 @@ */ - Index: sources/gui/qml/pages/treatment/TreatmentBegin.qml =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/pages/treatment/TreatmentBegin.qml (.../TreatmentBegin.qml) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ sources/gui/qml/pages/treatment/TreatmentBegin.qml (.../TreatmentBegin.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -45,7 +45,6 @@ state: "begin" } - Flickable { id: _flickable objectName: "_treatmentBeginFlickable" anchors.top: _topMenuBar.bottom Index: sources/gui/qml/pages/treatment/TreatmentCreate.qml =================================================================== diff -u -r0401b9a1fb6f89f0ec83571f2f868956c7500a0f -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 0401b9a1fb6f89f0ec83571f2f868956c7500a0f) +++ sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -41,7 +41,6 @@ } } - Flickable { id: _flickable objectName: "TreatmentCreateFlickable" anchors.top: _topMenuBar.bottom @@ -319,7 +318,6 @@ } } - Text { id: _venousPressureLimitsTitle text: qsTr("Venous Pressure Limits") anchors.left: _venousPressureLimits.left Index: sources/gui/qml/pages/treatment/TreatmentPrime.qml =================================================================== diff -u -rcc1e9d6d55c816f3fcd626dc6948cca24da283b3 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/pages/treatment/TreatmentPrime.qml (.../TreatmentPrime.qml) (revision cc1e9d6d55c816f3fcd626dc6948cca24da283b3) +++ sources/gui/qml/pages/treatment/TreatmentPrime.qml (.../TreatmentPrime.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -27,29 +27,33 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - signal backClicked() - signal continueClicked() + objectName: "_treatmentPrime" backgroundRect.color: Colors.backgroundMainMenu + signal clickedBack() + signal clickedContinue() + TopMenuBarCreateTreatment { id: _topMenuBar anchors.top: parent.top anchors.left: parent.left width: parent.width - onBackClicked: { - _root.backClicked(); + onClickedBack: { + _root.clickedBack(); } state: "prime" } Flickable { id: _flickable + objectName: "_treatmentPrimeFlickable" anchors.top: _topMenuBar.bottom anchors.left: parent.left anchors.bottom: parent.bottom width: parent.width contentWidth: parent.width contentHeight: _column.implicitHeight clip: true + flickDeceleration: Variables.createTreatmentFlickableDeceleration ScrollBar.vertical: ScrollBar { id: _scrollBar anchors.right: _flickable.right @@ -68,19 +72,86 @@ anchors.fill: parent; Text { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter; + anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Priming") color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle } - TouchRect { + ProgressCircle { id: _circle anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("CONTINUE TO TREATMENT") + minimum: 0 + maximum: vPriming.secondsTotal + diameter: 100 + value: vPriming.primingComplete ? vPriming.secondsTotal : vPriming.secondsRemaining + + PrimingTimer { id: _timeText + anchors.centerIn: parent + seconds : vPriming.secondsRemaining + completed: vPriming.primingComplete + } + } + + Column { id: _checklist + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter + + CheckListItem { id: _checking_installation + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Checking installation" + completed: vPriming.checkingInstallationComplete + } + + CheckListItem { id: _creating_dialysate + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Creating dialysate" + completed: vPriming.creatingDialysateComplete + } + + CheckListItem { id: _priming_lines + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Priming lines" + completed: vPriming.primingLinesComplete + } + } + + Text { id: _priming_complete + objectName: "_primingCompleteText" + anchors.horizontalCenter: parent.horizontalCenter + text: "Priming Complete!" + color: vPriming.primingComplete ? Colors.textMain : "transparent" + font.pixelSize: Fonts.primingFontSize + } + + TouchRect { id : _continueRect + objectName: "_treatmentPrimeContinueButton" + anchors.horizontalCenter: parent.horizontalCenter + text.text: vPriming.continueBtnText + enabled: vPriming.continueEnabled + onEnabledChanged: { + if (enabled) { + borderColor = Colors.primingReady + textColor = Colors.primingReady + } else { + borderColor = Colors.primingNotReady + textColor = Colors.primingNotReady + } + } + button.onClicked: { - _root.continueClicked() + _root.clickedContinue() } } + + Rectangle { + id: _spacer + height: 75 + width: parent.width + color: "transparent" + } } } Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r1aa53e9869f4c27d53dd9052271ca38befbe22e9 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 1aa53e9869f4c27d53dd9052271ca38befbe22e9) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -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 TreatmentStack.qml * \author (last) Behrouz NematiPour * \date (last) 16-Oct-2020 * \author (original) Behrouz NematiPour * \date (original) 27-Jan-2020 - * + * */ // Qt @@ -81,11 +81,11 @@ TreatmentHome { id: _treatmentHome onTreatmentStarted : push( _treatmentStart ) - onTreatmentCreated : push( _treatmentCreate) + onTreatmentCreated : vTreatmentCreate.doSelectParameters() } TreatmentStart { id: _treatmentStart - onBackClicked : pop () + onBackClicked : popToItem(_treatmentHome) onSectionFlowClicked : { _treatmentAdjustmentFlow.open() } @@ -109,23 +109,23 @@ } TreatmentCreate { id: _treatmentCreate - onBackClicked : pop() - onContinueClicked : vCreateTreatment.onFinishedCreate() + onClickedBack : {vTreatmentCreate.doCancelSelectingParameters() } + onClickedContinue : {vTreatmentCreate.doFinishedCreate(); } } TreatmentConfirm { id: _treatmentConfirm - onBackClicked : pop() - onConfirmClicked : vCreateTreatment.onFinishedConfirm() + onClickedBack : {vTreatmentCreate.doCancelConfirmParameters() } + onClickedConfirm : {vTreatmentCreate.doFinishedConfirm(); } } TreatmentPrime { id: _treatmentPrime - onBackClicked : pop() - onContinueClicked : vCreateTreatment.onFinishedPrime() + onClickedBack : {vTreatmentCreate.doRequestPop() } + onClickedContinue : {vTreatmentCreate.doFinishedPrime(); } } TreatmentBegin { id: _treatmentBegin - onBackClicked : pop() - onStartClicked : vCreateTreatment.onStart() + onClickedBack : {vTreatmentCreate.doRequestPop() } + onClickedStart : {vTreatmentCreate.doStartTreatment(); } } //// Treatment Adjustment Dialogs @@ -297,9 +297,12 @@ } } - Connections { target: vCreateTreatment - onShowConfirm : { push(_treatmentConfirm) } - onShowPrime : { push(_treatmentPrime ) } - onShowBegin : { push(_treatmentBegin ) } + Connections { target: vTreatmentCreate + onShowCreate : { push(_treatmentCreate) } + onShowConfirm : { push(_treatmentConfirm) } + onShowPrime : { push(_treatmentPrime) } + onShowBegin : { push(_treatmentBegin) } + onPop : { pop() } + onShowTreatmentStart : { push(_treatmentStart) } } } Index: sources/main.h =================================================================== diff -u -r16d1a6146bea20c96397284d7a7d4cef6d1373c8 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/main.h (.../main.h) (revision 16d1a6146bea20c96397284d7a7d4cef6d1373c8) +++ sources/main.h (.../main.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -127,7 +127,23 @@ PROPERTY_BASE( vTYPE , vVARIABLE , vDEFVALUE , Triggered) \ TRIGGER_SLOT( vTYPE , vVARIABLE) //--------------------------------------------------------------------------------// +#define CONSTANT( vTYPE , vVARIABLE , vDEFVALUE ) \ + /*! \brief Qt Constant Property declaration + \details The Qt Property definition by Q_PROPERTY documentation. + */\ + Q_PROPERTY( vTYPE vVARIABLE \ + READ vVARIABLE \ + CONSTANT) \ + protected: \ + /*! \brief Property getter + \details The property getter which reads the private variable + \return current value + */\ + vTYPE vVARIABLE () const { \ + return vDEFVALUE ; \ + } //--------------------------------------------------------------------------------// +//--------------------------------------------------------------------------------// #define ACTION_VIEW_CONNECTION(vTYPE) \ connect(&_GuiController, SIGNAL(didActionReceive(const vTYPE &)), \ this, SLOT( onActionReceive(const vTYPE &))); Index: sources/model/MModel.h =================================================================== diff -u -rc241fc1d31be3e4958582dff94de8189f5bbba67 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/model/MModel.h (.../MModel.h) (revision c241fc1d31be3e4958582dff94de8189f5bbba67) +++ sources/model/MModel.h (.../MModel.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -56,6 +56,7 @@ #include "MStartTreatmentResponse.h" #include "MEndTreatmentResponse.h" #include "MTreatmentAdjustSalineResponse.h" +#include "MTreatmentAdjustPressuresLimitsResponse.h" /*! * \page MessageFlow Message interpretation Flow @@ -167,7 +168,6 @@ * 12 - Use it. */ - //--------------------------------------------------------------------------------// //-------- Please add the model type to the lists below to register them ---------// //--------------------------------------------------------------------------------// @@ -220,6 +220,7 @@ REGISTER_METATYPE( AdjustUltrafiltrationEditRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmRequestData ) \ REGISTER_METATYPE( AdjustSalineRequestData ) \ + REGISTER_METATYPE( AdjustPressuresLimitsRequestData ) \ REGISTER_METATYPE( AdjustTreatmentParametersRequestData ) \ /* Response */ \ REGISTER_METATYPE( StartTreatmentResponseData ) \ @@ -231,7 +232,8 @@ REGISTER_METATYPE( AdjustUltrafiltrationEditResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmResponseData ) \ REGISTER_METATYPE( AdjustSalineResponseData ) \ - REGISTER_METATYPE( AdjustTreatmentParametersResponseData ) + REGISTER_METATYPE( AdjustPressuresLimitsResponseData ) \ + REGISTER_METATYPE( AdjustTreatmentParametersResponseData ) \ //===============================================================================// /*! @@ -285,7 +287,8 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, StartTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, EndTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustSalineResponseData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentParametersResponseData ) + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresLimitsResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentParametersResponseData ) \ // /* Request */ ---------------------------------------------------------// #define ADJUST_TRANSMT_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ @@ -299,9 +302,10 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, ConfirmTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, EndTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustSalineRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresLimitsRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmAcknowledgeRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmSilenceRequestData ) + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmSilenceRequestData ) \ //===============================================================================// /*! @@ -358,7 +362,8 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( StartTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( EndTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustSalineResponseData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustTreatmentParametersResponseData ) + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustPressuresLimitsResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustTreatmentParametersResponseData ) \ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ /* Request --------------------------------------------------------- */ \ @@ -371,9 +376,10 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( ConfirmTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( EndTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustSalineRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustPressuresLimitsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmAcknowledgeRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmSilenceRequestData ) + ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmSilenceRequestData ) \ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_NOEMIT \ /* Request ----------------------- NoEmit -------------------------- */ \ @@ -386,9 +392,10 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( ConfirmTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( EndTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustSalineRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustPressuresLimitsRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmSilenceRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmAcknowledgeRequestData ) + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmAcknowledgeRequestData ) \ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_PUBLIC \ /* Request ----------------------- public -------------------------- */ \ @@ -397,13 +404,16 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustPressuresLimitsRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( StartTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( ConfirmTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( EndTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmAcknowledgeRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmSilenceRequestData ) + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmSilenceRequestData ) \ + //===============================================================================// #define ACTION_RECEIVE_SIGNALS \ /* Received signals */ \ @@ -444,6 +454,8 @@ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationConfirmResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustTreatmentParametersResponseData ) \ - ACTION_RECEIVE_SIGNAL( AdjustSalineResponseData ) + ACTION_RECEIVE_SIGNAL( AdjustSalineResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustPressuresLimitsResponseData ) \ + //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -r1284cf3e36ef692c94c38545121c83072626036d -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 1284cf3e36ef692c94c38545121c83072626036d) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -332,7 +332,7 @@ */ class MAlarmSilenceReq : public MModel { public: - bool state = 0; + quint8 state; // coco begin validated : Has been validated manually. // This object is used statically for now, kept the logic for later usage. QString toString() { @@ -344,6 +344,202 @@ } }; +/*! + * \brief The MAlarmAcknowledgeReq class + * \details The model to tell HD an alarm has been acknowledged + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 63 | 0x100 | N/A | Cmd | Y | UI | HD | Alarm Acknolwedge Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref alarmID | + * + */ +class MAlarmAcknowledgeReq : public MModel { +public: + quint32 alarmID; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({alarmID}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AlarmAcknowledgeRequest", vParameters); + } +}; + +/*! + * \brief The MStartTreatmentReq class + * \details The model to request starting a treatment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 56 | 0x100 | 9 | Req | Y | UI | HD | Start Treatment Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref request | + * + */ +class MStartTreatmentReq : public MModel { +public: + enum Options { + eSelectParams = 0, + eCancel = 1, + eStartTreatment = 2 + }; + Options request = eSelectParams; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({request}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("StartTreatment", vParameters); + } +}; + +/*! + * \brief The MConfirmTreatmentReq class + * \details The model to tell HD treatment parameters have been confirmed + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 56 | 0x100 | 9 | Req | Y | UI | HD | Confirm Treatment Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref request | + * + */ +class MConfirmTreatmentReq : public MModel { +public: + enum Options { + eCancel = 0, + eConfirm = 1 + }; + Options request = eConfirm; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({request}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("ConfirmTreatment", vParameters); + } +}; + +/*! + * \brief The MEndTreatmentReq class + * \details The model to request an end to treatment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 60 | 0x100 | 9 | Req | Y | UI | HD | End Treatment Request | + * + * | Payload || + * | || + * | N/A || + * + */ +class MEndTreatmentReq : public MModel { +public: + + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("EndTreatment", vParameters); + } +}; + +/*! + * \brief The MAdjustTreatmentParametersReq class + * \details The model used to request treatment parameters validation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * | 60 | 0x100 | 9 | Req | Y | UI | HD | New Treatment Parameters Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref bloodFlowRate | + * | #2:(U32) | \ref dialysateFlowRate | + * | #3:(U32) | \ref duration | + * | #4:(U32) | \ref heparinStopTime | + * | #5:(U32) | \ref salineBolus | + * | #6:(U32) | \ref acidConcentrate | + * | #7:(U32) | \ref bicarbonateConcentrate | + * | #8:(U32) | \ref dialyzerType | + * | #9:(U32) | \ref bloodPressureMeasureInterval | + * | #10:(U32) | \ref rinsebackFlowRate | + * | #11:(S32) | \ref arterialPressureLimitLow | + * | #12:(S32) | \ref arterialPressureLimitHigh | + * | #13:(S32) | \ref venousPressureLimitLow | + * | #14:(S32) | \ref venousPressureLimitHigh | + * | #15:(F32) | \ref heparinDispensingRate | + * | #16:(F32) | \ref heparinBolusVolume | + * | #17:(F32) | \ref dialysateTemp | + * + */ +class MAdjustTreatmentParametersReq : public MModel { +public: + + quint32 bloodFlowRate = 0; // mL/min + quint32 dialysateFlowRate = 0; // mL/min + quint32 duration = 0; // minutes + quint32 heparinStopTime = 0; // min + quint32 salineBolus = 0; // mL + quint32 acidConcentrate = 0; // + quint32 bicarbonateConcentrate = 0; // + quint32 dialyzerType = 0; // + quint32 bloodPressureMeasureInterval = 0; // minutes + quint32 rinsebackFlowRate = 0; // mL/min + qint32 arterialPressureLimitLow = 0; // mmHg + qint32 arterialPressureLimitHigh = 0; // mmHg + qint32 venousPressureLimitLow = 0; // mmHg + qint32 venousPressureLimitHigh = 0; // mmHg + float heparinDispensingRate = 0; // mL/hr + float heparinBolusVolume = 0; // mL + float dialysateTemp = 0; // Celsius + + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({ + bloodFlowRate , + dialysateFlowRate , + duration , + heparinStopTime , + salineBolus , + acidConcentrate , + bicarbonateConcentrate , + dialyzerType , + bloodPressureMeasureInterval , + rinsebackFlowRate , + arterialPressureLimitLow , + arterialPressureLimitHigh , + venousPressureLimitLow , + venousPressureLimitHigh , + heparinDispensingRate , + heparinBolusVolume , + dialysateTemp , + }); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustTreatmentParametersRequest", vParameters); + } +}; + } typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; @@ -354,5 +550,9 @@ typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; typedef Model:: MAdjustSalineReq AdjustSalineRequestData; typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; - +typedef Model:: MStartTreatmentReq StartTreatmentRequestData; +typedef Model:: MConfirmTreatmentReq ConfirmTreatmentRequestData; +typedef Model:: MEndTreatmentReq EndTreatmentRequestData; +typedef Model:: MAdjustTreatmentParametersReq AdjustTreatmentParametersRequestData; typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; +typedef Model:: MAlarmAcknowledgeReq AlarmAcknowledgeRequestData; Index: sources/storage/FileHandler.cpp =================================================================== diff -u -rb61d8a3e01fef66eee8095c9cddf835d9bb32b66 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision b61d8a3e01fef66eee8095c9cddf835d9bb32b66) +++ sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -85,7 +85,6 @@ return true; } - /*! * \brief FileHandler::read * \details reads file vFilename content into vContent variable. @@ -124,7 +123,6 @@ QTextStream in(&file); QString content = in.readAll(); - QJsonDocument doc = QJsonDocument::fromJson(content.toUtf8()); vContent = doc.object(); return true; Index: sources/storage/FileHandler.h =================================================================== diff -u -rb61d8a3e01fef66eee8095c9cddf835d9bb32b66 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/storage/FileHandler.h (.../FileHandler.h) (revision b61d8a3e01fef66eee8095c9cddf835d9bb32b66) +++ sources/storage/FileHandler.h (.../FileHandler.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -35,12 +35,12 @@ public: static bool write (const QString &vFileName, const QString &vContent, bool vAppend = true); - static bool read (const QString &vFileName, QString &vContent); - static bool readJSON (const QString &vFileName, QJsonObject &vContent); + static bool read (const QString &vFileName, QString &vContent); + static bool readJSON (const QString &vFileName, QJsonObject &vContent); - static int copyFolder (const QString &vSource, const QString &vDestination); + static int copyFolder (const QString &vSource , const QString &vDestination); static int removeFiles(const QStringList &vFolders, const QStringList &vNameFilter, const QDate &vDateOlderThan); - static bool makeFolder (const QString &vFolder); - static bool isMounted (const QString &vPath, bool *vIsReadOnly = nullptr); + static bool makeFolder (const QString &vFolder); + static bool isMounted (const QString &vPath, bool *vIsReadOnly = nullptr); }; } Index: sources/storage/FileSaver.cpp =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/storage/FileSaver.cpp (.../FileSaver.cpp) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ sources/storage/FileSaver.cpp (.../FileSaver.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -14,15 +14,13 @@ */ #include "FileSaver.h" - // Qt #include #include // Project #include "FileHandler.h" - using namespace Storage; FileSaver::FileSaver(QObject *parent) : QObject(parent) Index: sources/view/VView.h =================================================================== diff -u -r53134008481fd775533e8988b7436f2f75e47336 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- sources/view/VView.h (.../VView.h) (revision 53134008481fd775533e8988b7436f2f75e47336) +++ sources/view/VView.h (.../VView.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -130,10 +130,11 @@ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationState ) \ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationEdit ) \ REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationConfirm ) \ + REGISTER_TYPE( VTreatmentAdjustmentSaline ) \ + REGISTER_TYPE( VTreatmentAdjustmentPressuresLimits ) \ REGISTER_TYPE( VTreatmentCreate ) \ REGISTER_TYPE( VPriming ) \ REGISTER_TYPE( VTreatmentBegin ) \ REGISTER_TYPE( VTreatmentEnd ) \ - REGISTER_TYPE( VTreatmentAdjustmentSaline ) - + //--------------------------------------------------------------------------------// Index: unittests/tst_messaging.cpp =================================================================== diff -u -rc8b2c06141831ba2908323138d94dec0ccc0d402 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision c8b2c06141831ba2908323138d94dec0ccc0d402) +++ unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -507,7 +507,6 @@ QList actionTypes = { Gui::GuiActionType::ID_AlarmTriggered, Gui::GuiActionType::ID_AlarmCleared, - Gui::GuiActionType::ID_AlarmSilenceRsp, Gui::GuiActionType::ID_TreatmentStates, }; @@ -791,31 +790,6 @@ } /*! - * \brief tst_messaging::tst_MessageInterpreter_createTreatmentResp - * Tests that an invalid response message is detected properly - */ -void tst_messaging::tst_MessageInterpreter_createTreatmentResp() -{ - Can::MessageInterpreter interpreter; - Can::Message msg; - msg.actionId = Gui::GuiActionType::ID_CreateTreatmentRsp; - msg.data = {}; - QVariantList data; - QVERIFY(! interpreter.createTreatmentRespData(msg, data)); - - msg.actionId = Gui::GuiActionType::ID_CreateTreatmentReq; - QVERIFY(! interpreter.createTreatmentRespData(msg, data)); - - QVariantList variantList = QVariantList() << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 - << 0 << 0 << 0; - QByteArray byteArray; - QVERIFY(interpreter.interpretMessage(msg.actionId, variantList, byteArray)); - - QVERIFY(!interpreter.interpretMessage(msg.actionId, QVariantList(), byteArray)); - -} - -/*! * \brief tst_messaging::tst_MessageBuilder_addActionId * \details Tests addActionId() method usage of MessageBuilder */ Index: unittests/tst_messaging.h =================================================================== diff -u -rc8b2c06141831ba2908323138d94dec0ccc0d402 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- unittests/tst_messaging.h (.../tst_messaging.h) (revision c8b2c06141831ba2908323138d94dec0ccc0d402) +++ unittests/tst_messaging.h (.../tst_messaging.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -97,7 +97,6 @@ void tst_MessageInterpreter_interpretMessage_DG_Unhandled(); void tst_MessageInterpreter_notify_fromByteArray(); - void tst_MessageInterpreter_createTreatmentResp(); void tst_MessageBuilder_addActionId(); void tst_MessageBuilder_addData_shorterLen(); Index: unittests/tst_models.cpp =================================================================== diff -u -rc8b2c06141831ba2908323138d94dec0ccc0d402 -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- unittests/tst_models.cpp (.../tst_models.cpp) (revision c8b2c06141831ba2908323138d94dec0ccc0d402) +++ unittests/tst_models.cpp (.../tst_models.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -39,6 +39,7 @@ #include "MTreatmentTimeData.h" #include "MTreatmentPressureOcclusionData.h" #include "MTreatmentSalineData.h" +#include "MPrimingData.h" #include "MTreatmentAdjustUltrafiltrationStateResponse.h" #include "MTreatmentAdjustUltrafiltrationEditResponse.h" @@ -50,9 +51,14 @@ #include "MAlarmTriggered.h" #include "MAlarmCleared.h" -#include "MTreatmentParameters.h" #include "MTreatmentParametersResp.h" +#include "MStartTreatmentResponse.h" +#include "MEndTreatmentResponse.h" +#include "MessageInterpreter.h" + +using namespace Can; + #undef CONSOLEOUT /*! @@ -992,7 +998,7 @@ void tst_models::tst_MOutletFlowData_data () { QTest::addColumn("errorIndex"); QTest::addColumn("data"); - QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); QTest::newRow("mRefUFVol ") << 1 << QByteArray::fromHex(QByteArray()); QTest::newRow("mRefUFVol ") << 1 << QByteArray::fromHex(QByteArray("00")); QTest::newRow("mRefUFVol ") << 1 << QByteArray::fromHex(QByteArray("00" "01")); @@ -1058,7 +1064,7 @@ void tst_models::tst_MBloodFlowData_data () { QTest::addColumn("errorIndex"); QTest::addColumn("data"); - QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); QTest::newRow("mFlowSetPoint ") << 1 << QByteArray::fromHex(QByteArray()); QTest::newRow("mFlowSetPoint ") << 1 << QByteArray::fromHex(QByteArray("00")); QTest::newRow("mFlowSetPoint ") << 1 << QByteArray::fromHex(QByteArray("00" "01")); @@ -1124,7 +1130,7 @@ void tst_models::tst_MDialysateFlowData_data () { QTest::addColumn("errorIndex"); QTest::addColumn("data"); - QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B")); QTest::newRow("mFlowSetPoint ") << 1 << QByteArray::fromHex(QByteArray()); QTest::newRow("mFlowSetPoint ") << 1 << QByteArray::fromHex(QByteArray("00")); QTest::newRow("mFlowSetPoint ") << 1 << QByteArray::fromHex(QByteArray("00" "01")); @@ -1236,7 +1242,7 @@ void tst_models::tst_MPressureOcclusionData_data () { QTest::addColumn("errorIndex"); QTest::addColumn("data"); - QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13")); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13")); QTest::newRow("mArterialPressure ") << 1 << QByteArray::fromHex(QByteArray()); QTest::newRow("mArterialPressure ") << 1 << QByteArray::fromHex(QByteArray("00")); QTest::newRow("mArterialPressure ") << 1 << QByteArray::fromHex(QByteArray("00" "01")); @@ -1457,6 +1463,9 @@ } } + +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MTreatmentParametersResp test ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MTreatmentParametersResp data definition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MTreatmentParametersResp_data() { QTest::addColumn("errorIndex"); @@ -1536,6 +1545,7 @@ QTest::newRow("rinsebackFlowRate") << 18 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2B" "2C" "2D" "2E" "2F" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" "40" "41" "42" "43" "44" "45" "46" "47")); } +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MTreatmentParametersResp test definition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MTreatmentParametersResp() { Model::MTreatmentParametersResponse mData; @@ -1627,113 +1637,132 @@ } } -void tst_models::tst_MTreatmentParametersResp_fromVariantList() -{ - Model::MTreatmentParametersResponse mData; +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MPrimingData ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MPrimingData data definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MPrimingData_data () { + QTest::addColumn("errorIndex"); + QTest::addColumn("data"); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B")); + QTest::newRow("currentState ") << 1 << QByteArray::fromHex(QByteArray()); + QTest::newRow("currentState ") << 1 << QByteArray::fromHex(QByteArray("00")); + QTest::newRow("currentState ") << 1 << QByteArray::fromHex(QByteArray("00" "01")); + QTest::newRow("currentState ") << 1 << QByteArray::fromHex(QByteArray("00" "01" "02")); + QTest::newRow("secondsRemaining ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03")); + QTest::newRow("secondsRemaining ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04")); + QTest::newRow("secondsRemaining ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05")); + QTest::newRow("secondsRemaining ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06")); + QTest::newRow("secondsTotal ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07")); + QTest::newRow("secondsTotal ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08")); + QTest::newRow("secondsTotal ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09")); + QTest::newRow("secondsTotal ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A")); +} - QVariantList list; - for (int i = 0; i < 20; ++i) - { +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MPrimingData test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MPrimingData() { + Model::MPrimingData mData; - list.append(QVariant(1)); - AdjustTreatmentParametersResponseData tempData = mData.fromVariantList(list); - if (i == 17) { - QVERIFY(1 == tempData.requestValid); - QVERIFY(1 == tempData.bloodFlowRate); - QVERIFY(1 == tempData.dialysateFlowRate); - QVERIFY(1 == tempData.duration); - QVERIFY(1 == tempData.heparinDispensingRate); - QVERIFY(1 == tempData.heparinBolusVolume); - QVERIFY(1 == tempData.heparinStopTime); - QVERIFY(1 == tempData.salineBolus); - QVERIFY(1 == tempData.acidConcentrate); - QVERIFY(1 == tempData.bicarbonateConcentrate); - QVERIFY(1 == tempData.dialyzerType); - QVERIFY(1 == tempData.dialysateTemp); - QVERIFY(1 == tempData.arterialPressureLimitLow); - QVERIFY(1 == tempData.arterialPressureLimitHigh); - QVERIFY(1 == tempData.venousPressureLimitLow); - QVERIFY(1 == tempData.venousPressureLimitHigh); - QVERIFY(1 == tempData.bloodPressureMeasureInterval); - QVERIFY(1 == tempData.rinsebackFlowRate); - } - else { - AdjustTreatmentParametersResponseData data; - QVERIFY(data.requestValid == tempData.requestValid); - QVERIFY(data.bloodFlowRate == tempData.bloodFlowRate); - QVERIFY(data.dialysateFlowRate == tempData.dialysateFlowRate); - QVERIFY(data.duration == tempData.duration); - QVERIFY(data.heparinDispensingRate == tempData.heparinDispensingRate); - QVERIFY(data.heparinBolusVolume == tempData.heparinBolusVolume); - QVERIFY(data.heparinStopTime == tempData.heparinStopTime); - QVERIFY(data.salineBolus == tempData.salineBolus); - QVERIFY(data.acidConcentrate == tempData.acidConcentrate); - QVERIFY(data.bicarbonateConcentrate == tempData.bicarbonateConcentrate); - QVERIFY(data.dialyzerType == tempData.dialyzerType); - QVERIFY(data.dialysateTemp == tempData.dialysateTemp); - QVERIFY(data.arterialPressureLimitLow == tempData.arterialPressureLimitLow); - QVERIFY(data.arterialPressureLimitHigh == tempData.arterialPressureLimitHigh); - QVERIFY(data.venousPressureLimitLow == tempData.venousPressureLimitLow); - QVERIFY(data.venousPressureLimitHigh == tempData.venousPressureLimitHigh); - QVERIFY(data.bloodPressureMeasureInterval== tempData.bloodPressureMeasureInterval); - QVERIFY(data.rinsebackFlowRate == tempData.rinsebackFlowRate); + QFETCH(int , errorIndex ); + QFETCH(QByteArray, data ); - } + int startIndex = 0; + int index = errorIndex - 1; + bool ok = mData.fromByteArray(data, &startIndex); + + Q_UNUSED(ok) +#ifdef CONSOLEOUT + qDebug() << index << errorIndex << startIndex << ok << data ; +#endif + + switch (errorIndex) { + case 0: { index = 0 ; QVERIFY ( mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 1: { index = index * sizeof mData._data.currentState ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 2: { index = index * sizeof mData._data.secondsRemaining ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 3: { index = index * sizeof mData._data.secondsTotal ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + default: + QVERIFY2(false, "Incorrect Test"); + break; } } -void tst_models::tst_MTreatmentParameters_fromVariantList() -{ - Model::MAdjustTreatmentParametersRequest mData; +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MStartTreatmentResponse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MStartTreatmentResponse data definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MStartTreatmentResponse_data () { + QTest::addColumn("errorIndex"); + QTest::addColumn("data"); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07")); + QTest::newRow("startTreatmentResponse ") << 1 << QByteArray::fromHex(QByteArray()); + QTest::newRow("startTreatmentResponse ") << 1 << QByteArray::fromHex(QByteArray("00")); + QTest::newRow("startTreatmentResponse ") << 1 << QByteArray::fromHex(QByteArray("00" "01")); + QTest::newRow("startTreatmentResponse ") << 1 << QByteArray::fromHex(QByteArray("00" "01" "02")); + QTest::newRow("startTreatmentRejectReason") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03")); + QTest::newRow("startTreatmentRejectReason") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04")); + QTest::newRow("startTreatmentRejectReason") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05")); + QTest::newRow("startTreatmentRejectReason") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06")); +} - QVariantList list; - for (int i = 0; i < 20; ++i) - { +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MStartTreatmentResponse test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MStartTreatmentResponse() { + Model::MStartTreatmentResponse mData; - list.append(QVariant(1)); - AdjustTreatmentParametersRequestData tempData = mData.fromVariantList(list); - if (i == 16) { - QVERIFY(1 == tempData.bloodFlowRate); - QVERIFY(1 == tempData.dialysateFlowRate); - QVERIFY(1 == tempData.duration); - QVERIFY(1 == tempData.heparinDispensingRate); - QVERIFY(1 == tempData.heparinBolusVolume); - QVERIFY(1 == tempData.heparinStopTime); - QVERIFY(1 == tempData.salineBolus); - QVERIFY(1 == tempData.acidConcentrate); - QVERIFY(1 == tempData.bicarbonateConcentrate); - QVERIFY(1 == tempData.dialyzerType); - QVERIFY(1 == tempData.dialysateTemp); - QVERIFY(1 == tempData.arterialPressureLimitLow); - QVERIFY(1 == tempData.arterialPressureLimitHigh); - QVERIFY(1 == tempData.venousPressureLimitLow); - QVERIFY(1 == tempData.venousPressureLimitHigh); - QVERIFY(1 == tempData.bloodPressureMeasureInterval); - QVERIFY(1 == tempData.rinsebackFlowRate); - } - else { - AdjustTreatmentParametersRequestData data; - QVERIFY(data.bloodFlowRate == tempData.bloodFlowRate); - QVERIFY(data.dialysateFlowRate == tempData.dialysateFlowRate); - QVERIFY(data.duration == tempData.duration); - QVERIFY(data.heparinDispensingRate == tempData.heparinDispensingRate); - QVERIFY(data.heparinBolusVolume == tempData.heparinBolusVolume); - QVERIFY(data.heparinStopTime == tempData.heparinStopTime); - QVERIFY(data.salineBolus == tempData.salineBolus); - QVERIFY(data.acidConcentrate == tempData.acidConcentrate); - QVERIFY(data.bicarbonateConcentrate == tempData.bicarbonateConcentrate); - QVERIFY(data.dialyzerType == tempData.dialyzerType); - QVERIFY(data.dialysateTemp == tempData.dialysateTemp); - QVERIFY(data.arterialPressureLimitLow == tempData.arterialPressureLimitLow); - QVERIFY(data.arterialPressureLimitHigh == tempData.arterialPressureLimitHigh); - QVERIFY(data.venousPressureLimitLow == tempData.venousPressureLimitLow); - QVERIFY(data.venousPressureLimitHigh == tempData.venousPressureLimitHigh); - QVERIFY(data.bloodPressureMeasureInterval== tempData.bloodPressureMeasureInterval); - QVERIFY(data.rinsebackFlowRate == tempData.rinsebackFlowRate); + QFETCH(int , errorIndex ); + QFETCH(QByteArray, data ); - } + int startIndex = 0; + int index = errorIndex - 1; + bool ok = mData.fromByteArray(data, &startIndex); + + Q_UNUSED(ok) +#ifdef CONSOLEOUT + qDebug() << index << errorIndex << startIndex << ok << data ; +#endif + + switch (errorIndex) { + case 0: { index = 0 ; QVERIFY ( mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 1: { index = index * sizeof mData._data.startTreatmentResponse ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 2: { index = index * sizeof mData._data.startTreatmentRejectReason ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + default: + QVERIFY2(false, "Incorrect Test"); + break; } } + +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MEndTreatmentResponse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MEndTreatmentResponse data definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MEndTreatmentResponse_data () { + QTest::addColumn("errorIndex"); + QTest::addColumn("data"); + QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03")); + QTest::newRow("endTreatmentResponse") << 1 << QByteArray::fromHex(QByteArray()); + QTest::newRow("endTreatmentResponse") << 1 << QByteArray::fromHex(QByteArray("00")); + QTest::newRow("endTreatmentResponse") << 1 << QByteArray::fromHex(QByteArray("00" "01")); + QTest::newRow("endTreatmentResponse") << 1 << QByteArray::fromHex(QByteArray("00" "01" "02")); +} + +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MEndTreatmentResponse test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MEndTreatmentResponse() { + Model::MEndTreatmentResponse mData; + + QFETCH(int , errorIndex ); + QFETCH(QByteArray, data ); + + int startIndex = 0; + int index = errorIndex - 1; + bool ok = mData.fromByteArray(data, &startIndex); + + Q_UNUSED(ok) +#ifdef CONSOLEOUT + qDebug() << index << errorIndex << startIndex << ok << data ; +#endif + + switch (errorIndex) { + case 0: { index = 0 ; QVERIFY ( mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 1: { index = index * sizeof mData._data.endTreatmentResponse ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + default: + QVERIFY2(false, "Incorrect Test"); + break; + } +} + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MSalineBolusResponse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MSalineBolusResponse data definition ~~~~~~~~~~~~~~~~~~~~~~~~ // @@ -1784,3 +1813,49 @@ break; } } + +void tst_models::tst_MAlarmAcknowledgeRequest() +{ + MessageInterpreter interpreter; + QVariantList vData; + QByteArray payload; + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_AlarmUserAckReq, vData, payload)); +} + +void tst_models::tst_MStartTreatmentRequest() +{ + MessageInterpreter interpreter; + QVariantList vData; + QByteArray payload; + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_StartTreatmentReq, vData, payload)); +} + +void tst_models::tst_MConfirmTreatmentRequest() +{ + MessageInterpreter interpreter; + QVariantList vData; + QByteArray payload; + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_ConfirmTreatmentReq, vData, payload)); +} + +void tst_models::tst_MEndTreatmentRequest() +{ + MessageInterpreter interpreter; + QVariantList vData; + QByteArray payload; + Message msg; + msg.actionId = Gui::GuiActions::ID_EndTreatmentReq; + + QVERIFY(interpreter.interpretMessage(Gui::GuiActions::ID_EndTreatmentReq, vData, payload)); + QVERIFY(!interpreter.interpretMessage_HD(msg,vData)); + vData.append(0); + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_EndTreatmentReq, vData, payload)); +} + +void tst_models::tst_MAdjustmentTreatmentParametersRequest() +{ + MessageInterpreter interpreter; + QVariantList vData; + QByteArray payload; + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_CreateTreatmentReq, vData, payload)); +} Index: unittests/tst_models.h =================================================================== diff -u -r95a840fc93f1a2cd65732d835fad2aca0f03f28e -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- unittests/tst_models.h (.../tst_models.h) (revision 95a840fc93f1a2cd65732d835fad2aca0f03f28e) +++ unittests/tst_models.h (.../tst_models.h) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -62,6 +62,10 @@ void tst_MAdjustUltrafiltrationConfirmResponse (); void tst_MConfirmTreatmentRequest(); + // -- Treatment Inline pressures + void tst_MAdjustPressuresLimitsResponse_data (); + void tst_MAdjustPressuresLimitsResponse (); + // - Data Messages void tst_DGROPumpData_data(); void tst_DGROPumpData(); Index: unittests/tst_views.cpp =================================================================== diff -u -re58be51c4aa52938af250db3ee579e98de08542c -r14c541d2b780b0a244bc84860aa565cf8dd7fe4b --- unittests/tst_views.cpp (.../tst_views.cpp) (revision e58be51c4aa52938af250db3ee579e98de08542c) +++ unittests/tst_views.cpp (.../tst_views.cpp) (revision 14c541d2b780b0a244bc84860aa565cf8dd7fe4b) @@ -52,11 +52,6 @@ // try rejected v.adjustment_Accepted(false); - // SALINE_BOLUS_STATE_IDLE = 0, - // SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP - // SALINE_BOLUS_STATE_IN_PROGRESS, - // SALINE_BOLUS_STATE_MAX_DELIVERED, - // if not accepted and a reason passed then the parent should translate it and return v.adjustment_Reason(GuiRequestReasons::REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE); QCOMPARE(v.text(), tr("REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE")); @@ -373,7 +368,6 @@ view.doResetCreateTreatment(); - for (int i = 0; i < 17; ++i) { VCreateTreatment_simulate_valid_parameters(view); @@ -401,7 +395,6 @@ default: break; } - QCOMPARE(view.validate(view.treatmentData), false); view.doFinishedCreate(); } @@ -496,7 +489,6 @@ view.bicarbonateConcentrateOptions(options); QCOMPARE(options, view.bicarbonateConcentrateOptions()); - options = QStringList() << "Nipro Elisio-H 17" << "Nipro Elisio-H 19" << "Fresenius Optiflux F160NRe" @@ -558,7 +550,6 @@ view.venousPressureLimitHighMax(v); QCOMPARE(v, view.venousPressureLimitHighMax()); - val = 1; view.bloodPressureMeasureIntervalMin(val); ++val; view.bloodPressureMeasureIntervalMin(val); view.bloodPressureMeasureIntervalMin(val); @@ -569,7 +560,6 @@ view.bloodPressureMeasureIntervalMax(val); QCOMPARE(val, view.bloodPressureMeasureIntervalMax()); - val = 10; view.rinsebackFlowRateMin(val); ++val; view.rinsebackFlowRateMin(val); view.rinsebackFlowRateMin(val); @@ -767,7 +757,6 @@ QVERIFY(view._saveTreatmentProfile); view.doFinishedConfirm(); - view.onFinishedSaveNewTreatment(true); view.onFinishedSaveNewTreatment(false); view.doFinishedPrime();