Index: sources/ApplicationController.cpp =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -441,7 +441,6 @@ data += (char)(0); } break; - } Types::safeIncrement(txCount); } Index: sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml (.../PreTreatmentDisposablesStack.qml) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml (.../PreTreatmentDisposablesStack.qml) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -32,6 +32,8 @@ property int stackStepIndex : 3 + readonly property bool hasHeparin : vTreatmentCreate.heparinBolusVolume || vTreatmentCreate.heparinDispensingRate + PreTreatmentBase { id: _preTreatmentDisposablesSelfTest title.text : qsTr("Disposables Self Test") hasTimeCircle : true @@ -51,11 +53,8 @@ PreTreatmentBase { id: _preTreatmentDisposablesCartridgeConnetion function page_confirm() { - if( vTreatmentCreate.heparinBolusVolume ) { - page( _preTreatmentDisposablesHeparinSyringe ) - } else { - page( _preTreatmentDisposablesSalineBag ) - } + if ( _root.hasHeparin ) page( _preTreatmentDisposablesHeparinSyringe ) + else page( _preTreatmentDisposablesSalineBag ) } title.text : qsTr("Cartridge Connection") @@ -79,11 +78,8 @@ PreTreatmentBase { id: _preTreatmentDisposablesSalineBag function page_back() { - if( vTreatmentCreate.heparinBolusVolume ) { - page( _preTreatmentDisposablesHeparinSyringe ) - } else { - page( _preTreatmentDisposablesCartridgeConnetion ) - } + if ( _root.hasHeparin ) page( _preTreatmentDisposablesHeparinSyringe ) + else page( _preTreatmentDisposablesCartridgeConnetion ) } title.text : qsTr("Saline Bag") Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -38,7 +38,7 @@ readonly property bool isUFPaused : vHDTreatmentStates.ufPaused readonly property bool isUFRunning : vHDTreatmentStates.ufRunning readonly property string ufInfoImageSource : isUFPaused ? "qrc:/images/iPauseGray" : "" - readonly property string ufInfoText : isUFPaused ? qsTr("Ultrafiltration is paused" ) : "" + readonly property string ufInfoText : isUFPaused ? qsTr("Ultrafiltration Paused" ) : "" readonly property string ufInfoTextColor : isUFPaused ? "gray" : "" readonly property bool isSBInProgress : ( vHDTreatmentStates.sbRunning || vHDTreatmentStates.sbWaitPump ) Index: sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml =================================================================== diff -u -rbd01334f257c35b96b7b232beacbcd7fae60c852 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision bd01334f257c35b96b7b232beacbcd7fae60c852) +++ sources/gui/qml/pages/treatment/sections/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -70,7 +70,9 @@ VTreatmentHeparin { id: vTreatmentHeparin } onClicked: { - vTreatmentAdjustmentHeparin.doAdjustment() + if ( isCompleted ) vTreatmentAdjustmentHeparin.doResume() + if ( isPaused ) vTreatmentAdjustmentHeparin.doResume() + if ( isDispensing ) vTreatmentAdjustmentHeparin.doPause () } notification { Index: sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml =================================================================== diff -u -rd0ae5a039ca37630c0911e1f9041b93b980e0431 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision d0ae5a039ca37630c0911e1f9041b93b980e0431) +++ sources/gui/qml/pages/treatment/sections/TreatmentSaline.qml (.../TreatmentSaline.qml) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -58,7 +58,8 @@ VTreatmentSaline { id: vTreatmentSaline } onClicked: { - vTreatmentAdjustmentSaline.doAdjustment() + if ( isIdle ) vTreatmentAdjustmentSaline.doStart() // IDLE + if ( isStarted ) vTreatmentAdjustmentSaline.doStop () // IN_PROGRESS } notification { Index: sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.cpp =================================================================== diff -u -rae1042a0c14d6d27556730183cc2cbe1a00bc0a7 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.cpp (.../MTreatmentAdjustHeparinResponse.cpp) (revision ae1042a0c14d6d27556730183cc2cbe1a00bc0a7) +++ sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.cpp (.../MTreatmentAdjustHeparinResponse.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -20,19 +20,16 @@ return { _data.mAccepted.value, _data.mReason .value, - _data.mState .value }; } bool MAdjustHeparinResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position if (GetValue(vByteArray, index, _data.mAccepted )) if (GetValue(vByteArray, index, _data.mReason )) - if (GetValue(vByteArray, index, _data.mState )) return true ; else { if(vIndex) *vIndex = index; return false; } else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } } /*! @@ -44,6 +41,5 @@ Data data; data.mAccepted = _data.mAccepted.value; data.mReason = _data.mReason .value; - data.mState = _data.mState .value; return data; } Index: sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.h =================================================================== diff -u -rf7fe40e1e2e5e7ccd02407aead0adcb0f5bf7f53 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.h (.../MTreatmentAdjustHeparinResponse.h) (revision f7fe40e1e2e5e7ccd02407aead0adcb0f5bf7f53) +++ sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.h (.../MTreatmentAdjustHeparinResponse.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -38,7 +38,6 @@ * | || * | #1:(U32) | \ref Data::mAccepted | * | #2:(U32) | \ref Data::mReason | - * | #4:(U32) | \ref Data::mState | * * \sa Data * \sa MAdjustHeparinReq : Heparin Request @@ -62,7 +61,6 @@ struct { Types::U32 mAccepted; Types::U32 mReason ; - Types::U32 mState ; } _data; public: @@ -74,7 +72,6 @@ struct Data { bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ - quint32 mState = 0; /*!< Heparin State value of type quint32 extracted out */ }; MAdjustHeparinResponse () { } Index: sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp (.../MTreatmentAdjustSalineResponse.cpp) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp (.../MTreatmentAdjustSalineResponse.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -5,11 +5,11 @@ * 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 MTreatmentAdjustSalineResponse.cpp - * \author (last) Behrouz NematiPour - * \date (last) 08-Sep-2020 - * \author (original) Behrouz NematiPour - * \date (original) 10-Aug-2020 + * \file MTreatmentAdjustSalineResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 01-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 01-Apr-2021 * */ #include "MTreatmentAdjustSalineResponse.h" @@ -21,7 +21,6 @@ _data.mAccepted.value, _data.mReason .value, _data.mTarget .value, - _data.mState .value }; } @@ -30,12 +29,10 @@ if (GetValue(vByteArray, index, _data.mAccepted )) if (GetValue(vByteArray, index, _data.mReason )) if (GetValue(vByteArray, index, _data.mTarget )) - if (GetValue(vByteArray, index, _data.mState )) return true ; else { if(vIndex) *vIndex = index; return false; } else { if(vIndex) *vIndex = index; return false; } else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } } /*! @@ -48,6 +45,5 @@ data.mAccepted = _data.mAccepted.value; data.mReason = _data.mReason .value; data.mTarget = _data.mTarget .value; - data.mState = _data.mState .value; return data; } Index: sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h =================================================================== diff -u -r1284cf3e36ef692c94c38545121c83072626036d -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h (.../MTreatmentAdjustSalineResponse.h) (revision 1284cf3e36ef692c94c38545121c83072626036d) +++ sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h (.../MTreatmentAdjustSalineResponse.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -5,11 +5,11 @@ * 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 MTreatmentAdjustSalineResponse.h - * \author (last) Behrouz NematiPour - * \date (last) 25-Sep-2020 - * \author (original) Behrouz NematiPour - * \date (original) 10-Aug-2020 + * \file MTreatmentAdjustSalineResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 01-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 01-Apr-2021 * */ #pragma once @@ -39,7 +39,6 @@ * | #1:(U32) | \ref Data::mAccepted | * | #2:(U32) | \ref Data::mReason | * | #3:(U32) | \ref Data::mTarget | - * | #4:(U32) | \ref Data::mState | * * \sa Data * \sa MAdjustSalineReq : Saline Bolus Request @@ -64,7 +63,6 @@ Types::U32 mAccepted; Types::U32 mReason ; Types::U32 mTarget ; - Types::U32 mState ; } _data; public: @@ -77,7 +75,6 @@ bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ quint32 mTarget = 0; /*!< Target Volume value of type quint32 extracted out */ - quint32 mState = 0; /*!< Saline State value of type quint32 extracted out */ }; MAdjustSalineResponse () { } Index: sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp =================================================================== diff -u -rcc1e9d6d55c816f3fcd626dc6948cca24da283b3 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp (.../MTreatmentAdjustUltrafiltrationStateResponse.cpp) (revision cc1e9d6d55c816f3fcd626dc6948cca24da283b3) +++ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp (.../MTreatmentAdjustUltrafiltrationStateResponse.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -20,19 +20,16 @@ return { _data.mAccepted.value, _data.mReason .value, - _data.mState .value }; } bool MAdjustUltrafiltrationStateResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position if (GetValue(vByteArray, index, _data.mAccepted )) if (GetValue(vByteArray, index, _data.mReason )) - if (GetValue(vByteArray, index, _data.mState )) return true ; else { if(vIndex) *vIndex = index; return false; } else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } } /*! @@ -44,6 +41,5 @@ Data data; data.mAccepted = _data.mAccepted.value; data.mReason = _data.mReason .value; - data.mState = _data.mState .value; return data; } Index: sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.h =================================================================== diff -u -r1284cf3e36ef692c94c38545121c83072626036d -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.h (.../MTreatmentAdjustUltrafiltrationStateResponse.h) (revision 1284cf3e36ef692c94c38545121c83072626036d) +++ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.h (.../MTreatmentAdjustUltrafiltrationStateResponse.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -38,7 +38,6 @@ * | || * | #1:(U32) | \ref Data::mAccepted | * | #2:(U32) | \ref Data::mReason | - * | #3:(U32) | \ref Data::mState | * * \sa Data * \sa MAdjustUltrafiltrationStateReq : Ultrafiltration state change Request @@ -61,7 +60,6 @@ struct { Types::U32 mAccepted; Types::U32 mReason ; - Types::U32 mState ; } _data; public: @@ -72,7 +70,6 @@ struct Data { bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ - quint32 mState = 0; /*!< UF State value of type quint32 extracted out */ }; MAdjustUltrafiltrationStateResponse() { } Index: sources/storage/StorageGlobals.cpp =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -13,10 +13,10 @@ * */ // Qt +#include // Project #include "StorageGlobals.h" - /*! * \brief Storage * \details The container of the constant global variable withing Storage namespace members. @@ -42,7 +42,7 @@ // Settings #ifdef BUILD_FOR_POKY - const char *Settings_Path_Name = QDir::homePath() + ".conf/"; + const char *Settings_Path_Name = QDir::homePath().append("/.conf/").toLatin1().data(); #else // should be in the project application folder. [is tracking by git] const char *Settings_Path_Name = "/home/denali/Projects/application/resources/settings/"; Index: sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp =================================================================== diff -u -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp (.../VTreatmentAdjustmentHeparin.cpp) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp (.../VTreatmentAdjustmentHeparin.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -29,28 +29,27 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - state ( vData.mState ); - // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** adjustment ( true ); } /*! - * \brief View::VTreatmentAdjustmentHeparin::doAdjustment - * \details the invocable slot to adjust(start/stop) the treatment Heparin bolus state + * \brief View::VTreatmentAdjustmentHeparin::doPause + * \details sends the pause heparin request */ -void View::VTreatmentAdjustmentHeparin::doAdjustment() +void View::VTreatmentAdjustmentHeparin::doPause() { - // if it's accepted or rejected we have the last/current state of Heparin - // so decide on last received/response state - // be careful the response enum (GuiHeparinStates) is - // different than request enum (AdjustHeparinRequestData) - if ( state() == GuiHeparinStates::HEPARIN_STATE_PAUSED ) { - _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_RESUME; - } - else { - _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE; - } + _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE ; emit didAdjustment(_data); // notify the controllers to do the adjustment } + +/*! + * \brief View::VTreatmentAdjustmentHeparin::doResume + * \details sends the resume heparin request + */ +void View::VTreatmentAdjustmentHeparin::doResume() +{ + _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_RESUME; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} Index: sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.h (.../VTreatmentAdjustmentHeparin.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.h (.../VTreatmentAdjustmentHeparin.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -46,19 +46,12 @@ TRIGGER( bool , adjustment , 0 ) // coco end - // coco begin validated: Manually tested - // This property should not be used in QML since it need exposed enum - // exposed enum usage in QML is not suggested since QML will not error out on any issue - // kept for consistency and debugging use cases - // Look at the VHDTreatmentStates Heparin bolus properties - PROPERTY( qint32 , state , 0 ) - //coco end - VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentHeparin, AdjustHeparinResponseData) // ---------- Start/Stop Heparin Bolus public slots: - void doAdjustment(); + void doPause (); + void doResume(); signals: /*! Index: sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp =================================================================== diff -u -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -28,9 +28,7 @@ { adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - target ( vData.mTarget ); - state ( vData.mState ); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** @@ -40,18 +38,25 @@ /*! * \brief View::VTreatmentAdjustmentSaline::doAdjustment * \details the invocable slot to adjust(start/stop) the treatment saline bolus state + * \param vStart - if true sets the requestedState to 1(SALINE_CMD_START) otherwise to 0(SALINE_CMD_STOP) */ -void View::VTreatmentAdjustmentSaline::doAdjustment() + +/*! + * \brief View::VTreatmentAdjustmentSaline::doStart + * \details sends the start saline request + */ +void View::VTreatmentAdjustmentSaline::doStart() { - // if it's accepted or rejected we have the last/current state of saline - // so decide on last received/response state - // be careful the response enum (GuiSalineStates) is - // different than request enum (AdjustSalineRequestData) - if ( state() == GuiSalineStates::SALINE_BOLUS_STATE_IN_PROGRESS ) { - _data.requestedState = GuiSalineCommands::SALINE_CMD_STOP; - } - else { - _data.requestedState = GuiSalineCommands::SALINE_CMD_START; - } - emit didAdjustment(_data); // notify the controllers to do the adjustment + _data.requestedState = GuiSalineCommands::SALINE_CMD_START; + emit didAdjustment(_data); } + +/*! + * \brief View::VTreatmentAdjustmentSaline::doStop + * \details sends the stop saline request + */ +void View::VTreatmentAdjustmentSaline::doStop() +{ + _data.requestedState = GuiSalineCommands::SALINE_CMD_STOP; + emit didAdjustment(_data); +} Index: sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h (.../VTreatmentAdjustmentSaline.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h (.../VTreatmentAdjustmentSaline.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -48,19 +48,12 @@ PROPERTY( qint32 , target , 0 ) - // coco begin validated: Manually tested - // This property should not be used in QML since it need exposed enum - // exposed enum usage in QML is not suggested since QML will not error out on any issue - // kept for consistency and debugging use cases - // Look at the VHDTreatmentStates saline bolus properties - PROPERTY( qint32 , state , 0 ) - //coco end - VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentSaline, AdjustSalineResponseData) // ---------- Start/Stop Saline Bolus public slots: - void doAdjustment(); + void doStart(); + void doStop (); signals: /*! Index: sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp =================================================================== diff -u -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp (.../VTreatmentAdjustmentUltrafiltrationState.cpp) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp (.../VTreatmentAdjustmentUltrafiltrationState.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -29,8 +29,6 @@ adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - state ( vData.mState ); - // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** // *** use this trigger to make sure you have all the properties with updated values *** Index: sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h (.../VTreatmentAdjustmentUltrafiltrationState.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h (.../VTreatmentAdjustmentUltrafiltrationState.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -46,14 +46,6 @@ TRIGGER( bool , adjustment , 0) // coco end - // coco begin validated: Manually tested - // This property should not be used in QML since it need exposed enum - // exposed enum usage in QML is not suggested since QML will not error out on any issue - // kept for consistency and debugging use cases - // Look at the VHDTreatmentStates ultrafiltration properties - PROPERTY( qint32 , state , 0) - // coco end - VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationState, AdjustUltrafiltrationStateResponseData) // ---------- Pause Ultrafiltration Index: sources/view/hd/data/VHDTreatmentStatesData.cpp =================================================================== diff -u -rbd01334f257c35b96b7b232beacbcd7fae60c852 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/data/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision bd01334f257c35b96b7b232beacbcd7fae60c852) +++ sources/view/hd/data/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -17,30 +17,9 @@ // Project #include "GuiController.h" -VIEW_DEF_CLASS(VHDTreatmentStates) +VIEW_DEF(VHDTreatmentStates, TreatmentStatesData) /*! - * \brief VTreatmentAdjustmentSaline::initConnections - * \details Initializes the message(s) connection - * \note This class not only listens to its dedicated message TreatmentStatesData, - * But also listens to other messages which affect ultrafiltration and saline bolus state. - * These extra messages are AdjustSalineResponseData , AdjustUltrafiltrationStateResponseData. - * Which ever comes first will set its related properties. - * Since the properties wont set twice if they have the same value it doesn't affect performance so much. - * Also FW suppose to send the TreatmentStatesData related message immediately after the two others. - */ -void VHDTreatmentStates::initConnections() { - ACTION_VIEW_CONNECTION(TreatmentStatesData ); - // these messages sending the same states as in message 15 (TreatmentStates above) - // it is redundant and with a better messaging protocol - // the one in the Adjustment messages should be removed since it is not sent on each state change - // and will be sent only once to the request. - ACTION_VIEW_CONNECTION(AdjustUltrafiltrationStateResponseData ); - ACTION_VIEW_CONNECTION(AdjustSalineResponseData ); - ACTION_VIEW_CONNECTION(AdjustHeparinResponseData ); -} - -/*! * \brief VHDTreatmentStates::onActionReceive * \details sets the properties for the received data of Treatment States * \param vData - Treatment States data @@ -132,46 +111,3 @@ } txStop ( mTreatmentStop ); } - -/*! - * \brief VHDTreatmentStates::onActionReceive - * \details message handler for the message AdjustUltrafiltrationStateResponse data - * \param vData - AdjustUltrafiltrationStateResponse data - */ -void VHDTreatmentStates::onActionReceive(const AdjustUltrafiltrationStateResponseData &vData) -{ - // Ultrafiltration states - ufStart ( vData.mState == GuiUFStates ::UF_START_STATE ); - ufPaused ( vData.mState == GuiUFStates ::UF_PAUSED_STATE ); - ufRunning ( vData.mState == GuiUFStates ::UF_RUNNING_STATE ); -} - -/*! - * \brief VHDTreatmentStates::onActionReceive - * \details message handler for the message AdjustSalineResponseData data - * \param vData - AdjustSalineResponseData data - */ -void VHDTreatmentStates::onActionReceive(const AdjustSalineResponseData &vData) -{ - // Saline Bolus states - sbIdle ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_IDLE ); - sbWaitPump ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP ); - sbRunning ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_IN_PROGRESS ); - sbMaxReached ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_MAX_DELIVERED ); -} - -/*! - * \brief VHDTreatmentStates::onActionReceive - * \details message handler for the message AdjustHeparinResponseData data - * \param vData - AdjustHeparinResponseData data - */ -void VHDTreatmentStates::onActionReceive(const AdjustHeparinResponseData &vData) -{ - // Saline Bolus states - hpOff ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_OFF ); - hpPaused ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_PAUSED ); - hpInitial_bolus ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_INITIAL_BOLUS ); - hpDispensing ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_DISPENSING ); - hpCompleted ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_COMPLETED ); - hpEmpty ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_EMPTY ); -} Index: sources/view/hd/data/VHDTreatmentStatesData.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -117,12 +117,6 @@ PROPERTY( bool , tsRecirculateNo , false) ///< TREATMENT_STOP_NO_RECIRC_STATE = 1 # No dialysate re-circulation state of the treatment stop sub-mode state machine // class definition - VIEW_DEC_CLASS(VHDTreatmentStates) - - // slots for received data messages (onActionReceive) - VIEW_DEC_SLOT (TreatmentStatesData ) // Treatment States Broadcast messages (This class original receiver) - VIEW_DEC_SLOT (AdjustUltrafiltrationStateResponseData ) // Ultrafiltration state Adjustment response message - VIEW_DEC_SLOT (AdjustSalineResponseData ) // Saline Bolus Adjustment response message - VIEW_DEC_SLOT (AdjustHeparinResponseData ) // Heparin Adjustment response message + VIEW_DEC(VHDTreatmentStates, TreatmentStatesData) }; } Index: unittests/tst_models.cpp =================================================================== diff -u -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r6581def57942b1c1ef56a2f2feb74559946517b9 --- unittests/tst_models.cpp (.../tst_models.cpp) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ unittests/tst_models.cpp (.../tst_models.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -1865,10 +1865,6 @@ QTest::newRow("mTarget ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08")); QTest::newRow("mTarget ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09")); QTest::newRow("mTarget ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A")); - QTest::newRow("mState ") << 4 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B")); - QTest::newRow("mState ") << 4 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C")); - QTest::newRow("mState ") << 4 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D")); - QTest::newRow("mState ") << 4 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E")); } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MSalineBolusResponse test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MSalineBolusResponse() { @@ -1890,7 +1886,6 @@ case 1: { index = index * sizeof mData._data.mAccepted; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; case 2: { index = index * sizeof mData._data.mReason ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; case 3: { index = index * sizeof mData._data.mTarget ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; - case 4: { index = index * sizeof mData._data.mState ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; default: QVERIFY2(false, "Incorrect Test"); break; @@ -1912,10 +1907,6 @@ QTest::newRow("mReason ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04")); QTest::newRow("mReason ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05")); QTest::newRow("mReason ") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06")); - QTest::newRow("mState ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07")); - QTest::newRow("mState ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08")); - QTest::newRow("mState ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09")); - QTest::newRow("mState ") << 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A")); } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MHeparinResponse test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MHeparinResponse() { @@ -1936,7 +1927,6 @@ case 0: { index = 0 ; QVERIFY ( mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; case 1: { index = index * sizeof mData._data.mAccepted; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; case 2: { index = index * sizeof mData._data.mReason ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; - case 3: { index = index * sizeof mData._data.mState ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; default: QVERIFY2(false, "Incorrect Test"); break;