Index: leahi.pro =================================================================== diff -u -re07cde120d7476c4add90c4f86cf55af9ea830de -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- leahi.pro (.../leahi.pro) (revision e07cde120d7476c4add90c4f86cf55af9ea830de) +++ leahi.pro (.../leahi.pro) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -180,6 +180,9 @@ sources/model/td/adjustment/settings/MAdjustTDVersionsRequest.h \ sources/model/td/adjustment/settings/MAdjustTDVersionsResponse.h \ sources/model/td/adjustment/settings/MTDAdvancedInstitutionalRecordResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.h \ + sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresWideningResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustVitalsAlarmLimitsResponse.h \ sources/model/td/adjustment/treatment/MTreatmentAdjustVitalsResponse.h \ @@ -195,6 +198,7 @@ sources/model/td/data/MWaterSampleData.h \ sources/model/td/data/treatment/MTreatmentBloodFlowData.h \ sources/model/td/data/treatment/MTreatmentBloodPrimeData.h \ + sources/model/td/data/treatment/MTreatmentHDFData.h \ sources/model/td/data/treatment/MTreatmentIsolatedUFData.h \ sources/model/td/data/treatment/MTreatmentParametersSetPointData.h \ sources/model/td/data/treatment/MTreatmentPressureOcclusionData.h \ @@ -263,6 +267,9 @@ sources/view/fp/data/VFPTemperatureData.h \ sources/view/settings/VAdjustmentAdvancedInstitutionalRecord.h \ sources/view/settings/VAdvancedInstitutionalRecord.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.h \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.h \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresWidening.h \ sources/view/td/data/VTDAirBubbleData.h \ sources/view/td/data/VTDAirPumpData.h \ @@ -280,6 +287,7 @@ sources/view/td/data/treatment/VTDTreatmentStatesData.h \ sources/view/td/data/treatment/VTreatmentBloodFlow.h \ sources/view/td/data/treatment/VTreatmentBloodPrimeData.h \ + sources/view/td/data/treatment/VTreatmentHDFData.h \ sources/view/td/data/treatment/VTreatmentIsolatedUFData.h \ sources/view/td/data/treatment/VTreatmentParametersSetPointData.h \ sources/view/td/data/treatment/VTreatmentPressureOcclusion.h \ @@ -552,6 +560,9 @@ sources/model/td/adjustment/settings/MAdjustTDVersionsRequest.cpp \ sources/model/td/adjustment/settings/MAdjustTDVersionsResponse.cpp \ sources/model/td/adjustment/settings/MTDAdvancedInstitutionalRecordResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.cpp \ + sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustPressuresWideningResponse.cpp \ sources/model/td/adjustment/treatment/MTreatmentAdjustVitalsAlarmLimitsResponse.cpp \ sources/model/td/data/MTDAirBubbleData.cpp \ @@ -566,6 +577,7 @@ sources/model/td/data/MWaterSampleData.cpp \ sources/model/td/data/treatment/MTreatmentBloodFlowData.cpp \ sources/model/td/data/treatment/MTreatmentBloodPrimeData.cpp \ + sources/model/td/data/treatment/MTreatmentHDFData.cpp \ sources/model/td/data/treatment/MTreatmentIsolatedUFData.cpp \ sources/model/td/data/treatment/MTreatmentParametersSetPointData.cpp \ sources/model/td/data/treatment/MTreatmentPressureOcclusionData.cpp \ @@ -741,6 +753,9 @@ \ # ---------- Views - TD - States Data sources/view/settings/VAdjustmentAdvancedInstitutionalRecord.cpp \ sources/view/settings/VAdvancedInstitutionalRecord.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.cpp \ + sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.cpp \ sources/view/td/adjustment/treatment/VTreatmentAdjustmentPressuresWidening.cpp \ sources/view/td/data/VTDAirBubbleData.cpp \ sources/view/td/data/VTDAirPumpData.cpp \ @@ -758,6 +773,7 @@ sources/view/td/data/treatment/VTDTreatmentStatesData.cpp \ sources/view/td/data/treatment/VTreatmentBloodFlow.cpp \ sources/view/td/data/treatment/VTreatmentBloodPrimeData.cpp \ + sources/view/td/data/treatment/VTreatmentHDFData.cpp \ sources/view/td/data/treatment/VTreatmentIsolatedUFData.cpp \ sources/view/td/data/treatment/VTreatmentParametersSetPointData.cpp \ sources/view/td/data/treatment/VTreatmentPressureOcclusion.cpp \ Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r5fdac82425ab432aeda805a3ed7ad8cb2efc2bd1 -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 5fdac82425ab432aeda805a3ed7ad8cb2efc2bd1) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -657,6 +657,46 @@ /*! * \brief MessageDispatcher::onAdjustment + * \details This method transmits the HDF state + * \param vData - Data model contains hdf state adjustment. + * \return void + */ + void MessageDispatcher::onAdjustment(const AdjustHDFStateRequestData &vData) +{ + QVariantList mData; + mData += vData.state ; + actionTransmit(GuiActionType::ID_AdjustHDFStateReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the HDF auto sub state + * \param vData - Data model contains hdf auto sub state adjustment. + * \return void + */ + void MessageDispatcher::onAdjustment(const AdjustAutoSubRequestData &vData) +{ + QVariantList mData; + mData += vData.state ; + actionTransmit(GuiActionType::ID_AdjustAutoSubReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the HDF adjustment + * \param vData - Data model contains hdf adjustment. + * \return void + */ + void MessageDispatcher::onAdjustment(const AdjustHDFRequestData &vData) +{ + QVariantList mData; + mData += vData.treatmentMode ; + mData += vData.subFluidVolume ; + actionTransmit(GuiActionType::ID_AdjustHDFReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment * \details This method transmits the InitTreatment request message. * \param vData - Data model contains the init treatment request information. * \return void Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -r5335f246461dfd5b9a48dcc8c01aa97778ae773b -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 5335f246461dfd5b9a48dcc8c01aa97778ae773b) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -150,6 +150,9 @@ GuiActionType::ID_AdjustHeparinReq , GuiActionType::ID_AdjustPressuresLimitsReq , GuiActionType::ID_AdjustPressuresWideningReq , + GuiActionType::ID_AdjustHDFStateReq , + GuiActionType::ID_AdjustAutoSubReq , + GuiActionType::ID_AdjustHDFReq , // End-Treatment GuiActionType::ID_AdjustRinsebackReq , GuiActionType::ID_AdjustRecirculateReq , Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r718a3ed0b0693f0bc36e11931f41ccd0f49d7251 -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 718a3ed0b0693f0bc36e11931f41ccd0f49d7251) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -278,6 +278,15 @@ {Gui::GuiActionType::ID_AdjustRecirculateReq , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustRecirculateRsp , 2 * 4 }, // 2 parameters each 4bytes + // ---- HDF + {Gui::GuiActionType::ID_HDF , 9 * 4 }, // 9 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustHDFStateReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjsutHDFStateRsp , 2 * 4 }, // 2 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustAutoSubReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustAutoSubRsp , 2 * 4 }, // 2 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustHDFReq , 2 * 4 }, // 2 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustHDFRsp , 3 * 4 }, // 3 parameter each 4bytes + // ---- Treatment End {Gui::GuiActionType::ID_AdjustTreatmentEndReq , 0 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustTreatmentEndRsp , 2 * 4 }, // 2 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -re7a8d5092cb499d6c6ed621eabde437bccbc1e0e -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision e7a8d5092cb499d6c6ed621eabde437bccbc1e0e) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -260,6 +260,10 @@ case Gui::GuiActionType::ID_AdjustSalineReq : INTERPRET_TRANSMIT_MESSAGE(AdjustSalineRequestData ); break; case Gui::GuiActionType::ID_AdjustVitalsReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustVitalsRequestData ); break; case Gui::GuiActionType::ID_AdjustHeparinReq : INTERPRET_TRANSMIT_MESSAGE(AdjustHeparinRequestData ); break; + case Gui::GuiActionType::ID_AdjustHDFStateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustHDFStateRequestData ); break; + case Gui::GuiActionType::ID_AdjustAutoSubReq : INTERPRET_TRANSMIT_MESSAGE(AdjustAutoSubRequestData ); break; + case Gui::GuiActionType::ID_AdjustHDFReq : INTERPRET_TRANSMIT_MESSAGE(AdjustHDFRequestData ); break; + // in-treatment - ultrafiltration case Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationStateRequestData ); break; case Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationEditRequestData ); break; @@ -530,6 +534,7 @@ case Gui::GuiActionType::ID_DialysateOutletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateOutletFlow ); break; case Gui::GuiActionType::ID_PressureOcclusion : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PressureOcclusion ); break; case Gui::GuiActionType::ID_Saline : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Saline ); break; + case Gui::GuiActionType::ID_HDF : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDF ); break; case Gui::GuiActionType::ID_Vitals : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Vitals ); break; case Gui::GuiActionType::ID_Heparin : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Heparin ); break; case Gui::GuiActionType::ID_Rinseback : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Rinseback ); break; @@ -562,6 +567,9 @@ case Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsolatedUFDurationEditRsp ); break; case Gui::GuiActionType::ID_AdjustIsolatedUFVolumeEditRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsolatedUFVolumeEditRsp ); break; case Gui::GuiActionType::ID_AdjustIsolatedUFConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustIsolatedUFConfirmRsp ); break; + case Gui::GuiActionType::ID_AdjsutHDFStateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjsutHDFStateRsp ); break; + case Gui::GuiActionType::ID_AdjustAutoSubRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustAutoSubRsp ); break; + case Gui::GuiActionType::ID_AdjustHDFRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustHDFRsp ); break; // ----- Post-Treatment Adjust case Gui::GuiActionType::ID_AdjustPatientDisconnectConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustPatientDisconnectConfirmRsp ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r59a1b4dceeb629ed08a434775d819ce108fe894b -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 59a1b4dceeb629ed08a434775d819ce108fe894b) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -105,6 +105,7 @@ #include "VTDTemperatureData.h" #include "VTreatmentTrends.h" #include "VWaterSampleData.h" +#include "VTreatmentHDFData.h" // DG data #include "VDGDrainPumpData.h" #include "VDDHeatersData.h" @@ -160,6 +161,9 @@ #include "VTreatmentAdjustmentIsolatedUFVolumeEdit.h" #include "VTreatmentAdjustmentSetPoints.h" #include "VTreatmentAdjustmentVitalsAlarmLimits.h" +#include "VTreatmentAdjustmentAutoSub.h" +#include "VTreatmentAdjustmentHDFState.h" +#include "VTreatmentAdjustmentHDF.h" // ----- Post-Treatment Adjustments #include "VPostTreatmentAdjustPatientDisconnectionConfirm.h" #include "VPostTreatmentAdjustDisposablesRemovalConfirm.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -rac290dfdbd332fafc7a70ad7f78a21ef15e7f82e -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision ac290dfdbd332fafc7a70ad7f78a21ef15e7f82e) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -302,6 +302,18 @@ ID_AdjustIsolatedUFConfirmReq = 0x9F00, // 159 //// ----- @LEAHIZED ID_AdjustIsolatedUFConfirmRsp = 0xA000, // 160 //// ----- @LEAHIZED + // HDF + ID_HDF = 0xBC00, // 188 //// ----- @LEAHIZED + + ID_AdjustHDFStateReq = 0xBD00, // 189 //// ----- @LEAHIZED + ID_AdjsutHDFStateRsp = 0xBE00, // 190 //// ----- @LEAHIZED + + ID_AdjustAutoSubReq = 0xBF00, // 191 //// ----- @LEAHIZED + ID_AdjustAutoSubRsp = 0xC000, // 192 //// ----- @LEAHIZED + + ID_AdjustHDFReq = 0xC100, // 193 //// ----- @LEAHIZED + ID_AdjustHDFRsp = 0xC200, // 194 //// ----- @LEAHIZED + // End-Treatment // Rinseback ID_AdjustRinsebackReq = 0x9000, // 144 //// ----- @LEAHIZED @@ -345,7 +357,7 @@ // RO Water Input Mode ID_DuetRoWaterStatDGq = 0xC300, // 195 DG -> UI // DG initiates Status query - ID_DuetRoWaterModeUIi = 0xBC00, // 188 UI -> DG // UI initiates Mode Set || responses to status query + ID_DuetRoWaterModeUIi = 0xBC0F, // 188 UI -> DG // UI initiates Mode Set || responses to status query ID_DuetRoWaterModeDGr = 0xC400, // 196 UI <- DG // DG responses Mode Set // Institutional record request and response Index: sources/gui/qml/main.qml =================================================================== diff -u -re255d4633b338f4f46c3a2fad5a62f982ebfcd18 -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/gui/qml/main.qml (.../main.qml) (revision e255d4633b338f4f46c3a2fad5a62f982ebfcd18) +++ sources/gui/qml/main.qml (.../main.qml) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -86,6 +86,7 @@ import VTreatmentRanges 0.1 import VTreatmentHeparin 0.1 import VTreatmentTrends 0.1 +import VTreatmentHDF 0.1 // Pre-Treatment import VPreTreatmentAdjustmentInitTreatment 0.1 @@ -153,6 +154,9 @@ import VTreatmentAdjustmentRinseback 0.1 import VTreatmentAdjustmentRecirculate 0.1 import VTreatmentAdjustmentEnd 0.1 +import VTreatmentAdjustmentAutoSub 0.1 +import VTreatmentAdjustmentHDFState 0.1 +import VTreatmentAdjustmentHDF 0.1 // Post-Treatmnt import VPostTreatmentAdjustmentPatientDisconnectionConfirm 0.1 import VPostTreatmentAdjustmentDisposablesRemovalConfirm 0.1 @@ -258,6 +262,7 @@ VTreatmentRecirculate { id: vTreatmentRecirculate } VTreatmentStop { id: vTreatmentStop } VTreatmentHeparin { id: vTreatmentHeparin } + VTreatmentHDF { id: vTreatmentHDF } // ---- DD VDGDrainPump { id: vDGDrainPump } @@ -330,6 +335,9 @@ VTreatmentAdjustmentRinseback { id: vTreatmentAdjustmentRinseback } VTreatmentAdjustmentRecirculate { id: vTreatmentAdjustmentRecirculate } VTreatmentAdjustmentEnd { id: vTreatmentAdjustmentEnd } + VTreatmentAdjustmentAutoSub { id: vTreatmentAdjustmentAutoSub } + VTreatmentAdjustmentHDFState { id: vTreatmentAdjustmentHDFState } + VTreatmentAdjustmentHDF { id: vTreatmentAdjustmentHDF } // --- Post Treatment VPostTreatmentAdjustmentPatientDisconnectionConfirm { id: vPostTreatmentAdjustmentPatientDisconnectionConfirm } Index: sources/model/MModel.h =================================================================== diff -u -rd17a7a6adf72a6224280548e2341dfce22bf72c7 -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/model/MModel.h (.../MModel.h) (revision d17a7a6adf72a6224280548e2341dfce22bf72c7) +++ sources/model/MModel.h (.../MModel.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -52,6 +52,7 @@ #include "MTreatmentRangesData.h" #include "MTreatmentSalineData.h" #include "MTreatmentVitalsData.h" +#include "MTreatmentHDFData.h" #include "MTreatmentHeparinData.h" #include "MTreatmentRinsebackData.h" #include "MTreatmentRecirculateData.h" @@ -172,6 +173,9 @@ #include "MTreatmentAdjustEndResponse.h" #include "MTreatmentAdjustPressuresLimitsResponse.h" #include "MTreatmentAdjustPressuresWideningResponse.h" +#include "MTreatmentAdjustAutoSubResponse.h" +#include "MTreatmentAdjustHDFResponse.h" +#include "MTreatmentAdjustHDFStateResponse.h" // Post-Treatment #include "MPostTreatmentAdjustRequests.h" @@ -369,6 +373,7 @@ REGISTER_METATYPE( TreatmentRangesData ) \ REGISTER_METATYPE( TreatmentSalineData ) \ REGISTER_METATYPE( TreatmentVitalsData ) \ + REGISTER_METATYPE( TreatmentHDFData ) \ REGISTER_METATYPE( TreatmentHeparinData ) \ REGISTER_METATYPE( TreatmentRinsebackData ) \ REGISTER_METATYPE( TreatmentRecirculateData ) \ @@ -465,6 +470,9 @@ REGISTER_METATYPE( AdjustBloodPrimeRequestData ) \ REGISTER_METATYPE( AdjustBloodDialysateRequestData ) \ REGISTER_METATYPE( AdjustBolusVolumeRequestData ) \ + REGISTER_METATYPE( AdjustHDFStateRequestData ) \ + REGISTER_METATYPE( AdjustAutoSubRequestData ) \ + REGISTER_METATYPE( AdjustHDFRequestData ) \ REGISTER_METATYPE( AdjustDurationEditRequestData ) \ REGISTER_METATYPE( AdjustDurationConfirmRequestData ) \ REGISTER_METATYPE( AdjustSetPointsRequestData ) \ @@ -538,6 +546,9 @@ REGISTER_METATYPE( AdjustTreatmentEndResponseData ) \ REGISTER_METATYPE( AdjustPressuresLimitsResponseData ) \ REGISTER_METATYPE( AdjustPressuresWideningResponseData ) \ + REGISTER_METATYPE( AdjustHDFResponseData ) \ + REGISTER_METATYPE( AdjustHDFStateResponseData ) \ + REGISTER_METATYPE( AdjustAutoSubResponseData ) \ REGISTER_METATYPE( AdjustVersionsTDRequestData ) \ REGISTER_METATYPE( AdjustVersionsTDResponseData ) \ REGISTER_METATYPE( AdjustVersionsDDResponseData ) \ @@ -607,6 +618,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentRangesData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentSalineData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentVitalsData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentHDFData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentHeparinData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentRinsebackData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentRecirculateData ) \ @@ -715,6 +727,9 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentEndResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresLimitsResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresWideningResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHDFResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHDFStateResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustAutoSubResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustVersionsTDRequestData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustVersionsTDResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustVersionsDDResponseData ) \ @@ -747,6 +762,9 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustBloodPrimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustBolusVolumeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustHDFStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustAutoSubRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustHDFRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDurationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDurationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustSetPointsRequestData ) \ @@ -856,6 +874,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentRangesData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentSalineData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentVitalsData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentHDFData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentHeparinData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentRinsebackData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentRecirculateData ) \ @@ -964,6 +983,9 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustTreatmentEndResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustPressuresLimitsResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustPressuresWideningResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHDFResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHDFStateResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustAutoSubResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustVersionsTDRequestData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustVersionsTDResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustVersionsDDResponseData ) \ @@ -1018,6 +1040,9 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustBloodPrimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustBolusVolumeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustHDFStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustAutoSubRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustHDFRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDurationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDurationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustSetPointsRequestData ) \ @@ -1092,6 +1117,9 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustBloodPrimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustBolusVolumeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustHDFStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustAutoSubRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustHDFRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDurationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDurationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustSetPointsRequestData ) \ @@ -1166,6 +1194,9 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustBloodPrimeRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustBolusVolumeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustHDFStateRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustAutoSubRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustHDFRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDurationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDurationConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustSetPointsRequestData ) \ @@ -1237,6 +1268,7 @@ ACTION_RECEIVE_SIGNAL( TreatmentRangesData ) \ ACTION_RECEIVE_SIGNAL( TreatmentSalineData ) \ ACTION_RECEIVE_SIGNAL( TreatmentVitalsData ) \ + ACTION_RECEIVE_SIGNAL( TreatmentHDFData ) \ ACTION_RECEIVE_SIGNAL( TreatmentHeparinData ) \ ACTION_RECEIVE_SIGNAL( TreatmentRinsebackData ) \ ACTION_RECEIVE_SIGNAL( TreatmentRecirculateData ) \ @@ -1346,6 +1378,9 @@ ACTION_RECEIVE_SIGNAL( AdjustTreatmentEndResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustPressuresLimitsResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustPressuresWideningResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustHDFResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustHDFStateResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustAutoSubResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustVersionsTDRequestData ) \ ACTION_RECEIVE_SIGNAL( AdjustVersionsTDResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustVersionsDDResponseData ) \ Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -rd17a7a6adf72a6224280548e2341dfce22bf72c7 -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision d17a7a6adf72a6224280548e2341dfce22bf72c7) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -782,6 +782,84 @@ } }; +/*! + * \brief The MAdjustHDFStateReq class + * \details The model to request the HDF state + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:---------------: | + * |0xBD00| 0x100 | Req | Y | UI | TD | HDF State Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref state | + * + */ +class MAdjustHDFStateReq : public MModel { +public: + quint32 state = 0; + + QString toString() { + return toString({state}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustHDFState", vParameters); + } +}; + +/*! + * \brief The MAdjustAutoSubReq class + * \details The model to request the auto sub state + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:---------------: | + * |0xBD00| 0x100 | Req | Y | UI | TD | auto sub State Req | + * + * | Payload || + * | || + * | #1:(U32) | \ref state | + * + */ +class MAdjustAutoSubReq : public MModel { +public: + quint32 state = 0; + + QString toString() { + return toString({state}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustAutoSub", vParameters); + } +}; + +/*! + * \brief The MAdjustAutoSubReq class + * \details The model to request the auto sub state + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:---------------: | + * |0xBD00| 0x100 | Req | Y | UI | TD | auto sub State Req | + * + * | Payload || + * | || + * | #1:(U32) | \ref treatmetnModali | + * | #2:(F32) | \ref state | + * + */ +class MAdjustHDFReq : public MModel { +public: + quint32 treatmentMode = 0; + float subFluidVolume = 0; + + QString toString() { + return toString({treatmentMode, + subFluidVolume}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustHDF", vParameters); + } +}; + } typedef Model:: MDuetConfirmUIr DuetConfirmUIrData; @@ -807,8 +885,12 @@ typedef Model:: MAdjustTreatmentEndReq AdjustTreatmentEndRequestData; typedef Model:: MAdjustBloodPrimeReq AdjustBloodPrimeRequestData; typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; -typedef Model:: MAdjustPressuresWideningReq AdjustPressuresWideningRequestData; +typedef Model:: MAdjustPressuresWideningReq AdjustPressuresWideningRequestData; typedef Model:: MAdjustBolusVolumeReq AdjustBolusVolumeRequestData; + +typedef Model:: MAdjustHDFStateReq AdjustHDFStateRequestData; +typedef Model:: MAdjustAutoSubReq AdjustAutoSubRequestData; +typedef Model:: MAdjustHDFReq AdjustHDFRequestData; // Alarms typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; typedef Model:: MAlarmUserActionReq AlarmUserActionRequestData; Index: sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,47 @@ +#include "MTreatmentAdjustAutoSubResponse.h" + +using namespace Model; + +/*! + * \brief MAdjustAutoSubResponse::parameters + * \details Returns the response parameters. + * \return QVariantList containing the response parameters. + */ +QVariantList MAdjustAutoSubResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +/*! + * \brief MAdjustVitalsResponse::fromByteArray + * \details Parses the response from a byte array. + * \param vByteArray Input data + * \param vIndex Position where parsing failed. + * \return true if parsing was successful, otherwise false. + */ +bool MAdjustAutoSubResponse::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; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustAutoSubResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustAutoSubResponseData MAdjustAutoSubResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustAutoSubResponse.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,67 @@ +#pragma once + +// Project +#include "MAbstract.h" +#include "MAdjustRequestsBase.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustAutoSubResponse class + * \details The auto sub adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * |0xC000| 0x020 | 6 | Rsp | Y | TD | UI | Auto Sub Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustAutoSUbReq: Auto Sub Request + * \sa MTreatmentAdjustAutoSub: Auto Sub Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | AdjustVitals | + * + */ +class MAdjustAutoSubResponse : public MAbstract { + + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustAutoSub") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustAutoSubResponse () {}; + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} +typedef Model::MAdjustAutoSubResponse::Data AdjustAutoSubResponseData; + Index: sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,50 @@ +#include "MTreatmentAdjustHDFResponse.h" + +using namespace Model; + +/*! + * \brief MAdjustHDFResponse::parameters + * \details Returns the response parameters. + * \return QVariantList containing the response parameters. + */ +QVariantList MAdjustHDFResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mTreatmentModeRejectionReason .value, + _data.mPrescSubVolumeRejectionReason .value, + }; +} + +/*! + * \brief MAdjustHDFResponse::fromByteArray + * \details Parses the response from a byte array. + * \param vByteArray Input data + * \param vIndex Position where parsing failed. + * \return true if parsing was successful, otherwise false. + */ +bool MAdjustHDFResponse::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.mTreatmentModeRejectionReason )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mPrescSubVolumeRejectionReason )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustHDFResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustHDFResponseData MAdjustHDFResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mTreatmentModeRejectionReason = _data.mTreatmentModeRejectionReason .value; + data.mPrescSubVolumeRejectionReason = _data.mPrescSubVolumeRejectionReason .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFResponse.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,70 @@ +#pragma once + +// Project +#include "MAbstract.h" +#include "MAdjustRequestsBase.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustHDFResponse class + * \details The Saline Bolus adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * |0xC100| 0x020 | 6 | Rsp | Y | TD | UI | HDF Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mTreatmentModeRejectionReason | + * | #3:(U32) | \ref Data::mPrescSubVolumeRejectionReason | + * + * \sa Data + * \sa MAdjustHDFReq: Vitals Request + * \sa MAdjustHDF: Vitals Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | AdjustHDF| + * + */ +class MAdjustHDFResponse : public MAbstract { + + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; + Types::U32 mTreatmentModeRejectionReason ; + Types::U32 mPrescSubVolumeRejectionReason ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustHDF") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mTreatmentModeRejectionReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mPrescSubVolumeRejectionReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustHDFResponse () {}; + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} +typedef Model::MAdjustHDFResponse::Data AdjustHDFResponseData; + Index: sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.cpp =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.cpp (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,47 @@ +#include "MTreatmentAdjustHDFStateResponse.h" + +using namespace Model; + +/*! + * \brief MAdjustHDFStateResponse::parameters + * \details Returns the response parameters. + * \return QVariantList containing the response parameters. + */ +QVariantList MAdjustHDFStateResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +/*! + * \brief MAdjustHDFStateResponse::fromByteArray + * \details Parses the response from a byte array. + * \param vByteArray Input data + * \param vIndex Position where parsing failed. + * \return true if parsing was successful, otherwise false. + */ +bool MAdjustHDFStateResponse::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; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MAdjustHDFStateResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustHDFStateResponseData MAdjustHDFStateResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.h =================================================================== diff -u --- sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.h (revision 0) +++ sources/model/td/adjustment/treatment/MTreatmentAdjustHDFStateResponse.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,67 @@ +#pragma once + +// Project +#include "MAbstract.h" +#include "MAdjustRequestsBase.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentAdjustHDFStateResponse class + * \details The Saline Bolus adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * |0xBE00| 0x020 | 6 | Rsp | Y | TD | UI | HDF State Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustHDFStateReq: Vitals Request + * \sa MTreatmentAdjustHDFState: Vitals Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | AdjustHDFState | + * + */ +class MAdjustHDFStateResponse : public MAbstract { + + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("AdjustHDFState") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustHDFStateResponse () {}; + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} +typedef Model::MAdjustHDFStateResponse::Data AdjustHDFStateResponseData; + Index: sources/model/td/data/treatment/MTreatmentHDFData.cpp =================================================================== diff -u --- sources/model/td/data/treatment/MTreatmentHDFData.cpp (revision 0) +++ sources/model/td/data/treatment/MTreatmentHDFData.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,68 @@ +#include "MTreatmentHDFData.h" + +using namespace Model; + +/*! + * \brief MTreatmentHDF::parameters + * \details Returns the response parameters. + * \return QVariantList containing the response parameters. + */ +QVariantList MTreatmentHDF::parameters() const { + return { + _data.mHDFState .value, + _data.mAutoSubState .value, + _data.mRequestedRate .value, + _data.mTargetTMP .value, + _data.mCurrentRate .value, + _data.mCurrentTMP .value, + _data.mRequestedVolume .value, + _data.mTotalVolume .value, + _data.mIsHDFRequested .value, + }; +} + +/*! + * \brief MTreatmentHDF::fromByteArray + * \details Parses the response from a byte array. + * \param vByteArray Input data + * \param vIndex Position where parsing failed. + * \return true if parsing was successful, otherwise false. + */ +bool MTreatmentHDF::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mHDFState )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAutoSubState )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mRequestedRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTargetTMP )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mCurrentRate )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mCurrentTMP )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mRequestedVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTotalVolume )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mIsHDFRequested )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MTreatmentHDF::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentHDF::Data MTreatmentHDF::data() const { + Data data; + data.mHDFState = _data.mHDFState .value; + data.mAutoSubState = _data.mAutoSubState .value; + data.mRequestedRate = _data.mRequestedRate .value; + data.mTargetTMP = _data.mTargetTMP .value; + data.mCurrentRate = _data.mCurrentRate .value; + data.mCurrentTMP = _data.mCurrentTMP .value; + data.mRequestedVolume = _data.mRequestedVolume .value; + data.mTotalVolume = _data.mTotalVolume .value; + data.mIsHDFRequested = _data.mIsHDFRequested .value; + return data; +} Index: sources/model/td/data/treatment/MTreatmentHDFData.h =================================================================== diff -u --- sources/model/td/data/treatment/MTreatmentHDFData.h (revision 0) +++ sources/model/td/data/treatment/MTreatmentHDFData.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,82 @@ +#pragma once +// Project +#include "MAbstract.h" +#include "types.h" + +namespace Model { + +/*! + * \brief The MTreatmentHDFData class + * \details The HDF Data model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * |0xBC00| 0x100 | 7 | 1 Hz | N | TD | All | HDF Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mHDFState | + * | #2:(U32) | \ref Data::mAutoSubState | + * | #3:(F32) | \ref Data::mRequestedRate | + * | #4:(F32) | \ref Data::mTargetTMP | + * | #5:(F32) | \ref Data::mCurrentRate | + * | #6:(F32) | \ref Data::mCurrentTMP | + * | #7:(F32) | \ref Data::mRequestedVolume | + * | #8:(F32) | \ref Data::mTotalVolume | + * | #9:(U32) | \ref Data::mIsHDFRequested | + * + * \sa Data + + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | TD | + * | infoText | HDF | + * + */ + +class MTreatmentHDF : public MAbstract { + QVariantList parameters() const override; + + struct { + Types::U32 mHDFState ; + Types::U32 mAutoSubState ; + Types::F32 mRequestedRate ; + Types::F32 mTargetTMP ; + Types::F32 mCurrentRate ; + Types::F32 mCurrentTMP ; + Types::F32 mRequestedVolume ; + Types::F32 mTotalVolume ; + Types::U32 mIsHDFRequested ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eTD ; } + QString infoText () const override { return QString("HDF") ; } + + struct Data { + quint32 mHDFState = 0; + quint32 mAutoSubState = 0; + float mRequestedRate = 0; + float mTargetTMP = 0; + float mCurrentRate = 0; + float mCurrentTMP = 0; + float mRequestedVolume = 0; + float mTotalVolume = 0; + quint32 mIsHDFRequested = 0; + }; + + MTreatmentHDF () {} + + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentHDF::Data TreatmentHDFData; + Index: sources/view/VView.h =================================================================== diff -u -r59a1b4dceeb629ed08a434775d819ce108fe894b -r8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0 --- sources/view/VView.h (.../VView.h) (revision 59a1b4dceeb629ed08a434775d819ce108fe894b) +++ sources/view/VView.h (.../VView.h) (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -250,6 +250,10 @@ REGISTER_TYPE( VTreatmentAdjustmentIsolatedUFVolumeEdit ) \ REGISTER_TYPE( VTreatmentAdjustmentSetPoints ) \ REGISTER_TYPE( VTreatmentAdjustmentVitalsAlarmLimits ) \ + REGISTER_TYPE( VTreatmentHDF ) \ + REGISTER_TYPE( VTreatmentAdjustmentAutoSub ) \ + REGISTER_TYPE( VTreatmentAdjustmentHDFState ) \ + REGISTER_TYPE( VTreatmentAdjustmentHDF ) \ REGISTER_TYPE( VTreatmentCreate ) \ REGISTER_TYPE( VTreatmentIsolatedUF ) \ REGISTER_TYPE( VTreatmentTrends ) \ Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.cpp =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.cpp (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,35 @@ +#include "VTreatmentAdjustmentAutoSub.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentAutoSub) + +void VTreatmentAdjustmentAutoSub::initConnections() { + ACTION_VIEW_CONNECTION(AdjustAutoSubResponseData); + ADJUST_VIEW_CONNECTION( AdjustAutoSubRequestData); +} + +void VTreatmentAdjustmentAutoSub::onActionReceive(const AdjustAutoSubResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** 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 *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentAutoSub::doAdjustment + * \details request state of auto sub + */ +void View::VTreatmentAdjustmentAutoSub::doAdjustment (int state) +{ + AdjustAutoSubRequestData mData; + mData.state = state; + emit didAdjustment(mData); // notify the controllers to do the adjustment +} + + Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.h =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.h (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentAutoSub.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,39 @@ + +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MTreatmentAdjustAutoSubResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentAutoSub class + * \details View for Model's Data representation. + * + * \sa Model::MTreatmentAdjustAutoSubResponse + * + */ +class VTreatmentAdjustmentAutoSub : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentAutoSub, AdjustAutoSubResponseData) + +public slots: + void doAdjustment (int state); + +signals: + void didAdjustment(const AdjustAutoSubRequestData &vData); +}; +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.cpp =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.cpp (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,39 @@ +#include "VTreatmentAdjustmentHDF.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHDF) + +void VTreatmentAdjustmentHDF::initConnections() +{ + ACTION_VIEW_CONNECTION(AdjustHDFResponseData); + ADJUST_VIEW_CONNECTION(AdjustVitalsAlarmLimitsRequestData ); +} + +void VTreatmentAdjustmentHDF::onActionReceive(const AdjustHDFResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + + treatmentModeRejectionReason (vData.mTreatmentModeRejectionReason ); + prescSubVolumeRejectionReason (vData.mPrescSubVolumeRejectionReason ); + + // *** 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 doAdjustment + * \details the invocable slot to adjust the hdf + * \param vTreatmentMode + * \param vSubFluidVolume + + */ +void VTreatmentAdjustmentHDF::doAdjustment( const quint32 vTreatmentMode , + const float vSubFluidVolume ) +{ + _data.treatmentMode = vTreatmentMode ; + _data.subFluidVolume = vSubFluidVolume; + emit didAdjustment(_data); +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.h =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.h (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDF.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,50 @@ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MTreatmentAdjustHDFResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentHDF class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustHDFResponse + * + */ +class VTreatmentAdjustmentHDF : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustHDFRequestData _data; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + TRIGGER(quint32 , treatmentModeRejectionReason , 0) + TRIGGER(quint32 , prescSubVolumeRejectionReason , 0) + + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentHDF, AdjustHDFResponseData) + +public slots: + void doAdjustment(const quint32 vTreatmentMode , + const float vSubFluidVolume ); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the fluid bolus volume + * \param vData - data model for the fluid bolus volume adjustment request + */ + void didAdjustment(const AdjustHDFRequestData &vData); +}; +} Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.cpp =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.cpp (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,35 @@ +#include "VTreatmentAdjustmentHDFState.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHDFState) + +void VTreatmentAdjustmentHDFState::initConnections() { + ACTION_VIEW_CONNECTION(AdjustHDFStateResponseData); + ADJUST_VIEW_CONNECTION( AdjustHDFStateRequestData); +} + +void VTreatmentAdjustmentHDFState::onActionReceive(const AdjustHDFStateResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** 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 *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentHDFState::doAdjustment + * \details request state of auto sub + */ +void View::VTreatmentAdjustmentHDFState::doAdjustment (int state) +{ + AdjustHDFStateRequestData mData; + mData.state = state; + emit didAdjustment(mData); // notify the controllers to do the adjustment +} + + Index: sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.h =================================================================== diff -u --- sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.h (revision 0) +++ sources/view/td/adjustment/treatment/VTreatmentAdjustmentHDFState.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,39 @@ + +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VAdjustmentResponseBase.h" +#include "MTreatmentAdjustHDFStateResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentHDFState class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustHDFStateResponse + * + */ +class VTreatmentAdjustmentHDFState : public VAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + TRIGGER( bool , adjustment , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentHDFState, AdjustHDFStateResponseData) + +public slots: + void doAdjustment (int state); + +signals: + void didAdjustment(const AdjustHDFStateRequestData &vData); +}; +} Index: sources/view/td/data/treatment/VTreatmentHDFData.cpp =================================================================== diff -u --- sources/view/td/data/treatment/VTreatmentHDFData.cpp (revision 0) +++ sources/view/td/data/treatment/VTreatmentHDFData.cpp (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,20 @@ +#include "VTreatmentHDFData.h" + +// Project +#include "GuiController.h" +#include "GuiGlobals.h" + +VIEW_DEF(VTreatmentHDF, TreatmentHDFData) + +void VTreatmentHDF::onActionReceive(const TreatmentHDFData &vData) +{ + hdfState ( vData.mHDFState ); + autoSubState ( vData.mAutoSubState ); + requestedRate ( vData.mRequestedRate ); + targetTMP ( vData.mTargetTMP ); + currentRate ( vData.mCurrentRate ); + currentTMP ( vData.mCurrentTMP ); + mRequestedVolume ( vData.mRequestedVolume ); + totalVolume ( vData.mTotalVolume ); + isHDFRequested ( vData.mIsHDFRequested ); +} Index: sources/view/td/data/treatment/VTreatmentHDFData.h =================================================================== diff -u --- sources/view/td/data/treatment/VTreatmentHDFData.h (revision 0) +++ sources/view/td/data/treatment/VTreatmentHDFData.h (revision 8fa5a167170e6b1c77551e8583e5ec3dcb8f45b0) @@ -0,0 +1,38 @@ + +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VView.h" +#include "MTreatmentHDFData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentHDF class + * \details View for Model's data representation. + * + * \sa Model::VTreatmentHDF + * + */ +class VTreatmentHDF : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , hdfState , 0) + PROPERTY( quint32 , autoSubState , 0) + PROPERTY( float , requestedRate , 0) + PROPERTY( float , targetTMP , 0) + PROPERTY( float , currentRate , 0) + PROPERTY( float , currentTMP , 0) + PROPERTY( float , mRequestedVolume, 0) + PROPERTY( float , totalVolume , 0) + PROPERTY( quint32 , isHDFRequested , 0) + + VIEW_DEC(VTreatmentHDF, TreatmentHDFData) +}; +}