Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r38677167535b480612809a53d824b86e11b2e5f9 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 38677167535b480612809a53d824b86e11b2e5f9) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -189,7 +189,7 @@ // ---- {Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp , 4 * 4 }, // 8 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp , 4 * 4 }, // 4 parameters each 4bytes // ---- {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmReq , 2 * 4 }, // 2 parameters each 4bytes @@ -209,7 +209,7 @@ // ---- {Gui::GuiActionType::ID_AdjustPressuresLimitsReq , 4 * 4 }, // 4 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustPressuresLimitsRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustPressuresLimitsRsp , 5 * 4 }, // 5 parameters each 4bytes // ---- {Gui::GuiActionType::ID_AdjustPressuresWideningReq , 0 * 4 }, // 0 parameter each 4bytes Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r627062628b60e4d512ee8830c2dbc23eef02fe28 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 627062628b60e4d512ee8830c2dbc23eef02fe28) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -191,7 +191,7 @@ Connections { target: vTreatmentAdjustmentPressuresLimits function onAdjustmentTriggered ( vValue ) { if (vTreatmentAdjustmentPressuresLimits.adjustment_Accepted) { - _treatmentAdjustmentPressuresLimits.close() + if ( _treatmentAdjustmentPressuresLimits.isValid ) { _treatmentAdjustmentPressuresLimits.close() } } else { _treatmentAdjustmentPressuresLimits.notification.text = vTreatmentAdjustmentPressuresLimits.text() Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml =================================================================== diff -u -rbea36be2766046e63c4e82539a630b5cee7ce1c6 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision bea36be2766046e63c4e82539a630b5cee7ce1c6) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml (.../TreatmentAdjustmentPressuresLimits.qml) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -35,6 +35,11 @@ readonly property alias venousPressureLimitAsymtrc : _venousAsymmetricWindow.value readonly property alias tmpLimitWindow : _tmpWindow.value + readonly property bool isValid : _arterialWindow.valid && + _venousWindow.valid && + _venousAsymmetricWindow.valid && + _tmpWindow.valid + titleText: qsTr("Pressure Window Limit Settings") height : Variables.smallDialogHeight width : Variables.smallDialogWidth @@ -79,8 +84,12 @@ minimum : vTreatmentPressureOcclusion.arterialMin maximum : vTreatmentPressureOcclusion.arterialMax step : vTreatmentRanges.arterialPressureLimitWindowRes + valid : ! vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindowRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _arterialWindow.valid ) { vTreatmentAdjustmentPressuresLimits.arterialPressureLimitWindowRejectionReason = Variables.noRejectReason } + value = vValue + } } LabelUnitValueAdjuster { id: _venousWindow @@ -93,8 +102,12 @@ minimum : vTreatmentPressureOcclusion.venousMin maximum : vTreatmentPressureOcclusion.venousMax step : vTreatmentRanges.venousPressureLimitWindowRes + valid : ! vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindowRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _venousWindow.valid ) { vTreatmentAdjustmentPressuresLimits.venousPressureLimitWindowRejectionReason = Variables.noRejectReason } + value = vValue + } } LabelUnitValueAdjuster { id: _venousAsymmetricWindow @@ -107,8 +120,12 @@ minimum : vTreatmentRanges.venousPressureLimitAsymtrcMin maximum : vTreatmentRanges.venousPressureLimitAsymtrcMax step : vTreatmentRanges.venousPressureLimitAsymtrcRes + valid : ! vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrcRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _venousAsymmetricWindow.valid ) { vTreatmentAdjustmentPressuresLimits.venousPressureLimitAsymtrcRejectionReason = Variables.noRejectReason } + value = vValue + } } LabelUnitValueAdjuster { id: _tmpWindow @@ -121,8 +138,12 @@ minimum : vTreatmentPressureOcclusion.tmpMin maximum : vTreatmentPressureOcclusion.tmpMax step : vTreatmentRanges.transmembranePressureLimitWindowRes + valid : ! vTreatmentAdjustmentPressuresLimits.tmpPressureLimitWindowRejectionReason - onDidChange : function(vValue) { value = vValue } + onDidChange : function(vValue) { + if ( ! _tmpWindow.valid ) { vTreatmentAdjustmentPressuresLimits.tmpPressureLimitWindowRejectionReason = Variables.noRejectReason } + value = vValue + } } } } @@ -141,6 +162,7 @@ font.weight : Font.Medium } isDefault : true + enabled : _root.isValid onClicked : { _root.confirmClicked() Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -r38677167535b480612809a53d824b86e11b2e5f9 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 38677167535b480612809a53d824b86e11b2e5f9) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -561,21 +561,21 @@ * * | Payload ||| * | ||| - * | #1:(S32) | \ref mArterialPressureLimitWindow | (mmHg) | - * | #2:(S32) | \ref mVenousPressureLimitWindow | (mmHg) | - * | #3:(S32) | \ref mVenousPressureLimitAsymtrc | (mmHg) | - * | #4:(S32) | \ref mTmpPressureLimitWindow | (mmHg) | + * | #1:(U32) | \ref mArterialPressureLimitWindow | (mmHg) | + * | #2:(U32) | \ref mVenousPressureLimitWindow | (mmHg) | + * | #3:(U32) | \ref mVenousPressureLimitAsymtrc | (mmHg) | + * | #4:(U32) | \ref mTmpPressureLimitWindow | (mmHg) | * * \sa MPressureOcclusion : Pressure data broadcast * \sa MAdjustPressuresResponse : Pressures limit adjustment response * */ class MAdjustPressuresLimitsReq : public MModel { public: - qint32 mArterialPressureLimitWindow = 0; ///< (S32) Arterial Pressure Limit Window (mmHg) - qint32 mVenousPressureLimitWindow = 0; ///< (S32) Venous Pressure Limit Window (mmHg) - qint32 mVenousPressureLimitAsymtrc = 0; ///< (S32) Venous Pressure Limit Asymmetric (mmHg) - qint32 mTmpLimitWindow = 0; ///< (S32) Transmembrane Pressure Limit Window (mmHg) + quint32 mArterialPressureLimitWindow = 0; ///< (U32) Arterial Pressure Limit Window (mmHg) + quint32 mVenousPressureLimitWindow = 0; ///< (U32) Venous Pressure Limit Window (mmHg) + quint32 mVenousPressureLimitAsymtrc = 0; ///< (U32) Venous Pressure Limit Asymmetric (mmHg) + quint32 mTmpLimitWindow = 0; ///< (U32) Transmembrane Pressure Limit Window (mmHg) QString toString() { return toString Index: sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp =================================================================== diff -u -r48343520806859178923efdcca8a95f6af8599e9 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp (.../MTreatmentAdjustPressuresLimitsResponse.cpp) (revision 48343520806859178923efdcca8a95f6af8599e9) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp (.../MTreatmentAdjustPressuresLimitsResponse.cpp) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -18,15 +18,21 @@ QVariantList MAdjustPressuresLimitsResponse::parameters() const { return { - _data.mAccepted .value, - _data.mReason .value + _data.mAccepted .value, + _data.mArterialPressureLimitWindowRejectionReason .value, + _data.mVenousPressureLimitWindowRejectionReason .value, + _data.mVenousPressureLimitAsymtrcRejectionReason .value, + _data.mTmpPressureLimitWindowRejectionReason .value }; } bool MAdjustPressuresLimitsResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position - if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; - if ( ! GetValue(vByteArray, index, _data.mReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAccepted )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mArterialPressureLimitWindowRejectionReason)) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVenousPressureLimitWindowRejectionReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mVenousPressureLimitAsymtrcRejectionReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTmpPressureLimitWindowRejectionReason )) goto lError; return true ; @@ -43,7 +49,10 @@ */ AdjustPressuresLimitsResponseData MAdjustPressuresLimitsResponse::data() const { Data data; - data.mAccepted = _data.mAccepted .value; - data.mReason = _data.mReason .value; + data.mAccepted = _data.mAccepted .value; + data.mArterialPressureLimitWindowRejectionReason = _data.mArterialPressureLimitWindowRejectionReason .value; + data.mVenousPressureLimitWindowRejectionReason = _data.mVenousPressureLimitWindowRejectionReason .value; + data.mVenousPressureLimitAsymtrcRejectionReason = _data.mVenousPressureLimitAsymtrcRejectionReason .value; + data.mTmpPressureLimitWindowRejectionReason = _data.mTmpPressureLimitWindowRejectionReason .value; return data; } Index: sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h =================================================================== diff -u -r38677167535b480612809a53d824b86e11b2e5f9 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h (.../MTreatmentAdjustPressuresLimitsResponse.h) (revision 38677167535b480612809a53d824b86e11b2e5f9) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h (.../MTreatmentAdjustPressuresLimitsResponse.h) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -36,8 +36,11 @@ * * | Payload || * | || - * | #1:(U32) | \ref Data::mAccepted | - * | #2:(U32) | \ref Data::mReason | + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mArterialPressureLimitWindowRejectionReason | + * | #3:(U32) | \ref Data::mVenousPressureLimitWindowRejectionReason | + * | #4:(U32) | \ref Data::mVenousPressureLimitAsymtrcRejectionReason | + * | #5:(U32) | \ref Data::mTmpPressureLimitWindowRejectionReason | * * \sa Data * \sa MAdjustPressureLimitsReq : Pressures limits adjustment request @@ -59,8 +62,11 @@ QVariantList parameters() const override; struct { - Types::U32 mAccepted ; - Types::U32 mReason ; + Types::U32 mAccepted ; + Types::U32 mArterialPressureLimitWindowRejectionReason ; + Types::U32 mVenousPressureLimitWindowRejectionReason ; + Types::U32 mVenousPressureLimitAsymtrcRejectionReason ; + Types::U32 mTmpPressureLimitWindowRejectionReason ; } _data; public: @@ -70,8 +76,11 @@ QString infoText () const override { return QString("AdjustPressuresLimits") ; } struct Data { - bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ - quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mArterialPressureLimitWindowRejectionReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mVenousPressureLimitWindowRejectionReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mVenousPressureLimitAsymtrcRejectionReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mTmpPressureLimitWindowRejectionReason = 0; /*!< Reason value of type quint32 extracted out */ }; MAdjustPressuresLimitsResponse () { } Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp =================================================================== diff -u -r48343520806859178923efdcca8a95f6af8599e9 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp (.../VTreatmentAdjustmentPressuresLimits.cpp) (revision 48343520806859178923efdcca8a95f6af8599e9) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp (.../VTreatmentAdjustmentPressuresLimits.cpp) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -33,10 +33,10 @@ * \param vTmpLimitWindow - requested TMP window limit */ void VTreatmentAdjustmentPressuresLimits::doAdjustment( - qint32 vArterialPressureLimitWindow, - qint32 vVenousPressureLimitWindow, - qint32 vVenousPressureLimitAsymtrc, - qint32 vTmpLimitWindow) + quint32 vArterialPressureLimitWindow, + quint32 vVenousPressureLimitWindow, + quint32 vVenousPressureLimitAsymtrc, + quint32 vTmpLimitWindow) { _data.mArterialPressureLimitWindow = vArterialPressureLimitWindow ; _data.mVenousPressureLimitWindow = vVenousPressureLimitWindow ; @@ -53,9 +53,13 @@ */ void VTreatmentAdjustmentPressuresLimits::onActionReceive(const AdjustPressuresLimitsResponseData &vData) { - adjustment_Accepted ( vData.mAccepted ); - adjustment_Reason ( vData.mReason ); + adjustment_Accepted ( vData.mAccepted ); + arterialPressureLimitWindowRejectionReason ( vData.mArterialPressureLimitWindowRejectionReason ); + venousPressureLimitWindowRejectionReason ( vData.mVenousPressureLimitWindowRejectionReason ); + venousPressureLimitAsymtrcRejectionReason ( vData.mVenousPressureLimitAsymtrcRejectionReason ); + tmpPressureLimitWindowRejectionReason ( vData.mTmpPressureLimitWindowRejectionReason ); + // *** 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 ); Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h =================================================================== diff -u -r48343520806859178923efdcca8a95f6af8599e9 -r9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h (.../VTreatmentAdjustmentPressuresLimits.h) (revision 48343520806859178923efdcca8a95f6af8599e9) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h (.../VTreatmentAdjustmentPressuresLimits.h) (revision 9c2a4c5abe3a93c3b3a7ed3d6fd9e12f0c161b3c) @@ -44,6 +44,11 @@ // has been manually tested that it works perfectly fine TRIGGER( bool , adjustment , 0) + TRIGGER(quint32 , arterialPressureLimitWindowRejectionReason , 0) + TRIGGER(quint32 , venousPressureLimitWindowRejectionReason , 0) + TRIGGER(quint32 , venousPressureLimitAsymtrcRejectionReason , 0) + TRIGGER(quint32 , tmpPressureLimitWindowRejectionReason , 0) + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentPressuresLimits, AdjustPressuresLimitsResponseData) public slots: @@ -55,10 +60,10 @@ * \param vVenousLimitAsymtrc * \param vTmpLimitWindow */ - void doAdjustment( qint32 vArterialPressureLimitWindow , - qint32 vVenousPressureLimitWindow , - qint32 vVenousPressureLimitAsymtrc , - qint32 vTmpLimitWindow ); + void doAdjustment( quint32 vArterialPressureLimitWindow , + quint32 vVenousPressureLimitWindow , + quint32 vVenousPressureLimitAsymtrc , + quint32 vTmpLimitWindow ); signals: /*!