Index: denali.pro =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -re0412efcf85964a18ec52ad80f233c45998eb45a --- denali.pro (.../denali.pro) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ denali.pro (.../denali.pro) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -63,9 +63,6 @@ sources/model/MModel.h \ #sources/model/MAbstractProgressData.h \ sources/model/MAbstract.h \ - sources/model/MPowerOff.h \ - sources/model/MStartTreatmentResponse.h \ - sources/model/MTreatmentParametersResp.h \ sources/model/MDGDebugText.h \ sources/model/MHDDebugText.h \ \ # ---------- Models - Alarm @@ -74,12 +71,23 @@ sources/model/hd/alarm/MAlarmCleared.h \ sources/model/hd/alarm/MAlarmClearedCondition.h \ \ # ---------- Models - HD - Adjustment - sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h \ + sources/model/hd/adjustment/MAdjustRequestsBase.h \ + sources/model/hd/adjustment/MAdjustPowerOff.h \ + sources/model/hd/adjustment/MAdjustHDVersionsResponse.h \ + \ # ---------- Models - HD - Adjustment - Pre-Treatment + sources/model/hd/adjustment/MPreTreatmentAdjustRequests.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h \ + sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.h \ \ # ---------- Models - HD - Adjustment - In-Treatment sources/model/hd/adjustment/MTreatmentAdjustRequests.h \ sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.h \ sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationInitResponse.h \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.h \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.h \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.h \ @@ -97,7 +105,7 @@ \ # ---------- Models - HD - Data - Pre-Treatment - Progress sources/model/hd/data/MPreTreatmentSelfTestNoCartridgeData.h \ sources/model/hd/data/MPreTreatmentSelfTestDryData.h \ - sources/model/hd/data/MPreTreatmentPrimeData.h \ + sources/model/hd/data/MPreTreatmentDisposablePrimeData.h \ \ # ---------- Models - HD - Data sources/model/hd/data/MHDAccelerometerData.h \ sources/model/hd/data/MTreatmentTimeData.h \ @@ -111,7 +119,7 @@ sources/model/hd/data/MTreatmentRecirculateData.h \ sources/model/hd/data/MTreatmentBloodPrimeData.h \ \ # ---------- Models - DG - Adjustment - sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h \ + sources/model/dg/adjustment/MAdjustDGVersionsResponse.h \ \ # ---------- Models - DG - Data - Pre-Treatment - Progress sources/model/dg/data/MDGFilterFlushData.h \ \ # ---------- Models - DG - Data @@ -170,7 +178,7 @@ \ # ---------- Views - HD - Data - Pre-Treatment - Progress sources/view/hd/data/VPreTreatmentSelfTestNoCartridgeData.h \ sources/view/hd/data/VPreTreatmentSelfTestDryData.h \ - sources/view/hd/data/VPreTreatmentPrimeData.h \ + sources/view/hd/data/VPreTreatmentDisposablePrimeData.h \ \ # ---------- Views - HD - Data sources/view/hd/data/VHDAccelerometerData.h \ sources/view/hd/data/VTreatmentTime.h \ @@ -224,22 +232,28 @@ \ # ---------- Models ---------- sources/model/MAbstract.cpp \ # sources/model/MAbstractProgressData.cpp \ - sources/model/MPowerOff.cpp \ sources/model/MHDDebugText.cpp \ - sources/model/MStartTreatmentResponse.cpp \ - sources/model/MTreatmentParametersResp.cpp \ sources/model/MDGDebugText.cpp \ \ # ---------- Models - Alarm sources/model/hd/alarm/MAlarmStatusData.cpp \ sources/model/hd/alarm/MAlarmTriggered.cpp \ sources/model/hd/alarm/MAlarmCleared.cpp \ sources/model/hd/alarm/MAlarmClearedCondition.cpp \ + \ # ---------- Models - HD - Adjustment + sources/model/hd/adjustment/MAdjustPowerOff.cpp \ + sources/model/hd/adjustment/MAdjustHDVersionsResponse.cpp \ + \ # ---------- Models - HD - Adjustment - Pre-Treatment + sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp \ + sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.cpp \ \ # ---------- Models - HD - Adjustment - In-Treatment - sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.cpp \ - \ # ---------- Models - HD - Adjustment - In-Treatment sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationInitResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp \ @@ -250,10 +264,11 @@ sources/model/hd/adjustment/MTreatmentAdjustRinsebackResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustRecirculateResponse.cpp \ sources/model/hd/adjustment/MTreatmentAdjustEndResponse.cpp \ - \ # ---------- Models - HD - Data - Pre-Treatment - Progress + \ # ---------- Models - HD - Data + \ # ---------- Models - HD - Data - Pre-Treatment + sources/model/hd/data/MPreTreatmentDisposablePrimeData.cpp \ sources/model/hd/data/MPreTreatmentSelfTestNoCartridgeData.cpp \ sources/model/hd/data/MPreTreatmentSelfTestDryData.cpp \ - sources/model/hd/data/MPreTreatmentPrimeData.cpp \ \ # ---------- Models - HD - Data - States sources/model/hd/data/MHDOperationModeData.cpp \ sources/model/hd/data/MPreTreatmentStatesData.cpp \ @@ -322,9 +337,9 @@ sources/view/hd/adjustment/VTreatmentAdjustmentRecirculate.cpp \ sources/view/hd/adjustment/VTreatmentAdjustmentEnd.cpp \ \ # ---------- Views - HD - Data - Pre-Treatment - Progress + sources/view/hd/data/VPreTreatmentDisposablePrimeData.cpp \ sources/view/hd/data/VPreTreatmentSelfTestNoCartridgeData.cpp \ sources/view/hd/data/VPreTreatmentSelfTestDryData.cpp \ - sources/view/hd/data/VPreTreatmentPrimeData.cpp \ \ # ---------- Views - HD - States Data sources/view/hd/data/VHDOperationModeData.cpp \ sources/view/hd/data/VPreTreatmentStatesData.cpp \ Index: denali.pro.user =================================================================== diff -u -r4f87126626b76aa04ddcf2ae92e04e118cdcbe01 -re0412efcf85964a18ec52ad80f233c45998eb45a --- denali.pro.user (.../denali.pro.user) (revision 4f87126626b76aa04ddcf2ae92e04e118cdcbe01) +++ denali.pro.user (.../denali.pro.user) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -1,6 +1,6 @@ - + EnvironmentId Index: en_US.udic =================================================================== diff -u -r2d2917978a4e25eb79a0fb71851b6124171d8072 -re0412efcf85964a18ec52ad80f233c45998eb45a --- en_US.udic (.../en_US.udic) (revision 2d2917978a4e25eb79a0fb71851b6124171d8072) +++ en_US.udic (.../en_US.udic) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -32,3 +32,5 @@ Montazemi Accelerometer accelerometer +Init +Pre Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r0b8e00869ef81ef0a834c03c13049f4c281870d2 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 0b8e00869ef81ef0a834c03c13049f4c281870d2) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -248,19 +248,6 @@ /*! * \brief MessageDispatcher::onAdjustment - * \details This method transmits the Ultrafiltration Adjustment Denali message. - * \param vData - Data model contains treatment ultrafiltration adjustment volume - * \return void - */ -void MessageDispatcher::onAdjustment(const AdjustUltrafiltrationInitRequestData &vData) -{ - QVariantList mData; - mData += vData.volume; - onActionTransmit(GuiActionType::ID_AdjustUltrafiltrationInitReq, mData); -} - -/*! - * \brief MessageDispatcher::onAdjustment * \details This method transmits the Ultrafiltration State Adjustment Denali message. * \param vData - Data model contains treatment ultrafiltration state adjustment * \return void @@ -301,19 +288,6 @@ /*! * \brief MessageDispatcher::onAdjustment - * \details This method transmits the StartTreatment request message. - * \param vData - Data model contains the start treatment request information. - * \return void - */ -void MessageDispatcher::onAdjustment(const StartTreatmentRequestData &vData) -{ - QVariantList mData; - mData += vData.request; - onActionTransmit(GuiActionType::ID_StartTreatmentReq, mData); -} - -/*! - * \brief MessageDispatcher::onAdjustment * \details This method transmits the Alarm Request Silence message. * \param vData - Data model contains the silence request information. * \return void @@ -352,19 +326,6 @@ } // coco end */ -/*! - * \brief MessageDispatcher::onAdjustment - * \details This method transmits the Confirm Treatment request message. - * \param vData - Data model contains the confirm treatment request - * \return void - */ -void MessageDispatcher::onAdjustment(const ConfirmTreatmentRequestData &vData) -{ - QVariantList mData; - mData += vData.request; - onActionTransmit(GuiActionType::ID_ConfirmTreatmentReq, mData); -} - /** * \details This method transmits the Saline Bolus Adjustment Denali message. * \param vData - Data model contains treatment Saline Bolus adjustment state. @@ -454,12 +415,25 @@ onActionTransmit(GuiActionType::ID_AdjustPressuresLimitsReq, mData); } +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the InitTreatment request message. + * \param vData - Data model contains the init treatment request information. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustInitTreatmentRequestData &vData) +{ + QVariantList mData; + mData += vData.requestedState; + onActionTransmit(GuiActionType::ID_AdjustInitTreatmentReq, mData); +} + /** * \details This method transmits the Treatment Parameter request message. * \param vData - Data model contains treatment parameter adjustment data structure * \return void */ -void MessageDispatcher::onAdjustment(const AdjustTreatmentParametersRequestData &vData) +void MessageDispatcher::onAdjustment(const AdjustParametersValidationRequestData &vData) { QVariantList mData; mData += vData.bloodFlowRate ; @@ -480,11 +454,140 @@ mData += vData.heparinBolusVolume ; mData += vData.dialysateTemp ; - onActionTransmit(GuiActionType::ID_CreateTreatmentReq, mData); + onActionTransmit(GuiActionType::ID_AdjustParametersValidationReq, mData); } +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Confirm Treatment request message. + * \param vData - Data model contains the confirm treatment request + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustParametersConfirmRequestData &vData) +{ + QVariantList mData; + mData += vData.requestedState; + onActionTransmit(GuiActionType::ID_AdjustParametersConfirmReq, mData); +} /*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Water Sample Adjustment Denali message. + * \param vData - Data model contains Water Sample adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustWaterSampleRequestData &vData) +{ + QVariantList mData; + mData += vData.requestedState; + onActionTransmit(GuiActionType::ID_AdjustWaterSampleReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Water Sample Result Adjustment Denali message. + * \param vData - Data model contains Water Sample Result adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustWaterSampleResultRequestData &vData) +{ + QVariantList mData; + mData += vData.requestedState; + onActionTransmit(GuiActionType::ID_AdjustWaterSampleResultReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Consumables Confirm Adjustment Denali message. + * \param vData - Data model contains Consumables Confirm adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustConsumablesConfirmRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustConsumablesConfirmReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Disposables Confirm Adjustment Denali message. + * \param vData - Data model contains Disposables Confirm adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustDisposablesConfirmRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustDisposablesConfirmReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Disposables Prime Adjustment Denali message. + * \param vData - Data model contains Disposables Prime adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustDisposablesPrimeRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustDisposablesPrimeReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Ultrafiltration Adjustment Denali message. + * \param vData - Data model contains treatment ultrafiltration adjustment volume + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustUltrafiltrationInitRequestData &vData) +{ + QVariantList mData; + mData += vData.volume; + onActionTransmit(GuiActionType::ID_AdjustUltrafiltrationInitReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Patient Connection Begin Adjustment Denali message. + * \param vData - Data model contains Patient Connection Begin adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustPatientConnectionBeginRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustPatientConnectionBeginReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Patient Connection Confirm Adjustment Denali message. + * \param vData - Data model contains Patient Connection Confirm adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustPatientConnectionConfirmRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustPatientConnectionConfirmReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Start Treatment Adjustment Denali message. + * \param vData - Data model contains Start Treatment adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustStartTreatmentRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustStartTreatmentReq, mData); +} + +/*! * \brief MessageDispatcher::actionTransmit * \details This method is called by slot MessageDispatcher::onActionTransmit * which emits didFrameTransmit on successful interpretation of the requested message Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -r93b6bd48e2aec1fca4f2b5b79dcefffa49e9ce16 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 93b6bd48e2aec1fca4f2b5b79dcefffa49e9ce16) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -106,24 +106,35 @@ bool _init = false; QList _needsAcknow { - // Adjust + // Alarm + GuiActionType::ID_AlarmUserActionReq , + GuiActionType::ID_AlarmSilenceReq , + GuiActionType::ID_AlarmClearedConditionReq , + // Pre-Treatment + GuiActionType::ID_AdjustInitTreatmentReq , + GuiActionType::ID_AdjustWaterSampleReq , + GuiActionType::ID_AdjustWaterSampleResultReq , + GuiActionType::ID_AdjustConsumablesConfirmReq , + GuiActionType::ID_AdjustDisposablesConfirmReq , + GuiActionType::ID_AdjustDisposablesPrimeReq , + GuiActionType::ID_AdjustUltrafiltrationInitReq , + GuiActionType::ID_AdjustPatientConnectionBeginReq , + GuiActionType::ID_AdjustPatientConnectionConfirmReq , + GuiActionType::ID_AdjustStartTreatmentReq , + // In-Treatment GuiActionType::ID_AdjustBloodDialysateReq , GuiActionType::ID_AdjustDurationReq , - GuiActionType::ID_AdjustUltrafiltrationInitReq , GuiActionType::ID_AdjustUltrafiltrationStateReq , GuiActionType::ID_AdjustUltrafiltrationEditReq , GuiActionType::ID_AdjustUltrafiltrationConfirmReq , GuiActionType::ID_AdjustSalineReq , GuiActionType::ID_AdjustHeparinReq , GuiActionType::ID_AdjustPressuresLimitsReq , + // Post-Treatment GuiActionType::ID_AdjustRinsebackReq , GuiActionType::ID_AdjustRecirculateReq , GuiActionType::ID_AdjustTreatmentEndReq , GuiActionType::ID_AdjustVersionsReq , - // Alarm - GuiActionType::ID_AlarmUserActionReq , - GuiActionType::ID_AlarmSilenceReq , - GuiActionType::ID_AlarmClearedConditionReq , }; public slots: Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r52f3c502552558e0b35b23bf15dd75905fdce916 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 52f3c502552558e0b35b23bf15dd75905fdce916) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -89,9 +89,6 @@ {Gui::GuiActionType::ID_AlarmUserActionReq , 1 * 4 }, // 1 parameter each 4bytes // ---- - {Gui::GuiActionType::ID_StartTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes - {Gui::GuiActionType::ID_StartTreatmentRsp , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_ConfirmTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_TreatmentRanges , 6 * 4 }, // 6 parameters each 4bytes // ---- @@ -103,10 +100,6 @@ {Gui::GuiActionType::ID_AdjustDurationRsp , 4 * 4 }, // 4 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp , 3 * 4 }, // 3 parameters each 4bytes - - // ---- {Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp , 3 * 4 }, // 3 parameter each 4bytes @@ -122,18 +115,46 @@ {Gui::GuiActionType::ID_AdjustPressuresLimitsReq , 4 * 4 }, // 4 parameter each 4bytes {Gui::GuiActionType::ID_AdjustPressuresLimitsRsp , 6 * 4 }, // 6 parameters each 4bytes - // --- - {Gui::GuiActionType::ID_CreateTreatmentReq , 17 * 4 }, // 17 parameters, each 4 bytes - {Gui::GuiActionType::ID_CreateTreatmentRsp , 18 * 4 }, // 18 parameters, each 4 bytes + // Pre-Treatment + // Create Parameters + // Pre-Treatment Initiate Treatment + {Gui::GuiActionType::ID_AdjustInitTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustInitTreatmentRsp , 2 * 4 }, // 2 parameters each 4bytes + // Pre-Treatment Treatment Parameters Validation/Confirm + {Gui::GuiActionType::ID_AdjustParametersValidationReq , 17 * 4 }, //17 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustParametersValidationRsp , 18 * 4 }, //18 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustParametersConfirmReq , 1 * 4 }, // 1 parameters each 4bytes + // Pre-Treatment Water Sample + {Gui::GuiActionType::ID_DGFilterFlushData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustWaterSampleReq , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustWaterSampleRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustWaterSampleResultReq , 1 * 4 }, // 1 parameters each 4bytes + // Pre-Treatment Consumables Installation Confirm + {Gui::GuiActionType::ID_AdjustConsumablesConfirmReq , 0 * 4 }, // 0 parameters each 4bytes + // Pre-Treatment SelfTest NoCartridge Progress Data + {Gui::GuiActionType::ID_SelfTestNoCartridgeData , 2 * 4 }, // 2 parameters each 4bytes + // Pre-Treatment Disposables Installation Confirm + {Gui::GuiActionType::ID_AdjustDisposablesConfirmReq , 0 * 4 }, // 0 parameters each 4bytes + // Pre-Treatment SelfTest Dry Progress Data + {Gui::GuiActionType::ID_SelfTestDryData , 2 * 4 }, // 2 parameters each 4bytes + // Pre-Treatment Disposable Priming + {Gui::GuiActionType::ID_AdjustDisposablesPrimeReq , 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustDisposablesPrimeRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_DisposablesPrimeData , 2 * 4 }, // 2 parameters each 4bytes + // Pre-Treatment Ultrafiltration initial volume + {Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp , 3 * 4 }, // 3 parameters each 4bytes + // Pre-Treatment Patient Connection Begin + {Gui::GuiActionType::ID_AdjustPatientConnectionBeginReq , 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustPatientConnectionBeginRsp , 2 * 4 }, // 2 parameters each 4bytes + // Pre-Treatment Patient Connection Confirm + {Gui::GuiActionType::ID_AdjustPatientConnectionConfirmReq, 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustPatientConnectionConfirmRsp, 2 * 4 }, // 2 parameters each 4bytes + // Pre-Treatment Start Treatment + {Gui::GuiActionType::ID_AdjustStartTreatmentReq , 0 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustStartTreatmentRsp , 2 * 4 }, // 2 parameters each 4bytes - // Pre-Treatment Progress Data - {Gui::GuiActionType::ID_DGFilterFlush , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_SelfTestNoCartridge , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_SelfTestDry , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_DisposablesPrime , 2 * 4 }, // 2 parameters each 4bytes - - // ---- {Gui::GuiActionType::ID_AdjustSalineReq , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_AdjustSalineRsp , 3 * 4 }, // 3 parameters each 4bytes @@ -165,8 +186,8 @@ {Gui::GuiActionType::ID_Acknow , 0 }, {Gui::GuiActionType::ID_AcknowGeneric , 1 }, - {Gui::GuiActionType::ID_HDDebugText , 40 + 1 }, // ASCII text - 40 bytes + null term - {Gui::GuiActionType::ID_DGDebugText , 40 + 1 }, // ASCII text - 40 bytes + null term + {Gui::GuiActionType::ID_HDDebugText , 40 + 1 }, // ASCII text - 40 bytes + null term + {Gui::GuiActionType::ID_DGDebugText , 40 + 1 }, // ASCII text - 40 bytes + null term }; Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -25,27 +25,27 @@ using namespace Can; using namespace Model; -#define DEBUG_RECEIVE_SIGNAL(vID, vMODEL) // qDebug() << vID << vMODEL; +#define DEBUG_SIGNAL(vID, vMODEL) // qDebug() << vID << vMODEL; // a macro to simplify the transmit message // would be better later to be replaced by a template method // like the notify method of received messages -#define INTERPRET_RECEIVED_MESSAGE(vMODEL) \ +#define INTERPRET_TRANSMIT_MESSAGE(vMODEL) \ if ( ! length ) { logInvalidLength(vActionId); return false; } \ vCanId = vMODEL::canid(); \ vPayload = Format::fromVariant(vData); \ LOG_EVENT(vMODEL::toString(vData)); \ - DEBUG_RECEIVE_SIGNAL(0, typeid(vMODEL).name()) + DEBUG_SIGNAL(0, typeid(vMODEL).name()) -// another version of the INTERPRET_RECEIVED_MESSAGE for empty messages +// another version of the INTERPRET_TRANSMIT_MESSAGE for empty messages // same later improvements apply to this MACRO as well. -#define INTERPRET_RECVD_MT_MESSAGE(vMODEL) \ +#define INTERPRET_TRSMT_MT_MESSAGE(vMODEL) \ if ( length ) { logInvalidLength(vActionId); return false; } \ vCanId = vMODEL::canid(); \ vPayload = Format::fromVariant(vData); \ LOG_EVENT(vMODEL::toString(vData)); \ - DEBUG_RECEIVE_SIGNAL(0, typeid(vMODEL).name()) + DEBUG_SIGNAL(0, typeid(vMODEL).name()) /*! * \brief MessageInterpreter::MessageInterpreter @@ -81,7 +81,7 @@ // coco end emit didActionReceive(tModel.data()); logReceivedMessage(tModel); - DEBUG_RECEIVE_SIGNAL(vIdCheck, typeid(TModel).name()) + DEBUG_SIGNAL(vIdCheck, typeid(TModel).name()) return ok; } @@ -221,7 +221,7 @@ if ( length ) { // this message has a variable length vPayload = Format::fromVariant(vData[0]); } - LOG_EVENT(mSenderID + QString("CheckIn")); + // LOG_EVENT(mSenderID + QString("CheckIn")); break; case Gui::GuiActionType::ID_RawData: // len: 255, can have any len @@ -231,32 +231,40 @@ LOG_EVENT(mSenderID + QString("RawData")); break; - case Gui::GuiActionType::ID_PowerOff : INTERPRET_RECEIVED_MESSAGE(AdjustPowerOffRequestData ); break; - case Gui::GuiActionType::ID_AdjustVersionsReq : INTERPRET_RECVD_MT_MESSAGE(AdjustVersionsRequestData ); break; + case Gui::GuiActionType::ID_PowerOff : INTERPRET_TRANSMIT_MESSAGE(AdjustPowerOffRequestData ); break; + case Gui::GuiActionType::ID_AdjustVersionsReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustVersionsRequestData ); break; // in-treatment - case Gui::GuiActionType::ID_AdjustDurationReq : INTERPRET_RECEIVED_MESSAGE(AdjustDurationRequestData ); break; - case Gui::GuiActionType::ID_AdjustBloodDialysateReq : INTERPRET_RECEIVED_MESSAGE(AdjustBloodDialysateRequestData ); break; - case Gui::GuiActionType::ID_AdjustPressuresLimitsReq : INTERPRET_RECEIVED_MESSAGE(AdjustPressuresLimitsRequestData ); break; - case Gui::GuiActionType::ID_AdjustSalineReq : INTERPRET_RECEIVED_MESSAGE(AdjustSalineRequestData ); break; - case Gui::GuiActionType::ID_AdjustHeparinReq : INTERPRET_RECEIVED_MESSAGE(AdjustHeparinRequestData ); break; + case Gui::GuiActionType::ID_AdjustDurationReq : INTERPRET_TRANSMIT_MESSAGE(AdjustDurationRequestData ); break; + case Gui::GuiActionType::ID_AdjustBloodDialysateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustBloodDialysateRequestData ); break; + case Gui::GuiActionType::ID_AdjustPressuresLimitsReq : INTERPRET_TRANSMIT_MESSAGE(AdjustPressuresLimitsRequestData ); break; + case Gui::GuiActionType::ID_AdjustSalineReq : INTERPRET_TRANSMIT_MESSAGE(AdjustSalineRequestData ); break; + case Gui::GuiActionType::ID_AdjustHeparinReq : INTERPRET_TRANSMIT_MESSAGE(AdjustHeparinRequestData ); break; // in-treatment - ultrafiltration - case Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq : INTERPRET_RECEIVED_MESSAGE(AdjustUltrafiltrationInitRequestData ); break; - case Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq : INTERPRET_RECEIVED_MESSAGE(AdjustUltrafiltrationStateRequestData ); break; - case Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq : INTERPRET_RECEIVED_MESSAGE(AdjustUltrafiltrationEditRequestData ); break; - case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmReq : INTERPRET_RECEIVED_MESSAGE(AdjustUltrafiltrationConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationStateRequestData ); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationEditRequestData ); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationConfirmRequestData ); break; // Post-Treatment - case Gui::GuiActionType::ID_AdjustRinsebackReq : INTERPRET_RECEIVED_MESSAGE(AdjustRinsebackRequestData ); break; - case Gui::GuiActionType::ID_AdjustRecirculateReq : INTERPRET_RECEIVED_MESSAGE(AdjustRecirculateRequestData ); break; - case Gui::GuiActionType::ID_AdjustTreatmentEndReq : INTERPRET_RECEIVED_MESSAGE(AdjustTreatmentEndRequestData ); break; - // pre-Treatment - case Gui::GuiActionType::ID_StartTreatmentReq : INTERPRET_RECEIVED_MESSAGE(StartTreatmentRequestData ); break; - case Gui::GuiActionType::ID_ConfirmTreatmentReq : INTERPRET_RECEIVED_MESSAGE(ConfirmTreatmentRequestData ); break; - case Gui::GuiActionType::ID_CreateTreatmentReq : INTERPRET_RECEIVED_MESSAGE(AdjustTreatmentParametersRequestData ); break; + case Gui::GuiActionType::ID_AdjustRinsebackReq : INTERPRET_TRANSMIT_MESSAGE(AdjustRinsebackRequestData ); break; + case Gui::GuiActionType::ID_AdjustRecirculateReq : INTERPRET_TRANSMIT_MESSAGE(AdjustRecirculateRequestData ); break; + case Gui::GuiActionType::ID_AdjustTreatmentEndReq : INTERPRET_TRANSMIT_MESSAGE(AdjustTreatmentEndRequestData ); break; + // Pre-Treatment + case Gui::GuiActionType::ID_AdjustInitTreatmentReq : INTERPRET_TRANSMIT_MESSAGE(AdjustInitTreatmentRequestData ); break; + case Gui::GuiActionType::ID_AdjustParametersValidationReq : INTERPRET_TRANSMIT_MESSAGE(AdjustParametersValidationRequestData ); break; + case Gui::GuiActionType::ID_AdjustParametersConfirmReq : INTERPRET_TRANSMIT_MESSAGE(AdjustParametersConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustWaterSampleReq : INTERPRET_TRANSMIT_MESSAGE(AdjustWaterSampleRequestData ); break; + case Gui::GuiActionType::ID_AdjustWaterSampleResultReq : INTERPRET_TRANSMIT_MESSAGE(AdjustWaterSampleResultRequestData ); break; + case Gui::GuiActionType::ID_AdjustConsumablesConfirmReq : INTERPRET_TRANSMIT_MESSAGE(AdjustConsumablesConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustDisposablesConfirmReq : INTERPRET_TRANSMIT_MESSAGE(AdjustDisposablesConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustDisposablesPrimeReq : INTERPRET_TRANSMIT_MESSAGE(AdjustDisposablesPrimeRequestData ); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationInitRequestData ); break; + case Gui::GuiActionType::ID_AdjustPatientConnectionBeginReq : INTERPRET_TRANSMIT_MESSAGE(AdjustPatientConnectionBeginRequestData ); break; + case Gui::GuiActionType::ID_AdjustPatientConnectionConfirmReq : INTERPRET_TRANSMIT_MESSAGE(AdjustPatientConnectionConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustStartTreatmentReq : INTERPRET_TRANSMIT_MESSAGE(AdjustStartTreatmentRequestData ); break; // alarms - case Gui::GuiActionType::ID_AlarmSilenceReq : INTERPRET_RECEIVED_MESSAGE(AlarmSilenceRequestData ); break; - case Gui::GuiActionType::ID_AlarmUserActionReq : INTERPRET_RECEIVED_MESSAGE(AlarmUserActionRequestData ); break; + case Gui::GuiActionType::ID_AlarmSilenceReq : INTERPRET_TRANSMIT_MESSAGE(AlarmSilenceRequestData ); break; + case Gui::GuiActionType::ID_AlarmUserActionReq : INTERPRET_TRANSMIT_MESSAGE(AlarmUserActionRequestData ); break; // coco begin validated: Manually tested. This model class is a placeholder for the message 63(0x3F00) and there is no use case for this now. - case Gui::GuiActionType::ID_AlarmClearedConditionReq : INTERPRET_RECEIVED_MESSAGE(AlarmClearedConditionRequestData ); break; + case Gui::GuiActionType::ID_AlarmClearedConditionReq : INTERPRET_TRANSMIT_MESSAGE(AlarmClearedConditionRequestData ); break; // coco end default: QString mActionIdHexString = Format::toHexString(vActionId); @@ -339,36 +347,41 @@ case Gui::GuiActionType::ID_Recirculate : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Recirculate ); break; case Gui::GuiActionType::ID_BloodPrime : ok = notify(vMessage, vData, Gui::GuiActionType::ID_BloodPrime ); break; case Gui::GuiActionType::ID_HDAccelerometerData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDAccelerometerData ); break; - // ----- Datum - Pre-Treatment progress - case Gui::GuiActionType::ID_SelfTestNoCartridge : ok = notify(vMessage, vData, Gui::GuiActionType::ID_SelfTestNoCartridge ); break; - case Gui::GuiActionType::ID_SelfTestDry : ok = notify(vMessage, vData, Gui::GuiActionType::ID_SelfTestDry ); break; - case Gui::GuiActionType::ID_DisposablesPrime : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisposablesPrime ); break; + // ----- Pre-Treatment - Datum - Progress + case Gui::GuiActionType::ID_SelfTestNoCartridgeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_SelfTestNoCartridgeData ); break; + case Gui::GuiActionType::ID_SelfTestDryData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_SelfTestDryData ); break; + case Gui::GuiActionType::ID_DisposablesPrimeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DisposablesPrimeData ); break; + // ----- Pre-Treatment - Adjust + case Gui::GuiActionType::ID_AdjustInitTreatmentRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustInitTreatmentRsp ); break; + case Gui::GuiActionType::ID_AdjustParametersValidationRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustParametersValidationRsp ); break; + case Gui::GuiActionType::ID_AdjustWaterSampleRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustWaterSampleRsp ); break; + case Gui::GuiActionType::ID_AdjustDisposablesPrimeRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDisposablesPrimeRsp ); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp ); break; + case Gui::GuiActionType::ID_AdjustPatientConnectionBeginRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustPatientConnectionBeginRsp ); break; + case Gui::GuiActionType::ID_AdjustPatientConnectionConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustPatientConnectionConfirmRsp ); break; + case Gui::GuiActionType::ID_AdjustStartTreatmentRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustStartTreatmentRsp ); break; // ----- Events case Gui::GuiActionType::ID_Acknow : ok = true; break; // TODO : implement notify<>() case Gui::GuiActionType::ID_PowerOff : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOff ); break; case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_EVENT("HD,ShuttingDown"); break; // TODO : implement notify<>() - case Gui::GuiActionType::ID_CreateTreatmentRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_CreateTreatmentRsp ); break; // Adjustment Response Messages case Gui::GuiActionType::ID_AdjustDurationRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDurationRsp ); break; case Gui::GuiActionType::ID_AdjustBloodDialysateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustBloodDialysateRsp ); break; case Gui::GuiActionType::ID_AdjustPressuresLimitsRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustPressuresLimitsRsp ); break; case Gui::GuiActionType::ID_AdjustSalineRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustSalineRsp ); break; - case Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp ); break; case Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp ); break; case Gui::GuiActionType::ID_AdjustHeparinRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustHeparinRsp ); break; case Gui::GuiActionType::ID_AdjustRinsebackRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustRinsebackRsp ); break; case Gui::GuiActionType::ID_AdjustRecirculateRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustRecirculateRsp ); break; case Gui::GuiActionType::ID_AdjustTreatmentEndRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustTreatmentEndRsp ); break; - case Gui::GuiActionType::ID_AdjustHDVersionsRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustHDVersionsRsp ); break; + case Gui::GuiActionType::ID_AdjustHDVersionsRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustHDVersionsRsp ); break; // these need to be standard and use notify as well case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // TODO : implement notify<>() case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); break; // TODO : implement notify<>() - case Gui::GuiActionType::ID_StartTreatmentRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_StartTreatmentRsp ); break; - // Alarms case Gui::GuiActionType::ID_AlarmStatus : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmStatus ); break; case Gui::GuiActionType::ID_AlarmTriggered : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmTriggered ); break; @@ -420,7 +433,7 @@ case Gui::GuiActionType::ID_DGDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGDebugText ); break; case Gui::GuiActionType::ID_DGAccelerometerData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGAccelerometerData ); break; // ----- Datum - Pre-Treatment progress - case Gui::GuiActionType::ID_DGFilterFlush : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGFilterFlush ); break; + case Gui::GuiActionType::ID_DGFilterFlushData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGFilterFlushData ); break; // DG Response Messages case Gui::GuiActionType::ID_AdjustDGVersionsRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDGVersionsRsp ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -36,7 +36,7 @@ #include "VDGFilterFlushData.h" #include "VPreTreatmentSelfTestNoCartridgeData.h" #include "VPreTreatmentSelfTestDryData.h" -#include "VPreTreatmentPrimeData.h" +#include "VPreTreatmentDisposablePrimeData.h" // In-treatment - Data #include "VTreatmentBloodFlow.h" #include "VTreatmentDialysateFlow.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -104,19 +104,44 @@ ID_AlarmSilenceReq = 0x3200, // 50 ID_AlarmUserActionReq = 0x4000, // 64 // there is no response since it is kind of the response to the ID_AlarmStatus from UI to HD - // Pre-Treatment Parameters - ID_CreateTreatmentReq = 0x3500, // 53 - ID_CreateTreatmentRsp = 0x3600, // 54 - ID_ConfirmTreatmentReq = 0x3B00, // 59 - ID_StartTreatmentReq = 0x3800, // 56 - ID_StartTreatmentRsp = 0x3900, // 57 - // Pre-Treatment Progress Data - ID_DGFilterFlush = 0x6000, // 96 - ID_SelfTestNoCartridge = 0x6100, // 97 - ID_SelfTestDry = 0x6300, // 99 - ID_DisposablesPrime = 0x4300, // 67 + // Pre-Treatment + // Pre-Treatment Initiate Treatment + ID_AdjustInitTreatmentReq = 0x3800, // 56 + ID_AdjustInitTreatmentRsp = 0x3900, // 57 + // Pre-Treatment Parameters Validation/Confirm + ID_AdjustParametersValidationReq = 0x3500, // 53 + ID_AdjustParametersValidationRsp = 0x3600, // 54 + ID_AdjustParametersConfirmReq = 0x3B00, // 59 + // Pre-Treatment Water Sample + ID_DGFilterFlushData = 0x6000, // 96 + ID_AdjustWaterSampleReq = 0x5D00, // 93 + ID_AdjustWaterSampleRsp = 0x5E00, // 94 + ID_AdjustWaterSampleResultReq = 0x5F00, // 95 // there is no response and will a response by changing the state in Pre_Treatment_States + // Pre-Treatment Consumables Installation Confirm + ID_AdjustConsumablesConfirmReq = 0x6800, // 104 // there is no response and will a response by changing the state in Pre_Treatment_States + // Pre-Treatment SelfTest NoCartridge Progress Data + ID_SelfTestNoCartridgeData = 0x6100, // 97 // there is no response and will a response by changing the state in Pre_Treatment_States + // Pre-Treatment Disposables Installation Confirm + ID_AdjustDisposablesConfirmReq = 0x6200, // 98 // there is no response and will a response by changing the state in Pre_Treatment_States + // Pre-Treatment SelfTest Dry Progress Data + ID_SelfTestDryData = 0x6300, // 99 + // Pre-Treatment Disposable Priming + ID_AdjustDisposablesPrimeReq = 0x3C00, // 60 + ID_AdjustDisposablesPrimeRsp = 0x3D00, // 61 + ID_DisposablesPrimeData = 0x4300, // 67 + // Pre-Treatment Ultrafiltration initial volume + ID_AdjustUltrafiltrationInitReq = 0x4F00, // 79 + ID_AdjustUltrafiltrationInitRsp = 0x5000, // 80 + // Pre-Treatment Patient Connection Begin + ID_AdjustPatientConnectionBeginReq = 0x6400, // 100 + ID_AdjustPatientConnectionBeginRsp = 0x6500, // 101 + // Pre-Treatment Patient Connection Confirm + ID_AdjustPatientConnectionConfirmReq= 0x6600, // 102 + ID_AdjustPatientConnectionConfirmRsp= 0x6700, // 103 + // Pre-Treatment Start Treatment + ID_AdjustStartTreatmentReq = 0x7100, // 113 + ID_AdjustStartTreatmentRsp = 0x7200, // 114 - // DG Data Messages ID_DGROPumpData = 0x1F00, // 31 ID_DGPressuresData = 0x2000, // 32 @@ -145,10 +170,7 @@ ID_AdjustHeparinReq = 0x4B00, // 75 ID_AdjustHeparinRsp = 0x4C00, // 76 - // Ultrafiltration: has also In-Treatment Adjustables but kept together - ID_AdjustUltrafiltrationInitReq = 0x4F00, // 79 - ID_AdjustUltrafiltrationInitRsp = 0x5000, // 80 - + // Ultrafiltration ID_AdjustUltrafiltrationStateReq = 0x1000, // 16 ID_AdjustUltrafiltrationStateRsp = 0x4100, // 65 Index: sources/gui/qml/main.qml =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/gui/qml/main.qml (.../main.qml) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/gui/qml/main.qml (.../main.qml) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -40,7 +40,7 @@ import VDGFilterFlush 0.1 import VPreTreatmentSelfTestNoCartridge 0.1 import VPreTreatmentSelfTestDry 0.1 -import VPreTreatmentPrime 0.1 +import VPreTreatmentDisposablePrime 0.1 // --- import VDGDrainPump 0.1 import VDGHeaters 0.1 @@ -111,7 +111,7 @@ VDGFilterFlush { id: vDGFilterFlush } VPreTreatmentSelfTestNoCartridge { id: vPreTreatmentSelfTestNoCartridge } VPreTreatmentSelfTestDry { id: vPreTreatmentSelfTestDry } - VPreTreatmentPrime { id: vPreTreatmentPrime } + VPreTreatmentDisposablePrime { id: vPreTreatmentDisposablePrime } // --- VTreatmentAdjustmentDuration { id: vTreatmentAdjustmentDuration } VTreatmentAdjustmentFlows { id: vTreatmentAdjustmentFlows } Index: sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml =================================================================== diff -u -rdb2238dcf17941be6a3c587b55a3ef06b94cee96 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml (.../PreTreatmentDisposablesStack.qml) (revision db2238dcf17941be6a3c587b55a3ef06b94cee96) +++ sources/gui/qml/pages/pretreatment/PreTreatmentDisposablesStack.qml (.../PreTreatmentDisposablesStack.qml) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -36,9 +36,9 @@ title.text : qsTr("Disposables Self Test") hasTimeCircle : true timeCircleMinimum : 0 - timeCircleMaximum : vDGFilterFlush.total - timeCircleProgressValue : vDGFilterFlush.elapsed - timeCircleTimeTextValue : vDGFilterFlush.remaining * 60 + timeCircleMaximum : vPreTreatmentSelfTestNoCartridge.total + timeCircleProgressValue : vPreTreatmentSelfTestNoCartridge.elapsed + timeCircleTimeTextValue : vPreTreatmentSelfTestNoCartridge.remaining * 60 } PreTreatmentBase { id: _preTreatmentDisposablesCartridgeInstallation Index: sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml =================================================================== diff -u -r4f87126626b76aa04ddcf2ae92e04e118cdcbe01 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml (.../PreTreatmentPrimeStack.qml) (revision 4f87126626b76aa04ddcf2ae92e04e118cdcbe01) +++ sources/gui/qml/pages/pretreatment/PreTreatmentPrimeStack.qml (.../PreTreatmentPrimeStack.qml) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -40,9 +40,9 @@ hasTimeCircle : true timeCircleMinimum : 0 - timeCircleMaximum : vDGFilterFlush.total - timeCircleProgressValue : vDGFilterFlush.elapsed - timeCircleTimeTextValue : vDGFilterFlush.remaining * 60 + timeCircleMaximum : vPreTreatmentSelfTestDry.total + timeCircleProgressValue : vPreTreatmentSelfTestDry.elapsed + timeCircleTimeTextValue : vPreTreatmentSelfTestDry.remaining * 60 hasCheckList : true checkListStepNames : [ @@ -62,9 +62,9 @@ hasTimeCircle : true timeCircleMinimum : 0 - timeCircleMaximum : vDGFilterFlush.total - timeCircleProgressValue : vDGFilterFlush.elapsed - timeCircleTimeTextValue : vDGFilterFlush.remaining * 60 + timeCircleMaximum : vPreTreatmentDisposablePrime.total + timeCircleProgressValue : vPreTreatmentDisposablePrime.elapsed + timeCircleTimeTextValue : vPreTreatmentDisposablePrime.remaining * 60 hasCheckList : true checkListStepNames : [ @@ -81,7 +81,7 @@ onSelfTestDry_bubbleDetectorEntered : { _preTreatmentDrySelfTest.checkList.setItem( 0, vselfTestDry_bubbleDetector )} onSelfTestDry_airTrapEntered : { _preTreatmentDrySelfTest.checkList.setItem( 1, vselfTestDry_airTrap )} onSelfTestDry_occlusionSensorsEntered : { _preTreatmentDrySelfTest.checkList.setItem( 2, vselfTestDry_occlusionSensors )} - onSelfTestDry_pressureSensorsSetupEntered : { _preTreatmentDrySelfTest.checkList.setItem( 3, true )} + onSelfTestDry_pressureSensorsSetupEntered : { _preTreatmentDrySelfTest.checkList.setItem( 3, true )} onSelfTestDry_pressureSensorsEntered : {} onSelfTestDry_pressureSensorsNormalEntered : { _preTreatmentDrySelfTest.checkList.setItem( 3, vselfTestDry_pressureSensorsNormal )} onSelfTestDry_stoppedEntered : {} @@ -91,10 +91,10 @@ Connections { target: vPreTreatmentStates onPrimeChanged : { if ( vprime ) { page( _preTreatmentDisposablesPrime )}} onPrime_waitUserStartEntered : {} - onPrime_salineSetupEntered : { _preTreatmentDisposablesPrime.checkList.setItem(0, true)} + onPrime_salineSetupEntered : { _preTreatmentDisposablesPrime.checkList.setItem(0, true )} onPrime_salinePurgeAirEntered : {} onPrime_salineCirculateBloodCircuitEntered : { _preTreatmentDisposablesPrime.checkList.setItem(0, vprime_salineCirculateBloodCircuit )} - onPrime_reservoiOneFillCompleteEntered : { _preTreatmentDisposablesPrime.checkList.setItem(1, true )} + onPrime_reservoiOneFillCompleteEntered : { _preTreatmentDisposablesPrime.checkList.setItem(1, true )} onPrime_dialysateDialyzerEntered : {} onPrime_reservoirTwoFillCompleteEntered : {} onPrime_dialysateBypassEntered : { _preTreatmentDisposablesPrime.checkList.setItem(1, vprime_dialysateBypass )} @@ -109,8 +109,8 @@ Connections { target: _preTreatmentDisposablesPrime onConfirmClicked : {} - onBackClicked : {vTreatmentCreate.doRequestPop() } - //onContinueClicked : {vTreatmentCreate.doFinishedPrime(); } + onBackClicked : { vTreatmentCreate.doRequestPop() } + //onContinueClicked : { vTreatmentCreate.doFinishedPrime() } } onVisibleChanged: { Index: sources/model/MModel.h =================================================================== diff -u -r725cf5096e9664a0b6b1c4e4e902d1673bd976a9 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/model/MModel.h (.../MModel.h) (revision 725cf5096e9664a0b6b1c4e4e902d1673bd976a9) +++ sources/model/MModel.h (.../MModel.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -17,7 +17,7 @@ #include "main.h" // models -#include "MPowerOff.h" +#include "MAdjustPowerOff.h" #include "MAlarmStatusData.h" #include "MAlarmTriggered.h" #include "MAlarmCleared.h" @@ -39,6 +39,7 @@ #include "MTreatmentBloodPrimeData.h" #include "MHDAccelerometerData.h" +// DG Data Messages #include "MDGDrainPumpData.h" #include "MDGHeatersData.h" #include "MDGLoadCellReadingsData.h" @@ -49,21 +50,29 @@ #include "MDGTemperaturesData.h" #include "MDGValvesStatesData.h" #include "MDGAccelerometerData.h" -// Pre-Treatment progress Data -#include "MDGFilterFlushData.h" + +// Pre-Treatment +#include "MPreTreatmentAdjustRequests.h" +#include "MPreTreatmentAdjustInitTreatmentResponse.h" +#include "MPreTreatmentAdjustParametersValidationResponse.h" +#include "MDGFilterFlushData.h" // DG message but part of the Pre-Treatment messaging flow +#include "MPreTreatmentAdjustWaterSampleResponse.h" #include "MPreTreatmentSelfTestNoCartridgeData.h" #include "MPreTreatmentSelfTestDryData.h" -#include "MPreTreatmentPrimeData.h" +#include "MPreTreatmentAdjustDisposablePrimeResponse.h" +#include "MPreTreatmentDisposablePrimeData.h" +#include "MPreTreatmentAdjustUltrafiltrationInitResponse.h" +#include "MPreTreatmentAdjustPatientConnectionBeginResponse.h" +#include "MPreTreatmentAdjustPatientConnectionConfirmResponse.h" +#include "MPreTreatmentAdjustStartTreatmentResponse.h" -#include "MTreatmentParametersResp.h" - +// Debugging Messages #include "MHDDebugText.h" #include "MDGDebugText.h" - +// Treatment #include "MTreatmentAdjustRequests.h" #include "MTreatmentAdjustDurationResponse.h" #include "MTreatmentAdjustBloodDialysateResponse.h" -#include "MTreatmentAdjustUltrafiltrationInitResponse.h" #include "MTreatmentAdjustUltrafiltrationStateResponse.h" #include "MTreatmentAdjustUltrafiltrationEditResponse.h" #include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" @@ -73,10 +82,10 @@ #include "MTreatmentAdjustRecirculateResponse.h" #include "MTreatmentAdjustEndResponse.h" #include "MTreatmentAdjustPressuresLimitsResponse.h" -#include "MStartTreatmentResponse.h" -#include "MTreatmentAdjustHDVersionsResponse.h" -#include "MTreatmentAdjustDGVersionsResponse.h" +#include "MAdjustHDVersionsResponse.h" +#include "MAdjustDGVersionsResponse.h" + /*! * \page MessageFlow Message interpretation Flow * \dot @@ -233,14 +242,26 @@ \ REGISTER_METATYPE( HDDebugTextData ) \ REGISTER_METATYPE( DGDebugTextData ) \ + /* Pre-Treatment */ \ REGISTER_METATYPE( DGFilterFlushData ) \ REGISTER_METATYPE( PreTreatmentSelfTestNoCartridgeData ) \ REGISTER_METATYPE( PreTreatmentSelfTestDryData ) \ - REGISTER_METATYPE( PreTreatmentPrimeData ) \ + REGISTER_METATYPE( PreTreatmentDisposablePrimeData ) \ \ /* Request */ \ - REGISTER_METATYPE( StartTreatmentRequestData ) \ - REGISTER_METATYPE( ConfirmTreatmentRequestData ) \ + /* Pre-Treatment */ \ + REGISTER_METATYPE( AdjustInitTreatmentRequestData ) \ + REGISTER_METATYPE( AdjustParametersValidationRequestData ) \ + REGISTER_METATYPE( AdjustParametersConfirmRequestData ) \ + REGISTER_METATYPE( AdjustWaterSampleRequestData ) \ + REGISTER_METATYPE( AdjustWaterSampleResultRequestData ) \ + REGISTER_METATYPE( AdjustConsumablesConfirmRequestData ) \ + REGISTER_METATYPE( AdjustDisposablesConfirmRequestData ) \ + REGISTER_METATYPE( AdjustDisposablesPrimeRequestData ) \ + REGISTER_METATYPE( AdjustUltrafiltrationInitRequestData ) \ + REGISTER_METATYPE( AdjustPatientConnectionBeginRequestData ) \ + REGISTER_METATYPE( AdjustPatientConnectionConfirmRequestData ) \ + REGISTER_METATYPE( AdjustStartTreatmentRequestData ) \ \ REGISTER_METATYPE( AlarmSilenceRequestData ) \ REGISTER_METATYPE( AlarmUserActionRequestData ) \ @@ -249,7 +270,6 @@ coco end*/ \ REGISTER_METATYPE( AdjustBloodDialysateRequestData ) \ REGISTER_METATYPE( AdjustDurationRequestData ) \ - REGISTER_METATYPE( AdjustUltrafiltrationInitRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationStateRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationEditRequestData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmRequestData ) \ @@ -259,14 +279,21 @@ REGISTER_METATYPE( AdjustRecirculateRequestData ) \ REGISTER_METATYPE( AdjustTreatmentEndRequestData ) \ REGISTER_METATYPE( AdjustPressuresLimitsRequestData ) \ - REGISTER_METATYPE( AdjustTreatmentParametersRequestData ) \ REGISTER_METATYPE( AdjustVersionsRequestData ) \ + \ /* Response */ \ - REGISTER_METATYPE( StartTreatmentResponseData ) \ + /* Pre-Treatment */ \ + REGISTER_METATYPE( AdjustInitTreatmentResponseData ) \ + REGISTER_METATYPE( AdjustParametersValidationResponseData ) \ + REGISTER_METATYPE( AdjustWaterSampleResponseData ) \ + REGISTER_METATYPE( AdjustDisposablePrimeResponseData ) \ + REGISTER_METATYPE( AdjustUltrafiltrationInitResponseData ) \ + REGISTER_METATYPE( AdjustPatientConnectionBeginResponseData ) \ + REGISTER_METATYPE( AdjustPatientConnectionConfirmResponseData ) \ + REGISTER_METATYPE( AdjustStartTreatmentResponseData ) \ \ REGISTER_METATYPE( AdjustBloodDialysateResponseData ) \ REGISTER_METATYPE( AdjustDurationResponseData ) \ - REGISTER_METATYPE( AdjustUltrafiltrationInitResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationStateResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationEditResponseData ) \ REGISTER_METATYPE( AdjustUltrafiltrationConfirmResponseData ) \ @@ -276,7 +303,6 @@ REGISTER_METATYPE( AdjustRecirculateResponseData ) \ REGISTER_METATYPE( AdjustTreatmentEndResponseData ) \ REGISTER_METATYPE( AdjustPressuresLimitsResponseData ) \ - REGISTER_METATYPE( AdjustTreatmentParametersResponseData ) \ REGISTER_METATYPE( AdjustHDVersionsResponseData ) \ REGISTER_METATYPE( AdjustDGVersionsResponseData ) \ @@ -332,25 +358,33 @@ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDDebugTextData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DGDebugTextData ) \ + /* Pre-Treatment */ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DGFilterFlushData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentSelfTestNoCartridgeData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentSelfTestDryData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentPrimeData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentDisposablePrimeData ) \ /* Response */ \ + /* Pre-Treatment */ \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustInitTreatmentResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustParametersValidationResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustWaterSampleResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDisposablePrimeResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationInitResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustPatientConnectionBeginResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustPatientConnectionConfirmResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustStartTreatmentResponseData ) \ + \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustBloodDialysateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDurationResponseData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationInitResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationStateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmResponseData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, StartTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustSalineResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHeparinResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustRinsebackResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustRecirculateResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentEndResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresLimitsResponseData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentParametersResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustHDVersionsResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDGVersionsResponseData ) \ @@ -359,21 +393,30 @@ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDurationRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationInitRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationConfirmRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, StartTreatmentRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, ConfirmTreatmentRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustParametersConfirmRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustHeparinRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustRinsebackRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustRecirculateRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentEndRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresLimitsRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustVersionsRequestData ) \ - \ + /* Pre-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustInitTreatmentRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustParametersValidationRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustWaterSampleRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustWaterSampleResultRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustConsumablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDisposablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDisposablesPrimeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustUltrafiltrationInitRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustPatientConnectionBeginRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustPatientConnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustStartTreatmentRequestData ) \ + /* Alarms */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmUserActionRequestData ) \ /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. @@ -435,45 +478,63 @@ \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDDebugTextData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DGDebugTextData ) \ + /* Pre-Treatment */ \ ACTION_RECEIVE_BRIDGE_DEFINITION( DGFilterFlushData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentSelfTestNoCartridgeData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentSelfTestDryData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentPrimeData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentDisposablePrimeData ) \ /* Response */ \ + /* Pre-Treatment */ \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustInitTreatmentResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustParametersValidationResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustWaterSampleResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDisposablePrimeResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationInitResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustPatientConnectionBeginResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustPatientConnectionConfirmResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustStartTreatmentResponseData ) \ + \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustBloodDialysateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDurationResponseData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationInitResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationStateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmResponseData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( StartTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustSalineResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHeparinResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustRinsebackResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustRecirculateResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustTreatmentEndResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustPressuresLimitsResponseData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustTreatmentParametersResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustHDVersionsResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDGVersionsResponseData ) \ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ /* Request --------------------------------------------------------- */ \ + /* Pre-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustInitTreatmentRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustParametersValidationRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustParametersConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustWaterSampleRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustWaterSampleResultRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustConsumablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDisposablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDisposablesPrimeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationInitRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustPatientConnectionBeginRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustPatientConnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustStartTreatmentRequestData ) \ + \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDurationRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationInitRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustUltrafiltrationConfirmRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION( StartTreatmentRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION( ConfirmTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustHeparinRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustRinsebackRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustRecirculateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustTreatmentEndRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustPressuresLimitsRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustVersionsRequestData ) \ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmSilenceRequestData ) \ @@ -484,21 +545,31 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_NOEMIT \ /* Request ----------------------- NoEmit -------------------------- */ \ + /* Pre-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustInitTreatmentRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustParametersValidationRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustParametersConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustWaterSampleRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustWaterSampleResultRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustConsumablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDisposablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDisposablesPrimeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationInitRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustPatientConnectionBeginRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustPatientConnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustStartTreatmentRequestData ) \ + \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDurationRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationInitRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustUltrafiltrationConfirmRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( StartTreatmentRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( ConfirmTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustSalineRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustHeparinRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustRinsebackRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustRecirculateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustTreatmentEndRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustPressuresLimitsRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustVersionsRequestData ) \ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmSilenceRequestData ) \ @@ -509,9 +580,22 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_PUBLIC \ /* Request ----------------------- public -------------------------- */ \ + /* Pre-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustInitTreatmentRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustParametersValidationRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustParametersConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustWaterSampleRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustWaterSampleResultRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustConsumablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDisposablesConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDisposablesPrimeRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationInitRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustPatientConnectionBeginRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustPatientConnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustStartTreatmentRequestData ) \ + \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustBloodDialysateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDurationRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationInitRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationStateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationEditRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustUltrafiltrationConfirmRequestData ) \ @@ -521,9 +605,6 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustRinsebackRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustRecirculateRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustTreatmentEndRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( StartTreatmentRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( ConfirmTreatmentRequestData ) \ - ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustTreatmentParametersRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustVersionsRequestData ) \ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmSilenceRequestData ) \ @@ -570,20 +651,27 @@ \ ACTION_RECEIVE_SIGNAL( HDDebugTextData ) \ ACTION_RECEIVE_SIGNAL( DGDebugTextData ) \ + /* Pre-Treatment */ \ ACTION_RECEIVE_SIGNAL( DGFilterFlushData ) \ ACTION_RECEIVE_SIGNAL( PreTreatmentSelfTestNoCartridgeData ) \ ACTION_RECEIVE_SIGNAL( PreTreatmentSelfTestDryData ) \ - ACTION_RECEIVE_SIGNAL( PreTreatmentPrimeData ) \ + ACTION_RECEIVE_SIGNAL( PreTreatmentDisposablePrimeData ) \ /* Response */ \ - ACTION_RECEIVE_SIGNAL( StartTreatmentResponseData ) \ + /* Pre-Treatment */ \ + ACTION_RECEIVE_SIGNAL( AdjustInitTreatmentResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustParametersValidationResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustWaterSampleResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustDisposablePrimeResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationInitResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustPatientConnectionBeginResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustPatientConnectionConfirmResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustStartTreatmentResponseData ) \ \ ACTION_RECEIVE_SIGNAL( AdjustBloodDialysateResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustDurationResponseData ) \ - ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationInitResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationStateResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationEditResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustUltrafiltrationConfirmResponseData ) \ - ACTION_RECEIVE_SIGNAL( AdjustTreatmentParametersResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustSalineResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustHeparinResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustRinsebackResponseData ) \ Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/MPowerOff.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/MPowerOff.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/MStartTreatmentResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/MStartTreatmentResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/MTreatmentParametersResp.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/MTreatmentParametersResp.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/dg/adjustment/MAdjustDGVersionsResponse.h =================================================================== diff -u --- sources/model/dg/adjustment/MAdjustDGVersionsResponse.h (revision 0) +++ sources/model/dg/adjustment/MAdjustDGVersionsResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,101 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustDGVersionsResponse.h + * \author (last) Peman Montazemi + * \date (last) 8-Dec-2020 + * \author (original) Peman Montazemi + * \date (original) 8-Dec-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustDGVersionsResponse class + * \details The DG versions data model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:------:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * | 0x1E00 | 0x070 | 17 | Rsp | Y | DG | UI | DG Versions Data | + * + * | Payload || + * | || + * | #1:(U08) | \ref Data::mMajor | + * | #2:(U08) | \ref Data::mMinor | + * | #3:(U08) | \ref Data::mMicro | + * | #4:(U16) | \ref Data::mBuild | + * | #5:(U08) | \ref Data::mFPGAId | + * | #6:(U08) | \ref Data::mFPGAMajor | + * | #7:(U08) | \ref Data::mFPGAMinor | + * | #8:(U08) | \ref Data::mFPGALab | + * + * \sa Data + * \sa MAdjustDGVersionsResponse : DG Versions Response Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | DG | + * | infoText | DGVersions | + * + */ +class MAdjustDGVersionsResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U08 mMajor ; + Types::U08 mMinor ; + Types::U08 mMicro ; + Types::U16 mBuild ; + Types::U08 mFPGAId ; + Types::U08 mFPGAMajor ; + Types::U08 mFPGAMinor ; + Types::U08 mFPGALab ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eDG ; } + QString infoText () const override { return QString("DGVersions") ; } + + struct Data { + quint8 mMajor = 0; /*!< DG Versions Major value of type quint8 extracted out */ + quint8 mMinor = 0; /*!< DG Versions Minor value of type quint8 extracted out */ + quint8 mMicro = 0; /*!< DG Versions Micro value of type quint8 extracted out */ + quint16 mBuild = 0; /*!< DG Versions Build value of type quint16 extracted out */ + quint8 mFPGAId = 0; /*!< DG Versions FPGA ID value of type quint8 extracted out */ + quint8 mFPGAMajor = 0; /*!< DG Versions FPGA Major value of type quint8 extracted out */ + quint8 mFPGAMinor = 0; /*!< DG Versions FPGA Minor value of type quint8 extracted out */ + quint8 mFPGALab = 0; /*!< DG Versions FPGA Lab value of type quint8 extracted out */ + }; + + MAdjustDGVersionsResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDGVersionsResponse::Data AdjustDGVersionsResponseData; Index: sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp =================================================================== diff -u -r93b6bd48e2aec1fca4f2b5b79dcefffa49e9ce16 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp (.../MTreatmentAdjustDGVersionsResponse.cpp) (revision 93b6bd48e2aec1fca4f2b5b79dcefffa49e9ce16) +++ sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp (.../MTreatmentAdjustDGVersionsResponse.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -12,7 +12,7 @@ * \date (original) 10-Dec-2020 * */ -#include "MTreatmentAdjustDGVersionsResponse.h" +#include "MAdjustDGVersionsResponse.h" using namespace Model; Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/hd/adjustment/MAdjustHDVersionsResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MAdjustHDVersionsResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MAdjustHDVersionsResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,64 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MHDVersionResponse.cpp + * \author (last) Peman Montazemi + * \date (last) 4-Nov-2020 + * \author (original) Peman Montazemi + * \date (original) 4-Nov-2020 + * + */ +#include "MAdjustHDVersionsResponse.h" + +using namespace Model; + +QVariantList MAdjustHDVersionsResponse::parameters() const { + return { + _data.mMajor .value, + _data.mMinor .value, + _data.mMicro .value, + _data.mBuild .value, + _data.mFPGAId .value, + _data.mFPGAMajor.value, + _data.mFPGAMinor.value, + _data.mFPGALab .value + }; +} + +bool MAdjustHDVersionsResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mMajor )) + if (GetValue(vByteArray, index, _data.mMinor )) + if (GetValue(vByteArray, index, _data.mMicro )) + if (GetValue(vByteArray, index, _data.mBuild )) + if (GetValue(vByteArray, index, _data.mFPGAId )) + if (GetValue(vByteArray, index, _data.mFPGAMajor)) + if (GetValue(vByteArray, index, _data.mFPGAMinor)) + if (GetValue(vByteArray, index, _data.mFPGALab )) + 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; } + 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; } +} + +AdjustHDVersionsResponseData MAdjustHDVersionsResponse::data() const { + Data data; + data.mMajor = _data.mMajor .value; + data.mMinor = _data.mMinor .value; + data.mMicro = _data.mMicro .value; + data.mBuild = _data.mBuild .value; + data.mFPGAId = _data.mFPGAId .value; + data.mFPGAMajor = _data.mFPGAMajor.value; + data.mFPGAMinor = _data.mFPGAMinor.value; + data.mFPGALab = _data.mFPGALab .value; + return data; +} Index: sources/model/hd/adjustment/MAdjustHDVersionsResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MAdjustHDVersionsResponse.h (revision 0) +++ sources/model/hd/adjustment/MAdjustHDVersionsResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,101 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustHDVersionsResponse.h + * \author (last) Peman Montazemi + * \date (last) 6-Nov-2020 + * \author (original) Peman Montazemi + * \date (original) 4-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustHDVersionsResponse class + * \details The HD versions data model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:------:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * | 0x1D00 | 0x020 | 6 | Rsp | Y | HD | UI | HD Versions Data | + * + * | Payload || + * | || + * | #1:(U08) | \ref Data::mHDMajor | + * | #2:(U08) | \ref Data::mHDMinor | + * | #3:(U08) | \ref Data::mHDMicro | + * | #4:(U16) | \ref Data::mHDBuild | + * | #5:(U08) | \ref Data::mHDFPGAId | + * | #6:(U08) | \ref Data::mHDFPGAMajor | + * | #7:(U08) | \ref Data::mHDFPGAMinor | + * | #8:(U08) | \ref Data::mHDFPGALab | + * + * \sa Data + * \sa MAdjustHDVersionsResponse : HD Versions Response Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | HDVersions | + * + */ +class MAdjustHDVersionsResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U08 mMajor ; + Types::U08 mMinor ; + Types::U08 mMicro ; + Types::U16 mBuild ; + Types::U08 mFPGAId ; + Types::U08 mFPGAMajor ; + Types::U08 mFPGAMinor ; + Types::U08 mFPGALab ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("HDVersions") ; } + + struct Data { + quint8 mMajor = 0; /*!< HD Versions Major value of type quint8 extracted out */ + quint8 mMinor = 0; /*!< HD Versions Minor value of type quint8 extracted out */ + quint8 mMicro = 0; /*!< HD Versions Micro value of type quint8 extracted out */ + quint16 mBuild = 0; /*!< HD Versions Build value of type quint16 extracted out */ + quint8 mFPGAId = 0; /*!< HD Versions FPGA ID value of type quint8 extracted out */ + quint8 mFPGAMajor = 0; /*!< HD Versions FPGA Major value of type quint8 extracted out */ + quint8 mFPGAMinor = 0; /*!< HD Versions FPGA Minor value of type quint8 extracted out */ + quint8 mFPGALab = 0; /*!< HD Versions FPGA Lab value of type quint8 extracted out */ + }; + + MAdjustHDVersionsResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustHDVersionsResponse::Data AdjustHDVersionsResponseData; Index: sources/model/hd/adjustment/MAdjustPowerOff.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MAdjustPowerOff.cpp (revision 0) +++ sources/model/hd/adjustment/MAdjustPowerOff.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,41 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPowerOff.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MAdjustPowerOff.h" + +using namespace Model; + +QVariantList MPowerOff::parameters() const { + return { + _data.mStatus .value + }; +} + +bool MPowerOff::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mStatus )) + return true ; + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MPowerOff::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPowerOff::Data MPowerOff::data() const { + Data data; + data.mStatus = _data.mStatus.value; + return data; +} Index: sources/model/hd/adjustment/MAdjustPowerOff.h =================================================================== diff -u --- sources/model/hd/adjustment/MAdjustPowerOff.h (revision 0) +++ sources/model/hd/adjustment/MAdjustPowerOff.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,72 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPowerOff.h + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +namespace Model { + +/*! + * \brief The MPowerOff class + * \details The power off model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------:| + * |0x0100| 0x020 | 6 | Cmd | N | HD | UI | Power Off | + * + * | Payload || + * | || + * | #1:(U08) | \ref Data::mStatus | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | PowerOff | + * + */ +class MPowerOff : public MAbstract { +public: + Type_Enum typeText () const override { return Type_Enum::eEvent; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("PowerOff"); } + QVariantList parameters() const override; + + struct { + Types::U08 mStatus ; + } _data; + +public: + struct Data { + quint8 mStatus = 0; + bool mShutDown = false; + }; + + MPowerOff () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPowerOff::Data PowerOffData; Index: sources/model/hd/adjustment/MAdjustRequestsBase.h =================================================================== diff -u --- sources/model/hd/adjustment/MAdjustRequestsBase.h (revision 0) +++ sources/model/hd/adjustment/MAdjustRequestsBase.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,60 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MAdjustRequestsBase.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ + +#pragma once + +// Qt +#include + +//project +#include "MessageGlobals.h" +using namespace Gui; + +namespace Model { + +/*! + * Simple request models + * These are models to send the request for the doAdjustment + * The the only reason thy have been defined to help overloading the adjustment methods + * Otherwise the parameters are so tiny models. + */ + +class MModel { +protected: + /*! + * \brief toString + * \details the global toString function for all the request message models + * which is mainly used for logging and debugging. + * \param vStringPrefix - a prefix string to be inserted after senderID (UI) and parameter values list. + * This is comma separated. + * \param vParameters - list of parameter values of the model as a comma separated string. + * \return QString + */ + static QString toString (const QString &vStringPrefix, const QVariant &vParameters) { + QString senderID = "UI,"; + return QString(senderID + vStringPrefix + "," + vParameters.toStringList().join(',')); + } + +public: + /*! + * \brief canid returns the default channel id of the message. + * it can be modified by the specific message which inherits the MModel. + * \return Can::Can_Id + */ + static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_HD; } + +}; + +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustDisposablePrimeResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#include "MPreTreatmentAdjustDisposablePrimeResponse.h" + +using namespace Model; + +QVariantList MAdjustDisposablePrimeResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustDisposablePrimeResponse::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 )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustDisposablePrimeResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustDisposablePrimeResponseData MAdjustDisposablePrimeResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustDisposablePrimeResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustDisposablePrimeResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustDisposablePrimeResponse class + * \details The DisposablePrime adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0x3D00| 0x020 | 6 | Rsp | Y | HD | UI | DisposablePrime Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustDisposablePrimeReq : DisposablePrime Request + * \sa MTreatmentDisposablePrime : DisposablePrime Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustDisposablePrime | + * + */ +class MAdjustDisposablePrimeResponse : public MAbstract { + + // friends + 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::eHD ; } + QString infoText () const override { return QString("AdjustDisposablePrime") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustDisposablePrimeResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDisposablePrimeResponse::Data AdjustDisposablePrimeResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,27 @@ +#include "MPreTreatmentAdjustInitTreatmentResponse.h" + +using namespace Model; + +QVariantList MAdjustInitTreatmentResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mReason .value + }; +} + +bool MAdjustInitTreatmentResponse::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 )) + return true; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + +} + +MAdjustInitTreatmentResponse::Data MAdjustInitTreatmentResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,68 @@ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustInitTreatmentResponse class + * \details The start treamtent response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:----------------------: | + * |0x3900| 0x020 | 6 | Rsp | Y | HD | UI | Init Treatment Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::startTreatmentResponse | + * | #2:(U32) | \ref Data::startTreatmentRejectReason | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | InitTreatment | + * + */ +class MAdjustInitTreatmentResponse : public MAbstract { + + // friends + 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::eHD ; } + QString infoText () const override { return QString("InitTreatment" ); } + + struct Data { + quint32 mAccepted = 0; + quint32 mReason = 0; + }; + + MAdjustInitTreatmentResponse () {} + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustInitTreatmentResponse::Data AdjustInitTreatmentResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,104 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentParametersResp.cpp + * \author (last) Peter Lucia + * \date (last) 14-Oct-2020 + * \author (original) Peter Lucia + * \date (original) 08-Sep-2020 + * + */ +#include "MPreTreatmentAdjustParametersValidationResponse.h" + +using namespace Model; + +QVariantList MAdjustParametersValidationResponse::parameters() const { + return { + _data.requestValid .value, + _data.bloodFlowRate .value, + _data.dialysateFlowRate .value, + _data.duration .value, + _data.heparinStopTime .value, + _data.salineBolus .value, + _data.acidConcentrate .value, + _data.bicarbonateConcentrate .value, + _data.dialyzerType .value, + _data.bloodPressureMeasureInterval .value, + _data.rinsebackFlowRate .value, + _data.arterialPressureLimitLow .value, + _data.arterialPressureLimitHigh .value, + _data.venousPressureLimitLow .value, + _data.venousPressureLimitHigh .value, + _data.heparinDispensingRate .value, + _data.heparinBolusVolume .value, + _data.dialysateTemp .value + }; +} + +bool MAdjustParametersValidationResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.requestValid )) + if (GetValue(vByteArray, index, _data.bloodFlowRate )) + if (GetValue(vByteArray, index, _data.dialysateFlowRate )) + if (GetValue(vByteArray, index, _data.duration )) + if (GetValue(vByteArray, index, _data.heparinStopTime )) + if (GetValue(vByteArray, index, _data.salineBolus )) + if (GetValue(vByteArray, index, _data.acidConcentrate )) + if (GetValue(vByteArray, index, _data.bicarbonateConcentrate )) + if (GetValue(vByteArray, index, _data.dialyzerType )) + if (GetValue(vByteArray, index, _data.bloodPressureMeasureInterval )) + if (GetValue(vByteArray, index, _data.rinsebackFlowRate )) + if (GetValue(vByteArray, index, _data.arterialPressureLimitLow )) + if (GetValue(vByteArray, index, _data.arterialPressureLimitHigh )) + if (GetValue(vByteArray, index, _data.venousPressureLimitLow )) + if (GetValue(vByteArray, index, _data.venousPressureLimitHigh )) + if (GetValue(vByteArray, index, _data.heparinDispensingRate )) + if (GetValue(vByteArray, index, _data.heparinBolusVolume )) + if (GetValue(vByteArray, index, _data.dialysateTemp )) + 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; } + 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; } + 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; } + 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; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +MAdjustParametersValidationResponse::Data MAdjustParametersValidationResponse::data() const { + Data data; + data.requestValid = _data.requestValid .value; + data.bloodFlowRate = _data.bloodFlowRate .value; + data.dialysateFlowRate = _data.dialysateFlowRate .value; + data.duration = _data.duration .value; + data.heparinStopTime = _data.heparinStopTime .value; + data.salineBolus = _data.salineBolus .value; + data.acidConcentrate = _data.acidConcentrate .value; + data.bicarbonateConcentrate = _data.bicarbonateConcentrate .value; + data.dialyzerType = _data.dialyzerType .value; + data.bloodPressureMeasureInterval = _data.bloodPressureMeasureInterval .value; + data.rinsebackFlowRate = _data.rinsebackFlowRate .value; + data.arterialPressureLimitLow = _data.arterialPressureLimitLow .value; + data.arterialPressureLimitHigh = _data.arterialPressureLimitHigh .value; + data.venousPressureLimitLow = _data.venousPressureLimitLow .value; + data.venousPressureLimitHigh = _data.venousPressureLimitHigh .value; + data.heparinDispensingRate = _data.heparinDispensingRate .value; + data.heparinBolusVolume = _data.heparinBolusVolume .value; + data.dialysateTemp = _data.dialysateTemp .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,128 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentParametersResp.h + * \author (last) Peter Lucia + * \date (last) 14-Oct-2020 + * \author (original) Peter Lucia + * \date (original) 08-Sep-2020 + * + */ + +#pragma once + +// Qt + +// Project +#include "types.h" +#include "MAbstract.h" + +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustParametersValidationResponse class + * \details The treatment parameters response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:------------------------------: | + * |0x3600| 0x020 | 6 | Rsp | Y | HD | UI | Treatment Parameters Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::requestValid | + * | #2:(U32) | \ref Data::bloodFlowRate | + * | #3:(U32) | \ref Data::dialysateFlowRate | + * | #4:(U32) | \ref Data::duration | + * | #5:(U32) | \ref Data::heparinStopTime | + * | #6:(U32) | \ref Data::salineBolus | + * | #7:(U32) | \ref Data::acidConcentrate | + * | #8:(U32) | \ref Data::bicarbonateConcentrate | + * | #9:(U32) | \ref Data::dialyzerType | + * | #10:(U32) | \ref Data::bloodPressureMeasureInterval | + * | #11:(U32) | \ref Data::rinsebackFlowRate | + * | #12:(U32) | \ref Data::arterialPressureLimitLow | + * | #13:(U32) | \ref Data::arterialPressureLimitHigh | + * | #14:(U32) | \ref Data::venousPressureLimitLow | + * | #15:(U32) | \ref Data::venousPressureLimitHigh | + * | #16:(U32) | \ref Data::heparinDispensingRate | + * | #17:(U32) | \ref Data::heparinBolusVolume | + * | #18:(U32) | \ref Data::dialysateTemp | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | TreatmentParametersResponse | + * + */ +class MAdjustParametersValidationResponse : public MAbstract +{ + friend class::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 requestValid ; + Types::U32 bloodFlowRate ; + Types::U32 dialysateFlowRate ; + Types::U32 duration ; + Types::U32 heparinStopTime ; + Types::U32 salineBolus ; + Types::U32 acidConcentrate ; + Types::U32 bicarbonateConcentrate ; + Types::U32 dialyzerType ; + Types::U32 bloodPressureMeasureInterval ; + Types::U32 rinsebackFlowRate ; + Types::U32 arterialPressureLimitLow ; + Types::U32 arterialPressureLimitHigh ; + Types::U32 venousPressureLimitLow ; + Types::U32 venousPressureLimitHigh ; + Types::U32 heparinDispensingRate ; + Types::U32 heparinBolusVolume ; + Types::U32 dialysateTemp ; + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eEvent; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("ParametersValidation"); } + + struct Data { + quint32 requestValid = 0; + quint32 bloodFlowRate = 0; + quint32 dialysateFlowRate = 0; + quint32 duration = 0; + quint32 heparinStopTime = 0; + quint32 salineBolus = 0; + quint32 acidConcentrate = 0; + quint32 bicarbonateConcentrate = 0; + quint32 dialyzerType = 0; + quint32 bloodPressureMeasureInterval = 0; + quint32 rinsebackFlowRate = 0; + quint32 arterialPressureLimitLow = 0; + quint32 arterialPressureLimitHigh = 0; + quint32 venousPressureLimitLow = 0; + quint32 venousPressureLimitHigh = 0; + quint32 heparinDispensingRate = 0; + quint32 heparinBolusVolume = 0; + quint32 dialysateTemp = 0; + }; + + MAdjustParametersValidationResponse () {} + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustParametersValidationResponse::Data AdjustParametersValidationResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustPatientConnectionBeginResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#include "MPreTreatmentAdjustPatientConnectionBeginResponse.h" + +using namespace Model; + +QVariantList MAdjustPatientConnectionBeginResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustPatientConnectionBeginResponse::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 )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustPatientConnectionBeginResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustPatientConnectionBeginResponseData MAdjustPatientConnectionBeginResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustPatientConnectionBeginResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustPatientConnectionBeginResponse class + * \details The PatientConnectionBegin adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0x6500| 0x020 | 6 | Rsp | Y | HD | UI | PatientConnectionBegin Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustPatientConnectionBeginReq : PatientConnectionBegin Request + * \sa MTreatmentPatientConnectionBegin : PatientConnectionBegin Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustPatientConnectionBegin | + * + */ +class MAdjustPatientConnectionBeginResponse : public MAbstract { + + // friends + 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::eHD ; } + QString infoText () const override { return QString("AdjustPatientConnectionBegin") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustPatientConnectionBeginResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustPatientConnectionBeginResponse::Data AdjustPatientConnectionBeginResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#include "MPreTreatmentAdjustPatientConnectionConfirmResponse.h" + +using namespace Model; + +QVariantList MAdjustPatientConnectionConfirmResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustPatientConnectionConfirmResponse::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 )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustPatientConnectionConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustPatientConnectionConfirmResponseData MAdjustPatientConnectionConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustPatientConnectionConfirmResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustPatientConnectionConfirmResponse class + * \details The PatientConnectionConfirm adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x5300| 0x020 | 6 | Rsp | Y | HD | UI | PatientConnectionConfirm Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustPatientConnectionConfirmReq : PatientConnectionConfirm Request + * \sa MTreatmentPatientConnectionConfirm : PatientConnectionConfirm Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustPatientConnectionConfirm | + * + */ +class MAdjustPatientConnectionConfirmResponse : public MAbstract { + + // friends + 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::eHD ; } + QString infoText () const override { return QString("AdjustPatientConnectionConfirm") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustPatientConnectionConfirmResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustPatientConnectionConfirmResponse::Data AdjustPatientConnectionConfirmResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustRequests.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustRequests.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustRequests.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,437 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustRequests.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ + +#pragma once + +// Qt +#include + +//project +#include "MAdjustRequestsBase.h" +#include "GuiGlobals.h" +#include "MessageGlobals.h" +using namespace Gui; + +namespace Model { + +/*! + * Simple request models + * These are models to send the request for the doAdjustment + * The the only reason thy have been defined to help overloading the adjustment methods + * Otherwise the parameters are so tiny models. + */ + +/*! + * \brief The MAdjustInitiateTreatmentReq class + * \details The model to request starting a treatment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * |0x3800| 0x100 | 9 | Req | Y | UI | HD | Initiate Treatment Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + */ +class MAdjustInitTreatmentReq : public MModel { +public: + enum Options { + eUnknown = -1, + eCancel = 0, + eInitiate = 1, + }; + Options requestedState = eUnknown; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({requestedState}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("InitTreatment", vParameters); + } +}; + +/*! + * \brief The MAdjustParametersValidationReq class + * \details The model used to request treatment parameters validation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------------------------------------:| + * |0x3500| 0x100 | 9 | Req | Y | UI | HD | Validate New Treatment Parameters Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref bloodFlowRate | + * | #2:(U32) | \ref dialysateFlowRate | + * | #3:(U32) | \ref duration | + * | #4:(U32) | \ref heparinStopTime | + * | #5:(U32) | \ref salineBolus | + * | #6:(U32) | \ref acidConcentrate | + * | #7:(U32) | \ref bicarbonateConcentrate | + * | #8:(U32) | \ref dialyzerType | + * | #9:(U32) | \ref bloodPressureMeasureInterval | + * | #10:(U32) | \ref rinsebackFlowRate | + * | #11:(S32) | \ref arterialPressureLimitLow | + * | #12:(S32) | \ref arterialPressureLimitHigh | + * | #13:(S32) | \ref venousPressureLimitLow | + * | #14:(S32) | \ref venousPressureLimitHigh | + * | #15:(F32) | \ref heparinDispensingRate | + * | #16:(F32) | \ref heparinBolusVolume | + * | #17:(F32) | \ref dialysateTemp | + * + */ +class MAdjustParametersValidationReq : public MModel { +public: + + quint32 bloodFlowRate = 0; // mL/min + quint32 dialysateFlowRate = 0; // mL/min + quint32 duration = 0; // minutes + quint32 heparinStopTime = 0; // min + quint32 salineBolus = 0; // mL + quint32 acidConcentrate = 0; // + quint32 bicarbonateConcentrate = 0; // + quint32 dialyzerType = 0; // + quint32 bloodPressureMeasureInterval = 0; // minutes + quint32 rinsebackFlowRate = 0; // mL/min + qint32 arterialPressureLimitLow = 0; // mmHg + qint32 arterialPressureLimitHigh = 0; // mmHg + qint32 venousPressureLimitLow = 0; // mmHg + qint32 venousPressureLimitHigh = 0; // mmHg + float heparinDispensingRate = 0; // mL/hr + float heparinBolusVolume = 0; // mL + float dialysateTemp = 0; // Celsius + + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({ + bloodFlowRate , + dialysateFlowRate , + duration , + heparinStopTime , + salineBolus , + acidConcentrate , + bicarbonateConcentrate , + dialyzerType , + bloodPressureMeasureInterval , + rinsebackFlowRate , + arterialPressureLimitLow , + arterialPressureLimitHigh , + venousPressureLimitLow , + venousPressureLimitHigh , + heparinDispensingRate , + heparinBolusVolume , + dialysateTemp , + }); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("ValidateParameters", vParameters); + } +}; + +/*! + * \brief The MAdjustParametersConfirmReq class + * \details The model to tell HD treatment parameters have been confirmed + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------------------------------:| + * |0x3B00| 0x100 | 9 | Req | Y | UI | HD | Confirm Treatment Parameter Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + */ +class MAdjustParametersConfirmReq : public MModel { +public: + enum Options { + eCancel = 0, + eConfirm = 1 + }; + Options requestedState = eConfirm; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({requestedState}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("ConfirmParameters", vParameters); + } +}; + +/*! + * \brief The MAdjustWaterSampleReq class + * \details The model to request start/stop water sample + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------:| + * |0x5D00| 0x100 | 9 | Req | Y | UI | HD | Water Sample Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + */ +class MAdjustWaterSampleReq : public MModel { +public: + enum Options { + eStop = 0, + eStart = 1, + }; + Options requestedState = eStop; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({requestedState}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("WaterSample", vParameters); + } +}; + +/*! + * \brief The MAdjustWaterSampleResultReq class + * \details The model to provide water sample result + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------------:| + * |0x5F00| 0x100 | 9 | Req | Y | UI | HD | Water Sample Result Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref request | + * + */ +class MAdjustWaterSampleResultReq : public MModel { +public: + enum Options { + eUnknown = -1, + eFailed = 0, + ePassed = 1, + }; + Options requestedState = eUnknown; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({requestedState}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("WaterSampleResult", vParameters); + } +}; + +/*! + * \brief The MAdjustConsumablesConfirmReq class + * \details The model to Confirm Consumables Installation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------------------------------:| + * |0x6800| 0x100 | 9 | Req | Y | UI | HD | Consumables Installation Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustConsumablesConfirmReq : public MModel { +public: + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("ConsumablesConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustDisposablesConfirmReq class + * \details The model to Confirm Disposables Installation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------------------------------:| + * |0x6200| 0x100 | 9 | Req | Y | UI | HD | Disposables Installation Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustDisposablesConfirmReq : public MModel { +public: + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("DisposablesConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustDisposablesPrimeReq class + * \details The model to Confirm Disposables Installation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------------------:| + * |0x3C00| 0x100 | 9 | Req | Y | UI | HD | Disposables Priming Start Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustDisposablesPrimeReq : public MModel { +public: + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("DisposablesPrime", vParameters); + } +}; + +/*! + * \brief The MAdjustPatientConnectionBeginReq class + * \details The model to Confirm Disposables Installation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------------------:| + * |0x6400| 0x100 | 9 | Req | Y | UI | HD | Patient Connection Begin Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientConnectionBeginReq : public MModel { +public: + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PatientConnectionBegin", vParameters); + } +}; + +/*! + * \brief The MAdjustPatientConnectionConfirmReq class + * \details The model to Confirm Disposables Installation + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------------------------:| + * |0x6600| 0x100 | 9 | Req | Y | UI | HD | Patient Connection Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientConnectionConfirmReq : public MModel { +public: + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PatientConnectionConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustUltrafiltrationInitReq class + * \details The ultrafiltration volume change request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x4F00| 0x100 | 9 | Req | Y | UI | HD | UF Vol. Initial Adjustment Request | + * + * | Payload || + * | || + * | #1:(F32) | \ref volume | + * + */ +class MAdjustUltrafiltrationInitReq : public MModel { +public: + float volume = 0; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({volume}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustUFInit", vParameters); + } +}; + +/*! + * \brief The MAdjustStartTreatmentReq class + * \details The model to request starting a treatment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| + * |0x7100| 0x100 | 9 | Req | Y | UI | HD | Start Treatment Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref request | + * + */ +class MAdjustStartTreatmentReq : public MModel { +public: + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("StartTreatment", vParameters); + } +}; + +} + +typedef Model:: MAdjustInitTreatmentReq AdjustInitTreatmentRequestData; +typedef Model:: MAdjustParametersValidationReq AdjustParametersValidationRequestData; +typedef Model:: MAdjustParametersConfirmReq AdjustParametersConfirmRequestData; +typedef Model:: MAdjustWaterSampleReq AdjustWaterSampleRequestData; +typedef Model:: MAdjustWaterSampleResultReq AdjustWaterSampleResultRequestData; +typedef Model:: MAdjustConsumablesConfirmReq AdjustConsumablesConfirmRequestData; +typedef Model:: MAdjustDisposablesConfirmReq AdjustDisposablesConfirmRequestData; +typedef Model:: MAdjustDisposablesPrimeReq AdjustDisposablesPrimeRequestData; +typedef Model:: MAdjustPatientConnectionBeginReq AdjustPatientConnectionBeginRequestData; +typedef Model:: MAdjustPatientConnectionConfirmReq AdjustPatientConnectionConfirmRequestData; +typedef Model:: MAdjustUltrafiltrationInitReq AdjustUltrafiltrationInitRequestData; +typedef Model:: MAdjustStartTreatmentReq AdjustStartTreatmentRequestData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustStartTreatmentResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 19-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 19-MAr-2021 + * + */ +#include "MPreTreatmentAdjustStartTreatmentResponse.h" + +using namespace Model; + +QVariantList MAdjustStartTreatmentResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustStartTreatmentResponse::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 )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustStartTreatmentResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustStartTreatmentResponseData MAdjustStartTreatmentResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,82 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustStartTreatmentResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustStartTreatmentResponse class + * \details The StartTreatment adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7200| 0x020 | 6 | Rsp | Y | HD | UI | Start Treatment Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustStartTreatment | + * + */ +class MAdjustStartTreatmentResponse : public MAbstract { + + // friends + 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::eHD ; } + QString infoText () const override { return QString("AdjustStartTreatment") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustStartTreatmentResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustStartTreatmentResponse::Data AdjustStartTreatmentResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,49 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustUltrafiltrationInitResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 08-Dec-2020 + * \author (original) Behrouz NematiPour + * \date (original) 08-Dec-2020 + * + */ +#include "MPreTreatmentAdjustUltrafiltrationInitResponse.h" + +using namespace Model; + +QVariantList MAdjustUltrafiltrationInitResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mReason .value, + _data.mVolume .value + }; +} + +bool MAdjustUltrafiltrationInitResponse::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.mVolume )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustUltrafiltrationInitResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustUltrafiltrationInitResponseData MAdjustUltrafiltrationInitResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mVolume = _data.mVolume .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,86 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MTreatmentAdjustUltrafiltrationInitResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 08-Dec-2020 + * \author (original) Behrouz NematiPour + * \date (original) 08-Dec-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustUltrafiltrationInitResponse class + * \details The UF vol. change response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x5000| 0x020 | 6 | Rsp | Y | HD | UI | UF Vol. Initial adjustment Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(F32) | \ref Data::mVolume | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustUFInit | + * + */ +class MAdjustUltrafiltrationInitResponse : public MAbstract +{ + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; ///< Accepted or rejected + Types::U32 mReason ; ///< the rejections reason + Types::F32 mVolume ; ///< The Ultrafiltration volume accepted + } _data; + +public: + Type_Enum typeText () const override { return Type_Enum::eEvent ; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("AdjustUFInit"); } + + struct Data { + bool mAccepted = 0; ///< Accepted value of type quint32 extracted out + quint32 mReason = 0; ///< Reason value of type quint32 extracted out + float mVolume = 0; ///< volume value of type float extracted out + }; + +public: + MAdjustUltrafiltrationInitResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustUltrafiltrationInitResponse::Data AdjustUltrafiltrationInitResponseData; Index: sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.cpp (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustWaterSampleResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#include "MPreTreatmentAdjustWaterSampleResponse.h" + +using namespace Model; + +QVariantList MAdjustWaterSampleResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustWaterSampleResponse::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 )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustWaterSampleResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustWaterSampleResponseData MAdjustWaterSampleResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.h (revision 0) +++ sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentAdjustWaterSampleResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustWaterSampleResponse class + * \details The WaterSample adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------: | + * |0x5E00| 0x020 | 6 | Rsp | Y | HD | UI | WaterSample Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustWaterSampleReq : WaterSample Request + * \sa MPreTreatmentWaterSample : WaterSample Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustWaterSample | + * + */ +class MAdjustWaterSampleResponse : public MAbstract { + + // friends + 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::eHD ; } + QString infoText () const override { return QString("AdjustWaterSample") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustWaterSampleResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustWaterSampleResponse::Data AdjustWaterSampleResponseData; Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustHDVersionsResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/hd/adjustment/MTreatmentAdjustRequests.h =================================================================== diff -u -rc15ce613e372838316d42c40a86953e6f0aa05d3 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision c15ce613e372838316d42c40a86953e6f0aa05d3) +++ sources/model/hd/adjustment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -19,6 +19,7 @@ #include //project +#include "MAdjustRequestsBase.h" #include "GuiGlobals.h" #include "MessageGlobals.h" using namespace Gui; @@ -32,32 +33,6 @@ * Otherwise the parameters are so tiny models. */ -class MModel { -protected: - /*! - * \brief toString - * \details the global toString function for all the request message models - * which is mainly used for logging and debugging. - * \param vStringPrefix - a prefix string to be inserted after senderID (UI) and parameter values list. - * This is comma separated. - * \param vParameters - list of parameter values of the model as a comma separated string. - * \return QString - */ - static QString toString (const QString &vStringPrefix, const QVariant &vParameters) { - QString senderID = "UI,"; - return QString(senderID + vStringPrefix + "," + vParameters.toStringList().join(',')); - } - -public: - /*! - * \brief canid returns the default channel id of the message. - * it can be modified by the specific message which inherits the MModel. - * \return Can::Can_Id - */ - static Can::Can_Id canid () { return Can::Can_Id::eChlid_UI_HD; } - -}; - /*! * \brief The MAdjustPowerOffReq class * \details The power off request model @@ -146,33 +121,6 @@ }; /*! - * \brief The MAdjustUltrafiltrationEditReq class - * \details The ultrafiltration volume change request model - * - * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | - * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | - * |0x4F00| 0x100 | 9 | Req | Y | UI | HD | UF Vol. Initial Adjustment Request | - * - * | Payload || - * | || - * | #1:(F32) | \ref volume | - * - */ -class MAdjustUltrafiltrationInitReq : public MModel { -public: - float volume = 0; - // coco begin validated : Has been validated manually. - // This object is used statically for now, kept the logic for later usage. - QString toString() { - return toString({volume}); - } - // coco end - static QString toString(const QVariantList &vParameters) { - return MModel::toString("AdjustUFInit", vParameters); - } -}; - -/*! * \brief The MAdjustUltrafiltrationStateReq class * \details The ultrafiltration pause/resume request model * @@ -554,6 +502,7 @@ } }; // coco end + /*! * \brief The MAlarmUserActionReq class * \details The model to tell HD an alarm action has been made by user @@ -581,154 +530,11 @@ } }; -/*! - * \brief The MStartTreatmentReq class - * \details The model to request starting a treatment - * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| - * |0x3800| 0x100 | 9 | Req | Y | UI | HD | Start Treatment Request | - * - * | Payload || - * | || - * | #1:(U32) | \ref request | - * - */ -class MStartTreatmentReq : public MModel { -public: - enum Options { - eSelectParams = 0, - eCancel = 1, - eStartTreatment = 2 - }; - Options request = eSelectParams; - // coco begin validated : Has been validated manually. - // This object is used statically for now, kept the logic for later usage. - QString toString() { - return toString({request}); - } - // coco end - static QString toString(const QVariantList &vParameters) { - return MModel::toString("StartTreatment", vParameters); - } -}; - -/*! - * \brief The MConfirmTreatmentReq class - * \details The model to tell HD treatment parameters have been confirmed - * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| - * | 56 | 0x100 | 9 | Req | Y | UI | HD | Confirm Treatment Request | - * - * | Payload || - * | || - * | #1:(U32) | \ref request | - * - */ -class MConfirmTreatmentReq : public MModel { -public: - enum Options { - eCancel = 0, - eConfirm = 1 - }; - Options request = eConfirm; - // coco begin validated : Has been validated manually. - // This object is used statically for now, kept the logic for later usage. - QString toString() { - return toString({request}); - } - // coco end - static QString toString(const QVariantList &vParameters) { - return MModel::toString("ConfirmTreatment", vParameters); - } -}; - -/*! - * \brief The MAdjustTreatmentParametersReq class - * \details The model used to request treatment parameters validation - * - * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | - * |:---:|:------:|:-----:|:----:|:---:|:---:|:----:|:-------------------------:| - * | 60 | 0x100 | 9 | Req | Y | UI | HD | New Treatment Parameters Request | - * - * | Payload || - * | || - * | #1:(U32) | \ref bloodFlowRate | - * | #2:(U32) | \ref dialysateFlowRate | - * | #3:(U32) | \ref duration | - * | #4:(U32) | \ref heparinStopTime | - * | #5:(U32) | \ref salineBolus | - * | #6:(U32) | \ref acidConcentrate | - * | #7:(U32) | \ref bicarbonateConcentrate | - * | #8:(U32) | \ref dialyzerType | - * | #9:(U32) | \ref bloodPressureMeasureInterval | - * | #10:(U32) | \ref rinsebackFlowRate | - * | #11:(S32) | \ref arterialPressureLimitLow | - * | #12:(S32) | \ref arterialPressureLimitHigh | - * | #13:(S32) | \ref venousPressureLimitLow | - * | #14:(S32) | \ref venousPressureLimitHigh | - * | #15:(F32) | \ref heparinDispensingRate | - * | #16:(F32) | \ref heparinBolusVolume | - * | #17:(F32) | \ref dialysateTemp | - * - */ -class MAdjustTreatmentParametersReq : public MModel { -public: - - quint32 bloodFlowRate = 0; // mL/min - quint32 dialysateFlowRate = 0; // mL/min - quint32 duration = 0; // minutes - quint32 heparinStopTime = 0; // min - quint32 salineBolus = 0; // mL - quint32 acidConcentrate = 0; // - quint32 bicarbonateConcentrate = 0; // - quint32 dialyzerType = 0; // - quint32 bloodPressureMeasureInterval = 0; // minutes - quint32 rinsebackFlowRate = 0; // mL/min - qint32 arterialPressureLimitLow = 0; // mmHg - qint32 arterialPressureLimitHigh = 0; // mmHg - qint32 venousPressureLimitLow = 0; // mmHg - qint32 venousPressureLimitHigh = 0; // mmHg - float heparinDispensingRate = 0; // mL/hr - float heparinBolusVolume = 0; // mL - float dialysateTemp = 0; // Celsius - - // coco begin validated : Has been validated manually. - // This object is used statically for now, kept the logic for later usage. - QString toString() { - return toString({ - bloodFlowRate , - dialysateFlowRate , - duration , - heparinStopTime , - salineBolus , - acidConcentrate , - bicarbonateConcentrate , - dialyzerType , - bloodPressureMeasureInterval , - rinsebackFlowRate , - arterialPressureLimitLow , - arterialPressureLimitHigh , - venousPressureLimitLow , - venousPressureLimitHigh , - heparinDispensingRate , - heparinBolusVolume , - dialysateTemp , - }); - } - // coco end - static QString toString(const QVariantList &vParameters) { - return MModel::toString("AdjustTreatmentParametersRequest", vParameters); - } -}; - } typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; typedef Model:: MAdjustBloodDialysateReq AdjustBloodDialysateRequestData; typedef Model:: MAdjustDurationReq AdjustDurationRequestData; -typedef Model:: MAdjustUltrafiltrationInitReq AdjustUltrafiltrationInitRequestData; typedef Model:: MAdjustUltrafiltrationStateReq AdjustUltrafiltrationStateRequestData; typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; @@ -738,9 +544,6 @@ typedef Model:: MAdjustRecirculateReq AdjustRecirculateRequestData; typedef Model:: MAdjustTreatmentEndReq AdjustTreatmentEndRequestData; typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; -typedef Model:: MStartTreatmentReq StartTreatmentRequestData; -typedef Model:: MConfirmTreatmentReq ConfirmTreatmentRequestData; -typedef Model:: MAdjustTreatmentParametersReq AdjustTreatmentParametersRequestData; typedef Model:: MAdjustVersionsReq AdjustVersionsRequestData; // Alarms typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationInitResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationInitResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/hd/data/MPreTreatmentDisposablePrimeData.cpp =================================================================== diff -u --- sources/model/hd/data/MPreTreatmentDisposablePrimeData.cpp (revision 0) +++ sources/model/hd/data/MPreTreatmentDisposablePrimeData.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentPrime.cpp + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ +#include "MPreTreatmentDisposablePrimeData.h" + +using namespace Model; + +QVariantList MPreTreatmentDisposablePrime::parameters() const { + return { + _data.mTimeout .value, + _data.mCountdown .value, + }; +} + +bool MPreTreatmentDisposablePrime::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTimeout )) + if (GetValue(vByteArray, index, _data.mCountdown )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MPreTreatmentPrime::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPreTreatmentDisposablePrime::Data MPreTreatmentDisposablePrime::data() const { + Data data; + data.mTimeout = _data.mTimeout .value; + data.mCountdown = _data.mCountdown .value; + return data; +} Index: sources/model/hd/data/MPreTreatmentDisposablePrimeData.h =================================================================== diff -u --- sources/model/hd/data/MPreTreatmentDisposablePrimeData.h (revision 0) +++ sources/model/hd/data/MPreTreatmentDisposablePrimeData.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,79 @@ +/*! + * + * Copyright (c) 2020-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file MPreTreatmentDisposablePrimeData.h + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ + +#pragma once + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; +namespace Model { + +/*! + * \brief The MPreTreatmentPrime class + * \details The progress and state data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:--------------: | + * |0x4300| 0x020 | 9 | 1 Hz | N | HD | UI | Pre-Treatment Disposable Priming Progress Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTimeout | + * | #2:(U32) | \ref Data::mCountdown | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | DisposablePrime | + * + */ +class MPreTreatmentDisposablePrime : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mTimeout ; + Types::U32 mCountdown ; + } _data; + +public: + Type_Enum typeText () const override { return Type_Enum::eDatum ; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + QString infoText () const override { return QString("DisposablePrime"); } + + struct Data { + quint32 mTimeout = 0; ///< Timeout Total time in sec */ + quint32 mCountdown = 0; ///< Countdown current time countdown in sec */ + }; + +public: + MPreTreatmentDisposablePrime() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPreTreatmentDisposablePrime::Data PreTreatmentDisposablePrimeData; Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentPrimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentPrimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/uniq.sh =================================================================== diff -u --- sources/model/uniq.sh (revision 0) +++ sources/model/uniq.sh (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,17 @@ + + # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + # \copyright + # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + # + # \file uniq.sh + # \author (last) Behrouz NematiPour + # \date (last) 18-Mar-2021 + # \author (original) Behrouz NematiPour + # \date (original) 18-Mar-2021 + # \details This script finds the duplicate lines + # which has been created mainly to detect duplicate registrations of models in MModel.h + # to avoid the build errors. + +#!/bin/bash +cat "$1" | sort | uniq -cd Index: sources/view/VTreatmentCreate.cpp =================================================================== diff -u -rc0c63c4b149dafea2b02e4cd31f223e392ff7818 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision c0c63c4b149dafea2b02e4cd31f223e392ff7818) +++ sources/view/VTreatmentCreate.cpp (.../VTreatmentCreate.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -30,20 +30,20 @@ connect(&_FileSaver, SIGNAL(fileSaved(bool)), this, SLOT(onFinishedSaveNewTreatment(bool))); - connect(this, SIGNAL(requestValidateParameters(AdjustTreatmentParametersRequestData)), - &_GuiController, SLOT(doAdjustment(AdjustTreatmentParametersRequestData))); + connect(this, SIGNAL(requestValidateParameters(AdjustParametersValidationRequestData)), + &_GuiController, SLOT(doAdjustment(AdjustParametersValidationRequestData))); - connect(&_GuiController, SIGNAL(didActionReceive(AdjustTreatmentParametersResponseData)), - this, SLOT(doActionReceive(AdjustTreatmentParametersResponseData))); + connect(&_GuiController, SIGNAL(didActionReceive(AdjustParametersValidationResponseData)), + this, SLOT(doActionReceive(AdjustParametersValidationResponseData))); - connect(this, SIGNAL(requestSelectParameters(StartTreatmentRequestData)), - &_GuiController, SLOT(doAdjustment(StartTreatmentRequestData))); + connect(this, SIGNAL(requestSelectParameters(AdjustInitTreatmentRequestData)), + &_GuiController, SLOT(doAdjustment(AdjustInitTreatmentRequestData))); - connect(this, SIGNAL(requestConfirm(ConfirmTreatmentRequestData)), - &_GuiController, SLOT(doAdjustment(ConfirmTreatmentRequestData))); + connect(this, SIGNAL(requestConfirm(AdjustParametersConfirmRequestData)), + &_GuiController, SLOT(doAdjustment(AdjustParametersConfirmRequestData))); - connect(&_GuiController, SIGNAL(didActionReceive(StartTreatmentResponseData)), - this, SLOT(doActionReceive(StartTreatmentResponseData))); + connect(&_GuiController, SIGNAL(didActionReceive(AdjustInitTreatmentResponseData)), + this, SLOT(doActionReceive(AdjustInitTreatmentResponseData))); connect(this, SIGNAL(requestConcurrentSave(QString,QString,bool)), &_FileSaver, SLOT(onConcurrentSave(QString,QString,bool))); @@ -235,7 +235,7 @@ * \param messageData The message data must contain the reject reason codes for all parameters * \returns True if FW OK's treatment parameters, false otherwise */ -bool VTreatmentCreate::doActionReceive(AdjustTreatmentParametersResponseData data) { +bool VTreatmentCreate::doActionReceive(AdjustParametersValidationResponseData data) { bool success = true; if (data.bloodFlowRate != Gui::GuiRequestReasons::REQUEST_REJECT_REASON_NONE) { @@ -346,13 +346,12 @@ * to start selecting treatment parameters, cancel, or start the treatment * @param messageData */ -void VTreatmentCreate::doActionReceive(const StartTreatmentResponseData &messageData) +void VTreatmentCreate::doActionReceive(const AdjustInitTreatmentResponseData &messageData) { - qDebug() << "Received response after start treatment request: " << messageData.startTreatmentResponse; - if (messageData.startTreatmentResponse != 1) + if (messageData.mAccepted != 1) return; - if (startTreatmentRequest.request == StartTreatmentRequestData::eCancel) { + if (initTreatmentRequest.requestedState == AdjustInitTreatmentRequestData::eCancel) { //goToNextPage(false); } else { @@ -464,7 +463,7 @@ saveNewTreatment(obj); // Tell FW we confirm - confirmTreatmentRequest.request = ConfirmTreatmentRequestData::eConfirm; + confirmTreatmentRequest.requestedState = AdjustParametersConfirmRequestData::eConfirm; emit requestConfirm(confirmTreatmentRequest); // no FW response required @@ -573,8 +572,8 @@ */ void VTreatmentCreate::doStartTreatment() { qDebug() << "Requesting to start a treatment..."; - startTreatmentRequest.request = StartTreatmentRequestData::eStartTreatment; - emit requestSelectParameters(startTreatmentRequest); + initTreatmentRequest.requestedState = AdjustInitTreatmentRequestData::eInitiate; + emit requestSelectParameters(initTreatmentRequest); } /** @@ -583,7 +582,7 @@ * \param vData - the selected TreatmentParametersData * \return true on success, false otherwise. */ -bool VTreatmentCreate::validate(const AdjustTreatmentParametersRequestData &vData) +bool VTreatmentCreate::validate(const AdjustParametersValidationRequestData &vData) { bool success = true; @@ -868,8 +867,8 @@ */ void VTreatmentCreate::doSelectParameters() { - startTreatmentRequest.request = StartTreatmentRequestData::eSelectParams; - emit requestSelectParameters(startTreatmentRequest); + initTreatmentRequest.requestedState = AdjustInitTreatmentRequestData::eInitiate; + emit requestSelectParameters(initTreatmentRequest); } /** @@ -879,8 +878,8 @@ */ void VTreatmentCreate::doCancelSelectingParameters() { - startTreatmentRequest.request = StartTreatmentRequestData::eCancel; - emit requestSelectParameters(startTreatmentRequest); + initTreatmentRequest.requestedState = AdjustInitTreatmentRequestData::eCancel; + emit requestSelectParameters(initTreatmentRequest); } /** @@ -890,7 +889,7 @@ */ void VTreatmentCreate::doCancelConfirmParameters() { - confirmTreatmentRequest.request = ConfirmTreatmentRequestData::eCancel; + confirmTreatmentRequest.requestedState = AdjustParametersConfirmRequestData::eCancel; emit requestConfirm(confirmTreatmentRequest); // goToNextPage(false); } Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -r25e7d601d795c1622dd4c6e437b3dce91a676e83 -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 25e7d601d795c1622dd4c6e437b3dce91a676e83) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -10,7 +10,7 @@ #include // Project -#include "MTreatmentParametersResp.h" +#include "MPreTreatmentAdjustParametersValidationResponse.h" #include "GuiController.h" #include "StorageGlobals.h" #include "FileSaver.h" @@ -48,11 +48,11 @@ * - The data is validated for correctness and compatibility * - The continue button is enabled upon success so FW can validate the parameter selection * - * \sa Model::MAdjustTreatmentParametersReq - * \sa Model::MTreatmentParametersResponse - * \sa Model::MStartTreatmentReq + * \sa Model::MAdjustParametersValidationResponse + * \sa Model::MAdjustParametersConfirmReq + * \sa Model::MInitTreatmentReq * \sa Model::MConfirmTreatmentReq - * \sa Model::MStartTreatmentResponse + * \sa Model::MAdjustInitTreatmentResponse */ class VTreatmentCreate : public QObject { @@ -212,8 +212,8 @@ PROPERTY(bool, continueEnabled, false) PROPERTY(bool, saveTreatmentProfile, false) - AdjustTreatmentParametersRequestData treatmentData; - bool validate(const AdjustTreatmentParametersRequestData &vData); + AdjustParametersValidationRequestData treatmentData; + bool validate(const AdjustParametersValidationRequestData &vData); QString saveNewTreatment(const QJsonObject &obj, const QString &dir = Treatment_Profiles_Dir); QString getParameterRangesDataCSV(); bool saveTreatmentRangesCSV(const QString &filename); @@ -246,8 +246,8 @@ Page pageToShow = None; QString enumToString(GuiRequestReasons vEnum); - StartTreatmentRequestData startTreatmentRequest; - ConfirmTreatmentRequestData confirmTreatmentRequest; + AdjustInitTreatmentRequestData initTreatmentRequest; + AdjustParametersConfirmRequestData confirmTreatmentRequest; void goToNextPage(bool forward); @@ -261,9 +261,9 @@ void showBegin(); void pop(); void showTreatmentStart(); - void requestValidateParameters(const AdjustTreatmentParametersRequestData &data); - void requestConfirm(const ConfirmTreatmentRequestData &data); - void requestSelectParameters(const StartTreatmentRequestData &data); + void requestValidateParameters(const AdjustParametersValidationRequestData &data); + void requestConfirm(const AdjustParametersConfirmRequestData &data); + void requestSelectParameters(const AdjustInitTreatmentRequestData &data); void resetCreateTreatment(); void fwValidationFailed(QString reason); void fwValidationSuccess(); @@ -276,8 +276,8 @@ void doFinishedConfirm(); void doFinishedPrime(); void doStartTreatment(); - bool doActionReceive(AdjustTreatmentParametersResponseData data); - void doActionReceive(const StartTreatmentResponseData &messageData); + bool doActionReceive(AdjustParametersValidationResponseData data); + void doActionReceive(const AdjustInitTreatmentResponseData &messageData); void doUserModifiedParameters(); QStringList doGetPrescriptionParameterNames(); QStringList doGetPrescriptionParameterValues(); Index: sources/view/VView.h =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -re0412efcf85964a18ec52ad80f233c45998eb45a --- sources/view/VView.h (.../VView.h) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ sources/view/VView.h (.../VView.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -138,7 +138,7 @@ REGISTER_TYPE( VDGFilterFlush ) \ REGISTER_TYPE( VPreTreatmentSelfTestNoCartridge ) \ REGISTER_TYPE( VPreTreatmentSelfTestDry ) \ - REGISTER_TYPE( VPreTreatmentPrime ) \ + REGISTER_TYPE( VPreTreatmentDisposablePrime ) \ /* In-Treatment */ \ REGISTER_TYPE( VTreatmentAdjustmentDuration ) \ REGISTER_TYPE( VTreatmentAdjustmentFlows ) \ Index: sources/view/hd/data/VPreTreatmentDisposablePrimeData.cpp =================================================================== diff -u --- sources/view/hd/data/VPreTreatmentDisposablePrimeData.cpp (revision 0) +++ sources/view/hd/data/VPreTreatmentDisposablePrimeData.cpp (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,27 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VPreTreatmentDisposablePrimeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ +#include "VPreTreatmentDisposablePrimeData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VPreTreatmentDisposablePrime, PreTreatmentDisposablePrimeData) + +void VPreTreatmentDisposablePrime::onActionReceive(const PreTreatmentDisposablePrimeData &vData) +{ + total (vData.mTimeout ); + remaining (vData.mCountdown ); + elapsed (vData.mTimeout - vData.mCountdown ); +} Index: sources/view/hd/data/VPreTreatmentDisposablePrimeData.h =================================================================== diff -u --- sources/view/hd/data/VPreTreatmentDisposablePrimeData.h (revision 0) +++ sources/view/hd/data/VPreTreatmentDisposablePrimeData.h (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -0,0 +1,45 @@ +/*! + * + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * \copyright + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file VPreTreatmentDisposablePrimeData.h + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "MModel.h" +#include "VView.h" + +// namespace +namespace View { + +/*! + * \brief The VPreTreatmentDisposablePrime class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentTime + * + */ +class VPreTreatmentDisposablePrime : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , total , 0) + PROPERTY( quint32 , remaining , 0) + PROPERTY( quint32 , elapsed , 0) + + VIEW_DEC(VPreTreatmentDisposablePrime, PreTreatmentDisposablePrimeData) +}; +} Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentPrimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e0412efcf85964a18ec52ad80f233c45998eb45a refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentPrimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: unittests/tst_messaging.cpp =================================================================== diff -u -r7777127f3b60d5f884cd07adc9d586353d914f69 -re0412efcf85964a18ec52ad80f233c45998eb45a --- unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) +++ unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -20,7 +20,7 @@ #include "main.h" #include "MessageInterpreter.h" #include "MessageBuilder.h" -#include "MPowerOff.h" +#include "MAdjustPowerOff.h" #include "MessageDispatcher.h" #include "AlarmGenerator.h" Index: unittests/tst_models.cpp =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -re0412efcf85964a18ec52ad80f233c45998eb45a --- unittests/tst_models.cpp (.../tst_models.cpp) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ unittests/tst_models.cpp (.../tst_models.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -20,7 +20,7 @@ #include "MTreatmentAdjustBloodDialysateResponse.h" #include "MTreatmentAdjustDurationResponse.h" #include "MTreatmentRangesData.h" -#include "MPowerOff.h" +#include "MAdjustPowerOff.h" #include "MDGDrainPumpData.h" #include "MDGHeatersData.h" @@ -39,7 +39,7 @@ #include "MTreatmentTimeData.h" #include "MTreatmentPressureOcclusionData.h" #include "MTreatmentSalineData.h" -#include "MPreTreatmentPrimeData.h" +#include "MPreTreatmentDisposablePrimeData.h" #include "MTreatmentAdjustUltrafiltrationStateResponse.h" #include "MTreatmentAdjustUltrafiltrationEditResponse.h" @@ -52,8 +52,8 @@ #include "MAlarmTriggered.h" #include "MAlarmCleared.h" -#include "MTreatmentParametersResp.h" -#include "MStartTreatmentResponse.h" +#include "MPreTreatmentAdjustParametersValidationResponse.h" +#include "MPreTreatmentAdjustInitTreatmentResponse.h" #include "MessageInterpreter.h" @@ -1599,7 +1599,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MTreatmentParametersResp test definition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MTreatmentParametersResp() { - Model::MTreatmentParametersResponse mData; + Model::MAdjustParametersValidationResponse mData; QFETCH(int , errorIndex ); QFETCH(QByteArray, data ); @@ -1743,7 +1743,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MPreTreatmentPrime test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MPreTreatmentPrime() { - Model::MPreTreatmentPrime mData; + Model::MPreTreatmentDisposablePrime mData; QFETCH(int , errorIndex ); QFETCH(QByteArray, data ); @@ -1767,9 +1767,9 @@ } } -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MStartTreatmentResponse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MStartTreatmentResponse data definition ~~~~~~~~~~~~~~~~~~~~~~~~ // -void tst_models::tst_MStartTreatmentResponse_data () { +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MAdjustInitTreatmentResponse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MAdjustInitTreatmentResponse data definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MAdjustInitTreatmentResponse_data () { QTest::addColumn("errorIndex"); QTest::addColumn("data"); QTest::newRow("msg complete ") << 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07")); @@ -1783,9 +1783,9 @@ QTest::newRow("startTreatmentRejectReason") << 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06")); } -// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MStartTreatmentResponse test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // -void tst_models::tst_MStartTreatmentResponse() { - Model::MStartTreatmentResponse mData; +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MAdjustInitTreatmentResponse test definition ~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MAdjustInitTreatmentResponse() { + Model::MAdjustInitTreatmentResponse mData; QFETCH(int , errorIndex ); QFETCH(QByteArray, data ); @@ -1951,20 +1951,20 @@ QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_AlarmUserActionReq, vData, payload)); } -void tst_models::tst_MStartTreatmentRequest() +void tst_models::tst_MInitTreatmentRequest() { MessageInterpreter interpreter; QVariantList vData; QByteArray payload; - QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_StartTreatmentReq, vData, payload)); + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_AdjustInitTreatmentReq, vData, payload)); } void tst_models::tst_MConfirmTreatmentRequest() { MessageInterpreter interpreter; QVariantList vData; QByteArray payload; - QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_ConfirmTreatmentReq, vData, payload)); + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_AdjustParametersConfirmReq, vData, payload)); } void tst_models::tst_MEndTreatmentRequest() @@ -1986,5 +1986,5 @@ MessageInterpreter interpreter; QVariantList vData; QByteArray payload; - QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_CreateTreatmentReq, vData, payload)); + QVERIFY(!interpreter.interpretMessage(Gui::GuiActions::ID_AdjustParametersValidationReq, vData, payload)); } Index: unittests/tst_models.h =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -re0412efcf85964a18ec52ad80f233c45998eb45a --- unittests/tst_models.h (.../tst_models.h) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ unittests/tst_models.h (.../tst_models.h) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -32,11 +32,11 @@ void tst_MTreatmentRanges (); // Treatment Start / Stop - void tst_MStartTreatmentResponse_data(); - void tst_MStartTreatmentResponse(); + void tst_MAdjustInitTreatmentResponse_data(); + void tst_MAdjustInitTreatmentResponse(); void tst_MEndTreatmentResponse_data(); void tst_MEndTreatmentResponse(); - void tst_MStartTreatmentRequest(); + void tst_MInitTreatmentRequest(); void tst_MEndTreatmentRequest(); // - Treatment Adjustments Index: unittests/tst_views.cpp =================================================================== diff -u -r96854524927f212c24b9e4a253baeff2e672228f -re0412efcf85964a18ec52ad80f233c45998eb45a --- unittests/tst_views.cpp (.../tst_views.cpp) (revision 96854524927f212c24b9e4a253baeff2e672228f) +++ unittests/tst_views.cpp (.../tst_views.cpp) (revision e0412efcf85964a18ec52ad80f233c45998eb45a) @@ -21,7 +21,7 @@ #include "VTreatmentAdjustmentUltrafiltrationState.h" #include "FileHandler.h" #include "VTreatmentBegin.h" -#include "VPreTreatmentPrimeData.h" +#include "VPreTreatmentDisposablePrimeData.h" #include "VAlarmStatus.h" tst_views::tst_views(QObject *parent) : QObject(parent) { } @@ -709,13 +709,13 @@ void tst_views::VCreateTreatment_fw_validation_response() { View::VTreatmentCreate view; - GuiActionType action = GuiActionType::ID_CreateTreatmentRsp; + GuiActionType action = GuiActionType::ID_AdjustParametersValidationRsp; for (int i = 0; i < 18; ++i) { // 0 = OK, 1,2,3 ... parameter is not OK QVariantList messageData; - AdjustTreatmentParametersResponseData respData; + AdjustParametersValidationResponseData respData; if (i == 0) respData.requestValid = 1; else respData.requestValid = 0; if (i == 1) respData.bloodFlowRate = 1; else respData.bloodFlowRate = 0; if (i == 2) respData.dialysateFlowRate = 1; else respData.dialysateFlowRate = 0; @@ -737,11 +737,11 @@ QVERIFY(!view.doActionReceive(respData)); } - AdjustTreatmentParametersRequestData dataBackup = view.treatmentData; + AdjustParametersValidationRequestData dataBackup = view.treatmentData; - AdjustTreatmentParametersResponseData respData; + AdjustParametersValidationResponseData respData; - StartTreatmentResponseData startResponse; + AdjustInitTreatmentResponseData startResponse; startResponse.startTreatmentResponse = 0; // REJECT view.doActionReceive(startResponse);