Index: denali.pro.user =================================================================== diff -u -ra3f457785f86bd41a4df1dd3c6ca7300d5fca38e -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- denali.pro.user (.../denali.pro.user) (revision a3f457785f86bd41a4df1dd3c6ca7300d5fca38e) +++ denali.pro.user (.../denali.pro.user) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -1,6 +1,6 @@ - + EnvironmentId Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -520,32 +520,7 @@ } // ---------- ---------- ---------- ---------- ---------- Adjustments ---------- ---------- ---------- ---------- ---------- // - /*! - * \brief MessageInterpreter::adjustUltrafiltrationState - * \details This method interprets Treatment Ultrafiltration State Adjustment Response message data - * in vMessage of type Message. - * \param vMessage - The vMessage of type Message which contains all the data, - * require to be interpreted. - * \param vData - Treatment Ultrafiltration State Adjustment Response data - * \return true if the data can be extracted as defined for Treatment Ultrafiltration State Adjustment Response Message ID - */ -bool MessageInterpreter::adjustUltrafiltrationState(const Message &vMessage, QVariantList &vData) -{ - bool ok = false; - if ( ! isValidMessage(vMessage, Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp) ) return ok; - - Model::MAdjustUltrafiltrationStateResponse mData; - ok = mData.fromByteArray(vMessage.data); - LOG_EVENT(mData.toString()); - - mData.toVariantList(vData); - emit didActionReceive(mData.data()); - - return ok; -} - -/*! * \brief MessageInterpreter::adjustUltrafiltrationEditData * \details This method interprets Treatment Ultrafiltration Volume Adjustment Response message data * in vMessage of type Message. Index: sources/canbus/MessageInterpreter.h =================================================================== diff -u -r4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision 4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac) +++ sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -72,7 +72,6 @@ // ----- - DG // ----- Adjustments - bool adjustUltrafiltrationState (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool adjustUltrafiltrationEdit (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool adjustUltrafiltrationConfirm (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; Index: sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -43,7 +43,9 @@ */ void View::VTreatmentAdjustmentSaline::doAdjustment() { - if ( state() == AdjustSalineRequestData::eStart ) { // last received/response state + // if it's accepted or rejected we have the last/current state of saline + // so decide on last received/response state + if ( state() == AdjustSalineRequestData::eStart ) { _data.requestedState = AdjustSalineRequestData::eStop; } else { Index: sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h (.../VTreatmentAdjustmentSaline.h) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h (.../VTreatmentAdjustmentSaline.h) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -46,7 +46,14 @@ // coco end 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) Index: sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h (.../VTreatmentAdjustmentUltrafiltrationState.h) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h (.../VTreatmentAdjustmentUltrafiltrationState.h) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -46,7 +46,13 @@ 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) Index: sources/view/hd/data/VHDTreatmentStatesData.h =================================================================== diff -u -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) +++ sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -38,10 +38,12 @@ { Q_OBJECT + // 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 PROPERTY( quint32, subMode , 0) PROPERTY( quint32, ufState , 0) - // coco begin validated: Validated manually, but has not been used yet. - // instead VTreatmentAdjustmentSaline::isStarted is used which has more control over the saline state. PROPERTY( quint32, salineState , 0) // coco end @@ -53,35 +55,49 @@ // also start UF_START_STATE should not be used often // because it's only useful in FW implementation and it immediately changes to another state. - // Ultrafiltration states + // ---- Ultrafiltration states + // coco begin validated: Manually tested + // not useful for UI more FW state entry + // kept for consistency PROPERTY( bool , ufStart , false) ///< UF_START_STATE Start state of the ultrafiltration state machine + // coco end PROPERTY( bool , ufPaused , false) ///< UF_PAUSED_STATE Paused state of the ultrafiltration state machine PROPERTY( bool , ufRunning , false) ///< UF_RUNNING_STATE Running state of the ultrafiltration state machine PROPERTY( bool , ufOff , true ) ///< UF_OFF_STATE Completed/off state of the ultrafiltration state machine (default state) PROPERTY( bool , ufCompleted , false) ///< UF_COMPLETED_STATE Completed state of ultrafiltration state machine - // Saline Bolus states + // ---- Saline Bolus states PROPERTY( bool , sbOff , true ) ///< SALINE_BOLUS_STATE_IDLE No saline bolus delivery is in progress (default state) PROPERTY( bool , sbWaitPump , false) ///< SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP Wait for pumps to stop before starting bolus PROPERTY( bool , sbRunning , false) ///< SALINE_BOLUS_STATE_IN_PROGRESS A saline bolus delivery is in progress PROPERTY( bool , sbMaxReached , false) ///< SALINE_BOLUS_STATE_MAX_DELIVERED Maximum saline bolus volume reached - no more saline bolus deliveries allowed - // Treatment states - // Treatment states - Basics + // ---- Treatment states + // ---- Treatment states - Basics + // coco begin validated: Manually tested + // not used yet since the Treatment Start/stop/end has not been implemented yet. PROPERTY( bool , txStart , false) ///< TREATMENT_START_STATE Start treatment, prime blood side with gradual ramp for 1 min. while dialyzer is bypassed. No dialysis or UF taking place PROPERTY( bool , txStop , false) ///< TREATMENT_STOP_STATE Treatment stopped. All pumps off. Dializer bypassed PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE Treatment has ended. All pumps off. Dialyzer is bypassed. Blood lines are closed. User to disconnect - // Treatment states - Dialysis + // coco end + + // ---- Treatment states - Dialysis PROPERTY( bool , txDialysis_Running , false) ///< TREATMENT_DIALYSIS_STATE Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested + // coco begin validated: Manually tested + // not used yet since the Treatment Start/stop/end has not been implemented yet. PROPERTY( bool , txDialysis_End , false) ///< TREATMENT_DIALYSIS_END_STATE Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback - // Treatment states - Rinse back + // coco end + // ---- Treatment states - Rinse back + // coco begin validated: Manually tested + // not used yet since the rinse back and recirculate has not bin implemented yet. PROPERTY( bool , txRinseback_Running , false) ///< TREATMENT_RINSEBACK_STATE Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating PROPERTY( bool , txRinseback_Pause , false) ///< TREATMENT_RINSEBACK_PAUSE_STATE Rinseback paused. Blood pump off. Dialyzer bypassed. Dialysate recirculating - // Treatment states - Recirculate + // ---- Treatment states - Recirculate PROPERTY( bool , txRecirculate_Setup , false) ///< TREATMENT_RECIRC_SETUP_STATE Rinseback complete. Blood pump off. Blood lines closed. User to disconnect and shunt blood lines PROPERTY( bool , txRecirculate_Running , false) ///< TREATMENT_RECIRC_STATE Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed PROPERTY( bool , txRecirculate_Pause , false) ///< TREATMENT_RECIRC_PAUSE_STATE Recirculate paused. Blood pump off. Blood lines closed and shunted. Dialyzer is bypassed PROPERTY( bool , txRecirculate_Stop , false) ///< TREATMENT_RECIRC_STOP_STATE Recirculate stopped. Blood pump off. Blood lines open. Waiting for patient to unshunt and connect and resume treatment + // coco end // class definition VIEW_DEC_CLASS(VHDTreatmentStates) Index: unittests/tst_messaging.cpp =================================================================== diff -u -r4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision 4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac) +++ unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -436,34 +436,6 @@ } /*! - * \brief tst_messaging::tst_MessageInterpreter_adjustUltrafiltrationStateData_isType - * \details Tests MessageInterpreter adjustUltrafiltrationStateData method Message Type check - */ -void tst_messaging::tst_MessageInterpreter_adjustUltrafiltrationStateData_isType() -{ - Can::MessageInterpreter iMsg; - Can::Message msg; - msg.actionId = Gui::GuiActionType::ID_Unknown; - msg.data = {}; - QVariantList list; - QVERIFY( ! iMsg.adjustUltrafiltrationState(msg, list)); -} - -/*! - * \brief tst_messaging::tst_MessageInterpreter_adjustUltrafiltrationStateData_payloadLen - * \details Tests MessageInterpreter adjustUltrafiltrationStateData method Message payload length check - */ -void tst_messaging::tst_MessageInterpreter_adjustUltrafiltrationStateData_payloadLen() -{ - Can::MessageInterpreter iMsg; - Can::Message msg; - msg.actionId = Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq; - msg.data = {}; - QVariantList list; - QVERIFY( ! iMsg.adjustUltrafiltrationState(msg, list)); -} - -/*! * \brief tst_messaging::tst_MessageInterpreter_adjustUltrafiltrationEditData_isType * \details Tests MessageInterpreter adjustUltrafiltrationEditData method Message Type check */ Index: unittests/tst_messaging.h =================================================================== diff -u -r4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac -ra6abc05918a15924460d2b9358365b3eeedf1d1c --- unittests/tst_messaging.h (.../tst_messaging.h) (revision 4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac) +++ unittests/tst_messaging.h (.../tst_messaging.h) (revision a6abc05918a15924460d2b9358365b3eeedf1d1c) @@ -64,9 +64,6 @@ void tst_MessageInterpreter_adjustDurationData_isType(); void tst_MessageInterpreter_adjustDurationData_payloadLen(); - void tst_MessageInterpreter_adjustUltrafiltrationStateData_isType(); - void tst_MessageInterpreter_adjustUltrafiltrationStateData_payloadLen(); - void tst_MessageInterpreter_adjustUltrafiltrationEditData_isType(); void tst_MessageInterpreter_adjustUltrafiltrationEditData_payloadLen();