Index: denali.pro =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r88563177f10f20ced98750b2e40036201728131d --- denali.pro (.../denali.pro) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ denali.pro (.../denali.pro) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -50,15 +50,27 @@ sources/model \ sources/model/settings \ sources/model/hd/adjustment \ + sources/model/hd/adjustment/pretreatment \ + sources/model/hd/adjustment/treatment \ + sources/model/hd/adjustment/posttreatment \ sources/model/hd/alarm \ sources/model/hd/data \ + sources/model/hd/data/pretreatment \ + sources/model/hd/data/treatment \ + sources/model/hd/data/posttreatment \ sources/model/dg/data \ sources/model/dg/adjustment \ sources/view \ sources/view/settings \ sources/view/hd/adjustment \ + sources/view/hd/adjustment/pretreatment \ + sources/view/hd/adjustment/treatment \ + sources/view/hd/adjustment/posttreatment \ sources/view/hd/alarm \ sources/view/hd/data \ + sources/view/hd/data/pretreatment \ + sources/view/hd/data/treatment \ + sources/view/hd/data/posttreatment \ sources/view/dg/data HEADERS += \ @@ -90,50 +102,55 @@ 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/MPreTreatmentAdjustDisposablesPrimeResponse.h \ - sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.h \ - sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.h \ - sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h \ - sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.h \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h \ + sources/model/hd/adjustment/pretreatment/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/MTreatmentAdjustUltrafiltrationStateResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustPressuresLimitsResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h \ + \ # ---------- Models - HD - Adjustment - End-Treatment + sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.h \ \ # ---------- Models - HD - Adjustment - Post-Treatment - sources/model/hd/adjustment/MTreatmentAdjustRinsebackResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustRecirculateResponse.h \ - sources/model/hd/adjustment/MTreatmentAdjustEndResponse.h \ + sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustRequests.h \ + sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h \ + sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h \ \ # ---------- Models - HD - States Data sources/model/hd/data/MHDOperationModeData.h \ - sources/model/hd/data/MPreTreatmentStatesData.h \ - sources/model/hd/data/MTreatmentStatesData.h \ + sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h \ + sources/model/hd/data/treatment/MTreatmentStatesData.h \ + sources/model/hd/data/posttreatment/MPostTreatmentStatesData.h \ \ # ---------- Models - HD - Data - Pre-Treatment - Progress - sources/model/hd/data/MPreTreatmentSelfTestNoCartridgeData.h \ - sources/model/hd/data/MPreTreatmentSelfTestDryData.h \ - sources/model/hd/data/MPreTreatmentDisposablesPrimeData.h \ + sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.h \ + sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.h \ + sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.h \ \ # ---------- Models - HD - Data sources/model/hd/data/MHDDebugText.h \ sources/model/hd/data/MHDAccelerometerData.h \ - sources/model/hd/data/MTreatmentTimeData.h \ - sources/model/hd/data/MTreatmentFlowsData.h \ - sources/model/hd/data/MTreatmentOutletFlowData.h \ sources/model/hd/data/MTreatmentRangesData.h \ - sources/model/hd/data/MTreatmentPressureOcclusionData.h \ - sources/model/hd/data/MTreatmentSalineData.h \ - sources/model/hd/data/MTreatmentHeparinData.h \ - sources/model/hd/data/MTreatmentRinsebackData.h \ - sources/model/hd/data/MTreatmentRecirculateData.h \ - sources/model/hd/data/MTreatmentBloodPrimeData.h \ + sources/model/hd/data/treatment/MTreatmentTimeData.h \ + sources/model/hd/data/treatment/MTreatmentFlowsData.h \ + sources/model/hd/data/treatment/MTreatmentOutletFlowData.h \ + sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.h \ + sources/model/hd/data/treatment/MTreatmentSalineData.h \ + sources/model/hd/data/treatment/MTreatmentHeparinData.h \ + sources/model/hd/data/treatment/MTreatmentRinsebackData.h \ + sources/model/hd/data/treatment/MTreatmentRecirculateData.h \ + sources/model/hd/data/treatment/MTreatmentBloodPrimeData.h \ \ # ---------- Models - DG - Adjustment sources/model/dg/adjustment/MAdjustDGVersionsResponse.h \ \ # ---------- Models - DG - Data - Pre-Treatment - Progress @@ -174,50 +191,55 @@ \ # ---------- Views - HD - Adjustment sources/view/hd/adjustment/VTreatmentAdjustmentVersions.h \ \ # ---------- Views - HD - Adjustment - Pre-Treatment - sources/view/hd/adjustment/VPreTreatmentAdjustmentInitTreatment.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentWaterSample.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentConsumablesConfirm.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesConfirm.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesPrime.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionBegin.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentUltrafiltrationInit.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionConfirm.h \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentStartTreatment.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.h \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.h \ \ # ---------- Views - HD - Adjustment - In-Treatment - sources/view/hd/adjustment/VTreatmentAdjustmentResponseBase.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentDuration.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentFlows.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationEdit.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationConfirm.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentPressuresLimits.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h \ + \ # ---------- Views - HD - Adjustment - End-Treatment + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.h \ \ # ---------- Views - HD - Adjustment - Post-Treatment - sources/view/hd/adjustment/VTreatmentAdjustmentRinseback.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentRecirculate.h \ - sources/view/hd/adjustment/VTreatmentAdjustmentEnd.h \ + sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h \ + sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h \ + sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h \ \ # ---------- Views - HD - Data - States sources/view/hd/data/VHDOperationModeData.h \ - sources/view/hd/data/VHDTreatmentStatesData.h \ - sources/view/hd/data/VPreTreatmentStatesData.h \ + sources/view/hd/data/pretreatment/VPreTreatmentStatesData.h \ + sources/view/hd/data/treatment/VHDTreatmentStatesData.h \ + sources/view/hd/data/posttreatment/VPostTreatmentStatesData.h \ \ # ---------- Views - HD - Data - Pre-Treatment - Progress - sources/view/hd/data/VPreTreatmentSelfTestNoCartridgeData.h \ - sources/view/hd/data/VPreTreatmentSelfTestDryData.h \ - sources/view/hd/data/VPreTreatmentDisposablesPrimeData.h \ + sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.h \ + sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.h \ + sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.h \ \ # ---------- Views - HD - Data sources/view/hd/data/VHDAccelerometerData.h \ - sources/view/hd/data/VTreatmentTime.h \ - sources/view/hd/data/VTreatmentBloodFlow.h \ - sources/view/hd/data/VTreatmentDialysateFlow.h \ - sources/view/hd/data/VTreatmentUltrafiltration.h \ sources/view/hd/data/VTreatmentRanges.h \ - sources/view/hd/data/VTreatmentPressureOcclusion.h \ - sources/view/hd/data/VTreatmentSalineData.h \ - sources/view/hd/data/VTreatmentHeparinData.h \ - sources/view/hd/data/VTreatmentRinsebackData.h \ - sources/view/hd/data/VTreatmentRecirculateData.h \ - sources/view/hd/data/VTreatmentBloodPrimeData.h \ + sources/view/hd/data/treatment/VTreatmentTime.h \ + sources/view/hd/data/treatment/VTreatmentBloodFlow.h \ + sources/view/hd/data/treatment/VTreatmentDialysateFlow.h \ + sources/view/hd/data/treatment/VTreatmentUltrafiltration.h \ + sources/view/hd/data/treatment/VTreatmentPressureOcclusion.h \ + sources/view/hd/data/treatment/VTreatmentSalineData.h \ + sources/view/hd/data/treatment/VTreatmentHeparinData.h \ + sources/view/hd/data/treatment/VTreatmentRinsebackData.h \ + sources/view/hd/data/treatment/VTreatmentRecirculateData.h \ + sources/view/hd/data/treatment/VTreatmentBloodPrimeData.h \ \ # ---------- Views - DG - Data - Pre-Treatment - Progress sources/view/dg/data/VDGFilterFlushData.h \ \ # ---------- Views - DG - Data @@ -269,49 +291,53 @@ 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/MPreTreatmentAdjustDisposablesPrimeResponse.cpp \ - sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp \ - sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp \ - sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp \ - sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp \ + sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.cpp \ \ # ---------- Models - HD - Adjustment - In-Treatment - sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustPressuresLimitsResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp \ + \ # ---------- Models - HD - Adjustment - End-Treatment + sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp \ + sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.cpp \ \ # ---------- Models - HD - Adjustment - Post-Treatment - sources/model/hd/adjustment/MTreatmentAdjustRinsebackResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustRecirculateResponse.cpp \ - sources/model/hd/adjustment/MTreatmentAdjustEndResponse.cpp \ + sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp \ + sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp \ \ # ---------- Models - HD - Data \ # ---------- Models - HD - Data - Pre-Treatment - sources/model/hd/data/MPreTreatmentDisposablesPrimeData.cpp \ - sources/model/hd/data/MPreTreatmentSelfTestNoCartridgeData.cpp \ - sources/model/hd/data/MPreTreatmentSelfTestDryData.cpp \ + sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.cpp \ + sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.cpp \ + sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.cpp \ \ # ---------- Models - HD - Data - States sources/model/hd/data/MHDOperationModeData.cpp \ - sources/model/hd/data/MPreTreatmentStatesData.cpp \ - sources/model/hd/data/MTreatmentStatesData.cpp \ + sources/model/hd/data/pretreatment/MPreTreatmentStatesData.cpp \ + sources/model/hd/data/treatment/MTreatmentStatesData.cpp \ + sources/model/hd/data/posttreatment/MPostTreatmentStatesData.cpp \ \ # ---------- Models - HD - Data sources/model/hd/data/MHDDebugText.cpp \ sources/model/hd/data/MHDAccelerometerData.cpp \ - sources/model/hd/data/MTreatmentTimeData.cpp \ - sources/model/hd/data/MTreatmentFlowsData.cpp \ - sources/model/hd/data/MTreatmentOutletFlowData.cpp \ sources/model/hd/data/MTreatmentRangesData.cpp \ - sources/model/hd/data/MTreatmentPressureOcclusionData.cpp \ - sources/model/hd/data/MTreatmentSalineData.cpp \ - sources/model/hd/data/MTreatmentHeparinData.cpp \ - sources/model/hd/data/MTreatmentRinsebackData.cpp \ - sources/model/hd/data/MTreatmentRecirculateData.cpp \ - sources/model/hd/data/MTreatmentBloodPrimeData.cpp \ + sources/model/hd/data/treatment/MTreatmentTimeData.cpp \ + sources/model/hd/data/treatment/MTreatmentFlowsData.cpp \ + sources/model/hd/data/treatment/MTreatmentOutletFlowData.cpp \ + sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.cpp \ + sources/model/hd/data/treatment/MTreatmentSalineData.cpp \ + sources/model/hd/data/treatment/MTreatmentHeparinData.cpp \ + sources/model/hd/data/treatment/MTreatmentRinsebackData.cpp \ + sources/model/hd/data/treatment/MTreatmentRecirculateData.cpp \ + sources/model/hd/data/treatment/MTreatmentBloodPrimeData.cpp \ \ # ---------- Models - DG - Adjustment sources/model/dg/adjustment/MTreatmentAdjustDGVersionsResponse.cpp \ \ # ---------- Models - DG - Data - Pre-Treatment - Progress @@ -350,52 +376,57 @@ \ # ---------- Views - HD - Adjustment sources/view/hd/adjustment/VTreatmentAdjustmentVersions.cpp \ \ # ---------- Views - HD - Adjustment - Pre-Treatment - sources/view/hd/adjustment/VPreTreatmentAdjustmentInitTreatment.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentWaterSample.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentConsumablesConfirm.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesConfirm.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesPrime.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentUltrafiltrationInit.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionConfirm.cpp \ - sources/view/hd/adjustment/VPreTreatmentAdjustmentStartTreatment.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.cpp \ + sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.cpp \ \ # ---------- Views - HD - Adjustment - In-Treatment - sources/view/hd/adjustment/VTreatmentAdjustmentResponseBase.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentDuration.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentFlows.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationEdit.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentPressuresLimits.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp \ + \ # ---------- Views - HD - Adjustment - End-Treatment + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp \ + sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.cpp \ \ # ---------- Views - HD - Adjustment - Post-Treatment - sources/view/hd/adjustment/VTreatmentAdjustmentRinseback.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentRecirculate.cpp \ - sources/view/hd/adjustment/VTreatmentAdjustmentEnd.cpp \ + sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp \ + sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp \ + sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp \ \ # ---------- Views - HD - States Data sources/view/hd/data/VHDOperationModeData.cpp \ - sources/view/hd/data/VPreTreatmentStatesData.cpp \ - sources/view/hd/data/VHDTreatmentStatesData.cpp \ + sources/view/hd/data/pretreatment/VPreTreatmentStatesData.cpp \ + sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp \ + sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp \ \ # ---------- Views - HD - Data sources/view/hd/data/VHDAccelerometerData.cpp \ - \ # ---------- Views - HD - Data - Pre-Treament - sources/view/hd/data/VPreTreatmentSelfTestNoCartridgeData.cpp \ - sources/view/hd/data/VPreTreatmentSelfTestDryData.cpp \ - sources/view/hd/data/VPreTreatmentDisposablesPrimeData.cpp \ - \ # ---------- Views - HD - Data - In-Treament - sources/view/hd/data/VTreatmentTime.cpp \ - sources/view/hd/data/VTreatmentBloodFlow.cpp \ - sources/view/hd/data/VTreatmentDialysateFlow.cpp \ - sources/view/hd/data/VTreatmentUltrafiltration.cpp \ + \ # ---------- Views - HD - Data - Pre-Treatment + sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.cpp \ + sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.cpp \ + sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.cpp \ + \ # ---------- Views - HD - Data - In-Treatment sources/view/hd/data/VTreatmentRanges.cpp \ - sources/view/hd/data/VTreatmentPressureOcclusion.cpp \ - sources/view/hd/data/VTreatmentSalineData.cpp \ - sources/view/hd/data/VTreatmentHeparinData.cpp \ - \ # ---------- Views - HD - Data - Post-Treament - sources/view/hd/data/VTreatmentBloodPrimeData.cpp \ - sources/view/hd/data/VTreatmentRinsebackData.cpp \ - sources/view/hd/data/VTreatmentRecirculateData.cpp \ + sources/view/hd/data/treatment/VTreatmentTime.cpp \ + sources/view/hd/data/treatment/VTreatmentBloodFlow.cpp \ + sources/view/hd/data/treatment/VTreatmentDialysateFlow.cpp \ + sources/view/hd/data/treatment/VTreatmentUltrafiltration.cpp \ + sources/view/hd/data/treatment/VTreatmentPressureOcclusion.cpp \ + sources/view/hd/data/treatment/VTreatmentSalineData.cpp \ + sources/view/hd/data/treatment/VTreatmentHeparinData.cpp \ + \ # ---------- Views - HD - Data - End-Treatment + sources/view/hd/data/treatment/VTreatmentBloodPrimeData.cpp \ + sources/view/hd/data/treatment/VTreatmentRinsebackData.cpp \ + sources/view/hd/data/treatment/VTreatmentRecirculateData.cpp \ \ # ---------- Views - DG - Data - Pre-Treatment - Progress sources/view/dg/data/VDGFilterFlushData.cpp \ \ # ---------- Views - DG - Data Index: denali.pro.user =================================================================== diff -u -r0cc29248749353dfaca80fa02fdd6108173c3a71 -r88563177f10f20ced98750b2e40036201728131d --- denali.pro.user (.../denali.pro.user) (revision 0cc29248749353dfaca80fa02fdd6108173c3a71) +++ denali.pro.user (.../denali.pro.user) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -1,6 +1,6 @@ - + EnvironmentId Index: denali.qrc =================================================================== diff -u -r0cc29248749353dfaca80fa02fdd6108173c3a71 -r88563177f10f20ced98750b2e40036201728131d --- denali.qrc (.../denali.qrc) (revision 0cc29248749353dfaca80fa02fdd6108173c3a71) +++ denali.qrc (.../denali.qrc) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -165,23 +165,23 @@ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentUltrafiltrationConfirm.qml sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentPressuresLimits.qml - - sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackStack.qml - sources/gui/qml/pages/postTreatment/PostTreatmentRecirculateStack.qml - sources/gui/qml/pages/postTreatment/PostTreatmentEndStack.qml + + sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml + sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml + sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml - - sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackInit.qml - sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinseback.qml - sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackComplete.qml - sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentAdditional.qml + + sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml + sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml + sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml + sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentAdditional.qml - - sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentRecirculate.qml - sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentReconnect.qml + + sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentRecirculate.qml + sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentReconnect.qml - - sources/gui/qml/pages/postTreatment/end/PostTreatmentEnd.qml - sources/gui/qml/pages/postTreatment/end/PostTreatmentEndPause.qml + + sources/gui/qml/pages/endtreatment/end/EndTreatmentEnd.qml + sources/gui/qml/pages/endtreatment/end/EndTreatmentEndPause.qml Index: en_US.udic =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r88563177f10f20ced98750b2e40036201728131d --- en_US.udic (.../en_US.udic) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ en_US.udic (.../en_US.udic) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -39,3 +39,14 @@ Acknow Gui MSettings +MPost +mL +IU +UFVolume +UFRate +Eq +Req +METATYPE +VPre +VPost +MPre Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r583d1953c783940c93f22c37b23daadb1ff3a09c -r88563177f10f20ced98750b2e40036201728131d --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 583d1953c783940c93f22c37b23daadb1ff3a09c) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -218,6 +218,8 @@ actionTransmit(vActionId, vData); } +// ---------------------------------------------------------------------------------------------------- + /*! * \brief MessageDispatcher::onAdjustment * \details This method transmits the Blood/Dialysate Adjustment Denali message. @@ -588,6 +590,47 @@ } /*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Patient Disconnection Confirm Adjustment Denali message. + * \param vData - Data model contains Patient Disconnection Confirm adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustPatientDisconnectionConfirmRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustPatientDisconnectionConfirmReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Disposables Removal Confirm Adjustment Denali message. + * \param vData - Data model contains Disposables Removal Confirm adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustDisposablesRemovalConfirmRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustDisposablesRemovalConfirmReq, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the Treatment Log Adjustment Denali message. + * \param vData - Data model contains Treatment Log adjustment. + * \return void + */ +void MessageDispatcher::onAdjustment(const AdjustTreatmentLogRequestData &vData) +{ + Q_UNUSED(vData) + QVariantList mData; + onActionTransmit(GuiActionType::ID_AdjustTreatmentLogReq, 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 -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r88563177f10f20ced98750b2e40036201728131d --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -107,34 +107,38 @@ QList _needsAcknow { // Alarm - GuiActionType::ID_AlarmUserActionReq , - GuiActionType::ID_AlarmSilenceReq , - GuiActionType::ID_AlarmClearedConditionReq , + 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_AdjustPatientConnectionBeginReq , - GuiActionType::ID_AdjustUltrafiltrationInitReq , - GuiActionType::ID_AdjustPatientConnectionConfirmReq , - GuiActionType::ID_AdjustStartTreatmentReq , + GuiActionType::ID_AdjustInitTreatmentReq , + GuiActionType::ID_AdjustWaterSampleReq , + GuiActionType::ID_AdjustWaterSampleResultReq , + GuiActionType::ID_AdjustConsumablesConfirmReq , + GuiActionType::ID_AdjustDisposablesConfirmReq , + GuiActionType::ID_AdjustDisposablesPrimeReq , + GuiActionType::ID_AdjustPatientConnectionBeginReq , + GuiActionType::ID_AdjustUltrafiltrationInitReq , + GuiActionType::ID_AdjustPatientConnectionConfirmReq , + GuiActionType::ID_AdjustStartTreatmentReq , // In-Treatment - GuiActionType::ID_AdjustBloodDialysateReq , - GuiActionType::ID_AdjustDurationReq , - GuiActionType::ID_AdjustUltrafiltrationStateReq , - GuiActionType::ID_AdjustUltrafiltrationEditReq , - GuiActionType::ID_AdjustUltrafiltrationConfirmReq , - GuiActionType::ID_AdjustSalineReq , - GuiActionType::ID_AdjustHeparinReq , - GuiActionType::ID_AdjustPressuresLimitsReq , + GuiActionType::ID_AdjustBloodDialysateReq , + GuiActionType::ID_AdjustDurationReq , + GuiActionType::ID_AdjustUltrafiltrationStateReq , + GuiActionType::ID_AdjustUltrafiltrationEditReq , + GuiActionType::ID_AdjustUltrafiltrationConfirmReq , + GuiActionType::ID_AdjustSalineReq , + GuiActionType::ID_AdjustHeparinReq , + GuiActionType::ID_AdjustPressuresLimitsReq , + // End-Treatment + GuiActionType::ID_AdjustRinsebackReq , + GuiActionType::ID_AdjustRecirculateReq , + GuiActionType::ID_AdjustTreatmentEndReq , + GuiActionType::ID_AdjustVersionsReq , // Post-Treatment - GuiActionType::ID_AdjustRinsebackReq , - GuiActionType::ID_AdjustRecirculateReq , - GuiActionType::ID_AdjustTreatmentEndReq , - GuiActionType::ID_AdjustVersionsReq , + GuiActionType::ID_AdjustPatientDisconnectionConfirmReq , + GuiActionType::ID_AdjustDisposablesRemovalConfirmReq , + GuiActionType::ID_AdjustTreatmentLogReq , }; public slots: Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r583d1953c783940c93f22c37b23daadb1ff3a09c -r88563177f10f20ced98750b2e40036201728131d --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 583d1953c783940c93f22c37b23daadb1ff3a09c) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -44,150 +44,162 @@ */ const QHash payloadLen { // ---- - {Gui::GuiActionType::ID_PowerOff , 1 }, - {Gui::GuiActionType::ID_ShuttingDown , 0 }, - {Gui::GuiActionType::ID_KeepAlive , 255 }, // 0 => 255 to be able to run a multi-frame test. + {Gui::GuiActionType::ID_PowerOff , 1 }, + {Gui::GuiActionType::ID_ShuttingDown , 0 }, + {Gui::GuiActionType::ID_KeepAlive , 255 }, // 0 => 255 to be able to run a multi-frame test. // ----- - {Gui::GuiActionType::ID_TreatmentTime , 3 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_BloodFlow , 8 * 4 }, // 8 parameters each 4bytes - {Gui::GuiActionType::ID_DialysateInletFlow , 8 * 4 }, // 8 parameters each 4bytes - {Gui::GuiActionType::ID_DialysateOutletFlow , 7 * 4 }, // 7 parameters each 4bytes - {Gui::GuiActionType::ID_PressureOcclusion , 5 * 4 }, // 5 parameters each 4bytes - {Gui::GuiActionType::ID_Saline , 3 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_Heparin , 1 * 4 }, // 1 parameters each 4bytes - {Gui::GuiActionType::ID_Rinseback , 5 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_Recirculate , 2 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_BloodPrime , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_HDAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_TreatmentTime , 3 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_BloodFlow , 8 * 4 }, // 8 parameters each 4bytes + {Gui::GuiActionType::ID_DialysateInletFlow , 8 * 4 }, // 8 parameters each 4bytes + {Gui::GuiActionType::ID_DialysateOutletFlow , 7 * 4 }, // 7 parameters each 4bytes + {Gui::GuiActionType::ID_PressureOcclusion , 5 * 4 }, // 5 parameters each 4bytes + {Gui::GuiActionType::ID_Saline , 3 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_Heparin , 1 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_Rinseback , 5 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_Recirculate , 2 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_BloodPrime , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_HDAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_HDOperationModeData , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_PreTreatmentStates , 9 * 4 }, // 9 parameters each 4bytes - {Gui::GuiActionType::ID_TreatmentStates , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_HDOperationModeData , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_PreTreatmentStates , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_TreatmentStates , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_TreatmentStates , 1 * 4 }, // 1 parameter each 4bytes // ---- - {Gui::GuiActionType::ID_DGROPumpData , 4 * 4 }, // 4 parameters each 4bytes - {Gui::GuiActionType::ID_DGPressuresData , 4 * 4 }, // 4 parameters each 4bytes - {Gui::GuiActionType::ID_DGDrainPumpData , 4 * 4 }, // 4 parameters each 4bytes - {Gui::GuiActionType::ID_DGOperationModeData , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_DGReservoirData , 3 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_DGValvesStatesData , 1 * 2 }, // 1 parameters each 2bytes - {Gui::GuiActionType::ID_DGHeatersData , 3 * 4 }, // 3 parameters each 4bytes - {Gui::GuiActionType::ID_DGLoadCellReadingsData , 4 * 4 }, // 4 parameters each 4bytes - {Gui::GuiActionType::ID_DGTemperaturesData , 12 * 4 }, // 12 parameters each 4bytes - {Gui::GuiActionType::ID_DGAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_DGROPumpData , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_DGPressuresData , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_DGDrainPumpData , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_DGOperationModeData , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_DGReservoirData , 3 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_DGValvesStatesData , 1 * 2 }, // 1 parameters each 2bytes + {Gui::GuiActionType::ID_DGHeatersData , 3 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_DGLoadCellReadingsData , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_DGTemperaturesData , 12 * 4 }, // 12 parameters each 4bytes + {Gui::GuiActionType::ID_DGAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AlarmStatus , 4 * 4 + 2 }, // 4 parameters each 4bytes + 1 parameter 2bytes - {Gui::GuiActionType::ID_AlarmTriggered , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AlarmCleared , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AlarmClearedConditionReq , 1 * 4 }, // 1 parameter each 4bytes // the same message 63:0x3F00 - {Gui::GuiActionType::ID_AlarmClearedConditionRsp , 1 * 4 }, // 1 parameter each 4bytes // the same message 63:0x3F00 - {Gui::GuiActionType::ID_AlarmSilenceReq , 1 * 1 }, // 1 parameter each 1bytes - {Gui::GuiActionType::ID_AlarmUserActionReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AlarmStatus , 4 * 4 + 2 }, // 4 parameters each 4bytes + 1 parameter 2bytes + {Gui::GuiActionType::ID_AlarmTriggered , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AlarmCleared , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AlarmClearedConditionReq , 1 * 4 }, // 1 parameter each 4bytes // the same message 63:0x3F00 + {Gui::GuiActionType::ID_AlarmClearedConditionRsp , 1 * 4 }, // 1 parameter each 4bytes // the same message 63:0x3F00 + {Gui::GuiActionType::ID_AlarmSilenceReq , 1 * 1 }, // 1 parameter each 1bytes + {Gui::GuiActionType::ID_AlarmUserActionReq , 1 * 4 }, // 1 parameter each 4bytes // ---- - {Gui::GuiActionType::ID_TreatmentRanges , 6 * 4 }, // 6 parameters each 4bytes + {Gui::GuiActionType::ID_TreatmentRanges , 6 * 4 }, // 6 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustBloodDialysateReq , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustBloodDialysateRsp , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustBloodDialysateReq , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustBloodDialysateRsp , 4 * 4 }, // 4 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustDurationReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustDurationRsp , 4 * 4 }, // 4 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustDurationReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustDurationRsp , 4 * 4 }, // 4 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp , 3 * 4 }, // 3 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationStateReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationStateRsp , 3 * 4 }, // 3 parameter each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp , 8 * 4 }, // 8 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationEditReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp , 8 * 4 }, // 8 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmReq , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp , 5 * 4 }, + {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmReq , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp , 5 * 4 }, // ---- - {Gui::GuiActionType::ID_AdjustPressuresLimitsReq , 4 * 4 }, // 4 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustPressuresLimitsRsp , 6 * 4 }, // 6 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustPressuresLimitsReq , 4 * 4 }, // 4 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustPressuresLimitsRsp , 6 * 4 }, // 6 parameters each 4bytes // 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 + {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 + {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 + {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 + {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 + {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 + {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 + {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 + {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 Patient Connection Begin - {Gui::GuiActionType::ID_AdjustPatientConnectionBeginReq , 0 * 4 }, // 0 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustPatientConnectionBeginRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustPatientConnectionBeginReq , 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustPatientConnectionBeginRsp , 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 + {Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustUltrafiltrationInitRsp , 3 * 4 }, // 3 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 + {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 + {Gui::GuiActionType::ID_AdjustStartTreatmentReq , 0 * 4 }, // 1 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustStartTreatmentRsp , 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 + {Gui::GuiActionType::ID_AdjustSalineReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustSalineRsp , 3 * 4 }, // 3 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_AdjustHeparinReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustHeparinRsp , 2 * 4 }, // 3 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustHeparinReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustHeparinRsp , 2 * 4 }, // 3 parameters each 4bytes // ---- Rinseback - {Gui::GuiActionType::ID_AdjustRinsebackReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustRinsebackRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustRinsebackReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustRinsebackRsp , 2 * 4 }, // 2 parameters each 4bytes // ---- Recirculate - {Gui::GuiActionType::ID_AdjustRecirculateReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustRecirculateRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustRecirculateReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustRecirculateRsp , 2 * 4 }, // 2 parameters each 4bytes // ---- Treatment End - {Gui::GuiActionType::ID_AdjustTreatmentEndReq , 1 * 4 }, // 1 parameter each 4bytes - {Gui::GuiActionType::ID_AdjustTreatmentEndRsp , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustTreatmentEndReq , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustTreatmentEndRsp , 2 * 4 }, // 2 parameters each 4bytes + // ---- Post-Treatment + // ---- Patient Disconnect + {Gui::GuiActionType::ID_AdjustPatientDisconnectionConfirmReq , 0 * 4 }, // 0 parameter each 4bytes + + // ---- Disposables Removal + {Gui::GuiActionType::ID_AdjustDisposablesRemovalConfirmReq , 0 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustDisposableRemovalConfirmRsp , 2 * 4 }, // 1 parameter each 4bytes + + // ---- Treatment Log + {Gui::GuiActionType::ID_AdjustTreatmentLogReq , 0 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustTreatmentLogRsp , 35 * 4 }, //35 parameter each 4bytes + // ---- Versions - {Gui::GuiActionType::ID_AdjustVersionsReq , 0 * 4 }, // 0 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustHDVersionsRsp , 9 }, // 9 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustDGVersionsRsp , 9 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustVersionsReq , 0 * 4 }, // 0 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustHDVersionsRsp , 9 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustDGVersionsRsp , 9 }, // 9 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_CANBusFaultCount , 1 }, - {Gui::GuiActionType::ID_RawData , 255 }, - {Gui::GuiActionType::ID_Acknow , 0 }, - {Gui::GuiActionType::ID_AcknowGeneric , 1 }, + {Gui::GuiActionType::ID_CANBusFaultCount , 1 }, + {Gui::GuiActionType::ID_RawData , 255 }, + {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 -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r88563177f10f20ced98750b2e40036201728131d --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -231,40 +231,44 @@ LOG_EVENT(mSenderID + QString("RawData")); break; - case Gui::GuiActionType::ID_PowerOff : INTERPRET_TRANSMIT_MESSAGE(AdjustPowerOffRequestData ); break; - case Gui::GuiActionType::ID_AdjustVersionsReq : INTERPRET_TRSMT_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; + // 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_TRSMT_MT_MESSAGE(AdjustConsumablesConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustDisposablesConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustDisposablesConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustDisposablesPrimeReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustDisposablesPrimeRequestData ); break; + case Gui::GuiActionType::ID_AdjustPatientConnectionBeginReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustPatientConnectionBeginRequestData ); break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationInitRequestData ); break; + case Gui::GuiActionType::ID_AdjustPatientConnectionConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustPatientConnectionConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustStartTreatmentReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustStartTreatmentRequestData ); break; // in-treatment - 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; + 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_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; + 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; + // End-Treatment + 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; // Post-Treatment - 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_TRSMT_MT_MESSAGE(AdjustConsumablesConfirmRequestData ); break; - case Gui::GuiActionType::ID_AdjustDisposablesConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustDisposablesConfirmRequestData ); break; - case Gui::GuiActionType::ID_AdjustDisposablesPrimeReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustDisposablesPrimeRequestData ); break; - case Gui::GuiActionType::ID_AdjustPatientConnectionBeginReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustPatientConnectionBeginRequestData ); break; - case Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq : INTERPRET_TRANSMIT_MESSAGE(AdjustUltrafiltrationInitRequestData ); break; - case Gui::GuiActionType::ID_AdjustPatientConnectionConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustPatientConnectionConfirmRequestData ); break; - case Gui::GuiActionType::ID_AdjustStartTreatmentReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustStartTreatmentRequestData ); break; + case Gui::GuiActionType::ID_AdjustPatientDisconnectionConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustPatientDisconnectionConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustDisposablesRemovalConfirmReq : INTERPRET_TRSMT_MT_MESSAGE(AdjustDisposablesRemovalConfirmRequestData ); break; + case Gui::GuiActionType::ID_AdjustTreatmentLogRsp : INTERPRET_TRSMT_MT_MESSAGE(AdjustTreatmentLogRequestData ); break; // alarms - case Gui::GuiActionType::ID_AlarmSilenceReq : INTERPRET_TRANSMIT_MESSAGE(AlarmSilenceRequestData ); break; - case Gui::GuiActionType::ID_AlarmUserActionReq : INTERPRET_TRANSMIT_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_TRANSMIT_MESSAGE(AlarmClearedConditionRequestData ); break; + case Gui::GuiActionType::ID_AlarmClearedConditionReq : INTERPRET_TRANSMIT_MESSAGE(AlarmClearedConditionRequestData ); break; // coco end default: QString mActionIdHexString = Format::toHexString(vActionId); @@ -327,30 +331,30 @@ vData.clear(); switch (vMessage.actionId) { // notice we are in receive mode // ----- Debug - case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); break; // TODO : implement notify<>() - case Gui::GuiActionType::ID_HDDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDDebugText ); break; + case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_HDDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDDebugText ); break; - case Gui::GuiActionType::ID_HDOperationModeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDOperationModeData ); break; - case Gui::GuiActionType::ID_PreTreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PreTreatmentStates ); break; - case Gui::GuiActionType::ID_TreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentStates ); 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<>() + // ----- States + case Gui::GuiActionType::ID_HDOperationModeData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDOperationModeData ); break; + case Gui::GuiActionType::ID_PreTreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PreTreatmentStates ); break; + case Gui::GuiActionType::ID_TreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentStates ); break; + case Gui::GuiActionType::ID_PostTreatmentStates : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PostTreatmentStates ); break; + // ----- Datum - case Gui::GuiActionType::ID_TreatmentTime : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentTime ); break; - case Gui::GuiActionType::ID_BloodFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_BloodFlow ); break; - case Gui::GuiActionType::ID_DialysateInletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateInletFlow ); break; - case Gui::GuiActionType::ID_DialysateOutletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateOutletFlow ); break; - case Gui::GuiActionType::ID_TreatmentRanges : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentRanges ); break; - case Gui::GuiActionType::ID_PressureOcclusion : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PressureOcclusion ); break; - case Gui::GuiActionType::ID_Saline : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Saline ); break; - case Gui::GuiActionType::ID_Heparin : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Heparin ); break; - case Gui::GuiActionType::ID_Rinseback : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Rinseback ); break; - 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; + case Gui::GuiActionType::ID_HDAccelerometerData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDAccelerometerData ); break; + + // ----- Datum - Treatment + case Gui::GuiActionType::ID_TreatmentRanges : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentRanges ); 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; + 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; @@ -361,33 +365,43 @@ 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<>() + // ----- In-Treatment - Datum + case Gui::GuiActionType::ID_TreatmentTime : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TreatmentTime ); break; + case Gui::GuiActionType::ID_BloodFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_BloodFlow ); break; + case Gui::GuiActionType::ID_DialysateInletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateInletFlow ); break; + case Gui::GuiActionType::ID_DialysateOutletFlow : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DialysateOutletFlow ); break; + case Gui::GuiActionType::ID_PressureOcclusion : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PressureOcclusion ); break; + case Gui::GuiActionType::ID_Saline : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Saline ); break; + case Gui::GuiActionType::ID_Heparin : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Heparin ); break; + case Gui::GuiActionType::ID_Rinseback : ok = notify(vMessage, vData, Gui::GuiActionType::ID_Rinseback ); break; + 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; + // ----- In-Treatment Adjust + 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_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; - // 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_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; + // ----- In-Treatment Adjust + case Gui::GuiActionType::ID_AdjustDisposableRemovalConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustDisposableRemovalConfirmRsp ); break; + case Gui::GuiActionType::ID_AdjustTreatmentLogRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustTreatmentLogRsp ); 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_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); break; // TODO : implement notify<>() - // 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; - case Gui::GuiActionType::ID_AlarmCleared : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmCleared ); 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; + case Gui::GuiActionType::ID_AlarmCleared : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmCleared ); 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_AlarmClearedConditionRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmClearedConditionRsp ); break; + case Gui::GuiActionType::ID_AlarmClearedConditionRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmClearedConditionRsp ); break; // coco end // unhandles messages: these will only be logged as received message Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -32,6 +32,7 @@ #include "VHDOperationModeData.h" #include "VPreTreatmentStatesData.h" #include "VHDTreatmentStatesData.h" +#include "VPostTreatmentStatesData.h" // Pre-treatment #include "VPreTreatmentAdjustmentInitTreatment.h" #include "VDGFilterFlushData.h" @@ -83,6 +84,10 @@ #include "VTreatmentAdjustmentRinseback.h" #include "VTreatmentAdjustmentRecirculate.h" #include "VTreatmentAdjustmentPressuresLimits.h" +// ----- Post-Treatment Adjustments +#include "VPostTreatmentAdjustPatientDisconnectionConfirm.h" +#include "VPostTreatmentAdjustDisposablesRemovalConfirm.h" +#include "VPostTreatmentAdjustTreatmentLog.h" // ----- #include "VTreatmentAdjustmentEnd.h" #include "VTreatmentAdjustmentVersions.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r94fc1cd187816ecbf176df26f9dc5601bf379f13 -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -61,142 +61,157 @@ */ enum GuiActionsType_Enum /* : quint16 QML doesn't support enum types */ { - ID_Unknown = 0x0000, - ID_CANBusFaultCount = 0x9909, + ID_Unknown = 0x0000, + ID_CANBusFaultCount = 0x9909, - ID_RawData = 0xFFFE, + ID_RawData = 0xFFFE, - ID_Acknow = 0xFFFF, - ID_AcknowGeneric = 0x0000, //< Generic Acknowledgment is not a unique message ID and inherits its Id from the actual message. Zero is a placeholder + ID_Acknow = 0xFFFF, + ID_AcknowGeneric = 0x0000, //< Generic Acknowledgment is not a unique message ID and inherits its Id from the actual message. Zero is a placeholder - ID_HDDebugText = 0xF1FF, - ID_DGDebugText = 0xF2FF, + ID_HDDebugText = 0xF1FF, + ID_DGDebugText = 0xF2FF, - ID_DGCheckIn = 0x0600, - ID_KeepAlive = 0x0700, + ID_DGCheckIn = 0x0600, + ID_KeepAlive = 0x0700, - // HD Data Messages - ID_HDOperationModeData = 0x2500, // 37 - ID_PreTreatmentStates = 0x5C00, // 92 - ID_TreatmentStates = 0x0F00, // 15 + // HD State Messages + ID_HDOperationModeData = 0x2500, // 37 + ID_PreTreatmentStates = 0x5C00, // 92 + ID_TreatmentStates = 0x0F00, // 15 + ID_PostTreatmentStates = 0x7700, // 119 - ID_PowerOff = 0x0100, - ID_ShuttingDown = 0x0E00, - ID_TreatmentTime = 0x0D00, - ID_BloodFlow = 0x0500, - ID_DialysateInletFlow = 0x0800, - ID_DialysateOutletFlow = 0x0B00, - ID_TreatmentRanges = 0x1A00, // 26 - ID_PressureOcclusion = 0x0900, - ID_Saline = 0x2F00, // 47 - ID_Heparin = 0x4D00, // 77 - ID_Rinseback = 0x5600, // 86 - ID_Recirculate = 0x5A00, // 90 - ID_BloodPrime = 0x5900, // 89 - ID_HDAccelerometerData = 0x3300, // 51 + ID_PowerOff = 0x0100, + ID_ShuttingDown = 0x0E00, + ID_TreatmentTime = 0x0D00, + ID_BloodFlow = 0x0500, + ID_DialysateInletFlow = 0x0800, + ID_DialysateOutletFlow = 0x0B00, + ID_TreatmentRanges = 0x1A00, // 26 + ID_PressureOcclusion = 0x0900, + ID_Saline = 0x2F00, // 47 + ID_Heparin = 0x4D00, // 77 + ID_Rinseback = 0x5600, // 86 + ID_Recirculate = 0x5A00, // 90 + ID_BloodPrime = 0x5900, // 89 + ID_HDAccelerometerData = 0x3300, // 51 // Alarm Messages - ID_AlarmStatus = 0x0200, - ID_AlarmTriggered = 0x0300, - ID_AlarmCleared = 0x0400, - ID_AlarmClearedConditionReq = 0x3F00, // 63 // the same code is used for every unit to send and receive over the CANBus - ID_AlarmClearedConditionRsp = 0x3F00, // 63 // the same code is used for every unit to send and receive over the CANBus - 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 + ID_AlarmStatus = 0x0200, + ID_AlarmTriggered = 0x0300, + ID_AlarmCleared = 0x0400, + ID_AlarmClearedConditionReq = 0x3F00, // 63 // the same code is used for every unit to send and receive over the CANBus + ID_AlarmClearedConditionRsp = 0x3F00, // 63 // the same code is used for every unit to send and receive over the CANBus + 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 // Pre-Treatment Initiate Treatment - ID_AdjustInitTreatmentReq = 0x3800, // 56 - ID_AdjustInitTreatmentRsp = 0x3900, // 57 + 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 + 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 specific response message for this request and changing of the state in Pre_Treatment_States is used as the response + ID_DGFilterFlushData = 0x6000, // 96 + ID_AdjustWaterSampleReq = 0x5D00, // 93 + ID_AdjustWaterSampleRsp = 0x5E00, // 94 + ID_AdjustWaterSampleResultReq = 0x5F00, // 95 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment Consumables Installation Confirm - ID_AdjustConsumablesConfirmReq = 0x6800, // 104 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response + ID_AdjustConsumablesConfirmReq = 0x6800, // 104 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment SelfTest NoCartridge Progress Data - ID_SelfTestNoCartridgeData = 0x6100, // 97 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response + ID_SelfTestNoCartridgeData = 0x6100, // 97 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment Disposables Installation Confirm - ID_AdjustDisposablesConfirmReq = 0x6200, // 98 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response + ID_AdjustDisposablesConfirmReq = 0x6200, // 98 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment SelfTest Dry Progress Data - ID_SelfTestDryData = 0x6300, // 99 + ID_SelfTestDryData = 0x6300, // 99 // Pre-Treatment Disposable Priming - ID_AdjustDisposablesPrimeReq = 0x3C00, // 60 - ID_AdjustDisposablesPrimeRsp = 0x3D00, // 61 - ID_DisposablesPrimeData = 0x4300, // 67 + ID_AdjustDisposablesPrimeReq = 0x3C00, // 60 + ID_AdjustDisposablesPrimeRsp = 0x3D00, // 61 + ID_DisposablesPrimeData = 0x4300, // 67 // Pre-Treatment Patient Connection Begin - ID_AdjustPatientConnectionBeginReq = 0x6400, // 100 - ID_AdjustPatientConnectionBeginRsp = 0x6500, // 101 + ID_AdjustPatientConnectionBeginReq = 0x6400, // 100 + ID_AdjustPatientConnectionBeginRsp = 0x6500, // 101 // Pre-Treatment Ultrafiltration initial volume - ID_AdjustUltrafiltrationInitReq = 0x4F00, // 79 - ID_AdjustUltrafiltrationInitRsp = 0x5000, // 80 + ID_AdjustUltrafiltrationInitReq = 0x4F00, // 79 + ID_AdjustUltrafiltrationInitRsp = 0x5000, // 80 // Pre-Treatment Patient Connection Confirm - ID_AdjustPatientConnectionConfirmReq= 0x6600, // 102 - ID_AdjustPatientConnectionConfirmRsp= 0x6700, // 103 + ID_AdjustPatientConnectionConfirmReq = 0x6600, // 102 + ID_AdjustPatientConnectionConfirmRsp = 0x6700, // 103 // Pre-Treatment Start Treatment - ID_AdjustStartTreatmentReq = 0x7100, // 113 - ID_AdjustStartTreatmentRsp = 0x7200, // 114 + ID_AdjustStartTreatmentReq = 0x7100, // 113 + ID_AdjustStartTreatmentRsp = 0x7200, // 114 // DG Data Messages - ID_DGROPumpData = 0x1F00, // 31 - ID_DGPressuresData = 0x2000, // 32 - ID_DGDrainPumpData = 0x2400, // 36 - ID_DGOperationModeData = 0x2700, // 39 - ID_DGReservoirData = 0x2800, // 40 - ID_DGValvesStatesData = 0x2A00, // 42 - ID_DGHeatersData = 0x2C00, // 44 - ID_DGLoadCellReadingsData = 0x0C00, // 12 - ID_DGTemperaturesData = 0x2D00, // 45 - ID_DGAccelerometerData = 0x3400, // 52 + ID_DGROPumpData = 0x1F00, // 31 + ID_DGPressuresData = 0x2000, // 32 + ID_DGDrainPumpData = 0x2400, // 36 + ID_DGOperationModeData = 0x2700, // 39 + ID_DGReservoirData = 0x2800, // 40 + ID_DGValvesStatesData = 0x2A00, // 42 + ID_DGHeatersData = 0x2C00, // 44 + ID_DGLoadCellReadingsData = 0x0C00, // 12 + ID_DGTemperaturesData = 0x2D00, // 45 + ID_DGAccelerometerData = 0x3400, // 52 // In-Treatment Adjustables - ID_AdjustDurationReq = 0x1600, // 22 - ID_AdjustDurationRsp = 0x1B00, // 27 + ID_AdjustDurationReq = 0x1600, // 22 + ID_AdjustDurationRsp = 0x1B00, // 27 - ID_AdjustBloodDialysateReq = 0x1700, // 23 - ID_AdjustBloodDialysateRsp = 0x1800, // 24 + ID_AdjustBloodDialysateReq = 0x1700, // 23 + ID_AdjustBloodDialysateRsp = 0x1800, // 24 - ID_AdjustPressuresLimitsReq = 0x4600, // 70 - ID_AdjustPressuresLimitsRsp = 0x4700, // 71 + ID_AdjustPressuresLimitsReq = 0x4600, // 70 + ID_AdjustPressuresLimitsRsp = 0x4700, // 71 - ID_AdjustSalineReq = 0x1200, // 18 - ID_AdjustSalineRsp = 0x1400, // 20 + ID_AdjustSalineReq = 0x1200, // 18 + ID_AdjustSalineRsp = 0x1400, // 20 - ID_AdjustHeparinReq = 0x4B00, // 75 - ID_AdjustHeparinRsp = 0x4C00, // 76 + ID_AdjustHeparinReq = 0x4B00, // 75 + ID_AdjustHeparinRsp = 0x4C00, // 76 // Ultrafiltration - ID_AdjustUltrafiltrationStateReq = 0x1000, // 16 - ID_AdjustUltrafiltrationStateRsp = 0x4100, // 65 + ID_AdjustUltrafiltrationStateReq = 0x1000, // 16 + ID_AdjustUltrafiltrationStateRsp = 0x4100, // 65 - ID_AdjustUltrafiltrationEditReq = 0x1100, // 17 - ID_AdjustUltrafiltrationEditRsp = 0x1300, // 19 + ID_AdjustUltrafiltrationEditReq = 0x1100, // 17 + ID_AdjustUltrafiltrationEditRsp = 0x1300, // 19 - ID_AdjustUltrafiltrationConfirmReq = 0x1500, // 21 - ID_AdjustUltrafiltrationConfirmRsp = 0x2E00, // 46 + ID_AdjustUltrafiltrationConfirmReq = 0x1500, // 21 + ID_AdjustUltrafiltrationConfirmRsp = 0x2E00, // 46 - // post-treatment + // End-Treatment // Rinseback - ID_AdjustRinsebackReq = 0x5200, // 82 - ID_AdjustRinsebackRsp = 0x5300, // 83 + ID_AdjustRinsebackReq = 0x5200, // 82 + ID_AdjustRinsebackRsp = 0x5300, // 83 // Recirculate - ID_AdjustRecirculateReq = 0x5400, // 84 - ID_AdjustRecirculateRsp = 0x5500, // 85 + ID_AdjustRecirculateReq = 0x5400, // 84 + ID_AdjustRecirculateRsp = 0x5500, // 85 // Treatment End - ID_AdjustTreatmentEndReq = 0x5700, // 87 - ID_AdjustTreatmentEndRsp = 0x5800, // 88 + ID_AdjustTreatmentEndReq = 0x5700, // 87 + ID_AdjustTreatmentEndRsp = 0x5800, // 88 - // independent bidirectional - ID_AdjustVersionsReq = 0x1C00, // 28 - ID_AdjustHDVersionsRsp = 0x1D00, // 29 - ID_AdjustDGVersionsRsp = 0x1E00, // 30 + // Post-Treatment + // Patient Disconnect + ID_AdjustPatientDisconnectionConfirmReq = 0x4A00, // 74 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response + + // Disposables Removal + ID_AdjustDisposablesRemovalConfirmReq = 0x7300, // 115 + ID_AdjustDisposableRemovalConfirmRsp = 0x7400, // 116 + + // Treatment Log + ID_AdjustTreatmentLogReq = 0x7500, // 117 + ID_AdjustTreatmentLogRsp = 0x7600, // 118 + + // Independent Bidirectional + ID_AdjustVersionsReq = 0x1C00, // 28 + ID_AdjustHDVersionsRsp = 0x1D00, // 29 + ID_AdjustDGVersionsRsp = 0x1E00, // 30 + + }; enum class GuiActionsData_Enum /*: quint8 QML doesn't support*/ { @@ -271,62 +286,65 @@ }; // to be able to use the enum as signal/slot parameter - typedef GuiActions::GuiActionsType_Enum GuiActionType; - typedef GuiActions::GuiActionsData_Enum GuiActionData; + typedef GuiActions::GuiActionsType_Enum GuiActionType; + typedef GuiActions::GuiActionsData_Enum GuiActionData; - typedef GuiActions::Alarm_Priorities GuiAlarmPriority; - typedef GuiActions::Alarm_List GuiAlarmID; - typedef GuiActions::Alarm_State_Flag_Bit_Positions GuiAlarmFlags; - typedef GuiActions::Alarm_User_Actions GuiAlarmUserActions; + typedef GuiActions::Alarm_Priorities GuiAlarmPriority; + typedef GuiActions::Alarm_List GuiAlarmID; + typedef GuiActions::Alarm_State_Flag_Bit_Positions GuiAlarmFlags; + typedef GuiActions::Alarm_User_Actions GuiAlarmUserActions; - typedef GuiActions::Request_Reject_Reasons GuiRequestReasons; + typedef GuiActions::Request_Reject_Reasons GuiRequestReasons; // operation mode - typedef GuiActions::HD_Op_Modes GuiHDOpModes; - typedef GuiActions::DG_Op_Modes GuiDGOpModes; + typedef GuiActions::HD_Op_Modes GuiHDOpModes; + typedef GuiActions::DG_Op_Modes GuiDGOpModes; // Treatment States - typedef GuiActions::Treatment_States GuiTreatmentStates; + typedef GuiActions::Treatment_States GuiTreatmentStates; // Ultrafiltration - typedef GuiActions::UF_States GuiUFStates; - typedef GuiActions::UF_Commands GuiUFCommands; - typedef GuiActions::UF_Adjustments GuiUFAdjustment; + typedef GuiActions::UF_States GuiUFStates; + typedef GuiActions::UF_Commands GuiUFCommands; + typedef GuiActions::UF_Adjustments GuiUFAdjustment; // Saline - typedef GuiActions::Saline_Bolus_States GuiSalineStates; - typedef GuiActions::Saline_Commands GuiSalineCommands; + typedef GuiActions::Saline_Bolus_States GuiSalineStates; + typedef GuiActions::Saline_Commands GuiSalineCommands; // Heparin - typedef GuiActions::Heparin_States GuiHeparinStates; - typedef GuiActions::Heparin_Commands GuiHeparinCommands; + typedef GuiActions::Heparin_States GuiHeparinStates; + typedef GuiActions::Heparin_Commands GuiHeparinCommands; // Rinseback - typedef GuiActions::Rinseback_States GuiRinsebackStates; - typedef GuiActions::Requested_Rinseback_User_Actions GuiRinsebackCommands; + typedef GuiActions::Rinseback_States GuiRinsebackStates; + typedef GuiActions::Requested_Rinseback_User_Actions GuiRinsebackCommands; // Recirculate - typedef GuiActions::Treatment_Recirc_States GuiRecirculateStates; - typedef GuiActions::Requested_Treatment_Recirc_User_Actions GuiRecirculateCommands; + typedef GuiActions::Treatment_Recirc_States GuiRecirculateStates; + typedef GuiActions::Requested_Treatment_Recirc_User_Actions GuiRecirculateCommands; // Blood Prime - typedef GuiActions::Blood_Prime_States GuiBloodPrimeStates; -// typedef GuiActions::Requested_Blood_Prime_User_Actions GuiBloodPrimeCommands; // No user Action defined + typedef GuiActions::Blood_Prime_States GuiBloodPrimeStates; +// typedef GuiActions::Requested_Blood_Prime_User_Actions GuiBloodPrimeCommands; // No user Action defined // Treatment End - typedef GuiActions::Treatment_End_States GuiTreatmentEndStates; - typedef GuiActions::Requested_Treatment_End_User_Actions GuiTreatmentEndCommands; + typedef GuiActions::Treatment_End_States GuiTreatmentEndStates; + typedef GuiActions::Requested_Treatment_End_User_Actions GuiTreatmentEndCommands; // Treatment Stop - typedef GuiActions::Treatment_Stop_States GuiTreatmentStopStates; -// typedef GuiActions::Requested_Treatment_Stop_User_Actions GuiTreatmentStopCommands; // No user Action defined + typedef GuiActions::Treatment_Stop_States GuiTreatmentStopStates; +// typedef GuiActions::Requested_Treatment_Stop_User_Actions GuiTreatmentStopCommands; // No user Action defined // Pre-Treatment SubMode - typedef GuiActions::HD_Pre_Treatment_Mode_States GuiPreTreatmentStates; + typedef GuiActions::HD_Pre_Treatment_Mode_States GuiPreTreatmentStates; // Pre-Treatment Water Sample - typedef GuiActions::HD_Pre_Treatment_Sample_Water_States GuiPreTreatmentWaterSampleStates; - typedef GuiActions::Requested_Sample_Water_User_Actions GuiPreTreatmentWaterSampleCommands; + typedef GuiActions::HD_Pre_Treatment_Sample_Water_States GuiPreTreatmentWaterSampleStates; + typedef GuiActions::Requested_Sample_Water_User_Actions GuiPreTreatmentWaterSampleCommands; // Pre-Treatment Self Test Consumable typedef GuiActions::HD_Pre_Treatment_Consumable_Self_Test_States GuiPreTreatmentSelfTestConsumablesStates; // Pre-Treatment Self Test No Cartridge typedef GuiActions::HD_Pre_Treatment_No_Cart_Self_Tests_States GuiPreTreatmentSelfTestNoCartridgeStates; // Pre-Treatment Self Test Dry - typedef GuiActions::HD_Pre_Treatment_Dry_Self_Tests_States GuiPreTreatmentSelfTestDryStates; + typedef GuiActions::HD_Pre_Treatment_Dry_Self_Tests_States GuiPreTreatmentSelfTestDryStates; // Pre-Treatment Prime - typedef GuiActions::HD_Pre_Treatment_Prime_States GuiPreTreatmentPrimeStates; + typedef GuiActions::HD_Pre_Treatment_Prime_States GuiPreTreatmentPrimeStates; // Pre-Treatment Recirculate - typedef GuiActions::HD_Pre_Treatment_Recirc_States GuiPreTreatmentRecirculateStates; + typedef GuiActions::HD_Pre_Treatment_Recirc_States GuiPreTreatmentRecirculateStates; + // Post-Treatment SubMode + typedef GuiActions::HD_Post_Treatment_Mode_States GuiPostTreatmentStates; + /*! * \brief enumString * \details converts the enum index to it's code defined text Index: sources/gui/qml/components/ImageText.qml =================================================================== diff -u -rfd25d67f37410037f22be9c6e958b100e3790de9 -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/qml/components/ImageText.qml (.../ImageText.qml) (revision fd25d67f37410037f22be9c6e958b100e3790de9) +++ sources/gui/qml/components/ImageText.qml (.../ImageText.qml) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -5,7 +5,7 @@ * 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 PostTreatmentRinseback.qml + * \file ImageText.qml * \author (last) Behrouz NematiPour * \date (last) 08-Feb-2021 * \author (original) Behrouz NematiPour Index: sources/gui/qml/main.qml =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/qml/main.qml (.../main.qml) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/gui/qml/main.qml (.../main.qml) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -18,69 +18,73 @@ // Project // C++ imports -import Gui.View 0.1 -import Gui.Actions 0.1 +import Gui.View 0.1 +import Gui.Actions 0.1 -import VSettings 0.1 +import VSettings 0.1 // View classes -import VHDAccelerometer 0.1 -import VTreatmentAdjustmentVersions 0.1 +import VHDAccelerometer 0.1 +import VTreatmentAdjustmentVersions 0.1 // States views -import VHDOperationMode 0.1 -import VPreTreatmentStates 0.1 -import VHDTreatmentStates 0.1 +import VHDOperationMode 0.1 +import VPreTreatmentStates 0.1 +import VHDTreatmentStates 0.1 +import VPostTreatmentStates 0.1 // In-Treatment - Data -import VTreatmentBloodFlow 0.1 -import VTreatmentDialysateFlow 0.1 -import VTreatmentPressureOcclusion 0.1 -import VTreatmentUltrafiltration 0.1 -import VTreatmentTime 0.1 -import VTreatmentRinseback 0.1 -import VTreatmentRecirculate 0.1 -import VTreatmentBloodPrime 0.1 -import VTreatmentRanges 0.1 +import VTreatmentBloodFlow 0.1 +import VTreatmentDialysateFlow 0.1 +import VTreatmentPressureOcclusion 0.1 +import VTreatmentUltrafiltration 0.1 +import VTreatmentTime 0.1 +import VTreatmentRinseback 0.1 +import VTreatmentRecirculate 0.1 +import VTreatmentBloodPrime 0.1 +import VTreatmentRanges 0.1 // Pre-Treatment -import VPreTreatmentAdjustmentInitTreatment 0.1 -import VDGFilterFlush 0.1 -import VPreTreatmentAdjustmentWaterSample 0.1 -import VPreTreatmentAdjustmentConsumablesConfirm 0.1 -import VPreTreatmentSelfTestNoCartridge 0.1 -import VPreTreatmentAdjustmentDisposablesConfirm 0.1 -import VPreTreatmentSelfTestDry 0.1 -import VPreTreatmentAdjustmentDisposablesPrime 0.1 -import VPreTreatmentDisposablesPrime 0.1 -import VPreTreatmentAdjustmentPatientConnectionBegin 0.1 -import VPreTreatmentAdjustmentUltrafiltrationInit 0.1 -import VPreTreatmentAdjustmentPatientConnectionConfirm 0.1 -import VPreTreatmentAdjustmentStartTreatment 0.1 +import VPreTreatmentAdjustmentInitTreatment 0.1 +import VDGFilterFlush 0.1 +import VPreTreatmentAdjustmentWaterSample 0.1 +import VPreTreatmentAdjustmentConsumablesConfirm 0.1 +import VPreTreatmentSelfTestNoCartridge 0.1 +import VPreTreatmentAdjustmentDisposablesConfirm 0.1 +import VPreTreatmentSelfTestDry 0.1 +import VPreTreatmentAdjustmentDisposablesPrime 0.1 +import VPreTreatmentDisposablesPrime 0.1 +import VPreTreatmentAdjustmentPatientConnectionBegin 0.1 +import VPreTreatmentAdjustmentUltrafiltrationInit 0.1 +import VPreTreatmentAdjustmentPatientConnectionConfirm 0.1 +import VPreTreatmentAdjustmentStartTreatment 0.1 // --- -import VDGDrainPump 0.1 -import VDGHeaters 0.1 -import VDGLoadCellReadings 0.1 -import VDGOperationMode 0.1 -import VDGPressures 0.1 -import VDGROPump 0.1 -import VDGReservoir 0.1 -import VDGTemperatures 0.1 -import VDGValvesStates 0.1 -import VTreatmentCreate 0.1 -import VDGAccelerometer 0.1 +import VDGDrainPump 0.1 +import VDGHeaters 0.1 +import VDGLoadCellReadings 0.1 +import VDGOperationMode 0.1 +import VDGPressures 0.1 +import VDGROPump 0.1 +import VDGReservoir 0.1 +import VDGTemperatures 0.1 +import VDGValvesStates 0.1 +import VTreatmentCreate 0.1 +import VDGAccelerometer 0.1 // In-Treatment - Adjustemnt -import VTreatmentAdjustmentDuration 0.1 -import VTreatmentAdjustmentFlows 0.1 -import VTreatmentAdjustmentUltrafiltrationState 0.1 -import VTreatmentAdjustmentUltrafiltrationEdit 0.1 -import VTreatmentAdjustmentUltrafiltrationConfirm 0.1 -import VTreatmentAdjustmentPressuresLimits 0.1 -import VTreatmentAdjustmentSaline 0.1 -import VTreatmentAdjustmentHeparin 0.1 -import VTreatmentAdjustmentRinseback 0.1 -import VTreatmentAdjustmentRecirculate 0.1 -import VTreatmentAdjustmentEnd 0.1 +import VTreatmentAdjustmentDuration 0.1 +import VTreatmentAdjustmentFlows 0.1 +import VTreatmentAdjustmentUltrafiltrationState 0.1 +import VTreatmentAdjustmentUltrafiltrationEdit 0.1 +import VTreatmentAdjustmentUltrafiltrationConfirm 0.1 +import VTreatmentAdjustmentPressuresLimits 0.1 +import VTreatmentAdjustmentSaline 0.1 +import VTreatmentAdjustmentHeparin 0.1 +import VTreatmentAdjustmentRinseback 0.1 +import VTreatmentAdjustmentRecirculate 0.1 +import VTreatmentAdjustmentEnd 0.1 +// Post-Treatmnt +import VPostTreatmentAdjustmentPatientDisconnectionConfirm 0.1 +import VPostTreatmentAdjustmentDisposablesRemovalConfirm 0.1 +import VPostTreatmentAdjustmentTreatmentLog 0.1 - // Qml imports import "qrc:/globals" import "qrc:/pages" @@ -95,66 +99,72 @@ width : Variables.applicationWidth height: Variables.applicationHeight - VSettings { id: vSettings } + VSettings { id: vSettings } - VHDOperationMode { id: vHDOperationMode } - VPreTreatmentStates { id: vPreTreatmentStates } - VHDTreatmentStates { id: vHDTreatmentStates } + VHDOperationMode { id: vHDOperationMode } + VPreTreatmentStates { id: vPreTreatmentStates } + VHDTreatmentStates { id: vHDTreatmentStates } + VPostTreatmentStates { id: vPostTreatmentStates } - VTreatmentBloodFlow { id: vTreatmentBloodFlow } - VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } - VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } - VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } - VTreatmentTime { id: vTreatmentTime } - VTreatmentBloodPrime { id: vTreatmentBloodPrime } - VTreatmentRinseback { id: vTreatmentRinseback } - VTreatmentRecirculate { id: vTreatmentRecirculate } - VHDAccelerometer { id: vHDAccelerometer } + VTreatmentBloodFlow { id: vTreatmentBloodFlow } + VTreatmentDialysateFlow { id: vTreatmentDialysateFlow } + VTreatmentPressureOcclusion { id: vTreatmentPressureOcclusion } + VTreatmentUltrafiltration { id: vTreatmentUltrafiltration } + VTreatmentTime { id: vTreatmentTime } + VTreatmentBloodPrime { id: vTreatmentBloodPrime } + VTreatmentRinseback { id: vTreatmentRinseback } + VTreatmentRecirculate { id: vTreatmentRecirculate } + VHDAccelerometer { id: vHDAccelerometer } // ---- DG - VDGDrainPump { id: vDGDrainPump } - VDGHeaters { id: vDGHeaters } - VDGLoadCellReadings { id: vDGLoadCellReadings } - VDGOperationMode { id: vDGOperationMode } - VDGPressures { id: vDGPressures } - VDGROPump { id: vDGROPump } - VDGReservoir { id: vDGReservoir } - VDGTemperatures { id: vDGTemperatures } - VDGValvesStates { id: vDGValvesStates } - VDGAccelerometer { id: vDGAccelerometer } + VDGDrainPump { id: vDGDrainPump } + VDGHeaters { id: vDGHeaters } + VDGLoadCellReadings { id: vDGLoadCellReadings } + VDGOperationMode { id: vDGOperationMode } + VDGPressures { id: vDGPressures } + VDGROPump { id: vDGROPump } + VDGReservoir { id: vDGReservoir } + VDGTemperatures { id: vDGTemperatures } + VDGValvesStates { id: vDGValvesStates } + VDGAccelerometer { id: vDGAccelerometer } // --- Pre-Treatment Progress Data - VPreTreatmentAdjustmentInitTreatment { id: vPreTreatmentAdjustmentInitTreatment } - VDGFilterFlush { id: vDGFilterFlush } - VPreTreatmentAdjustmentWaterSample { id: vPreTreatmentAdjustmentWaterSample } - VPreTreatmentAdjustmentConsumablesConfirm { id: vPreTreatmentAdjustmentConsumablesConfirm } - VPreTreatmentSelfTestNoCartridge { id: vPreTreatmentSelfTestNoCartridge } - VPreTreatmentAdjustmentDisposablesConfirm { id: vPreTreatmentAdjustmentDisposablesConfirm } - VPreTreatmentSelfTestDry { id: vPreTreatmentSelfTestDry } - VPreTreatmentAdjustmentDisposablesPrime { id: vPreTreatmentAdjustmentDisposablesPrime } - VPreTreatmentDisposablesPrime { id: vPreTreatmentDisposablesPrime } - VPreTreatmentAdjustmentPatientConnectionBegin { id: vPreTreatmentAdjustmentPatientConnectionBegin } - VPreTreatmentAdjustmentUltrafiltrationInit { id: vPreTreatmentAdjustmentUltrafiltrationInit } - VPreTreatmentAdjustmentPatientConnectionConfirm { id: vPreTreatmentAdjustmentPatientConnectionConfirm } - VPreTreatmentAdjustmentStartTreatment { id: vPreTreatmentAdjustmentStartTreatment } + VPreTreatmentAdjustmentInitTreatment { id: vPreTreatmentAdjustmentInitTreatment } + VDGFilterFlush { id: vDGFilterFlush } + VPreTreatmentAdjustmentWaterSample { id: vPreTreatmentAdjustmentWaterSample } + VPreTreatmentAdjustmentConsumablesConfirm { id: vPreTreatmentAdjustmentConsumablesConfirm } + VPreTreatmentSelfTestNoCartridge { id: vPreTreatmentSelfTestNoCartridge } + VPreTreatmentAdjustmentDisposablesConfirm { id: vPreTreatmentAdjustmentDisposablesConfirm } + VPreTreatmentSelfTestDry { id: vPreTreatmentSelfTestDry } + VPreTreatmentAdjustmentDisposablesPrime { id: vPreTreatmentAdjustmentDisposablesPrime } + VPreTreatmentDisposablesPrime { id: vPreTreatmentDisposablesPrime } + VPreTreatmentAdjustmentPatientConnectionBegin { id: vPreTreatmentAdjustmentPatientConnectionBegin } + VPreTreatmentAdjustmentUltrafiltrationInit { id: vPreTreatmentAdjustmentUltrafiltrationInit } + VPreTreatmentAdjustmentPatientConnectionConfirm { id: vPreTreatmentAdjustmentPatientConnectionConfirm } + VPreTreatmentAdjustmentStartTreatment { id: vPreTreatmentAdjustmentStartTreatment } // --- - VTreatmentAdjustmentDuration { id: vTreatmentAdjustmentDuration } - VTreatmentAdjustmentFlows { id: vTreatmentAdjustmentFlows } - VTreatmentCreate { id: vTreatmentCreate } + VTreatmentAdjustmentDuration { id: vTreatmentAdjustmentDuration } + VTreatmentAdjustmentFlows { id: vTreatmentAdjustmentFlows } + VTreatmentCreate { id: vTreatmentCreate } - VTreatmentRanges { id: vTreatmentRanges } - VTreatmentAdjustmentSaline { id: vTreatmentAdjustmentSaline } - VTreatmentAdjustmentUltrafiltrationState { id: vTreatmentAdjustmentUltrafiltrationState } - VTreatmentAdjustmentUltrafiltrationEdit { id: vTreatmentAdjustmentUltrafiltrationEdit } - VTreatmentAdjustmentUltrafiltrationConfirm { id: vTreatmentAdjustmentUltrafiltrationConfirm } - VTreatmentAdjustmentPressuresLimits { id: vTreatmentAdjustmentPressuresLimits } - VTreatmentAdjustmentHeparin { id: vTreatmentAdjustmentHeparin } - VTreatmentAdjustmentRinseback { id: vTreatmentAdjustmentRinseback } - VTreatmentAdjustmentRecirculate { id: vTreatmentAdjustmentRecirculate } - VTreatmentAdjustmentEnd { id: vTreatmentAdjustmentEnd } - VTreatmentAdjustmentVersions { id: vTreatmentAdjustmentVersions } + VTreatmentRanges { id: vTreatmentRanges } + VTreatmentAdjustmentSaline { id: vTreatmentAdjustmentSaline } + VTreatmentAdjustmentUltrafiltrationState { id: vTreatmentAdjustmentUltrafiltrationState } + VTreatmentAdjustmentUltrafiltrationEdit { id: vTreatmentAdjustmentUltrafiltrationEdit } + VTreatmentAdjustmentUltrafiltrationConfirm { id: vTreatmentAdjustmentUltrafiltrationConfirm } + VTreatmentAdjustmentPressuresLimits { id: vTreatmentAdjustmentPressuresLimits } + VTreatmentAdjustmentHeparin { id: vTreatmentAdjustmentHeparin } + VTreatmentAdjustmentRinseback { id: vTreatmentAdjustmentRinseback } + VTreatmentAdjustmentRecirculate { id: vTreatmentAdjustmentRecirculate } + VTreatmentAdjustmentEnd { id: vTreatmentAdjustmentEnd } + VTreatmentAdjustmentVersions { id: vTreatmentAdjustmentVersions } + // --- Post Treatment + VPostTreatmentAdjustmentPatientDisconnectionConfirm { id: vPostTreatmentAdjustmentPatientDisconnectionConfirm } + VPostTreatmentAdjustmentDisposablesRemovalConfirm { id: vPostTreatmentAdjustmentDisposablesRemovalConfirm } + VPostTreatmentAdjustmentTreatmentLog { id: vPostTreatmentAdjustmentTreatmentLog } + Background {} GuiView { id: _GuiView } Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r0cc29248749353dfaca80fa02fdd6108173c3a71 -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 0cc29248749353dfaca80fa02fdd6108173c3a71) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -23,7 +23,7 @@ import "qrc:/pages/pretreatment" import "qrc:/pages/pretreatment/create" import "qrc:/pages/treatment" -import "qrc:/pages/posttreatment" +import "qrc:/pages/endtreatment" /*! * \brief ManagerStack is the screen @@ -46,12 +46,11 @@ onBackClicked: _root.pop ( _mainHome ) } - // Post Treatment - PostTreatmentRinsebackStack { id: _postTreatmentRinsebackStack } - PostTreatmentRecirculateStack { id: _postTreatmentRecirculateStack } - PostTreatmentEndStack { id: _postTreatmentEndStack } + // End Treatment + EndTreatmentRinsebackStack { id: _endTreatmentRinsebackStack } + EndTreatmentRecirculateStack { id: _endTreatmentRecirculateStack } + EndTreatmentEndStack { id: _endTreatmentEndStack } - ScreenItem { id: _faultModeScreen PlaceHolderText { screenName: qsTr("FAULT MODE") } onVisibleChanged: if (visible) _mainMenu.hidden = true @@ -84,7 +83,6 @@ onInvalidModeChanged : { page( null , vinvalidMode )} } - // the page function is more flixible regarding our current design // and it's easier(or may not need) to modify later if required. // and is more optimized and will never leave screen empty @@ -96,9 +94,9 @@ // in-Treatmet onTxDialysisChanged : { page( _treatmentStack , vtxDialysis )} - onTxRinsebackChanged : { page( _postTreatmentRinsebackStack , vtxRinseback )} - onTxRecirculateChanged : { page( _postTreatmentRecirculateStack , vtxRecirculate )} - onTxEndChanged : { page( _postTreatmentEndStack , vtxEnd )} + onTxRinsebackChanged : { page( _endTreatmentRinsebackStack , vtxRinseback )} + onTxRecirculateChanged : { page( _endTreatmentRecirculateStack , vtxRecirculate )} + onTxEndChanged : { page( _endTreatmentEndStack , vtxEnd )} // Treatment Stop onTxStopChanged : { page( _treatmentStack , vtxStop )} Index: sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/EndTreatmentEndStack.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,48 @@ +/*! + * + * 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 EndTreatmentEndStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 16-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 16-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/endtreatment/end" +/*! + * \brief the post treatment end stack screen + */ +StackItem { id: _root + objectName: "_EndTreatmentEndStack" + + stackView.initialItem : null + + // Treatment Complete + EndTreatmentEnd { id: _endTreatmentEnd + onRinsebackClicked : vTreatmentAdjustmentEnd.doEnd () //87.0 + } + EndTreatmentEndPaused { id: _endTreatmentEndPaused } + + Connections { target: vHDTreatmentStates + onTeWaitRinsebackChanged : { page( _endTreatmentEnd , vteWaitRinseback )} + onTePausedChanged : { page( _endTreatmentEndPaused , vtePaused )} + } + + Connections { target: vTreatmentAdjustmentEnd + onAdjustmentTriggered: { + _endTreatmentEnd.reasonText = vTreatmentAdjustmentEnd.text(); + } + } +} Index: sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/EndTreatmentRecirculateStack.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,57 @@ +/*! + * + * 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 EndTreatmentRecirculateStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 16-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 16-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/endtreatment/recirculate" +/*! + * \brief the end treatment recirculate stack screen + */ +StackItem { id: _root + objectName: "_EndTreatmentRecirculateStack" + + stackView.initialItem : null + + // Recirculate + EndTreatmentRecirculate { id: _endTreatmentRecirculate + onReconnectClicked : vTreatmentAdjustmentRecirculate.doReconnect () //84.0 + onTreatmentEndClicked : vTreatmentAdjustmentRecirculate.doTreatmentEnd() //84.3 + } + EndTreatmentReconnect { id: _endTreatmentReconnect + onConfirmClicked : vTreatmentAdjustmentRecirculate.doConfirm () //84.1 + onRecirculateBackClicked : vTreatmentAdjustmentRecirculate.doResume () //84.2 + } + + Connections { target: vHDTreatmentStates + onRcStartedChanged : { page( _endTreatmentRecirculate , vrcStarted )} + onRcStoppedChanged : { page( _endTreatmentReconnect , vrcStopped )} + } + + Connections { target: vTreatmentAdjustmentRecirculate + onAdjustmentTriggered: { + // there is only one message to handle all the sub pages of rinseback + // since the rejection reason will be cleared by each trasition + // so it's fine to set all at the same time + // and let them cleared for their own message when each get visible. + _endTreatmentRecirculate .reasonText = vTreatmentAdjustmentRecirculate.text(); + _endTreatmentReconnect .reasonText = vTreatmentAdjustmentRecirculate.text(); + } + } +} Index: sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/EndTreatmentRinsebackStack.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,100 @@ +/*! + * + * 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 EndTreatmentRinsebackStack.qml + * \author (last) Behrouz NematiPour + * \date (last) 15-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 15-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/pages/endtreatment/rinseback" +/*! + * \brief the end treatment rinseback stack screen + */ +StackItem { id: _root + objectName: "_EndTreatmentRinsebackStack" + + stackView.initialItem : null + + // Rinseback + EndTreatmentRinsebackInit { id: _endTreatmentRinsebackInit + onRinsebackClicked : vTreatmentAdjustmentRinseback.doStart () //82.0 + onTreatmentEndClicked : vTreatmentAdjustmentRinseback.doTreatmentEnd () //82.8 + onTreatmentBackClicked : vTreatmentAdjustmentRinseback.doTreatmentBack () //82.9 + } + EndTreatmentRinseback { id: _endTreatmentRinseback + onAccelerateClicked : vTreatmentAdjustmentRinseback.doIncrement () //82.1 + onDeccelerateClicked : vTreatmentAdjustmentRinseback.doDecrement () //82.2 + onPauseClicked : vTreatmentAdjustmentRinseback.doPause () //82.3 + onResumeClicked : vTreatmentAdjustmentRinseback.doResume () //82.4 + onEndClicked : vTreatmentAdjustmentRinseback.doEnd () //82.5 + } + EndTreatmentRinsebackComplete { id: _endTreatmentRinsebackComplete + onAdditionalClicked : vTreatmentAdjustmentRinseback.doAdditional () //82.6 + onTreatmentBackClicked : vTreatmentAdjustmentRinseback.doTreatmentBack () //82.9 + onConfirmClicked : vTreatmentAdjustmentRinseback.doConfirm () //82.7 + onTreatmentEndClicked : vTreatmentAdjustmentRinseback.doTreatmentEnd () //82.8 + } + EndTreatmentAdditional { id: _endTreatmentAdditional } + + Connections { target: vHDTreatmentStates + onRbInitChanged : { page( _endTreatmentRinsebackInit , vrbInit )} + onRbRunChanged : { page( _endTreatmentRinseback , vrbRun )} + onRbPausedChanged : { page( _endTreatmentRinseback , vrbPaused )} + onRbStopChanged : { page( _endTreatmentRinsebackComplete , vrbStop )} + onRbAdditionalChanged : { page( _endTreatmentAdditional , vrbAdditional )} + } + + Connections { target: vTreatmentAdjustmentRinseback + onAdjustmentTriggered: { + // there is only one message to handle all the sub pages of rinseback + // since the rejection reason will be cleared by each trasition + // so it's fine to set all at the same time + // and let them cleared for their own message when each get visible. + _endTreatmentRinsebackInit .reasonText = vTreatmentAdjustmentRinseback.text(); + _endTreatmentRinseback .reasonText = vTreatmentAdjustmentRinseback.text(); + _endTreatmentRinsebackComplete .reasonText = vTreatmentAdjustmentRinseback.text(); + } + } +} + +/* TODO: + // an idea that is being worked on for later performance imporovement + // if the stackview becomes slow this idea is a manual transition with animation to be replacecd with stackView + PropertyAnimation { id: _rbInitAnimation + target: _endTreatmentRinsebackInit + property: "opacity" + duration: 1000 + to: vHDTreatmentStates.rbInit ? 1 : 0 + } + PropertyAnimation { id: _rbStopAnimation + target: _endTreatmentRinsebackComplete + property: "opacity" + duration: 1000 + to: vHDTreatmentStates.rbStop ? 1 : 0 + } + Connections { target: vHDTreatmentStates + onStateTriggered : { // this property is a TRIGGER and shall be set at the end of the property setters functions list + _endTreatmentRinsebackInit .visible = vHDTreatmentStates.rbInit + _endTreatmentRinseback .visible = vHDTreatmentStates.rbRun || vHDTreatmentStates.rbPaused + _endTreatmentRinsebackComplete .visible = vHDTreatmentStates.rbStop + _endTreatmentAdditional .visible = vHDTreatmentStates.rbAdditional + + } + onRbInitChanged: _rbInitAnimation.running = true + onRbStopChanged: _rbStopAnimation.running = true + } +*/ Index: sources/gui/qml/pages/endtreatment/end/EndTreatmentEnd.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/end/EndTreatmentEnd.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/end/EndTreatmentEnd.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,110 @@ +/*! + * + * 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 EndTreatmentEnd.qml + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment end screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentEnd" + + property alias reasonText : _notification.text + + signal rinsebackClicked() + + QtObject { id: _private + property int sectionSpace : 30 + property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 + property int sectionHeight: _root.width * 1/3 - sectionSpace * 1.5 + } + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Treatment Complete") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: _timeout // not sure if this screen has a timeout + visible : false + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + secondsVisible : false + seconds : 0 + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionWidth + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors.centerIn: parent + Text { id: _visualAID + anchors.centerIn: parent + color: Colors.white + text: qsTr("Visual AID\nplaceholder") + font.pixelSize: Fonts.fontPixelButton + } + } + + Row { id: _buttonGroup + property int buttonsWidth : 300 + spacing: 75 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _startRinsebackTouchRect + visible : true + text.text : qsTr("START RINSEBACK") + width : _buttonGroup.buttonsWidth + color : borderColor + onClicked : rinsebackClicked() + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/end/EndTreatmentEndPause.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/end/EndTreatmentEndPause.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/end/EndTreatmentEndPause.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 PostTreatmentEndPause.qml + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Jan-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment end pause screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentEndPause" + + QtObject { id: _private + property int sectionSpace : 30 + property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 + property int sectionHeight: _root.width * 1/3 - sectionSpace * 1.5 + } + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Treatment Complete Paused") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: timeout + visible : false + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + secondsVisible : false + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + seconds : 0 * 60 + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionWidth + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors.centerIn: parent + Text { id: _visualAID + anchors.centerIn: parent + color: Colors.white + text: qsTr("Visual AID\nplaceholder") + font.pixelSize: Fonts.fontPixelButton + } + } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentRecirculate.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentRecirculate.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentRecirculate.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,120 @@ +/*! + * + * 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 EndTreatmentRecirculate.qml + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 30-Jan-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the post treatment recirculate screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentRecirculate" + + property alias reasonText : _notification.text + + signal reconnectClicked () + signal treatmentEndClicked () + + QtObject { id: _private + property int sectionSpace : 30 + property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 + property int sectionHeight: _root.width * 1/3 - sectionSpace * 1.5 + } + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Recirculate") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: timeout + visible : vTreatmentRecirculate.timeoutTotal + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + secondsVisible : false + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + seconds : vTreatmentRecirculate.timeoutCountDown * 60 + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionWidth + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors.centerIn: parent + Text { id: _visualAID + anchors.centerIn: parent + color: Colors.white + text: qsTr("Visual AID\nplaceholder") + font.pixelSize: Fonts.fontPixelButton + } + } + + Row { id: _buttonGroup + property int buttonsWidth : 300 + spacing: 75 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _backTreatmentTouchRect + visible : true + text.text : qsTr("RECONNECT") + width : _buttonGroup.buttonsWidth + color : borderColor + onClicked : reconnectClicked() + } + + TouchRect { id : _endTreatmentTouchRect + visible : vTreatmentTime.time_Total > 0 + text.text : qsTr("END TREATMENT") + width : _buttonGroup.buttonsWidth + onClicked : treatmentEndClicked() + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentReconnect.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentReconnect.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/recirculate/EndTreatmentReconnect.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,157 @@ +/*! + * + * 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 EndTreatmentReconnect.qml + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 09-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment recirculate reconnect screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentReconnect" + + property alias reasonText : _notification.text + + signal recirculateBackClicked () + signal confirmClicked () + + QtObject { id: _private + property int sectionSpace : 30 + property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 + property int sectionHeight: _root.width * 1/3 - sectionSpace * 1.5 + } + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Reconnect") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: timeout + visible : vTreatmentRecirculate.timeoutTotal + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + secondsVisible : false + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + seconds : vTreatmentRecirculate.timeoutCountDown * 60 + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionWidth + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius : 10 + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: _private.sectionSpace + } + Column { + spacing : 10 + anchors.fill: parent + anchors.margins: _private.sectionSpace + Text { id: _titleSteps + anchors.left: parent.left + color: Colors.white + text: qsTr("Please Follow The Steps") + font.pixelSize: Fonts.fontPixelButton + } + + Text { id: _steps + anchors.left : parent.left + anchors.leftMargin : _private.sectionSpace + color : Colors.white + text : qsTr("First Step\nSecond Step\nThird Step\n") + font.pixelSize: Fonts.fontPixelButton + } + } + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionHeight + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: _private.sectionSpace + } + Text { id: _visualAID + anchors.centerIn: parent + color: Colors.white + text: qsTr("Visual AID\nplaceholder") + font.pixelSize: Fonts.fontPixelButton + } + } + + Row { id: _buttonGroup + property int buttonsWidth : 300 + spacing: 75 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _backTreatmentTouchRect + visible : vTreatmentTime.time_Total > 0 + text.text : qsTr("BACK TO RECIRCULATE") + width : _buttonGroup.buttonsWidth + onClicked : recirculateBackClicked() + } + + TouchRect { id : _endTreatmentTouchRect + visible : vTreatmentTime.time_Total > 0 + text.text : qsTr("CONFIRM") + width : _buttonGroup.buttonsWidth + color : borderColor + onClicked : confirmClicked() + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentAdditional.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentAdditional.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentAdditional.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,90 @@ +/*! + * + * 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 EndTreatmentAdditional.qml + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 09-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment additional rinseback screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentAdditional" + + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: "white" + text: qsTr("Additional Rinseback") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: timeout + visible : vTreatmentRinseback.timeoutTotal + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + secondsVisible : false + seconds : vTreatmentRinseback.timeoutCountDown * 60 + } + + ProgressCircle { id: _circle + diameter: 335 + anchors.centerIn: parent + + minimum : 0 + maximum : vTreatmentRinseback.target + value : vTreatmentRinseback.current + + Text { id: _textVolume + anchors.centerIn: parent + color: "white" + text: vTreatmentRinseback.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) + font.pixelSize: 76 + font.weight: Font.ExtraLight + + } + + Text { id: _labelRate + anchors { + top: parent.bottom + topMargin: 20 + horizontalCenter: parent.horizontalCenter + } + color: "white" + text: vTreatmentRinseback.rate.toFixed(0) + " " + qsTr(Variables.unitTextFlowRate) + font.pixelSize: 23 + } + } + + onVisibleChanged: { + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinseback.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,176 @@ +/*! + * + * 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 EndTreatmentRinseback.qml + * \author (last) Behrouz NematiPour + * \date (last) 29-Jan-2021 + * \author (original) Behrouz NematiPour + * \date (original) 29-Jan-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment rinseback screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentRinseback" + + property alias reasonText : _notification.text + + signal pauseClicked () + signal resumeClicked () + signal endClicked () + + signal accelerateClicked () + signal deccelerateClicked () + + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: "white" + text: qsTr("Rinseback") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: timeout + visible : false // has been removed for now // vTreatmentRinseback.timeoutTotal + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + secondsVisible : false + seconds : vTreatmentRinseback.timeoutCountDown * 60 + } + + ImageText { id: _imageEnd + visible: ! vHDTreatmentStates.rbAdditional + anchors { + right : _root.right + top : _root.top + rightMargin : 45 + topMargin : 45 + } + diameter : Variables.rinsebackIconDiameterDefault + source : "qrc:/images/iRedCrossWCircle" + text : qsTr("End") + fontSize : Fonts.fontPixelRinsebackAdjustmentButton + onClicked : endClicked() + } + + ProgressCircle { id: _circle + diameter: 335 + anchors { + horizontalCenter: parent.horizontalCenter + top : parent.top + topMargin : vHDTreatmentStates.rbAdditional ? + _root.height/2 - height/2 : // move the progress circle in the center of the screen + 170 + } + + minimum : 0 + maximum : vTreatmentRinseback.target + value : vTreatmentRinseback.current + + Text { id: _textVolume + anchors.centerIn: parent + color: "white" + text: vTreatmentRinseback.current.toFixed(0) + " " + qsTr(Variables.unitTextFluid) + font.pixelSize: 76 + font.weight: Font.ExtraLight + + } + + Text { id: _labelRate + anchors { + top: parent.bottom + topMargin: 20 + horizontalCenter: parent.horizontalCenter + } + color: "white" + text: vTreatmentRinseback.rate.toFixed(0) + " " + qsTr(Variables.unitTextFlowRate) + font.pixelSize: 23 + } + } + + Row { id: _buttonRow + spacing: 175 + anchors { + horizontalCenter: _root.horizontalCenter + bottom : _root.bottom + bottomMargin : Variables.notificationHeight + 55 // + the texts height + } + + ImageText { id: _imageDecelerate + visible : vHDTreatmentStates.rbRun || vHDTreatmentStates.rbPaused + enabled : vHDTreatmentStates.rbRun + anchors.bottom : _buttonRow.bottom + diameter : Variables.rinsebackIconDiameterDefault + source : "qrc:/images/iDecelerate" + text : qsTr("Decelerate") + fontSize : Fonts.fontPixelRinsebackAdjustmentButton + onClicked : deccelerateClicked() + } + + ImageText { id: _imageResume + visible : vHDTreatmentStates.rbPaused + anchors.bottom : _buttonRow.bottom + diameter : Variables.rinsebackIconDiameterResumePause + source : "qrc:/images/iResume" + text : qsTr("Resume") + fontSize : Fonts.fontPixelRinsebackAdjustmentButton + onClicked : resumeClicked() + } + + ImageText { id: _imagePause + visible : vHDTreatmentStates.rbRun // not sure if it's possible || vHDTreatmentStates.rbAdditional + anchors.bottom : _buttonRow.bottom + diameter : Variables.rinsebackIconDiameterResumePause + source : "qrc:/images/iPauseLightBlue" + text : qsTr("Pause") + fontSize : Fonts.fontPixelRinsebackAdjustmentButton + onClicked : pauseClicked() + } + + ImageText { id: _imageAccelerate + visible : vHDTreatmentStates.rbRun || vHDTreatmentStates.rbPaused + enabled : vHDTreatmentStates.rbRun + anchors.bottom : _buttonRow.bottom + diameter : Variables.rinsebackIconDiameterDefault + source : "qrc:/images/iAccelerate" + text : qsTr("Accelerate") + fontSize : Fonts.fontPixelRinsebackAdjustmentButton + onClicked : accelerateClicked() + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackComplete.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,184 @@ +/*! + * + * 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 EndTreatmentRinsebackComplete.qml + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment rinseback complete screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentRinsebackComplete" + + property alias reasonText : _notification.text + signal additionalClicked () + signal treatmentBackClicked () + signal confirmClicked () + signal treatmentEndClicked () + + QtObject { id: _private + property int sectionSpace : 30 + property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 + property int sectionHeight : _root.width * 1/3 - sectionSpace * 1.5 + property bool treatmentIncomplete : vTreatmentTime.time_Total > 0 + } + + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Rinseback Complete") + font.pixelSize: Fonts.fontPixelTitle + } + + TouchRect { id : _touchAdditional + width : 155 + height : 50 + text { + text: qsTr("ADDITIONAL") + font.bold : true + font.pixelSize: Fonts.fontPixelConfirm + } + anchors { + verticalCenter : _title.verticalCenter + right : parent.right + rightMargin : 30 + } + onClicked : additionalClicked() + } + + TimeText { id: timeout + visible : vTreatmentRinseback.timeoutTotal + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + secondsVisible : false + seconds : vTreatmentRinseback.timeoutCountDown * 60 + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionWidth + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: _private.sectionSpace + } + Column { + spacing : 10 + anchors.fill: parent + anchors.margins: _private.sectionSpace + Text { id: _titleSteps + anchors.left: parent.left + color: Colors.white + text: qsTr("Please Disconnet") + font.pixelSize: Fonts.fontPixelButton + } + + Text { id: _steps + anchors.left: parent.left + anchors.leftMargin: _private.sectionSpace + color: Colors.white + text: qsTr("First Step\nSecond Step\nThird Step\n") + font.pixelSize: Fonts.fontPixelButton + } + } + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionHeight + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: _private.sectionSpace + } + Text { id: _visualAID + anchors.centerIn: parent + color: Colors.white + text: qsTr("Visual AID\nplaceholder") + font.pixelSize: Fonts.fontPixelButton + } + } + + Row { id: _buttonGroup + property int buttonsWidth : 300 + spacing: 75 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _backTreatmentTouchRect + visible : _private.treatmentIncomplete + text.text : qsTr("BACK TO TREATMENT") + width : _buttonGroup.buttonsWidth + onClicked : treatmentBackClicked() + } + + TouchRect { id : _beginRinsebackTouchRect + visible : _private.treatmentIncomplete + text.text : qsTr("CONFIRM") + width : _buttonGroup.buttonsWidth + color : borderColor + onClicked : confirmClicked() + } + + TouchRect { id : _endTreatmentTouchRect + visible : true // after the rinseback complete user can always end the treatment, regardless of incomplete or compeleted treatment + text.text : qsTr("END TREATMENT") + width : _buttonGroup.buttonsWidth + color : _private.treatmentIncomplete ? backgroundColor : borderColor + onClicked : treatmentEndClicked() + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml =================================================================== diff -u --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (revision 0) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,165 @@ +/*! + * + * 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 EndTreatmentRinsebackInit.qml + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 09-Feb-2021 + * + */ + +// Qt +import QtQuick 2.12 + +// Project +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +/*! + * \brief the end treatment rinseback setup screen + */ +ScreenItem { id: _root + objectName: "_EndTreatmentRinsebackInit" + + property alias reasonText : _notification.text + + signal treatmentBackClicked () + signal rinsebackClicked () + signal treatmentEndClicked () + + QtObject { id: _private + property int sectionSpace : 30 + property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 + property int sectionHeight: _root.width * 1/3 - sectionSpace * 1.5 + } + Text { id: _title + anchors { + top: parent.top + topMargin: 65 + horizontalCenter: parent.horizontalCenter + } + color: Colors.white + text: qsTr("Rinseback Setup") + font.pixelSize: Fonts.fontPixelTitle + } + + TimeText { id: timeout + visible : vTreatmentRinseback.timeoutTotal + anchors { + horizontalCenter: parent.horizontalCenter + top : _title.bottom + topMargin : 15 + } + textPixelSize : 30 + textWeight : Font.Normal + // the TimeText component works with hour and minute mainly + // so changing the seconds to minuts was easier than changing the component + secondsVisible : false + seconds : vTreatmentRinseback.timeoutCountDown * 60 + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionWidth + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: _private.sectionSpace + } + Column { + spacing : 10 + anchors.fill: parent + anchors.margins: _private.sectionSpace + Text { id: _titleSteps + anchors.left: parent.left + color: Colors.white + text: qsTr("Please Follow The Steps") + font.pixelSize: Fonts.fontPixelButton + } + + Text { id: _steps + anchors.left: parent.left + anchors.leftMargin: _private.sectionSpace + color: Colors.white + text: qsTr("First Step\nSecond Step\nThird Step\n") + font.pixelSize: Fonts.fontPixelButton + } + } + } + + Rectangle { + color : Colors.backgroundDialog + width : _private.sectionHeight + height : _private.sectionHeight + border.width: 2 + border.color: Colors.borderDisableButton + radius: 10 + anchors { + verticalCenter: parent.verticalCenter + right: parent.right + rightMargin: _private.sectionSpace + } + Text { id: _visualAID + anchors.centerIn: parent + color: Colors.white + text: qsTr("Visual AID\nplaceholder") + font.pixelSize: Fonts.fontPixelButton + } + } + + Row { id: _buttonGroup + property int buttonsWidth : 300 + spacing: 75 + + anchors { + bottom : parent.bottom + horizontalCenter: parent.horizontalCenter + rightMargin : spacing + leftMargin : spacing + bottomMargin : spacing + } + + TouchRect { id : _backTreatmentTouchRect + visible : vTreatmentTime.time_Total > 0 + text.text : qsTr("BACK TO TREATMENT") + width : _buttonGroup.buttonsWidth + onClicked : treatmentBackClicked() + } + + TouchRect { id : _beginRinsebackTouchRect + visible : true + text.text : qsTr("START RINSEBACK") + width : _buttonGroup.buttonsWidth + isDefault : true + onClicked : rinsebackClicked() + } + + TouchRect { id : _endTreatmentTouchRect + visible : vTreatmentTime.time_Total > 0 + text.text : qsTr("END TREATMENT") + width : _buttonGroup.buttonsWidth + onClicked : treatmentEndClicked() + } + } + + NotificationBar { id: _notification + iconVisible: false + } + + onVisibleChanged: { + _notification.text = "" + if (visible) { + _mainMenu.hidden = true + } + } +} Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/PostTreatmentEndStack.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/PostTreatmentRecirculateStack.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/PostTreatmentRinsebackStack.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/end/PostTreatmentEnd.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/end/PostTreatmentEndPause.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentRecirculate.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/recirculate/PostTreatmentReconnect.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentAdditional.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinseback.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackComplete.qml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/gui/qml/pages/postTreatment/rinseback/PostTreatmentRinsebackInit.qml'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml =================================================================== diff -u -r0cc29248749353dfaca80fa02fdd6108173c3a71 -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 0cc29248749353dfaca80fa02fdd6108173c3a71) +++ sources/gui/qml/pages/treatment/TreatmentBloodPrime.qml (.../TreatmentBloodPrime.qml) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -25,7 +25,7 @@ * \brief the in-treatment Blood Prime screen */ ScreenItem { id: _root - objectName: "_PostTreatmentBloodPrime" + objectName: "_TreatmentBloodPrime" Text { id: _title anchors { Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r0cc29248749353dfaca80fa02fdd6108173c3a71 -r88563177f10f20ced98750b2e40036201728131d --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 0cc29248749353dfaca80fa02fdd6108173c3a71) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -20,8 +20,6 @@ import "qrc:/globals" import "qrc:/components" import "qrc:/pages/treatment/adjustments" -import "qrc:/pages/pretreatment" -import "qrc:/pages/posttreatment" /*! * \brief TreatmentStack is the screen Index: sources/model/MModel.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r88563177f10f20ced98750b2e40036201728131d --- sources/model/MModel.h (.../MModel.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/model/MModel.h (.../MModel.h) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -24,10 +24,13 @@ #include "MAlarmCleared.h" #include "MAlarmClearedCondition.h" +// States Messages #include "MHDOperationModeData.h" #include "MPreTreatmentStatesData.h" #include "MTreatmentStatesData.h" +#include "MPostTreatmentStatesData.h" +// HD Data Messages #include "MTreatmentTimeData.h" #include "MTreatmentFlowsData.h" #include "MTreatmentOutletFlowData.h" @@ -40,6 +43,10 @@ #include "MTreatmentBloodPrimeData.h" #include "MHDAccelerometerData.h" +// Debugging Messages +#include "MHDDebugText.h" +#include "MDGDebugText.h" + // DG Data Messages #include "MDGDrainPumpData.h" #include "MDGHeatersData.h" @@ -67,9 +74,6 @@ #include "MPreTreatmentAdjustPatientConnectionConfirmResponse.h" #include "MPreTreatmentAdjustStartTreatmentResponse.h" -// Debugging Messages -#include "MHDDebugText.h" -#include "MDGDebugText.h" // Treatment #include "MTreatmentAdjustRequests.h" #include "MTreatmentAdjustDurationResponse.h" @@ -86,6 +90,10 @@ #include "MAdjustHDVersionsResponse.h" #include "MAdjustDGVersionsResponse.h" +// Post-Treatment +#include "MPostTreatmentAdjustRequests.h" +#include "MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h" +#include "MPostTreatmentAdjustTreatmentLogResponse.h" /*! * \page MessageFlow Message interpretation Flow @@ -211,6 +219,7 @@ REGISTER_METATYPE( HDOperationModeData ) \ REGISTER_METATYPE( PreTreatmentStatesData ) \ REGISTER_METATYPE( TreatmentStatesData ) \ + REGISTER_METATYPE( PostTreatmentStatesData ) \ REGISTER_METATYPE( BloodFlowData ) \ REGISTER_METATYPE( DialysateFlowData ) \ REGISTER_METATYPE( OutletFlowData ) \ @@ -251,6 +260,10 @@ REGISTER_METATYPE( PreTreatmentDisposablesPrimeData ) \ \ /* Request */ \ + /* Post-Treatment */ \ + REGISTER_METATYPE( AdjustPatientDisconnectionConfirmRequestData ) \ + REGISTER_METATYPE( AdjustDisposablesConfirmRequestData ) \ + REGISTER_METATYPE( AdjustTreatmentLogRequestData ) \ /* Pre-Treatment */ \ REGISTER_METATYPE( AdjustInitTreatmentRequestData ) \ REGISTER_METATYPE( AdjustParametersValidationRequestData ) \ @@ -284,6 +297,9 @@ REGISTER_METATYPE( AdjustVersionsRequestData ) \ \ /* Response */ \ + /* Post-Treatment */ \ + REGISTER_METATYPE( AdjustDisposablesPrimeResponseData ) \ + REGISTER_METATYPE( AdjustTreatmentLogResponseData ) \ /* Pre-Treatment */ \ REGISTER_METATYPE( AdjustInitTreatmentResponseData ) \ REGISTER_METATYPE( AdjustParametersValidationResponseData ) \ @@ -328,6 +344,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDOperationModeData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentStatesData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TreatmentStatesData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PostTreatmentStatesData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, BloodFlowData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DialysateFlowData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, OutletFlowData ) \ @@ -367,6 +384,9 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentSelfTestDryData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, PreTreatmentDisposablesPrimeData ) \ /* Response */ \ + /* Post-Treatment */ \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustDisposablesRemovalConfirmResponseData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentLogResponseData ) \ /* Pre-Treatment */ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustInitTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdjustParametersValidationResponseData ) \ @@ -407,6 +427,10 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentEndRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustPressuresLimitsRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustVersionsRequestData ) \ + /* Post-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustPatientDisconnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustDisposablesRemovalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustTreatmentLogRequestData ) \ /* Pre-Treatment */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustInitTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustParametersValidationRequestData ) \ @@ -449,6 +473,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( HDOperationModeData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentStatesData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TreatmentStatesData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( PostTreatmentStatesData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( BloodFlowData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DialysateFlowData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( OutletFlowData ) \ @@ -488,6 +513,9 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentSelfTestDryData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( PreTreatmentDisposablesPrimeData ) \ /* Response */ \ + /* Post-Treatment */ \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustDisposablesRemovalConfirmResponseData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustTreatmentLogResponseData ) \ /* Pre-Treatment */ \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustInitTreatmentResponseData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( AdjustParametersValidationResponseData ) \ @@ -514,6 +542,10 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ /* Request --------------------------------------------------------- */ \ + /* Post-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustPatientDisconnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustDisposablesRemovalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustTreatmentLogRequestData ) \ /* Pre-Treatment */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustInitTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustParametersValidationRequestData ) \ @@ -549,6 +581,10 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_NOEMIT \ /* Request ----------------------- NoEmit -------------------------- */ \ + /* Post-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustPatientDisconnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustDisposablesRemovalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustTreatmentLogRequestData ) \ /* Pre-Treatment */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustInitTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustParametersValidationRequestData ) \ @@ -584,6 +620,10 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_PUBLIC \ /* Request ----------------------- public -------------------------- */ \ + /* Post-Treatment */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustPatientDisconnectionConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustDisposablesRemovalConfirmRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustTreatmentLogRequestData ) \ /* Pre-Treatment */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustInitTreatmentRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustParametersValidationRequestData ) \ @@ -625,6 +665,7 @@ ACTION_RECEIVE_SIGNAL( HDOperationModeData ) \ ACTION_RECEIVE_SIGNAL( PreTreatmentStatesData ) \ ACTION_RECEIVE_SIGNAL( TreatmentStatesData ) \ + ACTION_RECEIVE_SIGNAL( PostTreatmentStatesData ) \ ACTION_RECEIVE_SIGNAL( BloodFlowData ) \ ACTION_RECEIVE_SIGNAL( DialysateFlowData ) \ ACTION_RECEIVE_SIGNAL( OutletFlowData ) \ @@ -662,6 +703,9 @@ ACTION_RECEIVE_SIGNAL( PreTreatmentSelfTestDryData ) \ ACTION_RECEIVE_SIGNAL( PreTreatmentDisposablesPrimeData ) \ /* Response */ \ + /* Post-Treatment */ \ + ACTION_RECEIVE_SIGNAL( AdjustDisposablesRemovalConfirmResponseData ) \ + ACTION_RECEIVE_SIGNAL( AdjustTreatmentLogResponseData ) \ /* Pre-Treatment */ \ ACTION_RECEIVE_SIGNAL( AdjustInitTreatmentResponseData ) \ ACTION_RECEIVE_SIGNAL( AdjustParametersValidationResponseData ) \ Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustDisposablesPrimeResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustDisposablesPrimeResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustInitTreatmentResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustParametersValidationResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionBeginResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustRequests.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustStartTreatmentResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustUltrafiltrationInitResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MPreTreatmentAdjustWaterSampleResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustEndResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustEndResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustHeparinResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustPressuresLimitsResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustPressuresLimitsResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustRecirculateResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustRecirculateResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustRequests.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustRinsebackResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustRinsebackResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp (revision 0) +++ sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPostTreatmentDisposablesRemovalConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h" + +using namespace Model; + +QVariantList MAdjustDisposablesRemovalConfirmResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustDisposablesRemovalConfirmResponse::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 MAdjustDisposablesRemovalConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustDisposablesRemovalConfirmResponseData MAdjustDisposablesRemovalConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h (revision 0) +++ sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPostTreatmentDisposablesRemovalConfirmResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustDisposablesRemovalConfirmResponse class + * \details The DisposablesRemovalConfirm adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0x7400| 0x020 | 6 | Rsp | Y | HD | UI | Disposables Removal Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustDisposablesRemovalConfirmReq : DisposablesRemovalConfirm Request + * \sa MTreatmentDisposablesRemovalConfirm : DisposablesRemovalConfirm Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustDisposablesRemovalConfirm | + * + */ +class MAdjustDisposablesRemovalConfirmResponse : 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("AdjustDisposablesRemovalConfirm") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustDisposablesRemovalConfirmResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDisposablesRemovalConfirmResponse::Data AdjustDisposablesRemovalConfirmResponseData; Index: sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustRequests.h =================================================================== diff -u --- sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (revision 0) +++ sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustRequests.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,118 @@ +/*! + * + * 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 MPostTreatmentAdjustRequests.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-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 MAdjustPatientDisconnectionConfirmReq class + * \details The model to Confirm Patient Disconnection + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x4A00| 0x100 | 9 | Req | Y | UI | HD | Patient Connection Begin Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustPatientDisconnectionConfirmReq : 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("PatientDisconnectionConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustDisposablesRemovalConfirmReq class + * \details The model to Confirm Disposables Removal + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7300| 0x100 | 9 | Req | Y | UI | HD | Disposables Removal Confirm Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustDisposablesRemovalConfirmReq : 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("DisposablesRemovalConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustTreatmentLogReq class + * \details The model to request Treatment Log + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------:| + * |0x7500| 0x100 | 9 | Req | Y | UI | HD | Treatment Log Request | + * + * | Payload || + * | || + * | None || + * + */ +class MAdjustTreatmentLogReq : 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("TreatmentLog", vParameters); + } +}; + +} + +typedef Model:: MAdjustPatientDisconnectionConfirmReq AdjustPatientDisconnectionConfirmRequestData; +typedef Model:: MAdjustDisposablesRemovalConfirmReq AdjustDisposablesRemovalConfirmRequestData; +typedef Model:: MAdjustTreatmentLogReq AdjustTreatmentLogRequestData; Index: sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp (revision 0) +++ sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,177 @@ +/*! + * + * 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 MPostTreatmentTreatmentLogResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MPostTreatmentAdjustTreatmentLogResponse.h" + +using namespace Model; + +QVariantList MAdjustTreatmentLogResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mReason .value, + _data.mBloodFlowRate .value, + _data.mDialysateFlowRate .value, + _data.mTreatmentDuration .value, + _data.mActualTreatmentDuration .value, + _data.mAcidConcentrateType .value, + _data.mBicarbonateConcentrateType .value, + _data.mPotassiumConcentration .value, + _data.mCalciumConcentration .value, + _data.mBicarbonateConcentration .value, + _data.mSodiumConcentration .value, + _data.mDialysateTemperature .value, + _data.mDialyzerType .value, + _data.mTreatmentDateTime .value, + _data.mAverageBloodFlow .value, + _data.mAverageDialysateFlow .value, + _data.mDialysateVolumeUsed .value, + _data.mAverageDialysateTemp .value, + _data.mTargetUFVolume .value, + _data.mActualUFVolume .value, + _data.mTargetUFRate .value, + _data.mActualUFRate .value, + _data.mSalineBolusVolume .value, + _data.mHeparinType .value, + _data.mHeparinConcentration .value, + _data.mHeparinBolusVolume .value, + _data.mHeparinDispenseRate .value, + _data.mHeparinPreStop .value, + _data.mHeparinDeliveredVolume .value, + _data.mAverageArterialPressure .value, + _data.mAverageVenousPressure .value, + _data.mEndTreatmentEarlyAlarm .value, + _data.mDeviceID .value, + _data.mWaterSampleTestResult .value, + }; +} + +bool MAdjustTreatmentLogResponse::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.mBloodFlowRate )) { + if (GetValue(vByteArray, index, _data.mDialysateFlowRate )) { + if (GetValue(vByteArray, index, _data.mTreatmentDuration )) { + if (GetValue(vByteArray, index, _data.mActualTreatmentDuration )) { + if (GetValue(vByteArray, index, _data.mAcidConcentrateType )) { + if (GetValue(vByteArray, index, _data.mBicarbonateConcentrateType )) { + if (GetValue(vByteArray, index, _data.mPotassiumConcentration )) { + if (GetValue(vByteArray, index, _data.mCalciumConcentration )) { + if (GetValue(vByteArray, index, _data.mBicarbonateConcentration )) { + if (GetValue(vByteArray, index, _data.mSodiumConcentration )) { + if (GetValue(vByteArray, index, _data.mDialysateTemperature )) { + if (GetValue(vByteArray, index, _data.mDialyzerType )) { + if (GetValue(vByteArray, index, _data.mTreatmentDateTime )) { + if (GetValue(vByteArray, index, _data.mAverageBloodFlow )) { + if (GetValue(vByteArray, index, _data.mAverageDialysateFlow )) { + if (GetValue(vByteArray, index, _data.mDialysateVolumeUsed )) { + if (GetValue(vByteArray, index, _data.mAverageDialysateTemp )) { + if (GetValue(vByteArray, index, _data.mTargetUFVolume )) { + if (GetValue(vByteArray, index, _data.mActualUFVolume )) { + if (GetValue(vByteArray, index, _data.mTargetUFRate )) { + if (GetValue(vByteArray, index, _data.mActualUFRate )) { + if (GetValue(vByteArray, index, _data.mSalineBolusVolume )) { + if (GetValue(vByteArray, index, _data.mHeparinType )) { + if (GetValue(vByteArray, index, _data.mHeparinConcentration )) { + if (GetValue(vByteArray, index, _data.mHeparinBolusVolume )) { + if (GetValue(vByteArray, index, _data.mHeparinDispenseRate )) { + if (GetValue(vByteArray, index, _data.mHeparinPreStop )) { + if (GetValue(vByteArray, index, _data.mHeparinDeliveredVolume )) { + if (GetValue(vByteArray, index, _data.mAverageArterialPressure )) { + if (GetValue(vByteArray, index, _data.mAverageVenousPressure )) { + if (GetValue(vByteArray, index, _data.mEndTreatmentEarlyAlarm )) { + if (GetValue(vByteArray, index, _data.mDeviceID )) { + if (GetValue(vByteArray, index, _data.mWaterSampleTestResult )) { + 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; } + } 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; } +} + +/*! + * \brief MAdjustTreatmentLogResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustTreatmentLogResponseData MAdjustTreatmentLogResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mBloodFlowRate = _data.mBloodFlowRate .value; + data.mDialysateFlowRate = _data.mDialysateFlowRate .value; + data.mTreatmentDuration = _data.mTreatmentDuration .value; + data.mActualTreatmentDuration = _data.mActualTreatmentDuration .value; + data.mAcidConcentrateType = _data.mAcidConcentrateType .value; + data.mBicarbonateConcentrateType = _data.mBicarbonateConcentrateType .value; + data.mPotassiumConcentration = _data.mPotassiumConcentration .value; + data.mCalciumConcentration = _data.mCalciumConcentration .value; + data.mBicarbonateConcentration = _data.mBicarbonateConcentration .value; + data.mSodiumConcentration = _data.mSodiumConcentration .value; + data.mDialysateTemperature = _data.mDialysateTemperature .value; + data.mDialyzerType = _data.mDialyzerType .value; + data.mTreatmentDateTime = _data.mTreatmentDateTime .value; + data.mAverageBloodFlow = _data.mAverageBloodFlow .value; + data.mAverageDialysateFlow = _data.mAverageDialysateFlow .value; + data.mDialysateVolumeUsed = _data.mDialysateVolumeUsed .value; + data.mAverageDialysateTemp = _data.mAverageDialysateTemp .value; + data.mTargetUFVolume = _data.mTargetUFVolume .value; + data.mActualUFVolume = _data.mActualUFVolume .value; + data.mTargetUFRate = _data.mTargetUFRate .value; + data.mActualUFRate = _data.mActualUFRate .value; + data.mSalineBolusVolume = _data.mSalineBolusVolume .value; + data.mHeparinType = _data.mHeparinType .value; + data.mHeparinConcentration = _data.mHeparinConcentration .value; + data.mHeparinBolusVolume = _data.mHeparinBolusVolume .value; + data.mHeparinDispenseRate = _data.mHeparinDispenseRate .value; + data.mHeparinPreStop = _data.mHeparinPreStop .value; + data.mHeparinDeliveredVolume = _data.mHeparinDeliveredVolume .value; + data.mAverageArterialPressure = _data.mAverageArterialPressure .value; + data.mAverageVenousPressure = _data.mAverageVenousPressure .value; + data.mEndTreatmentEarlyAlarm = _data.mEndTreatmentEarlyAlarm .value; + data.mDeviceID = _data.mDeviceID .value; + data.mWaterSampleTestResult = _data.mWaterSampleTestResult .value; + return data; +} Index: sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h (revision 0) +++ sources/model/hd/adjustment/posttreatment/MPostTreatmentAdjustTreatmentLogResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,182 @@ +/*! + * + * 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 MPostTreatmentTreatmentLogResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustTreatmentLogResponse class + * \details The TreatmentLog adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0x7600| 0x020 | 6 | Rsp | Y | HD | UI | TreatmentLog Response | + * + * | Payload || + * | || + * | # 1:(U32) | \ref Data::mAccepted | | + * | # 2:(U32) | \ref Data::mReason | | + * | # 3:(U32) | \ref Data::mBloodFlowRate | | + * | # 4:(U32) | \ref Data::mDialysateFlowRate | (mL/min) | + * | # 5:(U32) | \ref Data::mTreatmentDuration | (min) | + * | # 6:(U32) | \ref Data::mActualTreatmentDuration | (min) | + * | # 7:(U32) | \ref Data::mAcidConcentrateType | | + * | # 8:(U32) | \ref Data::mBicarbonateConcentrateType | | + * | # 9:(U32) | \ref Data::mPotassiumConcentration | (mEq/L) | + * | #10:(U32) | \ref Data::mCalciumConcentration | (mEq/L) | + * | #11:(U32) | \ref Data::mBicarbonateConcentration | (mEq/L) | + * | #12:(U32) | \ref Data::mSodiumConcentration | (mEq/L) | + * | #13:(F32) | \ref Data::mDialysateTemperature | (Celsius) | + * | #14:(U32) | \ref Data::mDialyzerType | | + * | #15:(U32) | \ref Data::mTreatmentDateTime | | + * | #16:(F32) | \ref Data::mAverageBloodFlow | (mL/min) | + * | #17:(F32) | \ref Data::mAverageDialysateFlow | (mL/min) | + * | #18:(F32) | \ref Data::mDialysateVolumeUsed | (L) | + * | #19:(F32) | \ref Data::mAverageDialysateTemp | (Celsius) | + * | #20:(F32) | \ref Data::mTargetUFVolume | (L) | + * | #21:(F32) | \ref Data::mActualUFVolume | (L) | + * | #22:(F32) | \ref Data::mTargetUFRate | (mL/min) | + * | #23:(F32) | \ref Data::mActualUFRate | (mL/min) | + * | #24:(U32) | \ref Data::mSalineBolusVolume | (mL) | + * | #25:(U32) | \ref Data::mHeparinType | | + * | #26:(U32) | \ref Data::mHeparinConcentration | (IU/mL) | + * | #27:(F32) | \ref Data::mHeparinBolusVolume | (mL) | + * | #28:(F32) | \ref Data::mHeparinDispenseRate | (mL/hr) | + * | #29:(U32) | \ref Data::mHeparinPreStop | (min) | + * | #30:(F32) | \ref Data::mHeparinDeliveredVolume | (mL) | + * | #31:(F32) | \ref Data::mAverageArterialPressure | (mmHg) | + * | #32:(F32) | \ref Data::mAverageVenousPressure | (mmHg) | + * | #33:(U32) | \ref Data::mEndTreatmentEarlyAlarm | | + * | #34:(U32) | \ref Data::mDeviceID | | + * | #35:(U32) | \ref Data::mWaterSampleTestResult | | + * \sa Data + * \sa MAdjustTreatmentLogReq : TreatmentLog Request + * \sa MTreatmentTreatmentLog : TreatmentLog Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustTreatmentLog | + * + */ +class MAdjustTreatmentLogResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::U32 mBloodFlowRate ; + Types::U32 mDialysateFlowRate ; + Types::U32 mTreatmentDuration ; + Types::U32 mActualTreatmentDuration ; + Types::U32 mAcidConcentrateType ; + Types::U32 mBicarbonateConcentrateType ; + Types::U32 mPotassiumConcentration ; + Types::U32 mCalciumConcentration ; + Types::U32 mBicarbonateConcentration ; + Types::U32 mSodiumConcentration ; + Types::F32 mDialysateTemperature ; + Types::U32 mDialyzerType ; + Types::U32 mTreatmentDateTime ; + Types::F32 mAverageBloodFlow ; + Types::F32 mAverageDialysateFlow ; + Types::F32 mDialysateVolumeUsed ; + Types::F32 mAverageDialysateTemp ; + Types::F32 mTargetUFVolume ; + Types::F32 mActualUFVolume ; + Types::F32 mTargetUFRate ; + Types::F32 mActualUFRate ; + Types::U32 mSalineBolusVolume ; + Types::U32 mHeparinType ; + Types::U32 mHeparinConcentration ; + Types::F32 mHeparinBolusVolume ; + Types::F32 mHeparinDispenseRate ; + Types::U32 mHeparinPreStop ; + Types::F32 mHeparinDeliveredVolume ; + Types::F32 mAverageArterialPressure ; + Types::F32 mAverageVenousPressure ; + Types::U32 mEndTreatmentEarlyAlarm ; + Types::U32 mDeviceID ; + Types::U32 mWaterSampleTestResult ; + } _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("AdjustTreatmentLog") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mBloodFlowRate = 0; /*!< Blood Flow Rate (mL/min) */ + quint32 mDialysateFlowRate = 0; /*!< Dialysate Flow Rate (mL/min) */ + quint32 mTreatmentDuration = 0; /*!< Treatment Duration (min) */ + quint32 mActualTreatmentDuration = 0; /*!< Actual Treatment Duration (min) */ + quint32 mAcidConcentrateType = 0; /*!< Acid Concentrate Type */ + quint32 mBicarbonateConcentrateType = 0; /*!< Bicarbonate Concentrate Type */ + quint32 mPotassiumConcentration = 0; /*!< Potassium Concentration (mEq/L) */ + quint32 mCalciumConcentration = 0; /*!< Calcium Concentration (mEq/L) */ + quint32 mBicarbonateConcentration = 0; /*!< Bicarbonate Concentration (mEq/L) */ + quint32 mSodiumConcentration = 0; /*!< SodiumConcentration (mEq/L) */ + float mDialysateTemperature = 0; /*!< Dialysate Temperature (Celsius) */ + quint32 mDialyzerType = 0; /*!< Dialyzer Type */ + quint32 mTreatmentDateTime = 0; /*!< Treatment Date and Time */ + float mAverageBloodFlow = 0; /*!< Average Blood Flow (mL/min) */ + float mAverageDialysateFlow = 0; /*!< Average Dialysate Flow (mL/min) */ + float mDialysateVolumeUsed = 0; /*!< Dialysate Volume Used (L) */ + float mAverageDialysateTemp = 0; /*!< Average Dialysate Temp (Celsius) */ + float mTargetUFVolume = 0; /*!< Target UF Volume (L) */ + float mActualUFVolume = 0; /*!< Actual UF Volume (L) */ + float mTargetUFRate = 0; /*!< Target UF Rate (mL/min) */ + float mActualUFRate = 0; /*!< Actual UF Rate (mL/min) */ + quint32 mSalineBolusVolume = 0; /*!< Saline Bolus Volume (mL) */ + quint32 mHeparinType = 0; /*!< Heparin Type */ + quint32 mHeparinConcentration = 0; /*!< Heparin Concentration (IU/mL) */ + float mHeparinBolusVolume = 0; /*!< Heparin Bolus Volume (mL) */ + float mHeparinDispenseRate = 0; /*!< Heparin Dispense Rate (mL/hr) */ + quint32 mHeparinPreStop = 0; /*!< Heparin Pre-Stop (min) */ + float mHeparinDeliveredVolume = 0; /*!< Heparin Delivered Volume (mL) */ + float mAverageArterialPressure = 0; /*!< Average Arterial Pressure (mmHg) */ + float mAverageVenousPressure = 0; /*!< Average Venous Pressure (mmHg) */ + quint32 mEndTreatmentEarlyAlarm = 0; /*!< End Treatment Early Alarm */ + quint32 mDeviceID = 0; /*!< Device ID */ + quint32 mWaterSampleTestResult = 0; /*!< Water Sample Test Result */ + }; + + MAdjustTreatmentLogResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustTreatmentLogResponse::Data AdjustTreatmentLogResponseData; Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentAdjustDisposablesPrimeResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 18-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 18-Mar-2021 + * + */ +#include "MPreTreatmentAdjustDisposablesPrimeResponse.h" + +using namespace Model; + +QVariantList MAdjustDisposablesPrimeResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustDisposablesPrimeResponse::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 MAdjustDisposablesPrimeResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustDisposablesPrimeResponseData MAdjustDisposablesPrimeResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustDisposablesPrimeResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentAdjustDisposablesPrimeResponse.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 MAdjustDisposablesPrimeResponse class + * \details The DisposablesPrime adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------: | + * |0x3D00| 0x020 | 6 | Rsp | Y | HD | UI | DisposablesPrime Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustDisposablesPrimeReq : DisposablesPrime Request + * \sa MTreatmentDisposablesPrime : DisposablesPrime Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustDisposablesPrime | + * + */ +class MAdjustDisposablesPrimeResponse : 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("AdjustDisposablesPrime") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustDisposablesPrimeResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDisposablesPrimeResponse::Data AdjustDisposablesPrimeResponseData; Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustInitTreatmentResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustParametersValidationResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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.mAccepted .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.mAccepted )) + 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.mAccepted = _data.mAccepted .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/pretreatment/MPreTreatmentAdjustParametersValidationResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustParametersValidationResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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::mAccepted | + * | #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 mAccepted ; + 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 mAccepted = 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/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionBeginResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustPatientConnectionConfirmResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustRequests.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustRequests.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 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 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 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:: MAdjustUltrafiltrationInitReq AdjustUltrafiltrationInitRequestData; +typedef Model:: MAdjustPatientConnectionConfirmReq AdjustPatientConnectionConfirmRequestData; +typedef Model:: MAdjustStartTreatmentReq AdjustStartTreatmentRequestData; Index: sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustStartTreatmentResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustUltrafiltrationInitResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustWaterSampleResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.cpp (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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/pretreatment/MPreTreatmentAdjustWaterSampleResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.h (revision 0) +++ sources/model/hd/adjustment/pretreatment/MPreTreatmentAdjustWaterSampleResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,53 @@ +/*! + * + * 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 MTreatmentAdjustBloodDialysateResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentAdjustBloodDialysateResponse.h" + +using namespace Model; + +QVariantList MAdjustBloodDialysateResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mReason .value, + _data.mBloodRate .value, + _data.mDialysateRate .value + }; +} + +bool MAdjustBloodDialysateResponse::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.mBloodRate )) + if (GetValue(vByteArray, index, _data.mDialysateRate )) + 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; } +} + +/*! + * \brief MAdjustBloodDialysateResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustBloodDialysateResponseData MAdjustBloodDialysateResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mBloodRate = _data.mBloodRate .value; + data.mDialysateRate = _data.mDialysateRate .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustBloodDialysateResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,88 @@ +/*! + * + * 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 MTreatmentAdjustBloodDialysateResponse.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustBloodDialysateResponse class + * \details The blood/dialysate rate change response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1800| 0x020 | 6 | Rsp | Y | HD | UI | Blood/dialysate rate change Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(U32) | \ref Data::mBloodRate | + * | #4:(U32) | \ref Data::mDialysateRate | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustBloodDialysate | + * + */ +class MAdjustBloodDialysateResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::U32 mBloodRate ; + Types::U32 mDialysateRate ; + } _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("AdjustBloodDialysate"); } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mBloodRate = 0; /*!< BloodRate value of type quint32 extracted out */ + quint32 mDialysateRate = 0; /*!< DialysateRate value of type quint32 extracted out */ + }; + + MAdjustBloodDialysateResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustBloodDialysateResponse::Data AdjustBloodDialysateResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,53 @@ +/*! + * + * 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 MTreatmentAdjustDurationResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentAdjustDurationResponse.h" + +using namespace Model; + +QVariantList MAdjustDurationResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + _data.mDuration.value, + _data.mUFVolume.value + }; +} + +bool MAdjustDurationResponse::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.mDuration )) + if (GetValue(vByteArray, index, _data.mUFVolume )) + 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; } +} + +/*! + * \brief MAdjustDurationResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustDurationResponseData MAdjustDurationResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + data.mDuration = _data.mDuration.value; + data.mUFVolume = _data.mUFVolume.value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustDurationResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,89 @@ +/*! + * + * 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 MTreatmentAdjustDurationResponse.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustDurationResponse class + * \details The treatment duration change response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1B00| 0x020 | 6 | Rsp | Y | HD | UI | Treatment Duration change Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(U32) | \ref Data::mDuration | + * | #4:(F32) | \ref Data::mUFVolume | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustDuration | + * + */ +class MAdjustDurationResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::U32 mDuration ; + Types::F32 mUFVolume ; + } _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("AdjustDuration"); } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mDuration = 0; /*!< Duration value of type quint32 extracted out */ + float mUFVolume = 0; /*!< UF Volume value of type quint32 extracted out */ + }; + + MAdjustDurationResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustDurationResponse::Data AdjustDurationResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustEndResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#include "MTreatmentAdjustEndResponse.h" + +using namespace Model; + +QVariantList MAdjustTreatmentEndResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustTreatmentEndResponse::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 MAdjustTreatmentEndResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustTreatmentEndResponseData MAdjustTreatmentEndResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustEndResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustEndResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustTreatmentEndResponse class + * \details The TreatmentEnd adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------: | + * |0x5800| 0x020 | 6 | Rsp | Y | HD | UI | Treatment End Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustTreatmentEndReq : Treatment End Request + * \sa MTreatmentTreatmentEnd : Treatment End Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustTxEnd | + * + */ +class MAdjustTreatmentEndResponse : 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("AdjustTxEnd") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustTreatmentEndResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustTreatmentEndResponse::Data AdjustTreatmentEndResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustHeparinResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "MTreatmentAdjustHeparinResponse.h" + +using namespace Model; + +QVariantList MAdjustHeparinResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustHeparinResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mAccepted )) + if (GetValue(vByteArray, index, _data.mReason )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustHeparinResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustHeparinResponseData MAdjustHeparinResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustHeparinResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustHeparinResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustHeparinResponse class + * \details The Heparin adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------:| + * |0x4C00| 0x020 | 6 | Rsp | Y | HD | UI | Heparin Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustHeparinReq : Heparin Request + * \sa MTreatmentHeparin : Heparin Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustHeparin | + * + */ +class MAdjustHeparinResponse : 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("AdjustHeparin") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustHeparinResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustHeparinResponse::Data AdjustHeparinResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,61 @@ +/*! + * + * 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 MTreatmentAdjustPressuresLimitsResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 1-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 1-Nov-2020 + * + */ +#include "MTreatmentAdjustPressuresLimitsResponse.h" + +using namespace Model; + +QVariantList MAdjustPressuresLimitsResponse::parameters() const { + return { + _data.mAccepted .value, + _data.mReason .value, + _data.mArterialLimitLow .value, + _data.mArterialLimitHigh .value, + _data.mVenousLimitLow .value, + _data.mVenousLimitHigh .value + }; +} + +bool MAdjustPressuresLimitsResponse::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.mArterialLimitLow )) + if (GetValue(vByteArray, index, _data.mArterialLimitHigh )) + if (GetValue(vByteArray, index, _data.mVenousLimitLow )) + if (GetValue(vByteArray, index, _data.mVenousLimitHigh )) + 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; } +} + +/*! + * \brief MAdjustPressuresLimitsResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustPressuresLimitsResponseData MAdjustPressuresLimitsResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mArterialLimitLow = _data.mArterialLimitLow .value; + data.mArterialLimitHigh = _data.mArterialLimitHigh .value; + data.mVenousLimitLow = _data.mVenousLimitLow .value; + data.mVenousLimitHigh = _data.mVenousLimitHigh .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustPressuresLimitsResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,96 @@ +/*! + * + * 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 MTreatmentAdjustPressuresLimitsResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 1-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 1-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustPressuresLimitsResponse class + * \details The pressures limits adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------------------:| + * |0x4700| 0x020 | 6 | Rsp | Y | HD | UI | A/V BP Limit Change Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(S32) | \ref Data::mArterialLimitLow | + * | #4:(S32) | \ref Data::mArterialLimitHigh | + * | #5:(S32) | \ref Data::mVenousLimitLow | + * | #6:(S32) | \ref Data::mVenousLimitHigh | + * + * \sa Data + * \sa MAdjustPressureLimitsReq : Pressures limits adjustment request + * \sa MPressureOcclusion : Pressure data broadcast + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustPressuresLimits | + * + */ +class MAdjustPressuresLimitsResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted ; + Types::U32 mReason ; + Types::S32 mArterialLimitLow ; + Types::S32 mArterialLimitHigh ; + Types::S32 mVenousLimitLow ; + Types::S32 mVenousLimitHigh ; + } _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("AdjustPressuresLimits") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + qint32 mArterialLimitLow = 0; /*!< ArterialLimitLow value of type qint32 extracted out */ + qint32 mArterialLimitHigh = 0; /*!< ArterialLimitHigh value of type qint32 extracted out */ + qint32 mVenousLimitLow = 0; /*!< VenousLimitLow value of type qint32 extracted out */ + qint32 mVenousLimitHigh = 0; /*!< VenousLimitHigh value of type qint32 extracted out */ + }; + + MAdjustPressuresLimitsResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustPressuresLimitsResponse::Data AdjustPressuresLimitsResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustRecirculateResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "MTreatmentAdjustRecirculateResponse.h" + +using namespace Model; + +QVariantList MAdjustRecirculateResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustRecirculateResponse::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 MAdjustRecirculateResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustRecirculateResponseData MAdjustRecirculateResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRecirculateResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustRecirculateResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustRecirculateResponse class + * \details The Recirculate adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------: | + * |0x5500| 0x020 | 6 | Rsp | Y | HD | UI | Recirculate Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustRecirculateReq : Recirculate Request + * \sa MTreatmentRecirculate : Recirculate Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustRecirculate | + * + */ +class MAdjustRecirculateResponse : 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("AdjustRecirculate") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustRecirculateResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustRecirculateResponse::Data AdjustRecirculateResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,551 @@ +/*! + * + * 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) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Jul-2020 + * + */ + +#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 MAdjustPowerOffReq class + * \details The power off request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0100| 0x020 | 6 | Cmd | N | HD | UI | Power Off | + * + * | Payload || + * | || + * | #1:(U08) | \ref state | + * + * + */ +class MAdjustPowerOffReq : public MModel { +public: + quint8 state; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({state}); + } + + explicit MAdjustPowerOffReq(quint8 vState) : state(vState) { } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("PowerOff", vParameters); + } +}; + +/*! + * \brief The MAdjustBloodDialysateReq class + * \details The blood/dialysate rate change request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1700| 0x100 | 9 | Req | Y | UI | HD | Blood/dialysate rate Change | + * + * | Payload || + * | || + * | #1:(U32) | \ref bloodFlow | + * | #2:(U32) | \ref dialysateFlow | + * + * + */ +class MAdjustBloodDialysateReq : public MModel { +public: + quint32 bloodFlow = 0; + quint32 dialysateFlow = 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({bloodFlow , dialysateFlow}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustBloodDialysate", vParameters); + } +}; + +/*! + * \brief The MAdjustDurationReq class + * \details The treatment duration change request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1600| 0x100 | 9 | Req | Y | UI | HD | Treatment Duration Change Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref duration | + * + */ +class MAdjustDurationReq : public MModel { +public: + quint32 duration = 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({duration}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustDuration", vParameters); + } +}; + +/*! + * \brief The MAdjustUltrafiltrationStateReq class + * \details The ultrafiltration pause/resume request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1000| 0x100 | 9 | Req | Y | UI | HD | UF Pause/Resume | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + */ +class MAdjustUltrafiltrationStateReq : public MModel { +public: + + GuiUFCommands requestedState = GuiUFCommands::UF_CMD_PAUSE; // the requested state. Initially it's running => paused. + // 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("AdjustUFState", vParameters); + } +}; + +/*! + * \brief The MAdjustUltrafiltrationEditReq class + * \details The ultrafiltration volume change request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1100| 0x100 | 9 | Req | Y | UI | HD | UF Vol. Change Request | + * + * | Payload || + * | || + * | #1:(F32) | \ref volume | + * + */ +class MAdjustUltrafiltrationEditReq : 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("AdjustUFEdit", vParameters); + } +}; + +/*! + * \brief The MAdjustUltrafiltrationConfirmReq class + * \details The ultrafiltration volume change user confirm request model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1500| 0x100 | 9 | Req | Y | UI | HD | UF Vol. Change User Confirm | + * + * | Payload || + * | || + * | #1:(F32) | \ref volume | + * | #2:(U32) | \ref option | + * + * \sa Options + * + */ +class MAdjustUltrafiltrationConfirmReq : public MModel { +public: + enum Options : quint32 { + eDuration = Gui::GuiActions::UF_ADJ_TREATMENT_TIME, + eRate = Gui::GuiActions::UF_ADJ_UF_RATE, + }; + + float volume = 0; + Options option = eDuration; + // 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 , option}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustUFConfirm", vParameters); + } +}; + +/*! + * \brief The MAdjustSalineReq class + * \details The model to request the Saline Bolus state + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:--------------------:| + * |0x1200| 0x100 | 9 | Req | Y | UI | HD | Saline Bolus Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + * \sa State + * \sa MTreatmentSaline : Saline Bolus Data + * \sa MAdjustSalineResponse : Saline Bolus Response + * + */ +class MAdjustSalineReq : public MModel { +public: + GuiSalineCommands requestedState = GuiSalineCommands::SALINE_CMD_STOP; // the requested state. Initially it's Stop => start. + // 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("AdjustSaline", vParameters); + } +}; + +/*! + * \brief The MAdjustHeparinReq class + * \details The model to request the Heparin state + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------:| + * |0x4B00| 0x100 | 9 | Req | Y | UI | HD | Heparin Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + * \sa State + * \sa MTreatmentHeparin : Heparin Data + * \sa MAdjustHeparinResponse : Heparin Response + * + */ +class MAdjustHeparinReq : public MModel { +public: + GuiHeparinCommands requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE ; // the requested state. Initially it's running with Initial Bolus. + // 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("AdjustHeparin", vParameters); + } +}; + +/*! + * \brief The MAdjustPressuresLimitsReq class + * \details The model to request the pressures limits adjustment + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------------:| + * |0x4600| 0x100 | 9 | Req | Y | UI | HD | A/V BP Limit Change Request | + * + * | Payload ||| + * | ||| + * | #1:(S32) | \ref mArterialLimitLow | (mmHg) | + * | #2:(S32) | \ref mArterialLimitHigh | (mmHg) | + * | #3:(S32) | \ref mVenousLimitLow | (mmHg) | + * | #4:(S32) | \ref mVenousLimitHigh | (mmHg) | + * + * \sa MPressureOcclusion : Pressure data broadcast + * \sa MAdjustPressuresResponse : Pressures limit adjustment response + * + */ +class MAdjustPressuresLimitsReq : public MModel { + +public: + static const qint32 ArterialLimitLowDef = -300; // PRS354 manufacturing default + static const qint32 ArterialLimitHighDef = 0; // PRS355 manufacturing default + static const qint32 VenousLimitLowDef = +20; // PRS356 manufacturing default + static const qint32 VenousLimitHighDef = +400; // PRS357 manufacturing default + +public: + qint32 mArterialLimitLow = ArterialLimitLowDef ; ///< (S32) Arterial Pressure Limit Low (mmHg) + qint32 mArterialLimitHigh = ArterialLimitHighDef; ///< (S32) Arterial Pressure Limit High (mmHg) + qint32 mVenousLimitLow = VenousLimitLowDef ; ///< (S32) Venous Pressure Limit Low (mmHg) + qint32 mVenousLimitHigh = VenousLimitHighDef ; ///< (S32) Venous Pressure Limit High (mmHg) + + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString + ({ mArterialLimitLow , + mArterialLimitHigh , + mVenousLimitLow , + mVenousLimitHigh + }); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AdjustPressuresLimits", vParameters); + } +}; + +/*! + * \brief The MAdjustRinsebackReq class + * \details The model to request the Rinseback state + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------: | + * |0x5200| 0x100 | 9 | Req | Y | UI | HD | Rinseback Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + * \sa State + * \sa MTreatmentRinseback : Rinseback Data + * \sa MAdjustRinsebackResponse : Rinseback Response + * + */ +class MAdjustRinsebackReq : public MModel { +public: + GuiRinsebackCommands requestedState = GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_CONFIRM_START; // the requested state. + // 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("AdjustRinseback", vParameters); + } +}; + +/*! + * \brief The MAdjustRecirculateReq class + * \details The model to request the Recirculate state + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------: | + * |0x5400| 0x100 | 9 | Req | Y | UI | HD | Recirculate Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + * \sa State + * \sa MTreatmentRecirculate : Recirculate Data + * \sa MAdjustRecirculateResponse : Recirculate Response + * + */ +class MAdjustRecirculateReq : public MModel { +public: + GuiRecirculateCommands requestedState = GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT; // the requested state. + // 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("AdjustRecirculate", vParameters); + } +}; + +/*! + * \brief The MAdjustTreatmentEndReq class + * \details The model to request the Rinseback state + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------: | + * |0x5700| 0x100 | 9 | Req | Y | UI | HD | Treatment End Request | + * + * | Payload || + * | || + * | #1:(U32) | \ref requestedState | + * + * \sa State + * \sa MTreatmentEnd : Treatment End Data + * \sa MAdjustTreatmentEndResponse : Treatment End Response + * + */ +class MAdjustTreatmentEndReq : public MModel { +public: + GuiTreatmentEndCommands requestedState = GuiTreatmentEndCommands::REQUESTED_USER_ACTION_TX_END_RINSEBACK_START; // the requested state. + // 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("AdjustTxEnd", vParameters); + } +}; + +/*! + * \brief The MAdjustVersionsReq class + * \details The DG/HD versions request model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:------:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------------:| + * | 0x1C00 | 0x200 | 10 | Req | Y | UI | All | DG/HD Versions Request | + * + * | Payload || + * | || + * | #1:(N/A) | \ref None | + * + */ +class MAdjustVersionsReq : 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("Version", vParameters); + } + + static Can::Can_Id canid () { return Can::eChlid_UI_Sync; } +}; + +//// ---------- Alarms + +/*! + * \brief The MAlarmSilenceReq class + * \details The model to request alarm silent + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:-----------------------:| + * |0x3200| 0x100 | 9 | Req | Y | UI | HD | Alarm (de)Silent Request | + * + * | Payload || + * | || + * | #1:(U08) | silence | + * + */ +class MAlarmSilenceReq : public MModel { +public: + quint8 silence = 1; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({silence}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AlarmSilence", vParameters); + } +}; + +/*! + * \brief The MAlarmClearedConditionReq class + * \details The model to tell HD an alarm has been acknowledged + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:----------:|:-----:|:----:|:---:|:---:|:----:|:------------------------:| + * |0x3F00| 0x001,2,4 | N/A | Cmd | Y | UI | HD | Alarm Condition Cleared | + * + * | Payload || + * | || + * | #1:(U32) | \ref alarmID | + * + */ +// 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. +class MAlarmClearedConditionReq : public MModel { +public: + GuiAlarmID alarmID = GuiAlarmID::ALARM_ID_NO_ALARM; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({alarmID}); + } + // coco end + // coco begin validate : + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AlarmCondition", vParameters); + } +}; +// coco end + +/*! + * \brief The MAlarmUserActionReq class + * \details The model to tell HD an alarm action has been made by user + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:------------------:| + * |0x4000| 0x100 | N/A | Cmd | Y | UI | HD | Alarm User Action | + * + * | Payload || + * | || + * | #1:(U32) | \ref action | + * + */ +class MAlarmUserActionReq : public MModel { +public: + GuiAlarmUserActions action; + // coco begin validated : Has been validated manually. + // This object is used statically for now, kept the logic for later usage. + QString toString() { + return toString({action}); + } + // coco end + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AlarmUserAction", vParameters); + } +}; + +} + +typedef Model:: MAdjustPowerOffReq AdjustPowerOffRequestData; +typedef Model:: MAdjustBloodDialysateReq AdjustBloodDialysateRequestData; +typedef Model:: MAdjustDurationReq AdjustDurationRequestData; +typedef Model:: MAdjustUltrafiltrationStateReq AdjustUltrafiltrationStateRequestData; +typedef Model:: MAdjustUltrafiltrationEditReq AdjustUltrafiltrationEditRequestData; +typedef Model::MAdjustUltrafiltrationConfirmReq AdjustUltrafiltrationConfirmRequestData; +typedef Model:: MAdjustSalineReq AdjustSalineRequestData; +typedef Model:: MAdjustHeparinReq AdjustHeparinRequestData; +typedef Model:: MAdjustRinsebackReq AdjustRinsebackRequestData; +typedef Model:: MAdjustRecirculateReq AdjustRecirculateRequestData; +typedef Model:: MAdjustTreatmentEndReq AdjustTreatmentEndRequestData; +typedef Model:: MAdjustPressuresLimitsReq AdjustPressuresLimitsRequestData; +typedef Model:: MAdjustVersionsReq AdjustVersionsRequestData; +// Alarms +typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; +typedef Model:: MAlarmClearedConditionReq AlarmClearedConditionRequestData; +typedef Model:: MAlarmUserActionReq AlarmUserActionRequestData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustRinsebackResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "MTreatmentAdjustRinsebackResponse.h" + +using namespace Model; + +QVariantList MAdjustRinsebackResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + }; +} + +bool MAdjustRinsebackResponse::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 MAdjustRinsebackResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustRinsebackResponseData MAdjustRinsebackResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRinsebackResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustRinsebackResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustRinsebackResponse class + * \details The Rinseback adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:----------------: | + * |0x5300| 0x020 | 6 | Rsp | Y | HD | UI | Rinseback Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * + * \sa Data + * \sa MAdjustRinsebackReq : Rinseback Request + * \sa MTreatmentRinseback : Rinseback Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustRinseback | + * + */ +class MAdjustRinsebackResponse : 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("AdjustRinseback") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + }; + + MAdjustRinsebackResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustRinsebackResponse::Data AdjustRinsebackResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustSalineResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 01-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 01-Apr-2021 + * + */ +#include "MTreatmentAdjustSalineResponse.h" + +using namespace Model; + +QVariantList MAdjustSalineResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + _data.mTarget .value, + }; +} + +bool MAdjustSalineResponse::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.mTarget )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustSalineResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustSalineResponseData MAdjustSalineResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + data.mTarget = _data.mTarget .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustSalineResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,87 @@ +/*! + * + * 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 MTreatmentAdjustSalineResponse.h + * \author (last) Behrouz NematiPour + * \date (last) 01-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 01-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustSalineResponse class + * \details The Saline Bolus adjustment response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:---------------------:| + * |0x1400| 0x020 | 6 | Rsp | Y | HD | UI | Saline Bolus Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(U32) | \ref Data::mTarget | + * + * \sa Data + * \sa MAdjustSalineReq : Saline Bolus Request + * \sa MTreatmentSaline : Saline Bolus Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustSaline | + * + */ +class MAdjustSalineResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + Types::U32 mTarget ; + } _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("AdjustSaline") ; } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mTarget = 0; /*!< Target Volume value of type quint32 extracted out */ + }; + + MAdjustSalineResponse () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustSalineResponse::Data AdjustSalineResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,65 @@ +/*! + * + * 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 MTreatmentAdjustUltrafiltrationConfirmResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" + +using namespace Model; + +QString MAdjustUltrafiltrationConfirmResponse::toString() const { + return QString(stringPrefix + ",%1,%2,%3,%4,%5") + .arg(_data.mAccepted .value) + .arg(_data.mReason .value) + .arg(_data.mVolume .value) + .arg(_data.mDuration .value) + .arg(_data.mRate .value) + ; +} + +void MAdjustUltrafiltrationConfirmResponse::toVariantList(QVariantList &vData) const { + vData += _data.mAccepted .value; + vData += _data.mReason .value; + vData += _data.mVolume .value; + vData += _data.mDuration .value; + vData += _data.mRate .value; +} + +bool MAdjustUltrafiltrationConfirmResponse::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 )) + if (GetValue(vByteArray, index, _data.mDuration )) + if (GetValue(vByteArray, index, _data.mRate )) + 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; } +} + +/*! + * \brief MAdjustUltrafiltrationConfirmResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustUltrafiltrationConfirmResponseData MAdjustUltrafiltrationConfirmResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mVolume = _data.mVolume .value; + data.mDuration = _data.mDuration .value; + data.mRate = _data.mRate .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationConfirmResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,92 @@ +/*! + * + * 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 MTreatmentAdjustUltrafiltrationConfirmResponse.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 "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustUltrafiltrationConfirmResponse class + * \details The UF vol. change confirmation response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x2E00| 0x020 | 6 | Rsp | Y | HD | UI | UF Vol. Change Confirmation Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | | | + * | #3:(F32) | \ref Data::mVolume | + * | #4:(U32) | \ref Data::mDuration | + * | #5:(F32) | \ref Data::mRate | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustUFConfirm | + * + */ +class MAdjustUltrafiltrationConfirmResponse { + + // friends + friend class ::tst_models; + +public: + QString stringPrefix = "AdjustUFConfirm"; + 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 */ + quint32 mDuration = 0; /*!< duration value of type quint32 extracted out */ + float mRate = 0; /*!< rate value of type float extracted out */ + }; + +protected: + struct _Data { + Types::U32 mAccepted ; + Types::U32 mReason ; + + Types::F32 mVolume ; + Types::U32 mDuration ; + Types::F32 mRate ; + } _data; + +public: + MAdjustUltrafiltrationConfirmResponse () { } + + QString toString ( ) const ; + void toVariantList ( QVariantList &vData ) const ; + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr); + + Data data() const; +}; +} + +typedef Model::MAdjustUltrafiltrationConfirmResponse::Data AdjustUltrafiltrationConfirmResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,80 @@ +/*! + * + * 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 MTreatmentAdjustUltrafiltrationEditResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentAdjustUltrafiltrationEditResponse.h" + +using namespace Model; + +QString MAdjustUltrafiltrationEditResponse::toString() const { + return QString(stringPrefix + ",%1,%2,%3,%4,%5,%6,%7,%8") + .arg(_data.mAccepted .value) + .arg(_data.mReason .value) + .arg(_data.mVolume .value) + .arg(_data.mDuration .value) + .arg(_data.mDurationDiff.value) + .arg(_data.mRate .value) + .arg(_data.mRateDiff .value) + .arg(_data.mRateOld .value) + ; +} + +void MAdjustUltrafiltrationEditResponse::toVariantList(QVariantList &vData) const { + vData += _data.mAccepted .value; + vData += _data.mReason .value; + vData += _data.mVolume .value; + vData += _data.mDuration .value; + vData += _data.mDurationDiff.value; + vData += _data.mRate .value; + vData += _data.mRateDiff .value; + vData += _data.mRateOld .value; +} + +bool MAdjustUltrafiltrationEditResponse::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 )) + if (GetValue(vByteArray, index, _data.mDuration )) + if (GetValue(vByteArray, index, _data.mDurationDiff )) + if (GetValue(vByteArray, index, _data.mRate )) + if (GetValue(vByteArray, index, _data.mRateDiff )) + if (GetValue(vByteArray, index, _data.mRateOld )) + 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; } +} + +/*! + * \brief MAdjustUltrafiltrationEditResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustUltrafiltrationEditResponseData MAdjustUltrafiltrationEditResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted .value; + data.mReason = _data.mReason .value; + data.mVolume = _data.mVolume .value; + data.mDuration = _data.mDuration .value; + data.mDurationDiff = _data.mDurationDiff.value; + data.mRate = _data.mRate .value; + data.mRateDiff = _data.mRateDiff .value; + data.mRateOld = _data.mRateOld .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationEditResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,92 @@ +/*! + * + * 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 MTreatmentAdjustUltrafiltrationEditResponse.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 "MTreatmentAdjustUltrafiltrationConfirmResponse.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustUltrafiltrationEditResponse class + * \details The UF vol. change response model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1300| 0x020 | 6 | Rsp | Y | HD | UI | UF Vol. Change Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | | | + * | #3:(F32) | \ref Data::mVolume | + * | #4:(U32) | \ref Data::mDuration | + * | #5:(F32) | \ref Data::mRate | + * | | | + * | #6:(S32) | \ref Data::mDurationDiff | + * | #7:(F32) | \ref Data::mRateDiff | + * | #8:(F32) | \ref Data::mRateOld | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustUFEdit | + * + */ +class MAdjustUltrafiltrationEditResponse : public MAdjustUltrafiltrationConfirmResponse +{ + + // friends + friend class ::tst_models; + +public: + QString stringPrefix = "AdjustUFEdit"; + struct Data : public MAdjustUltrafiltrationConfirmResponse::Data { + qint32 mDurationDiff= 0; /*!< durationDiff value of type quint32 extracted out */ + float mRateDiff = 0; /*!< rateDiff value of type float extracted out */ + float mRateOld = 0; /*!< rateOld value of type float extracted out */ + }; + +private: + struct : public MAdjustUltrafiltrationConfirmResponse::_Data { + Types::S32 mDurationDiff ; + Types::F32 mRateDiff ; + Types::F32 mRateOld ; + } _data; + +public: + MAdjustUltrafiltrationEditResponse () { } + + QString toString ( ) const ; + void toVariantList ( QVariantList &vData ) const ; + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr); + + Data data() const; +}; +} + +typedef Model::MAdjustUltrafiltrationEditResponse::Data AdjustUltrafiltrationEditResponseData; Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.cpp =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.cpp (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentAdjustUltrafiltrationStateResponse.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentAdjustUltrafiltrationStateResponse.h" + +using namespace Model; + +QVariantList MAdjustUltrafiltrationStateResponse::parameters() const { + return { + _data.mAccepted.value, + _data.mReason .value, + _data.mState .value, + }; +} + +bool MAdjustUltrafiltrationStateResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mAccepted )) + if (GetValue(vByteArray, index, _data.mReason )) + if (GetValue(vByteArray, index, _data.mState )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MAdjustUltrafiltrationStateResponse::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +AdjustUltrafiltrationStateResponseData MAdjustUltrafiltrationStateResponse::data() const { + Data data; + data.mAccepted = _data.mAccepted.value; + data.mReason = _data.mReason .value; + data.mState = _data.mState .value; + return data; +} Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.h =================================================================== diff -u --- sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.h (revision 0) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustUltrafiltrationStateResponse.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,85 @@ +/*! + * + * 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 MTreatmentAdjustUltrafiltrationStateResponse.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MAdjustUltrafiltrationStateResponse class + * \details The ultrafiltration adjustment state response model + * + * | MSG | CAN ID | M.Box | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:-----:|:----:|:---:|:---:|:----:|:------------------------:| + * |0x4100| 0x020 | 6 | Rsp | Y | HD | UI | UF Pause/Resume Response | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAccepted | + * | #2:(U32) | \ref Data::mReason | + * | #3:(U32) | \ref Data::mState | + * + * \sa Data + * \sa MAdjustUltrafiltrationStateReq : Ultrafiltration state change Request + * + *

Logging info

+ * | || + * | || + * | typeText | Event | + * | unitText | HD | + * | infoText | AdjustUFState | + * + */ +class MAdjustUltrafiltrationStateResponse : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mAccepted; + Types::U32 mReason ; + Types::U32 mState ; + } _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("AdjustUFState"); } + + struct Data { + bool mAccepted = 0; /*!< Accepted value of type quint32 extracted out */ + quint32 mReason = 0; /*!< Reason value of type quint32 extracted out */ + quint32 mState = 0; /*!< UF State value of type quint32 extracted out */ + }; + + MAdjustUltrafiltrationStateResponse() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MAdjustUltrafiltrationStateResponse::Data AdjustUltrafiltrationStateResponseData; Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentDisposablesPrimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentDisposablesPrimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentSelfTestDryData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentSelfTestDryData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentSelfTestNoCartridgeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentSelfTestNoCartridgeData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentStatesData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MPreTreatmentStatesData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentBloodPrimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentBloodPrimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentFlowsData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentFlowsData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentHeparinData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentHeparinData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentOutletFlowData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentOutletFlowData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentPressureOcclusionData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentPressureOcclusionData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentRecirculateData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentRecirculateData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentRinsebackData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentRinsebackData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentSalineData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentSalineData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentStatesData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentStatesData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentTimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/model/hd/data/MTreatmentTimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/model/hd/data/posttreatment/MPostTreatmentStatesData.cpp =================================================================== diff -u --- sources/model/hd/data/posttreatment/MPostTreatmentStatesData.cpp (revision 0) +++ sources/model/hd/data/posttreatment/MPostTreatmentStatesData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPostTreatmentStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "MPostTreatmentStatesData.h" + +using namespace Model; + +QVariantList MPostTreatmentStates::parameters() const { + return { + _data.mSubMode.value, + }; +} + +bool MPostTreatmentStates::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mSubMode )) + return true ; + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MPostTreatmentStates::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPostTreatmentStates::Data MPostTreatmentStates::data() const { + Data data; + data.mSubMode = _data.mSubMode.value; + return data; +} Index: sources/model/hd/data/posttreatment/MPostTreatmentStatesData.h =================================================================== diff -u --- sources/model/hd/data/posttreatment/MPostTreatmentStatesData.h (revision 0) +++ sources/model/hd/data/posttreatment/MPostTreatmentStatesData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,81 @@ +/*! + * + * 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 MPostTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MPostTreatmentStates class + * \details The post treatment states data model + * These are states of the post treatment. + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x7700| 0x040 | 7 | 1 Hz | N | HD | All | Post-Treatment States Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mState | + * + * \sa Data + * \sa HD_Post_Treatment_Mode_States + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | PostTreatmentStates | + * + */ +class MPostTreatmentStates : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mSubMode ; ///< State - HD_Post_Treatment_Mode_States + } _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("PostTreatmentStates"); } + + struct Data { + quint32 mSubMode = 0; ///< State - HD_Post_Treatment_Mode_States + }; + + MPostTreatmentStates() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPostTreatmentStates::Data PostTreatmentStatesData; Index: sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.cpp =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.cpp (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 "MPreTreatmentDisposablesPrimeData.h" + +using namespace Model; + +QVariantList MPreTreatmentDisposablesPrime::parameters() const { + return { + _data.mTimeout .value, + _data.mCountdown .value, + }; +} + +bool MPreTreatmentDisposablesPrime::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 + */ +MPreTreatmentDisposablesPrime::Data MPreTreatmentDisposablesPrime::data() const { + Data data; + data.mTimeout = _data.mTimeout .value; + data.mCountdown = _data.mCountdown .value; + return data; +} Index: sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.h =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.h (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentDisposablesPrimeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentDisposablesPrimeData.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 | DisposablesPrime | + * + */ +class MPreTreatmentDisposablesPrime : 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("DisposablesPrime"); } + + struct Data { + quint32 mTimeout = 0; ///< Timeout Total time in sec */ + quint32 mCountdown = 0; ///< Countdown current time countdown in sec */ + }; + +public: + MPreTreatmentDisposablesPrime() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPreTreatmentDisposablesPrime::Data PreTreatmentDisposablesPrimeData; Index: sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.cpp =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.cpp (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentSelfTestDryData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ +#include "MPreTreatmentSelfTestDryData.h" + +using namespace Model; + +QVariantList MPreTreatmentSelfTestDry::parameters() const { + return { + _data.mTimeout .value, + _data.mCountdown .value, + }; +} + +bool MPreTreatmentSelfTestDry::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 MPreTreatmentSelfTestDry::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPreTreatmentSelfTestDry::Data MPreTreatmentSelfTestDry::data() const { + Data data; + data.mTimeout = _data.mTimeout .value; + data.mCountdown = _data.mCountdown .value; + return data; +} Index: sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.h =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.h (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentSelfTestDryData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentSelfTestDryData.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 "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MPreTreatmentSelfTestDry class + * \details The progress time data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x6300| 0x020 | 9 | 1 Hz | N | HD | All | Pre-Treatment Self Test Dry Progress Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTimeout | + * | #2:(U32) | \ref Data::mCountDown | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | SelfTestDry | + * + */ +class MPreTreatmentSelfTestDry : 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("SelfTestDry"); } + + struct Data { + quint32 mTimeout = 0; ///< Timeout Total time in sec */ + quint32 mCountdown = 0; ///< Countdown current time countdown in sec */ + }; + +public: + MPreTreatmentSelfTestDry() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPreTreatmentSelfTestDry::Data PreTreatmentSelfTestDryData; Index: sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.cpp =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.cpp (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentSelfTestNoCartridgeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ +#include "MPreTreatmentSelfTestNoCartridgeData.h" + +using namespace Model; + +QVariantList MPreTreatmentSelfTestNoCartridge::parameters() const { + return { + _data.mTimeout .value, + _data.mCountdown .value, + }; +} + +bool MPreTreatmentSelfTestNoCartridge::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 MPreTreatmentSelfTestNoCartridge::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPreTreatmentSelfTestNoCartridge::Data MPreTreatmentSelfTestNoCartridge::data() const { + Data data; + data.mTimeout = _data.mTimeout .value; + data.mCountdown = _data.mCountdown .value; + return data; +} Index: sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.h =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.h (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentSelfTestNoCartridgeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MPreTreatmentSelfTestNoCartridgeData.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 "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MPreTreatmentSelfTestNoCartridge class + * \details The progress time data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x6100| 0x020 | 9 | 1 Hz | N | HD | All | Pre-Treatment Self Test No Cartridge Progress Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTimeout | + * | #2:(U32) | \ref Data::mCountDown | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | SelfTestNoCartridge | + * + */ +class MPreTreatmentSelfTestNoCartridge : 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("SelfTestNoCartridge"); } + + struct Data { + quint32 mTimeout = 0; ///< Timeout Total time in sec */ + quint32 mCountdown = 0; ///< Countdown current time countdown in sec */ + }; + +public: + MPreTreatmentSelfTestNoCartridge () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPreTreatmentSelfTestNoCartridge::Data PreTreatmentSelfTestNoCartridgeData; Index: sources/model/hd/data/pretreatment/MPreTreatmentStatesData.cpp =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentStatesData.cpp (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentStatesData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,73 @@ +/*! + * + * 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 MPreTreatmentStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MPreTreatmentStatesData.h" + +using namespace Model; + +QVariantList MPreTreatmentStates::parameters() const { + return { + _data.mSubMode .value, + _data.mWaterSampleState .value, + _data.mSelfTestConsumablesState .value, + _data.mSelfTestNoCartridgeState .value, + _data.mInstallationState .value, + _data.mSelfTestDryState .value, + _data.mPrimeState .value, + _data.mRecirculateState .value, + _data.mPatientConnectionState .value, + }; +} + +bool MPreTreatmentStates::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mSubMode )) + if (GetValue(vByteArray, index, _data.mWaterSampleState )) + if (GetValue(vByteArray, index, _data.mSelfTestConsumablesState )) + if (GetValue(vByteArray, index, _data.mSelfTestNoCartridgeState )) + if (GetValue(vByteArray, index, _data.mInstallationState )) + if (GetValue(vByteArray, index, _data.mSelfTestDryState )) + if (GetValue(vByteArray, index, _data.mPrimeState )) + if (GetValue(vByteArray, index, _data.mRecirculateState )) + if (GetValue(vByteArray, index, _data.mPatientConnectionState )) + 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; } +} + +/*! + * \brief MPreTreatmentStates::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPreTreatmentStates::Data MPreTreatmentStates::data() const { + Data data; + data.mSubMode = _data.mSubMode .value; + data.mWaterSampleState = _data.mWaterSampleState .value; + data.mSelfTestConsumablesState = _data.mSelfTestConsumablesState .value; + data.mSelfTestNoCartridgeState = _data.mSelfTestNoCartridgeState .value; + data.mInstallationState = _data.mInstallationState .value; + data.mSelfTestDryState = _data.mSelfTestDryState .value; + data.mPrimeState = _data.mPrimeState .value; + data.mRecirculateState = _data.mRecirculateState .value; + data.mPatientConnectionState = _data.mPatientConnectionState .value; + return data; +} Index: sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h =================================================================== diff -u --- sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h (revision 0) +++ sources/model/hd/data/pretreatment/MPreTreatmentStatesData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,112 @@ +/*! + * + * 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 MTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Nov-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Jul-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentStates class + * \details The treatment states data model + * These are states of the current treatment. + * It also includes the ultrafiltration states, saline bolus states. + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x5C00| 0x040 | 7 | 1 Hz | N | HD | All | Pre-Treatment States Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mSubMode | + * | #2:(U32) | \ref Data::mWaterSampleState | + * | #3:(U32) | \ref Data::mSelfTestConsumablesState | + * | #4:(U32) | \ref Data::mSelfTestNoCartridgeState | + * | #5:(U32) | \ref Data::mInstallationState | + * | #6:(U32) | \ref Data::mSelfTestDryState | + * | #7:(U32) | \ref Data::mPrimeState | + * | #8:(U32) | \ref Data::mRecirculateState | + * | #9:(U32) | \ref Data::mPatientConnectionState | + * + * \sa Data + * \sa HD_Pre_Treatment_Mode_States + * \sa HD_Pre_Treatment_Sample_Water_States + * \sa HD_Pre_Treatment_Consumable_Self_Test_States + * \sa HD_Pre_Treatment_No_Cart_Self_Tests_States + * \sa HD_Pre_Treatment_Dry_Self_Tests_States + * \sa HD_Pre_Treatment_Prime_States + * \sa HD_Pre_Treatment_Recirc_States + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | PreTreatmentStates | + * + */ +class MPreTreatmentStates : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mSubMode ; + Types::U32 mWaterSampleState ; + Types::U32 mSelfTestConsumablesState ; + Types::U32 mSelfTestNoCartridgeState ; + Types::U32 mInstallationState ; + Types::U32 mSelfTestDryState ; + Types::U32 mPrimeState ; + Types::U32 mRecirculateState ; + Types::U32 mPatientConnectionState ; + } _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("PreTreatmentStates"); } + + struct Data { + quint32 mSubMode = 0; ///< SubMode State - HD_Pre_Treatment_Mode_States + quint32 mWaterSampleState = 0; ///< WaterSample State - HD_Pre_Treatment_Sample_Water_States + quint32 mSelfTestConsumablesState = 0; ///< selfTestConsumables State - HD_Pre_Treatment_Consumable_Self_Test_States + quint32 mSelfTestNoCartridgeState = 0; ///< SelfTestNoCartridge State - HD_Pre_Treatment_No_Cart_Self_Tests_States + quint32 mInstallationState = 0; ///< Installation State - 0 = One state only + quint32 mSelfTestDryState = 0; ///< SelfTestDry State - HD_Pre_Treatment_Dry_Self_Tests_States + quint32 mPrimeState = 0; ///< Prime State - HD_Pre_Treatment_Prime_States + quint32 mRecirculateState = 0; ///< Recirculate State - HD_Pre_Treatment_Recirc_States + quint32 mPatientConnectionState = 0; ///< PatientConnection State - 0 = One state only + }; + + MPreTreatmentStates() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPreTreatmentStates::Data PreTreatmentStatesData; Index: sources/model/hd/data/treatment/MTreatmentBloodPrimeData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentBloodPrimeData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentBloodPrimeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentBloodPrimeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Feb-2021 + * + */ +#include "MTreatmentBloodPrimeData.h" + +using namespace Model; + +QVariantList MTreatmentBloodPrime::parameters() const { + return { + _data.mTarget .value, + _data.mCurrent.value, + }; +} + +bool MTreatmentBloodPrime::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTarget )) + if (GetValue(vByteArray, index, _data.mCurrent)) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MTreatmentBloodPrime::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentBloodPrime::Data MTreatmentBloodPrime::data() const { + Data data; + data.mTarget = _data.mTarget .value; + data.mCurrent = _data.mCurrent.value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentBloodPrimeData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentBloodPrimeData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentBloodPrimeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,83 @@ +/*! + * + * 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 MTreatmentBloodPrimeData.h + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Feb-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentBloodPrime class + * \details The treatment BloodPrime bolus data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x5900| 0x020 | 6 | 1 Hz | N | HD | UI | Blood Prime Progress Data | + * + * | Payload || + * | || + * | #1:(F32) | \ref Data::mTarget | + * | #2:(F32) | \ref Data::mCurrent | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | BloodPrimeData | + * + */ +class MTreatmentBloodPrime : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mTarget ; + Types::F32 mCurrent; + } _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("BloodPrimeData") ; } + + struct Data { + float mTarget = 0; ///< Target volume of BloodPrime delivery + float mCurrent = 0; ///< Current volume of BloodPrime delivery + }; + +public: + MTreatmentBloodPrime () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentBloodPrime::Data TreatmentBloodPrimeData; Index: sources/model/hd/data/treatment/MTreatmentFlowsData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentFlowsData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentFlowsData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,91 @@ +/*! + * + * 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 MTreatmentFlowsData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentFlowsData.h" + +using namespace Model; + +// ----- BloodFlow ----- + +QVariantList MFlow::parameters() const { + return { + _data.mFlowSetPoint .value, + _data.mMeasuredFlow .value, + _data.mRotorSpeed .value, + _data.mMotorSpeed .value, + _data.mMotorCtlSpeed .value, + _data.mMotorCtlCurrent.value, + _data.mPWMDutyCycle .value, + _data.mSigStrength .value, + }; +} + +bool MFlow::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mFlowSetPoint )) + if (GetValue(vByteArray, index, _data.mMeasuredFlow )) + if (GetValue(vByteArray, index, _data.mRotorSpeed )) + if (GetValue(vByteArray, index, _data.mMotorSpeed )) + if (GetValue(vByteArray, index, _data.mMotorCtlSpeed )) + if (GetValue(vByteArray, index, _data.mMotorCtlCurrent )) + if (GetValue(vByteArray, index, _data.mPWMDutyCycle )) + if (GetValue(vByteArray, index, _data.mSigStrength )) + 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; } +} + +/*! + * \brief MBloodFlow::data + * \details Provides model's Data from the received messages data values of + BloodFlow. + * \return Data + */ +MBloodFlow::Data MBloodFlow::data() const { + Data data; + data.mFlowSetPoint = _data.mFlowSetPoint .value; + data.mMeasuredFlow = _data.mMeasuredFlow .value; + data.mRotorSpeed = _data.mRotorSpeed .value; + data.mMotorSpeed = _data.mMotorSpeed .value; + data.mMotorCtlSpeed = _data.mMotorCtlSpeed .value; + data.mMotorCtlCurrent = _data.mMotorCtlCurrent.value; + data.mPWMDutyCycle = _data.mPWMDutyCycle .value; + data.mSigStrength = _data.mSigStrength .value; + return data; +} + +/*! + * \brief MDialysateFlow::data + * \details Provides model's Data from the received messages data values of + * DialysateFlow. + * \return Data + */ +MDialysateFlow::Data MDialysateFlow::data() const { + Data data; + data.mFlowSetPoint = _data.mFlowSetPoint .value; + data.mMeasuredFlow = _data.mMeasuredFlow .value; + data.mRotorSpeed = _data.mRotorSpeed .value; + data.mMotorSpeed = _data.mMotorSpeed .value; + data.mMotorCtlSpeed = _data.mMotorCtlSpeed .value; + data.mMotorCtlCurrent = _data.mMotorCtlCurrent.value; + data.mPWMDutyCycle = _data.mPWMDutyCycle .value; + data.mSigStrength = _data.mSigStrength .value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentFlowsData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentFlowsData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentFlowsData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,165 @@ +/*! + * + * 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 MTreatmentFlowsData.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MFlow class + * \details The parent class of the flow data models + */ +class MFlow : public MAbstract { + + QVariantList parameters() const override; + +protected: + struct Data { + Types::S32 mFlowSetPoint ; ///< Flow Set Point + Types::F32 mMeasuredFlow ; ///< Measured Flow + Types::F32 mRotorSpeed ; ///< Rotor Speed + Types::F32 mMotorSpeed ; ///< Motor Speed + Types::F32 mMotorCtlSpeed ; ///< Motor Controller Speed + Types::F32 mMotorCtlCurrent ; ///< Motor Controller Current + Types::F32 mPWMDutyCycle ; ///< PWM Duty Cycle in % + Types::F32 mSigStrength ; ///< Signal Strength in % + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eDatum; } + Unit_Enum unitText () const override { return Unit_Enum::eHD ; } + + MFlow () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; +}; + +/*! + * \brief The MBloodFlow class + * \details The blood flow data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0500| 0x040 | 7 | 1 Hz | N | HD | All | Blood Flow Data | + * + * | Payload || + * | || + * | #1:(S32) | \ref Data::mFlowSetPoint | + * | #2:(F32) | \ref Data::mMeasuredFlow | + * | #3:(F32) | \ref Data::mRotorSpeed | + * | #4:(F32) | \ref Data::mMotorSpeed | + * | #5:(F32) | \ref Data::mMotorCtlSpeed | + * | #6:(F32) | \ref Data::mMotorCtlCurrent | + * | #7:(F32) | \ref Data::mPWMDutyCycle | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | BloodFlow | + * + */ +class MBloodFlow : public MFlow { + + // friends + friend class ::tst_models; + +public: + QString infoText () const override { return QString("BloodFlow"); } + + struct Data { + qint32 mFlowSetPoint = 0; ///< Flow Set Point + float mMeasuredFlow = 0; ///< Measured Flow + float mRotorSpeed = 0; ///< Rotor Speed + float mMotorSpeed = 0; ///< Motor Speed + float mMotorCtlSpeed = 0; ///< Motor Controller Speed + float mMotorCtlCurrent = 0; ///< Motor Controller Current + float mPWMDutyCycle = 0; ///< PWM Duty Cycle in % + float mSigStrength = 0; ///< Signal Strength in % + }; + + MBloodFlow() { } + + Data data() const; +}; + +/*! + * \brief The MDialysateFlow class + * \details The dialysate flow data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0800| 0x040 | 7 | 1 Hz | N | HD | All | Dialysate Flow Data | + * + * | Payload || + * | || + * | #1:(S32) | \ref Data::mFlowSetPoint | + * | #2:(F32) | \ref Data::mMeasuredFlow | + * | #3:(F32) | \ref Data::mRotorSpeed | + * | #4:(F32) | \ref Data::mMotorSpeed | + * | #5:(F32) | \ref Data::mMotorCtlSpeed | + * | #6:(F32) | \ref Data::mMotorCtlCurrent | + * | #7:(F32) | \ref Data::mPWMDutyCycle | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | DialysateFlow | + * + */ +class MDialysateFlow : public MFlow { + + // friends + friend class ::tst_models; + +public: + QString infoText () const override { return QString("DialysateFlow"); } + + struct Data { + qint32 mFlowSetPoint = 0; ///< Flow Set Point + float mMeasuredFlow = 0; ///< Measured Flow + float mRotorSpeed = 0; ///< Rotor Speed + float mMotorSpeed = 0; ///< Motor Speed + float mMotorCtlSpeed = 0; ///< Motor Controller Speed + float mMotorCtlCurrent = 0; ///< Motor Controller Current + float mPWMDutyCycle = 0; ///< PWM Duty Cycle in % + float mSigStrength = 0; ///< Signal Strength in % + }; + + MDialysateFlow() { } + + Data data() const; +}; +} + +typedef Model:: MBloodFlow::Data BloodFlowData; +typedef Model::MDialysateFlow::Data DialysateFlowData; Index: sources/model/hd/data/treatment/MTreatmentHeparinData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentHeparinData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentHeparinData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentHeparinData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "MTreatmentHeparinData.h" + +using namespace Model; + +QVariantList MTreatmentHeparin::parameters() const { + return { + _data.mCumulative .value + }; +} + +bool MTreatmentHeparin::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mCumulative )) + return true ; + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MTreatmentHeparin::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentHeparin::Data MTreatmentHeparin::data() const { + Data data; + data.mCumulative = _data.mCumulative .value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentHeparinData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentHeparinData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentHeparinData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentHeparinData.h + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentHeparin class + * \details The treatment Heparin bolus data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x4D00| 0x040 | 7 | 1 Hz | N | HD | All | Treatment Heparin Data | + * + * | Payload || + * | || + * | #1:(F32) | \ref Data::mCumulative | + * + * \sa Data + * \sa MAdjustHeparinReq : Heparin Request + * \sa MAdjustHeparinResponse : Heparin Response + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | HeparinData | + * + */ +class MTreatmentHeparin : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mCumulative ; + } _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("HeparinData") ; } + + struct Data { + float mCumulative = 0; ///< Cumulative volume of all Heparin deliveries during current treatment + }; + +public: + MTreatmentHeparin () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentHeparin::Data TreatmentHeparinData; Index: sources/model/hd/data/treatment/MTreatmentOutletFlowData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentOutletFlowData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentOutletFlowData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,65 @@ +/*! + * + * 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 MTreatmentOutletFlowData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentOutletFlowData.h" + +using namespace Model; + +QVariantList MOutletFlow::parameters() const { + return { + _data.mRefUFVol .value, + _data.mMeasUFVol .value, + _data.mRotorSpeed .value, + _data.mMotorSpeed .value, + _data.mMotorCtlSpeed .value, + _data.mMotorCtlCurrent .value, + _data.mPWMDtCycle .value + }; +} + +bool MOutletFlow::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mRefUFVol )) + if (GetValue(vByteArray, index, _data.mMeasUFVol )) + if (GetValue(vByteArray, index, _data.mRotorSpeed )) + if (GetValue(vByteArray, index, _data.mMotorSpeed )) + if (GetValue(vByteArray, index, _data.mMotorCtlSpeed )) + if (GetValue(vByteArray, index, _data.mMotorCtlCurrent )) + if (GetValue(vByteArray, index, _data.mPWMDtCycle )) + 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; } +} + +/*! + * \brief MOutletFlow::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MOutletFlow::Data MOutletFlow::data() const { + Data data; + data.mRefUFVol = _data.mRefUFVol .value; + data.mMeasUFVol = _data.mMeasUFVol .value; + data.mRotorSpeed = _data.mRotorSpeed .value; + data.mMotorSpeed = _data.mMotorSpeed .value; + data.mMotorCtlSpeed = _data.mMotorCtlSpeed .value; + data.mMotorCtlCurrent = _data.mMotorCtlCurrent.value; + data.mPWMDtCycle = _data.mPWMDtCycle .value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentOutletFlowData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentOutletFlowData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentOutletFlowData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,97 @@ +/*! + * + * 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 MTreatmentOutletFlowData.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MOutletFlow class + * \details The outlet flow data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0B00| 0x040 | 7 | 1 Hz | N | HD | All | Outlet Flow Data | + * + * | Payload || + * | || + * | #1:(F32) | \ref Data::mRefUFVol | + * | #2:(F32) | \ref Data::mMeasUFVol | + * | #3:(F32) | \ref Data::mRotorSpeed | + * | #4:(F32) | \ref Data::mMotorSpeed | + * | #5:(F32) | \ref Data::mMotorCtlSpeed | + * | #6:(F32) | \ref Data::mMotorCtlCurrent | + * | #7:(F32) | \ref Data::mPWMDtCycle | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | OutletFlow | + * + */ +class MOutletFlow : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mRefUFVol ; + Types::F32 mMeasUFVol ; + Types::F32 mRotorSpeed ; + Types::F32 mMotorSpeed ; + Types::F32 mMotorCtlSpeed ; + Types::F32 mMotorCtlCurrent ; + Types::F32 mPWMDtCycle ; + } _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("OutletFlow"); } + + struct Data { + float mRefUFVol = 0; ///< Reference UF Volume + float mMeasUFVol = 0; ///< Measured UF Volume + float mRotorSpeed = 0; ///< Rotor Speed + float mMotorSpeed = 0; ///< Motor Speed + float mMotorCtlSpeed = 0; ///< Motor Controller Speed + float mMotorCtlCurrent = 0; ///< Motor Controller Current + float mPWMDtCycle = 0; ///< PWM Duty Cycle in % + }; + + MOutletFlow () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MOutletFlow::Data OutletFlowData; Index: sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,57 @@ +/*! + * + * 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 MTreatmentPressureOcclusionData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentPressureOcclusionData.h" + +using namespace Model; + +QVariantList MPressureOcclusion::parameters() const { + return { + _data.mArterialPressure .value, + _data.mVenousPressure .value, + _data.mBloodPumpOcclusion .value, + _data.mDialysateInletPumpOcclusion .value, + _data.mDialysateOutletPumpOcclusion .value + }; +} + +bool MPressureOcclusion::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mArterialPressure )) + if (GetValue(vByteArray, index, _data.mVenousPressure )) + if (GetValue(vByteArray, index, _data.mBloodPumpOcclusion )) + if (GetValue(vByteArray, index, _data.mDialysateInletPumpOcclusion )) + if (GetValue(vByteArray, index, _data.mDialysateOutletPumpOcclusion )) + 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; } +} + +/*! + * \brief MPressureOcclusion::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MPressureOcclusion::Data MPressureOcclusion::data() const { + Data data; + data.mArterialPressure = _data.mArterialPressure .value; + data.mVenousPressure = _data.mVenousPressure .value; + data.mBloodPumpOcclusion = _data.mBloodPumpOcclusion .value; + data.mDialysateInletPumpOcclusion = _data.mDialysateInletPumpOcclusion .value; + data.mDialysateOutletPumpOcclusion = _data.mDialysateOutletPumpOcclusion .value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentPressureOcclusionData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,91 @@ +/*! + * + * 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 MTreatmentPressureOcclusionData.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MPressureOcclusion class + * \details The pressureocclusion data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0900| 0x040 | 7 | 1 Hz | N | HD | All | PressureOcclusion Data | + * + * | Payload || + * | || + * | #1:(F32) | \ref Data::mArterialPressure | + * | #2:(F32) | \ref Data::mVenousPressure | + * | #3:(U32) | \ref Data::mBloodPumpOcclusion | + * | #4:(U32) | \ref Data::mDialysateInletPumpOcclusion | + * | #5:(U32) | \ref Data::mDialysateOutletPumpOcclusion | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | Pressure/Occlusion | + * + */ +class MPressureOcclusion : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mArterialPressure ; + Types::F32 mVenousPressure ; + Types::U32 mBloodPumpOcclusion ; + Types::U32 mDialysateInletPumpOcclusion ; + Types::U32 mDialysateOutletPumpOcclusion ; + } _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("Pressure/Occlusion"); } + + struct Data { + float mArterialPressure = 0; ///< ArterialPressure + float mVenousPressure = 0; ///< VenousPressure + quint32 mBloodPumpOcclusion = 0; ///< BloodPumpOcclusion + quint32 mDialysateInletPumpOcclusion = 0; ///< DialysateInletPumpOcclusion + quint32 mDialysateOutletPumpOcclusion = 0; ///< DialysateOutletPumpOcclusion + }; + + MPressureOcclusion () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MPressureOcclusion::Data PressureOcclusionData; Index: sources/model/hd/data/treatment/MTreatmentRecirculateData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentRecirculateData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentRecirculateData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentRecirculateData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#include "MTreatmentRecirculateData.h" + +using namespace Model; + +QVariantList MTreatmentRecirculate::parameters() const { + return { + _data.mTimeoutTotal .value, + _data.mTimeoutCountDown.value, + }; +} + +bool MTreatmentRecirculate::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTimeoutTotal )) + if (GetValue(vByteArray, index, _data.mTimeoutCountDown)) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MTreatmentRecirculate::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentRecirculate::Data MTreatmentRecirculate::data() const { + Data data; + data.mTimeoutTotal = _data.mTimeoutTotal .value; + data.mTimeoutCountDown = _data.mTimeoutCountDown.value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentRecirculateData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentRecirculateData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentRecirculateData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,85 @@ +/*! + * + * 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 MTreatmentRecirculateData.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentRecirculate class + * \details The treatment Recirculate bolus data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x5A00| 0x020 | 6 | 1 Hz | N | HD | UI | Recirculate Progress Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTimeoutTotal | + * | #2:(U32) | \ref Data::mTimeoutCountDown| + * + * \sa Data + * \sa MAdjustRecirculateReq : Recirculate Request + * \sa MAdjustRecirculateResponse : Recirculate Response + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | RecirculateData | + * + */ +class MTreatmentRecirculate : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mTimeoutTotal ; + Types::U32 mTimeoutCountDown; + } _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("RecirculateData") ; } + + struct Data { + quint32 mTimeoutTotal = 0; ///< Total Timeout of Recirculate delivery + quint32 mTimeoutCountDown = 0; ///< Current Timeout count down of Recirculate delivery + }; + +public: + MTreatmentRecirculate () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentRecirculate::Data TreatmentRecirculateData; Index: sources/model/hd/data/treatment/MTreatmentRinsebackData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentRinsebackData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentRinsebackData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,57 @@ +/*! + * + * 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 MTreatmentRinsebackData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Feb-2021 + * + */ +#include "MTreatmentRinsebackData.h" + +using namespace Model; + +QVariantList MTreatmentRinseback::parameters() const { + return { + _data.mTarget .value, + _data.mCurrent .value, + _data.mRate .value, + _data.mTimeoutTotal .value, + _data.mTimeoutCountDown.value, + }; +} + +bool MTreatmentRinseback::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTarget )) + if (GetValue(vByteArray, index, _data.mCurrent )) + if (GetValue(vByteArray, index, _data.mRate )) + if (GetValue(vByteArray, index, _data.mTimeoutTotal )) + if (GetValue(vByteArray, index, _data.mTimeoutCountDown)) + 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; } +} + +/*! + * \brief MTreatmentRinseback::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentRinseback::Data MTreatmentRinseback::data() const { + Data data; + data.mTarget = _data.mTarget .value; + data.mCurrent = _data.mCurrent .value; + data.mRate = _data.mRate .value; + data.mTimeoutTotal = _data.mTimeoutTotal .value; + data.mTimeoutCountDown = _data.mTimeoutCountDown.value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentRinsebackData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentRinsebackData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentRinsebackData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,94 @@ +/*! + * + * 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 MTreatmentRinsebackData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 07-Feb-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentRinseback class + * \details The treatment Rinseback bolus data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x5600| 0x020 | 6 | 1 Hz | N | HD | UI | Rinseback Progress Data | + * + * | Payload || + * | || + * | #1:(F32) | \ref Data::mTarget | + * | #2:(F32) | \ref Data::mCurrent | + * | #3:(U32) | \ref Data::mRate | + * | #4:(U32) | \ref Data::mTimeoutTotal | + * | #5:(U32) | \ref Data::mTimeoutCountDown| + * + * \sa Data + * \sa MAdjustRinsebackReq : Rinseback Request + * \sa MAdjustRinsebackResponse : Rinseback Response + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | RinsebackData | + * + */ +class MTreatmentRinseback : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mTarget ; + Types::F32 mCurrent ; + Types::U32 mRate ; + Types::U32 mTimeoutTotal ; + Types::U32 mTimeoutCountDown; + } _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("RinsebackData") ; } + + struct Data { + float mTarget = 0; ///< Target volume of rinseback delivery + float mCurrent = 0; ///< Current volume of rinseback delivery + quint32 mRate = 0; ///< Current flow rate of rinseback delivery + quint32 mTimeoutTotal = 0; ///< Total Timeout of rinseback delivery + quint32 mTimeoutCountDown = 0; ///< Current Timeout count down of rinseback delivery + }; + +public: + MTreatmentRinseback () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentRinseback::Data TreatmentRinsebackData; Index: sources/model/hd/data/treatment/MTreatmentSalineData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentSalineData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentSalineData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentSalineData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 08-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 10-Aug-2020 + * + */ +#include "MTreatmentSalineData.h" + +using namespace Model; + +QVariantList MTreatmentSaline::parameters() const { + return { + _data.mTarget .value, + _data.mCumulative .value, + _data.mDelivered .value, + }; +} + +bool MTreatmentSaline::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTarget )) + if (GetValue(vByteArray, index, _data.mCumulative )) + if (GetValue(vByteArray, index, _data.mDelivered )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MTreatmentSaline::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentSaline::Data MTreatmentSaline::data() const { + Data data; + data.mTarget = _data.mTarget .value; + data.mCumulative = _data.mCumulative .value; + data.mDelivered = _data.mDelivered .value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentSalineData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentSalineData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentSalineData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,88 @@ +/*! + * + * 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 MTreatmentSalineData.h + * \author (last) Behrouz NematiPour + * \date (last) 25-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 10-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentSaline class + * \details The treatment saline bolus data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x2F00| 0x040 | 7 | 1 Hz | N | HD | All | Treatment Saline Bolus Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTarget | + * | #2:(F32) | \ref Data::mCumulative | + * | #3:(F32) | \ref Data::mDelivered | + * + * \sa Data + * \sa MAdjustSalineReq : Saline Bolus Request + * \sa MAdjustSalineResponse : Saline Bolus Response + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | SalineData | + * + */ +class MTreatmentSaline : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mTarget ; + Types::F32 mCumulative ; + Types::F32 mDelivered ; + } _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("SalineData") ; } + + struct Data { + quint32 mTarget = 0; ///< Target volume for the current started saline bolus + float mCumulative = 0; ///< Cumulative volume of all saline deliveries during current treatment + float mDelivered = 0; ///< Current delivered saline volume + }; + +public: + MTreatmentSaline () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentSaline::Data TreatmentSalineData; Index: sources/model/hd/data/treatment/MTreatmentStatesData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentStatesData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentStatesData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,73 @@ +/*! + * + * 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 MTreatmentStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentStatesData.h" + +using namespace Model; + +QVariantList MTreatmentStates::parameters() const { + return { + _data.mSubMode .value, + _data.mUFState .value, + _data.mSalineState .value, + _data.mHeparinState .value, + _data.mRinsebackState .value, + _data.mRecirculateState .value, + _data.mBloodPrimeState .value, + _data.mTreatmentEndState .value, + _data.mTreatmentStopState .value, + }; +} + +bool MTreatmentStates::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mSubMode )) + if (GetValue(vByteArray, index, _data.mUFState )) + if (GetValue(vByteArray, index, _data.mSalineState )) + if (GetValue(vByteArray, index, _data.mHeparinState )) + if (GetValue(vByteArray, index, _data.mRinsebackState )) + if (GetValue(vByteArray, index, _data.mRecirculateState )) + if (GetValue(vByteArray, index, _data.mBloodPrimeState )) + if (GetValue(vByteArray, index, _data.mTreatmentEndState )) + if (GetValue(vByteArray, index, _data.mTreatmentStopState )) + 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; } +} + +/*! + * \brief MTreatmentStates::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentStates::Data MTreatmentStates::data() const { + Data data; + data.mSubMode = _data.mSubMode .value; + data.mUFState = _data.mUFState .value; + data.mSalineState = _data.mSalineState .value; + data.mHeparinState = _data.mHeparinState .value; + data.mRinsebackState = _data.mRinsebackState .value; + data.mRecirculateState = _data.mRecirculateState .value; + data.mBloodPrimeState = _data.mBloodPrimeState .value; + data.mTreatmentEndState = _data.mTreatmentEndState .value; + data.mTreatmentStopState = _data.mTreatmentStopState .value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentStatesData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentStatesData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentStatesData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,114 @@ +/*! + * + * 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 MTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Nov-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Jul-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentStates class + * \details The treatment states data model + * These are states of the current treatment. + * It also includes the ultrafiltration states, saline bolus states. + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0F00| 0x040 | 7 | 1 Hz | N | HD | All | Treatment States Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mSubMode | + * | #2:(U32) | \ref Data::mUFState | + * | #3:(U32) | \ref Data::mSalineState | + * | #4:(U32) | \ref Data::mHeparinState | + * | #5:(U32) | \ref Data::mRinsebackState | + * | #6:(U32) | \ref Data::mRecirculateState | + * | #6:(U32) | \ref Data::mBloodPrimeState | + * | #6:(U32) | \ref Data::mTreatmentEndState | + * | #6:(U32) | \ref Data::mTreatmentStopState | + * + * \sa Data + * \sa Treatment_States + * \sa UF_States + * \sa Saline_Bolus_States + * \sa Heparin_Bolus_States + * \sa Rinseback_States + * \sa Treatment_Recirc_States + * \sa Blood_Prime_States + * \sa Treatment_Stop_States + * \sa Treatment_End_States + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | TreatmentStates | + * + */ +class MTreatmentStates : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mSubMode ; + Types::U32 mUFState ; + Types::U32 mSalineState ; + Types::U32 mHeparinState ; + Types::U32 mRinsebackState ; + Types::U32 mRecirculateState ; + Types::U32 mBloodPrimeState ; + Types::U32 mTreatmentEndState ; + Types::U32 mTreatmentStopState ; + } _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("TreatmentStates"); } + + struct Data { + quint32 mSubMode = 0; ///< Sub-Mode State - Treatment_States + quint32 mUFState = 0; ///< UF State - UF_States + quint32 mSalineState = 0; ///< Saline State - Saline_Bolus_States + quint32 mHeparinState = 0; ///< Heparin State - Heparin_Bolus_States + quint32 mRinsebackState = 0; ///< Rinseback State - Rinseback_States + quint32 mRecirculateState = 0; ///< Recirculate State - Treatment_Recirc_States + quint32 mBloodPrimeState = 0; ///< BloodPrime State - Blood_Prime_States + quint32 mTreatmentEndState = 0; ///< TreatmentEnd State - Treatment_Stop_States + quint32 mTreatmentStopState = 0; ///< TreatmentStop State - Treatment_End_States + }; + + MTreatmentStates() { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentStates::Data TreatmentStatesData; Index: sources/model/hd/data/treatment/MTreatmentTimeData.cpp =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentTimeData.cpp (revision 0) +++ sources/model/hd/data/treatment/MTreatmentTimeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentTimeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NemaiPour + * \date (original) 02-Jul-2020 + * + */ +#include "MTreatmentTimeData.h" + +using namespace Model; + +QVariantList MTreatmentTime::parameters() const { + return { + _data.mTotal .value, + _data.mElapsed .value, + _data.mRemaining.value, + }; +} + +bool MTreatmentTime::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if (GetValue(vByteArray, index, _data.mTotal )) + if (GetValue(vByteArray, index, _data.mElapsed )) + if (GetValue(vByteArray, index, _data.mRemaining )) + return true ; + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } + else { if(vIndex) *vIndex = index; return false; } +} + +/*! + * \brief MTreatmentTime::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTreatmentTime::Data MTreatmentTime::data() const { + Data data; + data.mTotal = _data.mTotal .value; + data.mElapsed = _data.mElapsed .value; + data.mRemaining = _data.mRemaining.value; + return data; +} Index: sources/model/hd/data/treatment/MTreatmentTimeData.h =================================================================== diff -u --- sources/model/hd/data/treatment/MTreatmentTimeData.h (revision 0) +++ sources/model/hd/data/treatment/MTreatmentTimeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 MTreatmentTimeData.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" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTreatmentTime class + * \details The treatment time data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x0D00| 0x040 | 7 | 1 Hz | N | HD | All | Treatment Time Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mTotal | + * | #2:(U32) | \ref Data::mElapsed | + * | #3:(U32) | \ref Data::mRemaining | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | HD | + * | infoText | TreatmentTime | + * + */ +class MTreatmentTime : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 mTotal ; + Types::U32 mElapsed ; + Types::U32 mRemaining ; + } _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("TreatmentTime"); } + + struct Data { + quint32 mTotal = 0; ///< Total treatment time in sec */ + quint32 mElapsed = 0; ///< Elapsed treatment time in sec */ + quint32 mRemaining = 0; ///< Remaining treatment time in sec */ + }; + +public: + MTreatmentTime () { } + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MTreatmentTime::Data TreatmentTimeData; Index: sources/view/VView.h =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r88563177f10f20ced98750b2e40036201728131d --- sources/view/VView.h (.../VView.h) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/view/VView.h (.../VView.h) (revision 88563177f10f20ced98750b2e40036201728131d) @@ -99,70 +99,75 @@ //--------- Please add the view type to the lists below to register them ---------// //--------------------------------------------------------------------------------// //--------------------------------------------------------------------------------// -#define REGISTER_VIEW_TYPES \ - using namespace View; \ - \ - REGISTER_TYPE( VSettings ) \ - \ - REGISTER_TYPE( VAlarmStatus ) \ - REGISTER_TYPE( VPowerOff ) \ - /* Data - States */ \ - REGISTER_TYPE( VHDOperationMode ) \ - REGISTER_TYPE( VPreTreatmentStates ) \ - REGISTER_TYPE( VHDTreatmentStates ) \ - /* In-Treatment - Data */ \ - REGISTER_TYPE( VTreatmentBloodFlow ) \ - REGISTER_TYPE( VTreatmentDialysateFlow ) \ - REGISTER_TYPE( VTreatmentUltrafiltration ) \ - REGISTER_TYPE( VTreatmentPressureOcclusion ) \ - REGISTER_TYPE( VTreatmentTime ) \ - REGISTER_TYPE( VTreatmentRanges ) \ - REGISTER_TYPE( VTreatmentSaline ) \ - REGISTER_TYPE( VTreatmentHeparin ) \ - /* Post-Treatment */ \ - REGISTER_TYPE( VTreatmentRinseback ) \ - REGISTER_TYPE( VTreatmentRecirculate ) \ - REGISTER_TYPE( VTreatmentBloodPrime ) \ - /* Device - Data */ \ - REGISTER_TYPE( VHDAccelerometer ) \ - /* DG - Data */ \ - REGISTER_TYPE( VDGDrainPump ) \ - REGISTER_TYPE( VDGHeaters ) \ - REGISTER_TYPE( VDGLoadCellReadings ) \ - REGISTER_TYPE( VDGOperationMode ) \ - REGISTER_TYPE( VDGPressures ) \ - REGISTER_TYPE( VDGROPump ) \ - REGISTER_TYPE( VDGReservoir ) \ - REGISTER_TYPE( VDGTemperatures ) \ - REGISTER_TYPE( VDGValvesStates ) \ - REGISTER_TYPE( VDGAccelerometer ) \ - /* Pre-Treatment */ \ - REGISTER_TYPE( VPreTreatmentAdjustmentInitTreatment ) \ - REGISTER_TYPE( VDGFilterFlush ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentWaterSample ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentConsumablesConfirm ) \ - REGISTER_TYPE( VPreTreatmentSelfTestNoCartridge ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentDisposablesConfirm ) \ - REGISTER_TYPE( VPreTreatmentSelfTestDry ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentDisposablesPrime ) \ - REGISTER_TYPE( VPreTreatmentDisposablesPrime ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentPatientConnectionBegin) \ - REGISTER_TYPE( VPreTreatmentAdjustmentUltrafiltrationInit ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentPatientConnectionConfirm ) \ - REGISTER_TYPE( VPreTreatmentAdjustmentStartTreatment ) \ - /* In-Treatment */ \ - REGISTER_TYPE( VTreatmentAdjustmentDuration ) \ - REGISTER_TYPE( VTreatmentAdjustmentFlows ) \ - REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationState ) \ - REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationEdit ) \ - REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationConfirm ) \ - REGISTER_TYPE( VTreatmentAdjustmentSaline ) \ - REGISTER_TYPE( VTreatmentAdjustmentHeparin ) \ - REGISTER_TYPE( VTreatmentAdjustmentRinseback ) \ - REGISTER_TYPE( VTreatmentAdjustmentRecirculate ) \ - REGISTER_TYPE( VTreatmentAdjustmentEnd ) \ - REGISTER_TYPE( VTreatmentAdjustmentPressuresLimits ) \ - REGISTER_TYPE( VTreatmentCreate ) \ - REGISTER_TYPE( VTreatmentAdjustmentVersions ) \ +#define REGISTER_VIEW_TYPES \ + using namespace View; \ + \ + REGISTER_TYPE( VSettings ) \ + \ + REGISTER_TYPE( VAlarmStatus ) \ + REGISTER_TYPE( VPowerOff ) \ + /* Data - States */ \ + REGISTER_TYPE( VHDOperationMode ) \ + REGISTER_TYPE( VPreTreatmentStates ) \ + REGISTER_TYPE( VHDTreatmentStates ) \ + REGISTER_TYPE( VPostTreatmentStates ) \ + /* In-Treatment - Data */ \ + REGISTER_TYPE( VTreatmentBloodFlow ) \ + REGISTER_TYPE( VTreatmentDialysateFlow ) \ + REGISTER_TYPE( VTreatmentUltrafiltration ) \ + REGISTER_TYPE( VTreatmentPressureOcclusion ) \ + REGISTER_TYPE( VTreatmentTime ) \ + REGISTER_TYPE( VTreatmentRanges ) \ + REGISTER_TYPE( VTreatmentSaline ) \ + REGISTER_TYPE( VTreatmentHeparin ) \ + /* End-Treatment */ \ + REGISTER_TYPE( VTreatmentRinseback ) \ + REGISTER_TYPE( VTreatmentRecirculate ) \ + REGISTER_TYPE( VTreatmentBloodPrime ) \ + /* Device - Data */ \ + REGISTER_TYPE( VHDAccelerometer ) \ + /* DG - Data */ \ + REGISTER_TYPE( VDGDrainPump ) \ + REGISTER_TYPE( VDGHeaters ) \ + REGISTER_TYPE( VDGLoadCellReadings ) \ + REGISTER_TYPE( VDGOperationMode ) \ + REGISTER_TYPE( VDGPressures ) \ + REGISTER_TYPE( VDGROPump ) \ + REGISTER_TYPE( VDGReservoir ) \ + REGISTER_TYPE( VDGTemperatures ) \ + REGISTER_TYPE( VDGValvesStates ) \ + REGISTER_TYPE( VDGAccelerometer ) \ + /* Pre-Treatment */ \ + REGISTER_TYPE( VPreTreatmentAdjustmentInitTreatment ) \ + REGISTER_TYPE( VDGFilterFlush ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentWaterSample ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentConsumablesConfirm ) \ + REGISTER_TYPE( VPreTreatmentSelfTestNoCartridge ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentDisposablesConfirm ) \ + REGISTER_TYPE( VPreTreatmentSelfTestDry ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentDisposablesPrime ) \ + REGISTER_TYPE( VPreTreatmentDisposablesPrime ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentPatientConnectionBegin ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentUltrafiltrationInit ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentPatientConnectionConfirm ) \ + REGISTER_TYPE( VPreTreatmentAdjustmentStartTreatment ) \ + /* In-Treatment */ \ + REGISTER_TYPE( VTreatmentAdjustmentDuration ) \ + REGISTER_TYPE( VTreatmentAdjustmentFlows ) \ + REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationState ) \ + REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationEdit ) \ + REGISTER_TYPE( VTreatmentAdjustmentUltrafiltrationConfirm ) \ + REGISTER_TYPE( VTreatmentAdjustmentSaline ) \ + REGISTER_TYPE( VTreatmentAdjustmentHeparin ) \ + REGISTER_TYPE( VTreatmentAdjustmentRinseback ) \ + REGISTER_TYPE( VTreatmentAdjustmentRecirculate ) \ + REGISTER_TYPE( VTreatmentAdjustmentEnd ) \ + REGISTER_TYPE( VTreatmentAdjustmentPressuresLimits ) \ + REGISTER_TYPE( VTreatmentCreate ) \ + REGISTER_TYPE( VTreatmentAdjustmentVersions ) \ + /* Post-Treatment */ \ + REGISTER_TYPE( VPostTreatmentAdjustmentPatientDisconnectionConfirm ) \ + REGISTER_TYPE( VPostTreatmentAdjustmentDisposablesRemovalConfirm ) \ + REGISTER_TYPE( VPostTreatmentAdjustmentTreatmentLog ) \ //--------------------------------------------------------------------------------// Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentConsumablesConfirm.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentConsumablesConfirm.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesConfirm.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesConfirm.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesPrime.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentDisposablesPrime.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentInitTreatment.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentInitTreatment.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionBegin.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionConfirm.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentPatientConnectionConfirm.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentStartTreatment.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentStartTreatment.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentUltrafiltrationInit.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentUltrafiltrationInit.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentWaterSample.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VPreTreatmentAdjustmentWaterSample.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentDuration.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentDuration.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentEnd.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentEnd.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentFlows.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentFlows.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentHeparin.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentPressuresLimits.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentPressuresLimits.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentRecirculate.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentRecirculate.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentResponseBase.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentResponseBase.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentRinseback.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentRinseback.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationConfirm.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationEdit.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationEdit.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,52 @@ +/*! + * + * 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 VPostTreatmentAdjustDisposablesRemovalConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VPostTreatmentAdjustDisposablesRemovalConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentDisposablesRemovalConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustDisposablesRemovalConfirmRequestData); + ACTION_VIEW_CONNECTION(AdjustDisposablesRemovalConfirmResponseData); +} + +/*! + * \brief VPostTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::onActionReceive(const AdjustDisposablesRemovalConfirmResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::doConfirm + * \details the invocable slot to send user's Disposables Removal confirm + */ +void View::VPostTreatmentAdjustmentDisposablesRemovalConfirm::doConfirm() { + AdjustDisposablesRemovalConfirmRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h (revision 0) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustDisposablesRemovalConfirm.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPostTreatmentAdjustDisposablesRemovalConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPostTreatmentAdjustDisposablesRemovalConfirmResponse.h" + +namespace View { + +/*! + * \brief The VPostTreatmentAdjustmentDisposablesRemovalConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesRemovalConfirmResponse + * + */ +class VPostTreatmentAdjustmentDisposablesRemovalConfirm : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentDisposablesRemovalConfirm, AdjustDisposablesRemovalConfirmResponseData) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables Removal confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustDisposablesRemovalConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,36 @@ +/*! + * + * 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 VPostTreatmentAdjustPatientDisconnectionConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VPostTreatmentAdjustPatientDisconnectionConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentPatientDisconnectionConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustPatientDisconnectionConfirmRequestData); +} + +/*! + * \brief View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::doConfirm + * \details the invocable slot to send user's Patient Disconnection confirm + */ +void View::VPostTreatmentAdjustmentPatientDisconnectionConfirm::doConfirm() { + AdjustPatientDisconnectionConfirmRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h (revision 0) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustPatientDisconnectionConfirm.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,59 @@ +/*! + * + * 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 VPostTreatmentAdjustDisposablesRemovalConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" + +namespace View { + +/*! + * \brief The VPostTreatmentAdjustmentPatientDisconnectionConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesRemovalConfirmResponse + * + */ +class VPostTreatmentAdjustmentPatientDisconnectionConfirm : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS(VPostTreatmentAdjustmentPatientDisconnectionConfirm) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Patient Disconnection confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustPatientDisconnectionConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp =================================================================== diff -u --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (revision 0) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPostTreatmentAdjustTreatmentLog.cpp + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#include "VPostTreatmentAdjustTreatmentLog.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentTreatmentLog) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPostTreatmentAdjustmentTreatmentLog::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustTreatmentLogRequestData); + ACTION_VIEW_CONNECTION(AdjustTreatmentLogResponseData); +} + +/*! + * \brief VPostTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPostTreatmentAdjustmentTreatmentLog::onActionReceive(const AdjustTreatmentLogResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + bloodFlowRate ( vData.mBloodFlowRate ); + dialysateFlowRate ( vData.mDialysateFlowRate ); + treatmentDuration ( vData.mTreatmentDuration ); + actualTreatmentDuration ( vData.mActualTreatmentDuration ); + acidConcentrateType ( vData.mAcidConcentrateType ); + bicarbonateConcentrateType ( vData.mBicarbonateConcentrateType ); + potassiumConcentration ( vData.mPotassiumConcentration ); + calciumConcentration ( vData.mCalciumConcentration ); + bicarbonateConcentration ( vData.mBicarbonateConcentration ); + sodiumConcentration ( vData.mSodiumConcentration ); + dialysateTemperature ( vData.mDialysateTemperature ); + dialyzerType ( vData.mDialyzerType ); + treatmentDateTime ( vData.mTreatmentDateTime ); + averageBloodFlow ( vData.mAverageBloodFlow ); + averageDialysateFlow ( vData.mAverageDialysateFlow ); + dialysateVolumeUsed ( vData.mDialysateVolumeUsed ); + averageDialysateTemp ( vData.mAverageDialysateTemp ); + targetUFVolume ( vData.mTargetUFVolume ); + actualUFVolume ( vData.mActualUFVolume ); + targetUFRate ( vData.mTargetUFRate ); + actualUFRate ( vData.mActualUFRate ); + salineBolusVolume ( vData.mSalineBolusVolume ); + heparinType ( vData.mHeparinType ); + heparinConcentration ( vData.mHeparinConcentration ); + heparinBolusVolume ( vData.mHeparinBolusVolume ); + heparinDispenseRate ( vData.mHeparinDispenseRate ); + heparinPreStop ( vData.mHeparinPreStop ); + heparinDeliveredVolume ( vData.mHeparinDeliveredVolume ); + averageArterialPressure ( vData.mAverageArterialPressure ); + averageVenousPressure ( vData.mAverageVenousPressure ); + endTreatmentEarlyAlarm ( vData.mEndTreatmentEarlyAlarm ); + deviceID ( vData.mDeviceID ); + waterSampleTestResult ( vData.mWaterSampleTestResult ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the Previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPostTreatmentAdjustmentTreatmentLog::doConfirm + * \details the invocable slot to send user's Disposables Removal confirm + */ +void View::VPostTreatmentAdjustmentTreatmentLog::doRequest() { + AdjustTreatmentLogRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h =================================================================== diff -u --- sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (revision 0) +++ sources/view/hd/adjustment/posttreatment/VPostTreatmentAdjustTreatmentLog.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,94 @@ +/*! + * + * 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 VPostTreatmentAdjustTreatmentLog.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPostTreatmentAdjustTreatmentLogResponse.h" + +namespace View { + +/*! + * \brief The VPostTreatmentAdjustmentTreatmentLog class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustTreatmentLogResponse + * + */ +class VPostTreatmentAdjustmentTreatmentLog : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + PROPERTY(quint32 , bloodFlowRate , 0 ) + PROPERTY(quint32 , dialysateFlowRate , 0 ) + PROPERTY(quint32 , treatmentDuration , 0 ) + PROPERTY(quint32 , actualTreatmentDuration , 0 ) + PROPERTY(quint32 , acidConcentrateType , 0 ) + PROPERTY(quint32 , bicarbonateConcentrateType , 0 ) + PROPERTY(quint32 , potassiumConcentration , 0 ) + PROPERTY(quint32 , calciumConcentration , 0 ) + PROPERTY(quint32 , bicarbonateConcentration , 0 ) + PROPERTY(quint32 , sodiumConcentration , 0 ) + PROPERTY(float , dialysateTemperature , 0 ) + PROPERTY(quint32 , dialyzerType , 0 ) + PROPERTY(quint32 , treatmentDateTime , 0 ) + PROPERTY(float , averageBloodFlow , 0 ) + PROPERTY(float , averageDialysateFlow , 0 ) + PROPERTY(float , dialysateVolumeUsed , 0 ) + PROPERTY(float , averageDialysateTemp , 0 ) + PROPERTY(float , targetUFVolume , 0 ) + PROPERTY(float , actualUFVolume , 0 ) + PROPERTY(float , targetUFRate , 0 ) + PROPERTY(float , actualUFRate , 0 ) + PROPERTY(quint32 , salineBolusVolume , 0 ) + PROPERTY(quint32 , heparinType , 0 ) + PROPERTY(quint32 , heparinConcentration , 0 ) + PROPERTY(float , heparinBolusVolume , 0 ) + PROPERTY(float , heparinDispenseRate , 0 ) + PROPERTY(quint32 , heparinPreStop , 0 ) + PROPERTY(float , heparinDeliveredVolume , 0 ) + PROPERTY(float , averageArterialPressure , 0 ) + PROPERTY(float , averageVenousPressure , 0 ) + PROPERTY(quint32 , endTreatmentEarlyAlarm , 0 ) + PROPERTY(quint32 , deviceID , 0 ) + PROPERTY(quint32 , waterSampleTestResult , 0 ) + + VIEW_DEC_CLASS_ADJUSTMENT(VPostTreatmentAdjustmentTreatmentLog, AdjustTreatmentLogResponseData) + +public slots: + void doRequest(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables Removal confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustTreatmentLogRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,36 @@ +/*! + * + * 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 VPreTreatmentAdjustmentConsumablesConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentConsumablesConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentConsumablesConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentConsumablesConfirm::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustConsumablesConfirmRequestData); +} + +/*! + * \brief View::VPreTreatmentAdjustmentConsumablesConfirm::doConfirm + * \details the invocable slot to send user's consumables installation confirm + */ +void View::VPreTreatmentAdjustmentConsumablesConfirm::doConfirm() { + AdjustConsumablesConfirmRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentConsumablesConfirm.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,59 @@ +/*! + * + * 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 VPreTreatmentAdjustmentConsumablesConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentConsumablesConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustConsumablesConfirmResponse + * + */ +class VPreTreatmentAdjustmentConsumablesConfirm : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS(VPreTreatmentAdjustmentConsumablesConfirm) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's consumables installation confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustConsumablesConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,36 @@ +/*! + * + * 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 VPreTreatmentAdjustmentDisposablesConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentDisposablesConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentDisposablesConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentDisposablesConfirm::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustDisposablesConfirmRequestData); +} + +/*! + * \brief View::VPreTreatmentAdjustmentDisposablesConfirm::doConfirm + * \details the invocable slot to send user's Disposables installation confirm + */ +void View::VPreTreatmentAdjustmentDisposablesConfirm::doConfirm() { + AdjustDisposablesConfirmRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesConfirm.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,59 @@ +/*! + * + * 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 VPreTreatmentAdjustmentDisposablesConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentDisposablesConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesConfirmResponse + * + */ +class VPreTreatmentAdjustmentDisposablesConfirm : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS(VPreTreatmentAdjustmentDisposablesConfirm) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables installation confirm + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustDisposablesConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,52 @@ +/*! + * + * 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 VPreTreatmentAdjustmentDisposablesPrime.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentDisposablesPrime.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentDisposablesPrime) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentDisposablesPrime::initConnections() { + ACTION_VIEW_CONNECTION(AdjustDisposablesPrimeResponseData); + ADJUST_VIEW_CONNECTION(AdjustDisposablesPrimeRequestData ); +} + +/*! + * \brief VPreTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentDisposablesPrime::onActionReceive(const AdjustDisposablesPrimeResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentDisposablesPrime::doPrime + * \details the invocable slot to send user's Disposables installation Prime + */ +void View::VPreTreatmentAdjustmentDisposablesPrime::doPrime() { + AdjustDisposablesPrimeRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentDisposablesPrime.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentAdjustmentDisposablesPrime.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustDisposablesPrimeResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentDisposablesPrime class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDisposablesPrimeResponse + * + */ +class VPreTreatmentAdjustmentDisposablesPrime : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentDisposablesPrime, AdjustDisposablesPrimeResponseData) + +public slots: + void doPrime(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables installation Prime + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustDisposablesPrimeRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,63 @@ +/*! + * + * 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 VPreTreatmentAdjustmentInitTreatment.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentInitTreatment.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentInitTreatment) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentInitTreatment::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustInitTreatmentRequestData ); + ACTION_VIEW_CONNECTION(AdjustInitTreatmentResponseData ); +} + +/*! + * \brief VPreTreatmentAdjustmentInitTreatment::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentInitTreatment::onActionReceive(const AdjustInitTreatmentResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentInitTreatment::doInitiate + * \details requests to initiate a treatment and starting to set treatment parameters. + */ +void View::VPreTreatmentAdjustmentInitTreatment::doInitiate() { + AdjustInitTreatmentRequestData data; + data.requestedState = AdjustInitTreatmentRequestData::eInitiate; + emit didAdjustment(data); +} + +/*! + * \brief View::VPreTreatmentAdjustmentInitTreatment::doCancel + * \details requests to cancel the initiation of a treatment and goes back (typically to standby state) + */ +void View::VPreTreatmentAdjustmentInitTreatment::doCancel() { + AdjustInitTreatmentRequestData data; + data.requestedState = AdjustInitTreatmentRequestData::eCancel; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentInitTreatment.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,62 @@ +/*! + * + * 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 VPreTreatmentAdjustmentInitTreatment.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustInitTreatmentResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentInitTreatment class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustInitTreatmentResponse + * + */ +class VPreTreatmentAdjustmentInitTreatment : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentInitTreatment, AdjustInitTreatmentResponseData) + + // ----------- Adjust Ultrafiltration +public slots: + void doInitiate(); + void doCancel (); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send user request of start/stop the water sample. + * \param vData - data model that contains the request data. + */ + void didAdjustment(const AdjustInitTreatmentRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,52 @@ +/*! + * + * 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 VPreTreatmentAdjustmentPatientConnectionBegin.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentPatientConnectionBegin.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentPatientConnectionBegin) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentPatientConnectionBegin::initConnections() { + ACTION_VIEW_CONNECTION(AdjustPatientConnectionBeginResponseData); + ADJUST_VIEW_CONNECTION(AdjustPatientConnectionBeginRequestData ); +} + +/*! + * \brief VPreTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentPatientConnectionBegin::onActionReceive(const AdjustPatientConnectionBeginResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentPatientConnectionBegin::doPrime + * \details the invocable slot to send user's Disposables installation Prime + */ +void View::VPreTreatmentAdjustmentPatientConnectionBegin::doBegin() { + AdjustPatientConnectionBeginRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionBegin.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentAdjustmentPatientConnectionBegin.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustPatientConnectionBeginResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentPatientConnectionBegin class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustPatientConnectionBeginResponse + * + */ +class VPreTreatmentAdjustmentPatientConnectionBegin : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentPatientConnectionBegin, AdjustPatientConnectionBeginResponseData) + +public slots: + void doBegin(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables installation Prime + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustPatientConnectionBeginRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,52 @@ +/*! + * + * 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 VPreTreatmentAdjustmentPatientConnectionConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentPatientConnectionConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentPatientConnectionConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentPatientConnectionConfirm::initConnections() { + ACTION_VIEW_CONNECTION(AdjustPatientConnectionConfirmResponseData); + ADJUST_VIEW_CONNECTION(AdjustPatientConnectionConfirmRequestData ); +} + +/*! + * \brief VPreTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentPatientConnectionConfirm::onActionReceive(const AdjustPatientConnectionConfirmResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentPatientConnectionConfirm::doPrime + * \details the invocable slot to send user's Disposables installation Prime + */ +void View::VPreTreatmentAdjustmentPatientConnectionConfirm::doConfirm() { + AdjustPatientConnectionConfirmRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentPatientConnectionConfirm.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentAdjustmentPatientConnectionConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustPatientConnectionConfirmResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentPatientConnectionConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustPatientConnectionConfirmResponse + * + */ +class VPreTreatmentAdjustmentPatientConnectionConfirm : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentPatientConnectionConfirm, AdjustPatientConnectionConfirmResponseData) + +public slots: + void doConfirm(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables installation Prime + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustPatientConnectionConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,52 @@ +/*! + * + * 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 VPreTreatmentAdjustmentStartTreatment.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentStartTreatment.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentStartTreatment) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentStartTreatment::initConnections() { + ACTION_VIEW_CONNECTION(AdjustStartTreatmentResponseData); + ADJUST_VIEW_CONNECTION(AdjustStartTreatmentRequestData ); +} + +/*! + * \brief VPreTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentStartTreatment::onActionReceive(const AdjustStartTreatmentResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentStartTreatment::doPrime + * \details the invocable slot to send user's Disposables installation Prime + */ +void View::VPreTreatmentAdjustmentStartTreatment::doStart() { + AdjustStartTreatmentRequestData data; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentStartTreatment.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentAdjustmentStartTreatment.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustStartTreatmentResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentStartTreatment class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustStartTreatmentResponse + * + */ +class VPreTreatmentAdjustmentStartTreatment : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentStartTreatment, AdjustStartTreatmentResponseData) + +public slots: + void doStart(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send the user's Disposables installation Prime + * \param vData - data model includes request information + */ + void didAdjustment(const AdjustStartTreatmentRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,56 @@ +/*! + * + * 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 VPreTreatmentAdjustmentUltrafiltrationInit.cpp + * \author (last) Behrouz NematiPour + * \date (last) 08-Dec-2020 + * \author (original) Behrouz NematiPour + * \date (original) 08-Dec-2020 + * + */ +#include "VPreTreatmentAdjustmentUltrafiltrationInit.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentUltrafiltrationInit) + +/*! + * \brief Connection Initializer + * \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentUltrafiltrationInit::initConnections() { + ACTION_VIEW_CONNECTION(AdjustUltrafiltrationInitResponseData); + ADJUST_VIEW_CONNECTION(AdjustUltrafiltrationInitRequestData ); +} + +/*! + * \brief VPreTreatmentAdjustmentUltrafiltrationInit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentUltrafiltrationInit::onActionReceive(const AdjustUltrafiltrationInitResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + volume ( vData.mVolume / 1000 ); // mL => L + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentUltrafiltrationInit::doAdjustment + * \details the invocable slot to adjust the treatment ultrafiltration volume + * \param vVolume - requested ultrafiltration volume + */ +void View::VPreTreatmentAdjustmentUltrafiltrationInit::doAdjustment(float vVolume) { + _data.volume = vVolume * 1000; // L => mL + emit didAdjustment(_data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentUltrafiltrationInit.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,66 @@ +/*! + * + * 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 VPreTreatmentAdjustmentUltrafiltrationInit.h + * \author (last) Behrouz NematiPour + * \date (last) 08-Dec-2020 + * \author (original) Behrouz NematiPour + * \date (original) 08-Dec-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustUltrafiltrationInitResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentUltrafiltrationInit class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustUltrafiltrationInitResponse + * + */ +class VPreTreatmentAdjustmentUltrafiltrationInit : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustUltrafiltrationInitRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // Treatment Ultrafiltration data + PROPERTY( float , volume , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentUltrafiltrationInit, AdjustUltrafiltrationInitResponseData) + + // ----------- Adjust Ultrafiltration +public slots: + void doAdjustment(float vVolume); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the treatment ultrafiltration volume + * \param vData - data model for edit the treatment ultrafiltration volume adjustment request + */ + void didAdjustment(const AdjustUltrafiltrationInitRequestData &vData); +}; +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.cpp =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.cpp (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,70 @@ +/*! + * + * 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 VPreTreatmentAdjustmentWaterSample.cpp + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#include "VPreTreatmentAdjustmentWaterSample.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentWaterSample) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void View::VPreTreatmentAdjustmentWaterSample::initConnections() { + ADJUST_VIEW_CONNECTION(AdjustWaterSampleRequestData ); + ADJUST_VIEW_CONNECTION(AdjustWaterSampleResultRequestData ); + ACTION_VIEW_CONNECTION(AdjustWaterSampleResponseData ); +} + +/*! + * \brief VPreTreatmentAdjustmentWaterSample::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void View::VPreTreatmentAdjustmentWaterSample::onActionReceive(const AdjustWaterSampleResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VPreTreatmentAdjustmentWaterSample::doSample + * \details requests to start or stop the water sample + * \param vStart - the boolean value to indicate the request. + */ +void View::VPreTreatmentAdjustmentWaterSample::doSample(bool vStart) { + AdjustWaterSampleRequestData data; + data.requestedState = vStart ? + AdjustWaterSampleRequestData::eStart: + AdjustWaterSampleRequestData::eStop ; + emit didAdjustment(data); +} + +/*! + * \brief View::VPreTreatmentAdjustmentWaterSample::doResult + * \details requests to send the user result of the water sample. + * \param vPassed - the boolean value to indicate the result if passed is true, false otherwise. + */ +void View::VPreTreatmentAdjustmentWaterSample::doResult(bool vPassed) { + AdjustWaterSampleResultRequestData data; + data.requestedState = vPassed ? + AdjustWaterSampleResultRequestData::ePassed : + AdjustWaterSampleResultRequestData::eFailed ; + emit didAdjustment(data); +} Index: sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.h =================================================================== diff -u --- sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.h (revision 0) +++ sources/view/hd/adjustment/pretreatment/VPreTreatmentAdjustmentWaterSample.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,70 @@ +/*! + * + * 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 VPreTreatmentAdjustmentWaterSample.h + * \author (last) Behrouz NematiPour + * \date (last) 22-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 22-Mar-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MPreTreatmentAdjustWaterSampleResponse.h" + +namespace View { + +/*! + * \brief The VPreTreatmentAdjustmentWaterSample class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustWaterSampleResponse + * + */ +class VPreTreatmentAdjustmentWaterSample : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VPreTreatmentAdjustmentWaterSample, AdjustWaterSampleResponseData) + + // ----------- Adjust Ultrafiltration +public slots: + void doSample (bool vStart); + void doResult (bool vPassed); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to send user request of start/stop the water sample. + * \param vData - data model that contains the request data. + */ + void didAdjustment(const AdjustWaterSampleRequestData &vData); + + /*! + * \brief didAdjustment + * \details the notification signal to request to send the user water sample result. + * \param vData - data model that contains the request data. + */ + void didAdjustment(const AdjustWaterSampleResultRequestData &vData); + +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,37 @@ +/*! + * + * 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 VTreatmentAdjustmentDuration.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentAdjustmentDuration.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentDuration) + +void VTreatmentAdjustmentDuration::initConnections() { + ACTION_VIEW_CONNECTION(AdjustDurationResponseData); + ADJUST_VIEW_CONNECTION( AdjustDurationRequestData); +} + +void VTreatmentAdjustmentDuration::onActionReceive(const AdjustDurationResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + duration ( vData.mDuration ); + ultrafiltration ( vData.mUFVolume / 1000 ); // mL => L + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentDuration.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,75 @@ +/*! + * + * 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 VTreatmentAdjustmentDuration.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustDurationResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentDuration class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustDurationResponse + * + */ +class VTreatmentAdjustmentDuration : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustDurationRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // Treatment Duration data + PROPERTY( quint32 , duration , 0) + PROPERTY( float , ultrafiltration , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentDuration, AdjustDurationResponseData) + + // ----- Adjust Duration +public slots: + /*! + * \brief doAdjustment + * \details the invocable slot to adjust the treatment duration + * \param vDuration - treatment duration + */ + void doAdjustment(quint32 vDuration) { + _data.duration = vDuration; + emit didAdjustment(_data); + } + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the treatment duration + * \param vData - data model for the duration adjustment request + */ + void didAdjustment(const AdjustDurationRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,46 @@ +/*! + * + * 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 VTreatmentAdjustmentEnd.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#include "VTreatmentAdjustmentEnd.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentEnd) + +void VTreatmentAdjustmentEnd::initConnections() { + ACTION_VIEW_CONNECTION(AdjustTreatmentEndResponseData); + ADJUST_VIEW_CONNECTION(AdjustTreatmentEndRequestData ); +} + +void VTreatmentAdjustmentEnd::onActionReceive(const AdjustTreatmentEndResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentEnd::adjustment + * \details the invocable slot to adjust the Treatment End state + * \param vRequestedState - the requested state + */ +void View::VTreatmentAdjustmentEnd::adjustment(const GuiTreatmentEndCommands &vRequestedState) +{ + _data.requestedState = vRequestedState; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentEnd.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,65 @@ +/*! + * + * 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 VTreatmentAdjustmentEnd.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustEndResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentEnd class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustTreatmentEndResponse + * + */ +class VTreatmentAdjustmentEnd : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustTreatmentEndRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0 ) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentEnd, AdjustTreatmentEndResponseData) + +private: + void adjustment (const GuiTreatmentEndCommands &vRequestedState); + +public slots: + void doEnd () { adjustment( GuiTreatmentEndCommands::REQUESTED_USER_ACTION_TX_END_RINSEBACK_START ); } + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the Treatment End state + * \param vData - data model for the duration adjustment request + */ + void didAdjustment(const AdjustTreatmentEndRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,43 @@ +/*! + * + * 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 VTreatmentAdjustmentFlows.cpp + * \author (last) Behrouz NematiPour + * \date (last) 05-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentAdjustmentFlows.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentFlows) + +void VTreatmentAdjustmentFlows::initConnections() { + ACTION_VIEW_CONNECTION(AdjustBloodDialysateResponseData); + ADJUST_VIEW_CONNECTION( AdjustBloodDialysateRequestData); +} + +/*! + * \brief VTreatmentAdjustmentFlows::onActionReceive + * \details Model data received message handler. + * When signal received this method is called to update the view properties. + * \param vData - Model data + */ +void VTreatmentAdjustmentFlows::onActionReceive(const AdjustBloodDialysateResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + bloodFlow_FlowSetPoint ( vData.mBloodRate ); + dialysateFlow_FlowSetPoint ( vData.mDialysateRate ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentFlows.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,77 @@ +/*! + * + * 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 VTreatmentAdjustmentFlows.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustBloodDialysateResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentFlows class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustBloodDialysateResponse + * + */ +class VTreatmentAdjustmentFlows : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + // friends + friend class ::tst_views; + + AdjustBloodDialysateRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // Treatment Blood/Dialysate Flow data + PROPERTY( quint32 , bloodFlow_FlowSetPoint , 0) + PROPERTY( quint32 , dialysateFlow_FlowSetPoint , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentFlows, AdjustBloodDialysateResponseData) + + // ----- Adjust Blood/Dialysate Flows +public slots: + /*! + * \brief doAdjustment + * \details the invocable slot to adjust the treatment blood and dialysate flow rates + * \param vBloodFlow + * \param vDialysateFlow + */ + void doAdjustment(quint32 vBloodFlow, quint32 vDialysateFlow) { + _data. bloodFlow = vBloodFlow; + _data.dialysateFlow = vDialysateFlow; + emit didAdjustment(_data); + } + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the blood and dialysate flow rates + * \param vData - data model for the blood and dialysate adjustment request + */ + void didAdjustment(const AdjustBloodDialysateRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,55 @@ +/*! + * + * 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 VTreatmentAdjustmentHeparin.cpp + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "VTreatmentAdjustmentHeparin.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentHeparin) + +void VTreatmentAdjustmentHeparin::initConnections() { + ACTION_VIEW_CONNECTION(AdjustHeparinResponseData); + ADJUST_VIEW_CONNECTION(AdjustHeparinRequestData ); +} + +void VTreatmentAdjustmentHeparin::onActionReceive(const AdjustHeparinResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentHeparin::doPause + * \details sends the pause heparin request + */ +void View::VTreatmentAdjustmentHeparin::doPause() +{ + _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_PAUSE ; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} + +/*! + * \brief View::VTreatmentAdjustmentHeparin::doResume + * \details sends the resume heparin request + */ +void View::VTreatmentAdjustmentHeparin::doResume() +{ + _data.requestedState = GuiHeparinCommands::HEPARIN_CMD_RESUME; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentHeparin.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VTreatmentAdjustmentHeparin.h + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustHeparinResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentHeparin class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustHeparinResponse + * + */ +class VTreatmentAdjustmentHeparin : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustHeparinRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0 ) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentHeparin, AdjustHeparinResponseData) + +// ---------- Start/Stop Heparin Bolus +public slots: + void doPause (); + void doResume(); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the Heparin bolus state + * \param vData - data model for the duration adjustment request + */ + void didAdjustment(const AdjustHeparinRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,46 @@ +/*! + * + * 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 VTreatmentAdjustmentPressuresLimits.cpp + * \author (last) Behrouz NematiPour + * \date (last) 1-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 1-Nov-2020 + * + */ +#include "VTreatmentAdjustmentPressuresLimits.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentPressuresLimits) + +void VTreatmentAdjustmentPressuresLimits::initConnections() { + ACTION_VIEW_CONNECTION(AdjustPressuresLimitsResponseData); + ADJUST_VIEW_CONNECTION( AdjustPressuresLimitsRequestData); +} + +/*! + * \brief VTreatmentAdjustmentPressures::onActionReceive + * \details Model data received message handler. + * When signal received this method is called to update the view properties. + * \param vData - Model data + */ +void VTreatmentAdjustmentPressuresLimits::onActionReceive(const AdjustPressuresLimitsResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + arterialLimitLow ( vData.mArterialLimitLow ); + arterialLimitHigh ( vData.mArterialLimitHigh ); + venousLimitLow ( vData.mVenousLimitLow ); + venousLimitHigh ( vData.mVenousLimitHigh ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentPressuresLimits.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,94 @@ +/*! + * + * 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 VTreatmentAdjustmentPressuresLimits.h + * \author (last) Behrouz NematiPour + * \date (last) 1-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 1-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustPressuresLimitsResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentPressuresLimits class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustPressuresLimitsResponse + * + */ +class VTreatmentAdjustmentPressuresLimits : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + // friends + friend class ::tst_views; + + AdjustPressuresLimitsRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // Treatment pressures limits data + PROPERTY( qint32 , arterialLimitLow , _data.ArterialLimitLowDef ) + PROPERTY( qint32 , arterialLimitHigh , _data.ArterialLimitHighDef ) + PROPERTY( qint32 , venousLimitLow , _data.VenousLimitLowDef ) + PROPERTY( qint32 , venousLimitHigh , _data.VenousLimitHighDef ) + + // coco begin validated: Tested manually + // these are manufacturing default values which will be assigned to the pressure parameters initially. + // since after the first change it will be overwritten by user value it has been provided here in case it is needed. + CONSTANT( qint32 , arterialLimitLowDef , _data.ArterialLimitLowDef ) // default by PRS354 + CONSTANT( qint32 , arterialLimitHighDef , _data.ArterialLimitHighDef ) // default by PRS355 + CONSTANT( qint32 , venousLimitLowDef , _data.VenousLimitLowDef ) // default by PRS356 + CONSTANT( qint32 , venousLimitHighDef , _data.VenousLimitHighDef ) // default by PRS357 + // coco end + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentPressuresLimits, AdjustPressuresLimitsResponseData) + + // ----- Adjust Pressures Limits +public slots: + /*! + * \brief doAdjustment + * \details the invocable slot to adjust the treatment pressures limits + * \param vArterialLimitLow + * \param vArterialLimitHigh + * \param vVenousLimitLow + * \param vVenousLimitHigh + */ + void doAdjustment( qint32 vArterialLimitLow , + qint32 vArterialLimitHigh , + qint32 vVenousLimitLow , + qint32 vVenousLimitHigh ) { + _data.mArterialLimitLow = vArterialLimitLow ; + _data.mArterialLimitHigh = vArterialLimitHigh; + _data.mVenousLimitLow = vVenousLimitLow ; + _data.mVenousLimitHigh = vVenousLimitHigh ; + emit didAdjustment(_data); + } + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the pressures limits + * \param vData - data model for the pressures limits adjustment request + */ + void didAdjustment(const AdjustPressuresLimitsRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,77 @@ +/*! + * + * 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 VTreatmentAdjustmentRecirculate.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "VTreatmentAdjustmentRecirculate.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentRecirculate) + +void VTreatmentAdjustmentRecirculate::initConnections() { + ACTION_VIEW_CONNECTION(AdjustRecirculateResponseData); + ADJUST_VIEW_CONNECTION(AdjustRecirculateRequestData ); +} + +void VTreatmentAdjustmentRecirculate::onActionReceive(const AdjustRecirculateResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentRecirculate::doAdjustment + * \details the invocable slot to adjust recirculate requested state + */ +void View::VTreatmentAdjustmentRecirculate::doAdjustment(const Gui::GuiRecirculateCommands &vRequestedState) +{ + _data.requestedState = vRequestedState; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} + +/*! + * \brief View::VTreatmentAdjustmentRecirculate::doReconnect + * \details User requests to re-connect to system (stop re-circulating, clamp arterial and venous lines) + */ +void View::VTreatmentAdjustmentRecirculate::doReconnect() { + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT ); +} + +/*! + * \brief View::VTreatmentAdjustmentRecirculate::doConfirm + * \details User confirms patient connected, lines un-shunted to return to treatment + */ +void View::VTreatmentAdjustmentRecirculate::doConfirm() { + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_RECONNECT ); +} + +/*! + * \brief View::VTreatmentAdjustmentRecirculate::doResume + * \details User requests to resume re-circulation + */ +void View::VTreatmentAdjustmentRecirculate::doResume() { + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_RESUME_RC ); +} + +/*! + * \brief View::VTreatmentAdjustmentRecirculate::doTreatmentEnd + * \details User requests to end treatment + */ +void View::VTreatmentAdjustmentRecirculate::doTreatmentEnd() { + doAdjustment( GuiRecirculateCommands::REQUESTED_USER_ACTION_TX_RECIRC_END_TREATMENT ); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRecirculate.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,69 @@ +/*! + * + * 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 VTreatmentAdjustmentRecirculate.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustRecirculateResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentRecirculate class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustRecirculateResponse + * + */ +class VTreatmentAdjustmentRecirculate : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustRecirculateRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0 ) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentRecirculate, AdjustRecirculateResponseData) + +// ---------- Start/Stop Recirculate Bolus +private slots: + void doAdjustment(const GuiRecirculateCommands &vRequestedState); + +public slots: + void doReconnect (); + void doConfirm (); + void doResume (); + void doTreatmentEnd (); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the Recirculate bolus state + * \param vData - data model for the duration adjustment request + */ + void didAdjustment(const AdjustRecirculateRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,34 @@ +/*! + * + * 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 VTreatmentAdjustmentResponseBase.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentAdjustmentResponseBase.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS(VTreatmentAdjustmentResponseBase) +void VTreatmentAdjustmentResponseBase::initConnections() { } + +/*! + * \brief View::VTreatmentAdjustmentResponseBase::text + * \details The slot to get the Reason Description + * \return Reason description as string + */ +QString VTreatmentAdjustmentResponseBase::text() +{ + QString text; + if (_adjustment_Reason != GuiRequestReasons::REQUEST_REJECT_REASON_NONE) + text = Gui::enumString(static_cast(_adjustment_Reason), "[%1] Unknown Error"); + return text; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentResponseBase.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,66 @@ +/*! + * + * 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 VTreatmentAdjustmentResponseBase.h + * \author (last) Behrouz NematiPour + * \date (last) 05-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MPreTreatmentAdjustRequests.h" +#include "MTreatmentAdjustRequests.h" +#include "MPostTreatmentAdjustRequests.h" +#include "GuiGlobals.h" + +// forward declarations +class tst_views; + +// namespace +using namespace Gui; +namespace View { + +/*! + * \brief The VTreatmentAdjustmentResponseBase class + * \details The base class of all the view classes for adjustment response. + * All the adjustment responses contain accepted field as a flag for acceptance or rejection of the requested adjustment. + * In case of adjustment request rejection the reason field is the reason for rejection. + */ +class VTreatmentAdjustmentResponseBase : public QObject +{ + + Q_OBJECT + + // friends + friend class ::tst_views; + + // coco begin validated: + // The adjustment_Reason property as quint32 is not used directly in GUI + // it will be used as QString text. + // has been manually tested that it works perfectly fine if used. + // this property changed to trigger since it has been found out during tests that the reason could be same but has to be shown again. + TRIGGER ( quint32 , adjustment_Reason , 0) + // coco end + + PROPERTY( bool , adjustment_Accepted , 0) + + Q_PROPERTY(QString adjustment_ReasonText READ text NOTIFY adjustment_ReasonTriggered) + + VIEW_DEC_CLASS(VTreatmentAdjustmentResponseBase) + +protected slots: + QString text(); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,46 @@ +/*! + * + * 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 VTreatmentAdjustmentRinseback.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "VTreatmentAdjustmentRinseback.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentRinseback) + +void VTreatmentAdjustmentRinseback::initConnections() { + ACTION_VIEW_CONNECTION(AdjustRinsebackResponseData); + ADJUST_VIEW_CONNECTION(AdjustRinsebackRequestData ); +} + +void VTreatmentAdjustmentRinseback::onActionReceive(const AdjustRinsebackResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentRinseback::adjustment + * \details the invocable slot to adjust the rinseback state + * \param vRequestedState - the requested state + */ +void View::VTreatmentAdjustmentRinseback::adjustment(const GuiRinsebackCommands &vRequestedState) +{ + _data.requestedState = vRequestedState; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentRinseback.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,75 @@ +/*! + * + * 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 VTreatmentAdjustmentRinseback.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustRinsebackResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentRinseback class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustRinsebackResponse + * + */ +class VTreatmentAdjustmentRinseback : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustRinsebackRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0 ) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentRinseback, AdjustRinsebackResponseData) + +// ---------- Start/Stop Rinseback +private: + void adjustment (const GuiRinsebackCommands &vRequestedState); + +public slots: + void doStart () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_CONFIRM_START ); } + void doIncrement () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_INCREASE_RATE ); } + void doDecrement () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_DECREASE_RATE ); } + void doPause () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_PAUSE ); } + void doResume () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_RESUME ); } + void doEnd () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_END ); } + void doAdditional () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_ADDITIONAL ); } + void doConfirm () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_CONFIRM_DISCONNECT ); } + void doTreatmentEnd () { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_END_TREATMENT ); } + void doTreatmentBack() { adjustment( GuiRinsebackCommands::REQUESTED_USER_ACTION_RINSEBACK_BACK_TO_TREATMENT ); } + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the Rinseback bolus state + * \param vData - data model for the duration adjustment request + */ + void didAdjustment(const AdjustRinsebackRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,62 @@ +/*! + * + * 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 VTreatmentAdjustmentSaline.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#include "VTreatmentAdjustmentSaline.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentSaline) + +void VTreatmentAdjustmentSaline::initConnections() { + ACTION_VIEW_CONNECTION(AdjustSalineResponseData); + ADJUST_VIEW_CONNECTION(AdjustSalineRequestData ); +} + +void VTreatmentAdjustmentSaline::onActionReceive(const AdjustSalineResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + target ( vData.mTarget ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentSaline::doAdjustment + * \details the invocable slot to adjust(start/stop) the treatment saline bolus state + * \param vStart - if true sets the requestedState to 1(SALINE_CMD_START) otherwise to 0(SALINE_CMD_STOP) + */ + +/*! + * \brief View::VTreatmentAdjustmentSaline::doStart + * \details sends the start saline request + */ +void View::VTreatmentAdjustmentSaline::doStart() +{ + _data.requestedState = GuiSalineCommands::SALINE_CMD_START; + emit didAdjustment(_data); +} + +/*! + * \brief View::VTreatmentAdjustmentSaline::doStop + * \details sends the stop saline request + */ +void View::VTreatmentAdjustmentSaline::doStop() +{ + _data.requestedState = GuiSalineCommands::SALINE_CMD_STOP; + emit didAdjustment(_data); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentSaline.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,66 @@ +/*! + * + * 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 VTreatmentAdjustmentSaline.h + * \author (last) Behrouz NematiPour + * \date (last) 08-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustSalineResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentSaline class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustSalineResponse + * + */ +class VTreatmentAdjustmentSaline : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustSalineRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0 ) + // coco end + + PROPERTY( qint32 , target , 0 ) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentSaline, AdjustSalineResponseData) + +// ---------- Start/Stop Saline Bolus +public slots: + void doStart(); + void doStop (); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the saline bolus state + * \param vData - data model for the duration adjustment request + */ + void didAdjustment(const AdjustSalineRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,71 @@ +/*! + * + * 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 VTreatmentAdjustmentUltrafiltrationConfirm.cpp + * \author (last) Behrouz NematiPour + * \date (last) 05-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentAdjustmentUltrafiltrationConfirm.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationConfirm) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void VTreatmentAdjustmentUltrafiltrationConfirm::initConnections() { + ACTION_VIEW_CONNECTION(AdjustUltrafiltrationConfirmResponseData); + ADJUST_VIEW_CONNECTION( AdjustUltrafiltrationConfirmRequestData); +} + +/*! + * \brief VTreatmentAdjustmentUltrafiltrationEdit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void VTreatmentAdjustmentUltrafiltrationConfirm::onActionReceive(const AdjustUltrafiltrationConfirmResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + volume ( vData.mVolume / 1000 ); // mL => L + duration ( vData.mDuration ); + rate ( vData.mRate ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentUltrafiltrationConfirm::doOptionRate + * \details the invocable slot to adjust the ultrafiltration by rate modification + * \param vVolume - the ultrafiltration volume + */ +void View::VTreatmentAdjustmentUltrafiltrationConfirm::doOptionRate(float vVolume) +{ + _data.volume = int(vVolume * 1000); // cast to int to truncate the float after convert to mL + _data.option = AdjustUltrafiltrationConfirmRequestData::eRate; + emit didAdjustment(_data); +} + +/*! + * \brief View::VTreatmentAdjustmentUltrafiltrationConfirm::doOptionDuration + * \details the invocable slot to adjust the ultrafiltration by duration modification + * \param vVolume - the ultrafiltration volume + */ +void View::VTreatmentAdjustmentUltrafiltrationConfirm::doOptionDuration(float vVolume) +{ + _data.volume = int(vVolume * 1000); // cast to int to truncate the float after convert to mL + _data.option = AdjustUltrafiltrationConfirmRequestData::eDuration; + emit didAdjustment(_data); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationConfirm.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,73 @@ +/*! + * + * 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 VTreatmentAdjustmentUltrafiltrationConfirm.h + * \author (last) Behrouz NematiPour + * \date (last) 08-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustUltrafiltrationConfirmResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentUltrafiltrationConfirm class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustUltrafiltrationConfirmResponse + * + */ +class VTreatmentAdjustmentUltrafiltrationConfirm : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustUltrafiltrationConfirmRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // Treatment Ultrafiltration data + PROPERTY( float , volume , 0) + // coco begin validated: Manually validated + // Duration is not used since will be passed each second by TreatmentTime message + PROPERTY( quint32 , duration , 0) + // Rate has not been decided to be used anywhere yet. + PROPERTY( float , rate , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationConfirm, AdjustUltrafiltrationConfirmResponseData) + + // ----------- Adjust Ultrafiltration +public slots: + void doOptionRate (float vVolume); + void doOptionDuration(float vVolume); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to confirm the the treatment ultrafiltration adjustment + * \param vData - data model for confirm the the treatment ultrafiltration adjustment request + */ + void didAdjustment(const AdjustUltrafiltrationConfirmRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VTreatmentAdjustmentUltrafiltrationEdit.cpp + * \author (last) Behrouz NematiPour + * \date (last) 05-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentAdjustmentUltrafiltrationEdit.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationEdit) + +/*! \brief Connection Initializer + \details All the class signal/slot connections are defined here. +*/ +void VTreatmentAdjustmentUltrafiltrationEdit::initConnections() { + ACTION_VIEW_CONNECTION(AdjustUltrafiltrationEditResponseData); + ADJUST_VIEW_CONNECTION( AdjustUltrafiltrationEditRequestData); +} + +/*! + * \brief VTreatmentAdjustmentUltrafiltrationEdit::onActionReceive + * \details received response model data handler + * \param vData - model data + */ +void VTreatmentAdjustmentUltrafiltrationEdit::onActionReceive(const AdjustUltrafiltrationEditResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + volume ( vData.mVolume / 1000 ); // mL => L + duration ( vData.mDuration ); + durationDiff ( vData.mDurationDiff ); + rate ( vData.mRate ); + rateDiff ( vData.mRateDiff ); + rateOld ( vData.mRateOld ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentUltrafiltrationEdit::doAdjustment + * \details the invocable slot to adjust the treatment ultrafiltration volume + * \param vVolume - requested ultrafiltration volume + */ +void View::VTreatmentAdjustmentUltrafiltrationEdit::doAdjustment(float vVolume) { + _data.volume = vVolume * 1000; // L => mL + emit didAdjustment(_data); +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationEdit.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,71 @@ +/*! + * + * 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 VTreatmentAdjustmentUltrafiltrationEdit.h + * \author (last) Behrouz NematiPour + * \date (last) 08-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustUltrafiltrationEditResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentUltrafiltrationEdit class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustUltrafiltrationEditResponse + * + */ +class VTreatmentAdjustmentUltrafiltrationEdit : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustUltrafiltrationEditRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // Treatment Ultrafiltration data + PROPERTY( float , volume , 0) + PROPERTY( quint32 , duration , 0) + PROPERTY( qint32 , durationDiff , 0) + PROPERTY( float , rate , 0) + PROPERTY( float , rateDiff , 0) + PROPERTY( float , rateOld , 0) + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationEdit, AdjustUltrafiltrationEditResponseData) + + // ----------- Adjust Ultrafiltration +public slots: + void doAdjustment(float vVolume); + +signals: + /*! + * \brief didAdjustment + * \details the notification signal to adjust the treatment ultrafiltration volume + * \param vData - data model for edit the treatment ultrafiltration volume adjustment request + */ + void didAdjustment(const AdjustUltrafiltrationEditRequestData &vData); +}; +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.cpp =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.cpp (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,58 @@ +/*! + * + * 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 VTreatmentAdjustmentUltrafiltrationState.cpp + * \author (last) Behrouz NematiPour + * \date (last) 16-Oct-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentAdjustmentUltrafiltrationState.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationState) + +void VTreatmentAdjustmentUltrafiltrationState::initConnections() { + ACTION_VIEW_CONNECTION(AdjustUltrafiltrationStateResponseData); + ADJUST_VIEW_CONNECTION( AdjustUltrafiltrationStateRequestData); +} + +void VTreatmentAdjustmentUltrafiltrationState::onActionReceive(const AdjustUltrafiltrationStateResponseData &vData) +{ + adjustment_Accepted ( vData.mAccepted ); + adjustment_Reason ( vData.mReason ); + + state ( vData.mState ); + + // *** has to be the last to let the information to be set and then emit the signal *** + // *** otherwise will use the previous values before being set. *** + // *** use this trigger to make sure you have all the properties with updated values *** + adjustment ( true ); +} + +/*! + * \brief View::VTreatmentAdjustmentUltrafiltrationState::doPause + * \details request to pause the ultrafiltration + */ +void View::VTreatmentAdjustmentUltrafiltrationState::doPause() +{ + _data.requestedState = GuiUFCommands::UF_CMD_PAUSE; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} + +/*! + * \brief View::VTreatmentAdjustmentUltrafiltrationState::doResume + * \details request to resume the ultrafiltration + */ +void View::VTreatmentAdjustmentUltrafiltrationState::doResume() +{ + _data.requestedState = GuiUFCommands::UF_CMD_RESUME; + emit didAdjustment(_data); // notify the controllers to do the adjustment +} Index: sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.h =================================================================== diff -u --- sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.h (revision 0) +++ sources/view/hd/adjustment/treatment/VTreatmentAdjustmentUltrafiltrationState.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,67 @@ +/*! + * + * 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 VTreatmentAdjustmentUltrafiltrationState.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VTreatmentAdjustmentResponseBase.h" +#include "MTreatmentAdjustUltrafiltrationStateResponse.h" + +namespace View { + +/*! + * \brief The VTreatmentAdjustmentUltrafiltrationState class + * \details View for Model's Data representation. + * + * \sa Model::MAdjustUltrafiltrationStateResponse + * + */ +class VTreatmentAdjustmentUltrafiltrationState : public VTreatmentAdjustmentResponseBase +{ + Q_OBJECT + + // friends + friend class ::tst_views; + + AdjustUltrafiltrationStateRequestData _data; + + // coco begin validated: + // The property adjustment_Triggered has to be always true + // and to always trigger the change event to work as a notifier for GUI + // has been manually tested that it works perfectly fine + TRIGGER( bool , adjustment , 0) + // coco end + + // coco begin validated: Manually tested + // This property should not be used in QML since it need exposed enum + // exposed enum usage in QML is not suggested since QML will not error out on any issue + // kept for consistency and debugging use cases + // Look at the VHDTreatmentStates ultrafiltration properties + PROPERTY( qint32 , state , 0) + // coco end + + VIEW_DEC_CLASS_ADJUSTMENT(VTreatmentAdjustmentUltrafiltrationState, AdjustUltrafiltrationStateResponseData) + + // ---------- Pause Ultrafiltration +public slots: + void doPause (); + void doResume(); + +signals: + void didAdjustment(const AdjustUltrafiltrationStateRequestData &vData); +}; +} Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VHDTreatmentStatesData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VHDTreatmentStatesData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentDisposablesPrimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentDisposablesPrimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentSelfTestDryData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentSelfTestDryData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentSelfTestNoCartridgeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentSelfTestNoCartridgeData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentStatesData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VPreTreatmentStatesData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentBloodFlow.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentBloodFlow.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentBloodPrimeData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentBloodPrimeData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentDialysateFlow.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentDialysateFlow.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentHeparinData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentHeparinData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentPressureOcclusion.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentPressureOcclusion.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentRecirculateData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentRecirculateData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentRinsebackData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentRinsebackData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentSalineData.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentSalineData.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentTime.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentTime.h'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentUltrafiltration.cpp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 88563177f10f20ced98750b2e40036201728131d refers to a dead (removed) revision in file `sources/view/hd/data/VTreatmentUltrafiltration.h'. Fisheye: No comparison available. Pass `N' to diff? Index: sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp =================================================================== diff -u --- sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp (revision 0) +++ sources/view/hd/data/posttreatment/VPostTreatmentStatesData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,38 @@ +/*! + * + * 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 VPostTreatmentStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#include "VPostTreatmentStatesData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VPostTreatmentStates, PostTreatmentStatesData) + +/*! + * \brief VPostTreatmentStates::onActionReceive + * \details sets the properties for the received data of Treatment States + * \param vData - Treatment States data + */ +void View::VPostTreatmentStates::onActionReceive(const PostTreatmentStatesData &vData) +{ + subMode ( vData.mSubMode ); + + patientDisconnection ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE ); + drainReservoirs ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_DRAIN_RESERVOIRS_STATE ); + verify ( vData.mSubMode == GuiPostTreatmentStates::HD_POST_TREATMENT_VERIFY_STATE ); + + // *** Only for test ***S + // Be careful it is always triggered on each message. + state(true); +} Index: sources/view/hd/data/posttreatment/VPostTreatmentStatesData.h =================================================================== diff -u --- sources/view/hd/data/posttreatment/VPostTreatmentStatesData.h (revision 0) +++ sources/view/hd/data/posttreatment/VPostTreatmentStatesData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,52 @@ +/*! + * + * 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 VPostTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 11-Apr-2021 + * \author (original) Behrouz NematiPour + * \date (original) 11-Apr-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MPostTreatmentStatesData.h" + +// namespace +namespace View { + +/*! + * \brief The VPostTreatmentStates class + * \details View for Model's data representation. + * + * \sa Model::MPostTreatmentStates + * + */ +class VPostTreatmentStates : public QObject +{ + Q_OBJECT + + // *** Only for test *** + // Be careful it is always triggered on each message. + TRIGGER ( bool , state , false ) // changes in case any message received. + + PROPERTY( quint8 , subMode , 0 ) ///< HD_Post_Treatment_Mode_States + + // Start post-treatment mode state + PROPERTY( bool , patientDisconnection , false ) ///< HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE, Patient disconnection state + PROPERTY( bool , drainReservoirs , false ) ///< HD_POST_TREATMENT_DRAIN_RESERVOIRS_STATE , Drain reservoirs state + PROPERTY( bool , verify , false ) ///< HD_POST_TREATMENT_VERIFY_STATE , Verify cartridge removed, syringe removed, and reservoirs drained state + + VIEW_DEC(VPostTreatmentStates, PostTreatmentStatesData) +}; +} Index: sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.cpp =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.cpp (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentDisposablesPrimeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 02-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 02-Mar-2021 + * + */ +#include "VPreTreatmentDisposablesPrimeData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VPreTreatmentDisposablesPrime, PreTreatmentDisposablesPrimeData) + +void VPreTreatmentDisposablesPrime::onActionReceive(const PreTreatmentDisposablesPrimeData &vData) +{ + total (vData.mTimeout ); + remaining (vData.mCountdown ); + elapsed (vData.mTimeout - vData.mCountdown ); +} Index: sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.h =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.h (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentDisposablesPrimeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentDisposablesPrimeData.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 "VView.h" +#include "MPreTreatmentDisposablesPrimeData.h" + +// namespace +namespace View { + +/*! + * \brief The VPreTreatmentDisposablesPrime class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentTime + * + */ +class VPreTreatmentDisposablesPrime : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , total , 0) + PROPERTY( quint32 , remaining , 0) + PROPERTY( quint32 , elapsed , 0) + + VIEW_DEC(VPreTreatmentDisposablesPrime, PreTreatmentDisposablesPrimeData) +}; +} Index: sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.cpp =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.cpp (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentSelfTestDryData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 03-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Mar-2021 + * + */ +#include "VPreTreatmentSelfTestDryData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VPreTreatmentSelfTestDry, PreTreatmentSelfTestDryData) + +void VPreTreatmentSelfTestDry::onActionReceive(const PreTreatmentSelfTestDryData &vData) +{ + total (vData.mTimeout ); + remaining (vData.mCountdown ); + elapsed (vData.mTimeout - vData.mCountdown ); +} Index: sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.h =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.h (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentSelfTestDryData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentSelfTestDryData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 03-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MPreTreatmentSelfTestDryData.h" + +// namespace +namespace View { + +/*! + * \brief The VPreTreatmentSelfTestDry class + * \details View for Model's data representation. + * + * \sa Model::MPreTreatmentSelfTestDry + * + */ +class VPreTreatmentSelfTestDry : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , total , 0) + PROPERTY( quint32 , remaining , 0) + PROPERTY( quint32 , elapsed , 0) + + VIEW_DEC(VPreTreatmentSelfTestDry, PreTreatmentSelfTestDryData) +}; +} Index: sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.cpp =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.cpp (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentSelfTestNoCartridgeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 03-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Mar-2021 + * + */ +#include "VPreTreatmentSelfTestNoCartridgeData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VPreTreatmentSelfTestNoCartridge, PreTreatmentSelfTestNoCartridgeData) + +void VPreTreatmentSelfTestNoCartridge::onActionReceive(const PreTreatmentSelfTestNoCartridgeData &vData) +{ + total (vData.mTimeout ); + remaining (vData.mCountdown ); + elapsed (vData.mTimeout - vData.mCountdown ); +} Index: sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.h =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.h (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VPreTreatmentSelfTestNoCartridgeData.h + * \author (last) Behrouz NematiPour + * \date (last) 03-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 03-Mar-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MPreTreatmentSelfTestNoCartridgeData.h" + +// namespace +namespace View { + +/*! + * \brief The VPreTreatmentSelfTestNoCartridge class + * \details View for Model's data representation. + * + * \sa Model::MPreTreatmentSelfTestNoCartridge + * + */ +class VPreTreatmentSelfTestNoCartridge : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , total , 0) + PROPERTY( quint32 , remaining , 0) + PROPERTY( quint32 , elapsed , 0) + + VIEW_DEC(VPreTreatmentSelfTestNoCartridge, PreTreatmentSelfTestNoCartridgeData) +}; +} Index: sources/view/hd/data/pretreatment/VPreTreatmentStatesData.cpp =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentStatesData.cpp (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentStatesData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,149 @@ +/*! + * + * 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 VPreTreatmentStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#include "VPreTreatmentStatesData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VPreTreatmentStates, PreTreatmentStatesData) + + +/*! + * \brief VHDTreatmentStates::onActionReceive + * \details sets the properties for the received data of Treatment States + * \param vData - Treatment States data + */ +void VPreTreatmentStates::onActionReceive(const PreTreatmentStatesData &vData) +{ + subMode ( vData.mSubMode ); + waterSampleState ( vData.mWaterSampleState ); + selfTestConsumablesState( vData.mSelfTestConsumablesState ); + selfTestNoCartridgeState( vData.mSelfTestNoCartridgeState ); + installationState ( vData.mInstallationState ); + selfTestDryState ( vData.mSelfTestDryState ); + primeState ( vData.mPrimeState ); + recirculateState ( vData.mRecirculateState ); + patientConnectionState ( vData.mPatientConnectionState ); + + // start state + start ( vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_START_STATE ); + + + // water sample state + bool mWaterSample = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_WATER_SAMPLE_STATE ; + if ( mWaterSample ) { + waterSample_setup ( vData.mWaterSampleState == GuiPreTreatmentWaterSampleStates ::SAMPLE_WATER_SETUP_STATE ); + waterSample_running ( vData.mWaterSampleState == GuiPreTreatmentWaterSampleStates ::SAMPLE_WATER_STATE ); + } + waterSample( mWaterSample ); // it's the main even so moved last to have all the sub-states updated prior to. + + // Self tests consumables state + bool mSelfTestConsumables = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_SELF_TEST_CONSUMABLE_STATE ; + if ( mSelfTestConsumables ) { + selfTestConsumables_install ( vData.mSelfTestConsumablesState == GuiPreTreatmentSelfTestConsumablesStates ::CONSUMABLE_SELF_TESTS_INSTALL_STATE ); + selfTestConsumables_waterQuality ( vData.mSelfTestConsumablesState == GuiPreTreatmentSelfTestConsumablesStates ::CONSUMABLE_SELF_TESTS_WATER_QUALITY_CHECK_STATE ); + selfTestConsumables_biCarbPump ( vData.mSelfTestConsumablesState == GuiPreTreatmentSelfTestConsumablesStates ::CONSUMABLE_SELF_TESTS_BICARB_PUMP_CHECK_STATE ); + selfTestConsumables_acidPump ( vData.mSelfTestConsumablesState == GuiPreTreatmentSelfTestConsumablesStates ::CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE ); + selfTestConsumables_complete ( vData.mSelfTestConsumablesState == GuiPreTreatmentSelfTestConsumablesStates ::CONSUMABLE_SELF_TESTS_COMPLETE_STATE ); + } + selfTestConsumables(mSelfTestConsumables); // it's the main even so moved last to have all the sub-states updated prior to. + + + // Self tests with no cartridge state + bool mSelfTestNoCartridge = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_SELF_TEST_NO_CART_STATE ; + if ( mSelfTestNoCartridge ) { + selfTestNoCartridge_start ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_START_STATE ); + selfTestNoCartridge_waitDoorClose ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE ); + selfTestNoCartridge_occlusionSensors ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_OCCLUSION_SENSORS_STATE ); + selfTestNoCartridge_bloodFlowMeters ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_BLOOD_FLOW_METERS_STATE ); + selfTestNoCartridge_dialysateFlowMeters ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_DIALYSATE_FLOW_METERS_STATE ); + selfTestNoCartridge_leakDetectors ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_LEAK_DETECTORS_STATE ); + selfTestNoCartridge_boardTemperature ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_BOARD_TEMPERATURE_STATE ); + selfTestNoCartridge_homeValves ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_HOME_VALVES_STATE ); + selfTestNoCartridge_homeSyringePump ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_HOME_SYRINGE_PUMP_STATE ); + selfTestNoCartridge_pumps ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_PUMPS_STATE ); + selfTestNoCartridge_homeIdle ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_HOME_IDLE_STATE ); + selfTestNoCartridge_stopped ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_STOPPED_STATE ); + selfTestNoCartridge_complete ( vData.mSelfTestNoCartridgeState == GuiPreTreatmentSelfTestNoCartridgeStates ::NO_CART_SELF_TESTS_COMPLETE_STATE ); + } + selfTestNoCartridge(mSelfTestNoCartridge); // it's the main even so moved last to have all the sub-states updated prior to. + + + // Consumable and cartridge installation state + bool mInstallation = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_CART_INSTALL_STATE ; + if ( mInstallation ) { + // There is not state(enum) for this and it is always 0 for now. but will be used to notify UI about being in this state. + installation_start ( vData.mInstallationState == 0 /* There is no other state and it is always 0 for now */ ); + } + installation(mInstallation); // it's the main even so moved last to have all the sub-states updated prior to. + + + // Self tests dry state + bool mSelfTestDry = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_SELF_TEST_DRY_STATE ; + if ( mSelfTestDry ) { + selfTestDry_start ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_START_STATE ); + selfTestDry_waitDoorClose ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE ); + selfTestDry_usedCartridge ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_USED_CARTRIDGE_CHECK_STATE ); + selfTestDry_occlusionSensors ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_OCCLUSION_SENSORS_STATE ); + selfTestDry_pressureSensorsSetup ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_PRESSURE_SENSORS_SETUP_STATE ); + selfTestDry_pressureSensors ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_PRESSURE_SENSORS_STATE ); + selfTestDry_pressureSensorsNormal ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_PRESSURE_SENSORS_NORMAL_STATE ); + selfTestDry_syringePump ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE ); + selfTestDry_stopped ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_STOPPED_STATE ); + selfTestDry_complete ( vData.mSelfTestDryState == GuiPreTreatmentSelfTestDryStates ::DRY_SELF_TESTS_COMPLETE_STATE ); + } + selfTestDry(mSelfTestDry); // it's the main even so moved last to have all the sub-states updated prior to. + + + // Prime blood and dialysate circuits and run wet self-tests state + bool mPrime = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_PRIME_STATE ; + if ( mPrime ) { + prime_start ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_START_STATE ); + prime_waitUserStart ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_WAIT_FOR_USER_START_STATE ); + prime_salineSetup ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_SALINE_SETUP_STATE ); + prime_salinePurgeAir ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_SALINE_PURGE_AIR_STATE ); + prime_salineCirculateBloodCircuit ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_SALINE_CIRC_BLOOD_CIRCUIT_STATE ); + prime_reservoiOneFillComplete ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_RESERVOIR_ONE_FILL_COMPLETE_STATE ); + prime_dialysateDialyzer ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_DIALYSATE_DIALYZER_STATE ); + prime_reservoirTwoFillComplete ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_RESERVOIR_TWO_FILL_COMPLETE_STATE ); + prime_dialysateBypass ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_DIALYSATE_BYPASS_STATE ); + prime_wetSelfTests ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_WET_SELF_TESTS_STATE ); + prime_pause ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_PAUSE ); + prime_complete ( vData.mPrimeState == GuiPreTreatmentPrimeStates ::HD_PRIME_COMPLETE ); + } + prime(mPrime); // it's the main even so moved last to have all the sub-states updated prior to. + + + // Re-circulate blood and dialysate circuits state + bool mRecirculate = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_RECIRCULATE_STATE ; + if ( mRecirculate ) { + recirculate_start ( vData.mRecirculateState == GuiPreTreatmentRecirculateStates ::PRE_TREATMENT_RECIRC_STATE ); + recirculate_stopped ( vData.mRecirculateState == GuiPreTreatmentRecirculateStates ::PRE_TREATMENT_RECIRC_STOPPED_STATE ); + } + recirculate(mRecirculate); // it's the main even so moved last to have all the sub-states updated prior to. + + + // Patient connection state + bool mPatientConnection = vData.mSubMode == GuiPreTreatmentStates ::HD_PRE_TREATMENT_PATIENT_CONNECTION_STATE ; + if ( mPatientConnection ) { + // There is not state(enum) for this and it is always 0 for now. but will be used to notify UI about being in this state. + patientConnection_start ( vData.mPatientConnectionState == 0 /* There is no other state and it is always 0 for now */ ); + } + patientConnection(mPatientConnection); + + // *** Only for test *** + // Be careful it is always triggered on each message. + state(true); +} Index: sources/view/hd/data/pretreatment/VPreTreatmentStatesData.h =================================================================== diff -u --- sources/view/hd/data/pretreatment/VPreTreatmentStatesData.h (revision 0) +++ sources/view/hd/data/pretreatment/VPreTreatmentStatesData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,131 @@ +/*! + * + * 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 VPreTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 01-Mar-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MPreTreatmentStatesData.h" + +// namespace +namespace View { + +/*! + * \brief The VPreTreatmentStates class + * \details View for Model's data representation. + * + * \sa Model::MPreTreatmentStates + * + */ +class VPreTreatmentStates : public QObject +{ + Q_OBJECT + + // *** Only for test *** + // Be careful it is always triggered on each message. + TRIGGER ( bool , state , false ) // changes in case any message received. + + PROPERTY( quint8 , subMode , 0 ) ///< HD_PRE_TREATMENT_START_STATE , Start pre-treatment mode state + PROPERTY( quint8 , waterSampleState , 0 ) ///< HD_PRE_TREATMENT_WATER_SAMPLE_STATE , Water sample state + PROPERTY( quint8 , selfTestConsumablesState , 0 ) ///< HD_PRE_TREATMENT_SELF_TEST_CONSUMABLE_STATE, , Consumable self-tests state + PROPERTY( quint8 , selfTestNoCartridgeState , 0 ) ///< HD_PRE_TREATMENT_SELF_TEST_NO_CART_STATE , Self tests with no cartridge state + PROPERTY( quint8 , installationState , 0 ) ///< HD_PRE_TREATMENT_CART_INSTALL_STATE , Consumable and cartridge installation state + PROPERTY( quint8 , selfTestDryState , 0 ) ///< HD_PRE_TREATMENT_SELF_TEST_DRY_STATE , Self tests dry state + PROPERTY( quint8 , primeState , 0 ) ///< HD_PRE_TREATMENT_PRIME_STATE , Prime blood and dialysate circuits and run wet self-tests state + PROPERTY( quint8 , recirculateState , 0 ) ///< HD_PRE_TREATMENT_RECIRCULATE_STATE , Re-circulate blood and dialysate circuits state + PROPERTY( quint8 , patientConnectionState , 0 ) ///< HD_PRE_TREATMENT_PATIENT_CONNECTION_STATE , Patient connection state + + // Start pre-treatment mode state + PROPERTY( bool , start , false ) ///< HD_PRE_TREATMENT_START_STATE , Start pre-treatment mode state + PROPERTY( bool , waterSample , false ) ///< HD_PRE_TREATMENT_WATER_SAMPLE_STATE , Water sample state + PROPERTY( bool , selfTestConsumables , false ) ///< HD_PRE_TREATMENT_SELF_TEST_CONSUMABLE_STATE, , Consumable self-tests state + PROPERTY( bool , selfTestNoCartridge , false ) ///< HD_PRE_TREATMENT_SELF_TEST_NO_CART_STATE , Self tests with no cartridge state + PROPERTY( bool , installation , false ) ///< HD_PRE_TREATMENT_CART_INSTALL_STATE , Consumable and cartridge installation state + PROPERTY( bool , selfTestDry , false ) ///< HD_PRE_TREATMENT_SELF_TEST_DRY_STATE , Self tests dry state + PROPERTY( bool , prime , false ) ///< HD_PRE_TREATMENT_PRIME_STATE , Prime blood and dialysate circuits and run wet self-tests state + PROPERTY( bool , recirculate , false ) ///< HD_PRE_TREATMENT_RECIRCULATE_STATE , Re-circulate blood and dialysate circuits state + PROPERTY( bool , patientConnection , false ) ///< HD_PRE_TREATMENT_PATIENT_CONNECTION_STATE , Patient connection state + + // Water sample state + PROPERTY( bool , waterSample_setup , false ) ///< SAMPLE_WATER_SETUP_STATE , Sample water setup state of the sample water sub-mode state machine + PROPERTY( bool , waterSample_running , false ) ///< SAMPLE_WATER_STATE , Sample water state of the sample water sub-mode state machine + + // Self tests consumables state + PROPERTY( bool , selfTestConsumables_install , false ) ///< CONSUMABLE_SELF_TESTS_INSTALL_STATE , Consumable self-tests install state + STATE ( bool , selfTestConsumables_waterQuality , false ) ///< CONSUMABLE_SELF_TESTS_WATER_QUALITY_CHECK_STATE , Consumable self-tests water quality check state + STATE ( bool , selfTestConsumables_biCarbPump , false ) ///< CONSUMABLE_SELF_TESTS_BICARB_PUMP_CHECK_STATE , Consumable self-tests bicarbonate concentrate pump check state + STATE ( bool , selfTestConsumables_acidPump , false ) ///< CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE , Consumable self-tests acid concentrate pump check state + STATE ( bool , selfTestConsumables_complete , false ) ///< CONSUMABLE_SELF_TESTS_COMPLETE_STATE , Consumable self-tests complete state + + // Self tests with no cartridge state + PROPERTY( bool , selfTestNoCartridge_start , false ) ///< NO_CART_SELF_TESTS_START_STATE , No cartridge self-tests starting state. + PROPERTY( bool , selfTestNoCartridge_waitDoorClose , false ) ///< NO_CART_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE , Wait for door to be closed before running self-tests. + PROPERTY( bool , selfTestNoCartridge_occlusionSensors , false ) ///< NO_CART_SELF_TESTS_OCCLUSION_SENSORS_STATE , No cartridge occlusion sensors self-test state. + PROPERTY( bool , selfTestNoCartridge_bloodFlowMeters , false ) ///< NO_CART_SELF_TESTS_BLOOD_FLOW_METERS_STATE , No cartridge blood flow meter self-test state. + PROPERTY( bool , selfTestNoCartridge_dialysateFlowMeters , false ) ///< NO_CART_SELF_TESTS_DIALYSATE_FLOW_METERS_STATE , No cartridge dialysate flow meter self-test state. + PROPERTY( bool , selfTestNoCartridge_leakDetectors , false ) ///< NO_CART_SELF_TESTS_LEAK_DETECTORS_STATE , No cartridge leak detectors self-test state. + PROPERTY( bool , selfTestNoCartridge_boardTemperature , false ) ///< NO_CART_SELF_TESTS_BOARD_TEMPERATURE_STATE , No cartridge board temperature self-test state. + PROPERTY( bool , selfTestNoCartridge_homeValves , false ) ///< NO_CART_SELF_TESTS_HOME_VALVES_STATE , No cartridge home valves state + PROPERTY( bool , selfTestNoCartridge_homeSyringePump , false ) ///< NO_CART_SELF_TESTS_HOME_SYRINGE_PUMP_STATE , No cartridge home syringe pump state + PROPERTY( bool , selfTestNoCartridge_pumps , false ) ///< NO_CART_SELF_TESTS_PUMPS_STATE , No cartridge self-test for blood pump, dialysate in pump, dialysate out pump state. + PROPERTY( bool , selfTestNoCartridge_homeIdle , false ) ///< NO_CART_SELF_TESTS_HOME_IDLE_STATE , Wait for valves and pumps finish homing state. + PROPERTY( bool , selfTestNoCartridge_stopped , false ) ///< NO_CART_SELF_TESTS_STOPPED_STATE , No cart self-test stopped state. + PROPERTY( bool , selfTestNoCartridge_complete , false ) ///< NO_CART_SELF_TESTS_COMPLETE_STATE , No cartridge self-test complete state. + + // Consumable and cartridge installation state + // There is not state(enum) for this and it is always 0 for now. but will be used to notify UI about being in this state. + PROPERTY( bool , installation_start , false ) ///< Consumable and cartridge installation state + + // Self tests dry state + PROPERTY( bool , selfTestDry_start , false ) ///< DRY_SELF_TESTS_START_STATE , Dry self-tests starting state. + PROPERTY( bool , selfTestDry_waitDoorClose , false ) ///< DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE , Wait for door to close before executing self-tests. + STATE ( bool , selfTestDry_usedCartridge , false ) ///< DRY_SELF_TESTS_USED_CARTRIDGE_CHECK_STATE , Used Cartridge self-test state. + STATE ( bool , selfTestDry_occlusionSensors , false ) ///< DRY_SELF_TESTS_OCCLUSION_SENSORS_STATE , Occlusion sensors dry self-test state. + STATE ( bool , selfTestDry_pressureSensorsSetup , false ) ///< DRY_SELF_TESTS_PRESSURE_SENSORS_SETUP_STATE , Pressure sensors dry self-test setup valves and pump state. + STATE ( bool , selfTestDry_pressureSensors , false ) ///< DRY_SELF_TESTS_PRESSURE_SENSORS_STATE , Pressure sensors verify pressure readings state. + STATE ( bool , selfTestDry_pressureSensorsNormal , false ) ///< DRY_SELF_TESTS_PRESSURE_SENSORS_NORMAL_STATE , Pressure sensors verify normal pressure readings state. + STATE ( bool , selfTestDry_syringePump , false ) ///< DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE , Prime syringe pump state + STATE ( bool , selfTestDry_stopped , false ) ///< DRY_SELF_TESTS_STOPPED_STATE , Dry self-test stopped state. + STATE ( bool , selfTestDry_complete , false ) ///< DRY_SELF_TESTS_COMPLETE_STATE , Dry self-test complete state. + + // Prime blood and dialysate circuits and run wet self-tests state + PROPERTY( bool , prime_start , false ) ///< HD_PRIME_START_STATE , Prime start state + STATE ( bool , prime_waitUserStart , false ) ///< HD_PRIME_WAIT_FOR_USER_START_STATE , Wait for user to start prime state + STATE ( bool , prime_salineSetup , false ) ///< HD_PRIME_SALINE_SETUP_STATE , Saline setup state + STATE ( bool , prime_salinePurgeAir , false ) ///< HD_PRIME_SALINE_PURGE_AIR_STATE , Saline purge air state + STATE ( bool , prime_salineCirculateBloodCircuit , false ) ///< HD_PRIME_SALINE_CIRC_BLOOD_CIRCUIT_STATE , Circulate blood circuit state + STATE ( bool , prime_reservoiOneFillComplete , false ) ///< HD_PRIME_RESERVOIR_ONE_FILL_COMPLETE_STATE , Wait for reservoir 1 fill complete + STATE ( bool , prime_dialysateDialyzer , false ) ///< HD_PRIME_DIALYSATE_DIALYZER_STATE , Dialysate dialyzer fluid path state + STATE ( bool , prime_reservoirTwoFillComplete , false ) ///< HD_PRIME_RESERVOIR_TWO_FILL_COMPLETE_STATE , Wait for reservoir 2 fill complete + STATE ( bool , prime_dialysateBypass , false ) ///< HD_PRIME_DIALYSATE_BYPASS_STATE , Dialysate bypass fluid path state + STATE ( bool , prime_wetSelfTests , false ) ///< HD_PRIME_WET_SELF_TESTS_STATE , Perform wet self-tests after priming complete + STATE ( bool , prime_pause , false ) ///< HD_PRIME_PAUSE , Prime pause state, waits to be resumed + STATE ( bool , prime_complete , false ) ///< HD_PRIME_COMPLETE , Prime complete state + + // Re-circulate blood and dialysate circuits state + PROPERTY( bool , recirculate_start , false ) ///< PRE_TREATMENT_RECIRC_STATE , Pre-treatment recirculate state. + PROPERTY( bool , recirculate_stopped , false ) ///< PRE_TREATMENT_RECIRC_STOPPED_STATE , Pre-treatment recirculate stopped state. + + // Patient connection state + // There is not state(enum) for this and it is always 0 for now. but will be used to notify UI about being in this state. + PROPERTY( bool , patientConnection_start , false ) ///< Patient connection state + + + VIEW_DEC(VPreTreatmentStates, PreTreatmentStatesData) +}; +} Index: sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp (revision 0) +++ sources/view/hd/data/treatment/VHDTreatmentStatesData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,145 @@ +/*! + * + * 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 VHDTreatmentStatesData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#include "VHDTreatmentStatesData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF_CLASS(VHDTreatmentStates) + +/*! + * \brief VTreatmentAdjustmentSaline::initConnections + * \details Initializes the message(s) connection + * \note This class not only listens to its dedicated message TreatmentStatesData, + * But also listens to other messages which affect ultrafiltration and saline bolus state. + * These extra messages are AdjustSalineResponseData , AdjustUltrafiltrationStateResponseData. + * Which ever comes first will set its related properties. + * Since the properties wont set twice if they have the same value it doesn't affect performance so much. + * Also FW suppose to send the TreatmentStatesData related message immediately after the two others. + */ +void VHDTreatmentStates::initConnections() { + ACTION_VIEW_CONNECTION(TreatmentStatesData ); + // these messages sending the same states as in message 15 (TreatmentStates above) + // it is redundant and with a better messaging protocol + // the one in the Adjustment messages should be removed since it is not sent on each state change + // and will be sent only once to the request. + ACTION_VIEW_CONNECTION(AdjustUltrafiltrationStateResponseData ); +} + +/*! + * \brief VHDTreatmentStates::onActionReceive + * \details sets the properties for the received data of Treatment States + * \param vData - Treatment States data + */ +void VHDTreatmentStates::onActionReceive(const TreatmentStatesData &vData) +{ + subMode ( vData.mSubMode ); + ufState ( vData.mUFState ); + salineState ( vData.mSalineState ); + + // Ultrafiltration states + ufStart ( vData.mUFState == GuiUFStates ::UF_START_STATE ); + ufPaused ( vData.mUFState == GuiUFStates ::UF_PAUSED_STATE ); + ufRunning ( vData.mUFState == GuiUFStates ::UF_RUNNING_STATE ); + + // Saline Bolus states + sbIdle ( vData.mSalineState == GuiSalineStates ::SALINE_BOLUS_STATE_IDLE ); + sbWaitPump ( vData.mSalineState == GuiSalineStates ::SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP ); + sbRunning ( vData.mSalineState == GuiSalineStates ::SALINE_BOLUS_STATE_IN_PROGRESS ); + sbMaxReached ( vData.mSalineState == GuiSalineStates ::SALINE_BOLUS_STATE_MAX_DELIVERED ); + + // Heparin States + hpOff ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_OFF ); + hpStopped ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_STOPPED ); + hpPaused ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_PAUSED ); + hpInitial_bolus ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_INITIAL_BOLUS ); + hpDispensing ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_DISPENSING ); + hpCompleted ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_COMPLETED ); + hpEmpty ( vData.mHeparinState == GuiHeparinStates ::HEPARIN_STATE_EMPTY ); + + // Treatment states + // Treatment states - Basics + txStart ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_START_STATE ); + + // Treatment states - Dialysis + txDialysis ( vData.mSubMode == GuiTreatmentStates ::TREATMENT_DIALYSIS_STATE ); + + // NOTE: For Rinseback and Recirculate + // 1 - it seems we may never need the txRinseback + // since in the Rinseback state parameter of the Treatment State the first state of each has the same meaning + // it may only be used to know when those parameters have valid values to update the properties. + // Kept for now because cannot be sure that it will change later or not. + // 2 - if there could be a way to export enums to qml and qml can raise an error if an incorrect enum used, + // then it would is absolutely preferred to use enum instead of properties + // currently if just one property being defined/used to send the current state to the qml, there is no way to make sure if incorrect/undefined + // enum is used or not. + // in Qt user/developer can literally type GuiActions.abcdefg and qml will never complain and only if compared with the state will return false. + + // Treatment states - Rinse back + // Rinseback states + bool mRinseback = vData.mSubMode == GuiTreatmentStates ::TREATMENT_RINSEBACK_STATE ; + if ( mRinseback ) { + rbInit ( vData.mRinsebackState == GuiRinsebackStates ::RINSEBACK_STOP_INIT_STATE ); + rbRun ( vData.mRinsebackState == GuiRinsebackStates ::RINSEBACK_RUN_STATE ); + rbPaused ( vData.mRinsebackState == GuiRinsebackStates ::RINSEBACK_PAUSED_STATE ); + rbStop ( vData.mRinsebackState == GuiRinsebackStates ::RINSEBACK_STOP_STATE ); + rbAdditional ( vData.mRinsebackState == GuiRinsebackStates ::RINSEBACK_RUN_ADDITIONAL_STATE ); + } + txRinseback ( mRinseback ); // it's the main rinseback even so moved last to have all the sub-rinseback-states updated prior to. + + // Recirculate states + bool mRecirculate = vData.mSubMode == GuiTreatmentStates ::TREATMENT_RECIRC_STATE ; + if ( mRecirculate ) { + rcStarted ( vData.mRecirculateState == GuiRecirculateStates ::TREATMENT_RECIRC_RECIRC_STATE ); + rcStopped ( vData.mRecirculateState == GuiRecirculateStates ::TREATMENT_RECIRC_STOPPED_STATE ); + } + txRecirculate ( mRecirculate ); // it's the main recirculate even so moved last to have all the sub-recirculate-states updated prior to. + + // Blood Prime states + bool mBloodPrime = vData.mSubMode == GuiTreatmentStates ::TREATMENT_BLOOD_PRIME_STATE ; + if ( mBloodPrime ) { + bpRamp ( vData.mBloodPrimeState == GuiBloodPrimeStates ::BLOOD_PRIME_RAMP_STATE ); + } + txBloodPrime ( mBloodPrime ); + + // Treatment End states + bool mTreatmentEnd = vData.mSubMode == GuiTreatmentStates ::TREATMENT_END_STATE ; + if ( mTreatmentEnd ) { + teWaitRinseback ( vData.mTreatmentEndState == GuiTreatmentEndStates ::TREATMENT_END_WAIT_FOR_RINSEBACK_STATE ); + tePaused ( vData.mTreatmentEndState == GuiTreatmentEndStates ::TREATMENT_END_PAUSED_STATE ); + } + txEnd ( mTreatmentEnd ); + + // Treatment Stop states + bool mTreatmentStop = vData.mSubMode == GuiTreatmentStates ::TREATMENT_STOP_STATE ; + if ( mTreatmentStop ) { + tsRecirculate ( vData.mTreatmentStopState == GuiTreatmentStopStates ::TREATMENT_STOP_RECIRC_STATE ); + tsRecirculateNo ( vData.mTreatmentStopState == GuiTreatmentStopStates ::TREATMENT_STOP_NO_RECIRC_STATE ); + } + txStop ( mTreatmentStop ); +} + +/*! + * \brief VHDTreatmentStates::onActionReceive + * \details message handler for the message AdjustUltrafiltrationStateResponse data + * \param vData - AdjustUltrafiltrationStateResponse data + */ +void VHDTreatmentStates::onActionReceive(const AdjustUltrafiltrationStateResponseData &vData) +{ + // Ultrafiltration states + ufStart ( vData.mState == GuiUFStates ::UF_START_STATE ); + ufPaused ( vData.mState == GuiUFStates ::UF_PAUSED_STATE ); + ufRunning ( vData.mState == GuiUFStates ::UF_RUNNING_STATE ); +} Index: sources/view/hd/data/treatment/VHDTreatmentStatesData.h =================================================================== diff -u --- sources/view/hd/data/treatment/VHDTreatmentStatesData.h (revision 0) +++ sources/view/hd/data/treatment/VHDTreatmentStatesData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,126 @@ +/*! + * + * 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 VHDTreatmentStatesData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentStatesData.h" +#include "MTreatmentAdjustUltrafiltrationStateResponse.h" +#include "MTreatmentAdjustSalineResponse.h" +#include "MTreatmentAdjustHeparinResponse.h" + +// namespace +namespace View { + +/*! + * \brief The VHDTreatmentStates class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentStates + * + */ +class VHDTreatmentStates : public QObject +{ + Q_OBJECT + + // coco begin validated: Manually tested + // This property should not be used in QML since it need exposed enum + // exposed enum usage in QML is not suggested since QML will not error out on any issue + // kept for consistency and debugging use cases + PROPERTY( quint32, subMode , 0) + PROPERTY( quint32, ufState , 0) + PROPERTY( quint32, salineState , 0) + // coco end + + // these groups of properties are mutually exclusive + // and if one becomes true the other ones become false at the same time + // so on each change we were going to have multiple signal emits. + // but since it is not happening more often Property is used. + // otherwise it should be implemented as a single signal with these properties as parameters.\n + // also start UF_START_STATE should not be used often + // because it's only useful in FW implementation and it immediately changes to another state. + + + // ---- Treatment states + // ---- Treatment states - Basics + // coco begin validated: Manually tested + // not used yet since the Treatment Start/stop/end has not been implemented yet. + PROPERTY( bool , txStart , false) ///< TREATMENT_START_STATE = 0 # Start treatment - initialize treatment and go to blood prime state + PROPERTY( bool , txBloodPrime , false) ///< TREATMENT_BLOOD_PRIME_STATE = 1 # Prime blood-side of dialyzer with gradual ramp for 1 min. while dialyzer is bypassed. No dialysis or UF taking place. No treatment time. + PROPERTY( bool , txDialysis , false) ///< TREATMENT_DIALYSIS_STATE = 2 # Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested + PROPERTY( bool , txStop , false) ///< TREATMENT_STOP_STATE = 3 # Treatment stopped. All pumps off. Dializer bypassed + PROPERTY( bool , txRinseback , false) ///< TREATMENT_RINSEBACK_STATE = 4 # Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating + PROPERTY( bool , txRecirculate , false) ///< TREATMENT_RECIRC_STATE = 5 # Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed + PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE = 6 # Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback + // coco end + + // ---- Ultrafiltration states + // coco begin validated: Manually tested + // not useful for UI more FW state entry + // kept for consistency + PROPERTY( bool , ufStart , false) ///< UF_START_STATE = 0 # Start state of the ultrafiltration state machine + // coco end + PROPERTY( bool , ufPaused , false) ///< UF_PAUSED_STATE = 1 # Paused state of the ultrafiltration state machine + PROPERTY( bool , ufRunning , false) ///< UF_RUNNING_STATE = 2 # Running state of the ultrafiltration state machine + + // ---- Saline Bolus states + PROPERTY( bool , sbIdle , true ) ///< SALINE_BOLUS_STATE_IDLE = 0 # No saline bolus delivery is in progress + PROPERTY( bool , sbWaitPump , false) ///< SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP = 1 # Wait for pumps to stop before starting bolus + PROPERTY( bool , sbRunning , false) ///< SALINE_BOLUS_STATE_IN_PROGRESS = 2 # A saline bolus delivery is in progress + PROPERTY( bool , sbMaxReached , false) ///< SALINE_BOLUS_STATE_MAX_DELIVERED = 3 # Maximum saline bolus volume reached - no more saline bolus deliveries allowed + + // ---- Heparin states + PROPERTY( bool , hpOff , true ) ///< HEPARIN_STATE_OFF = 0 # No heparin delivery is in progress + PROPERTY( bool , hpStopped , false) ///< HEPARIN_STATE_STOPPED = 1 # Heparin delivery stopped by alarm or not yet started + PROPERTY( bool , hpPaused , false) ///< HEPARIN_STATE_PAUSED = 2 # Heparin delivery paused + PROPERTY( bool , hpInitial_bolus , false) ///< HEPARIN_STATE_INITIAL_BOLUS = 3 # Initial heparin bolus delivery in progress + PROPERTY( bool , hpDispensing , false) ///< HEPARIN_STATE_DISPENSING = 4 # Gradual heparin dispensing in progress + PROPERTY( bool , hpCompleted , false) ///< HEPARIN_STATE_COMPLETED = 5 # Heparin delivery stopped due to the set stop time before treatment end + PROPERTY( bool , hpEmpty , false) ///< HEPARIN_STATE_EMPTY = 6 # Heparin Syringe empty + + // Rinseback States + PROPERTY( bool , rbInit , true ) ///< RINSEBACK_STOP_INIT_STATE = 0 # Start state (stopped) of the rinseback sub-mode state machine + PROPERTY( bool , rbRun , false) ///< RINSEBACK_RUN_STATE = 1 # Rinseback running state of the rinseback sub-mode state machine + PROPERTY( bool , rbPaused , false) ///< RINSEBACK_PAUSED_STATE = 2 # Rinseback paused state of the rinseback sub-mode state machine + PROPERTY( bool , rbStop , false) ///< RINSEBACK_STOP_STATE = 3 # Rinseback stopped (done) state of the rinseback sub-mode state machine + PROPERTY( bool , rbAdditional , false) ///< RINSEBACK_RUN_ADDITIONAL_STATE = 4 # Additional rinseback volume (10 mL) state of the rinseback sub-mode state machine + + // Recirculate states + PROPERTY( bool , rcStarted , true ) ///< TREATMENT_RECIRC_RECIRC_STATE = 0 # Re-circulate state of the treatment re-circulate sub-mode state machine + PROPERTY( bool , rcStopped , false) ///< TREATMENT_RECIRC_STOPPED_STATE = 1 # Stopped state of the treatment re-circulate sub-mode state machine + + // Blood Prime + PROPERTY( bool , bpRamp , true ) ///< BLOOD_PRIME_RAMP_STATE = 0 # Ramp state of the blood prime sub-mode state machine + + // Treatment End + PROPERTY( bool , teWaitRinseback , true ) ///< TREATMENT_END_WAIT_FOR_RINSEBACK_STATE = 0 # Wait for rinseback state of the treatment end sub-mode state machine + PROPERTY( bool , tePaused , false) ///< TREATMENT_END_PAUSED_STATE = 1 # Paused state of the treatment end sub-mode state machine + + // Treatment Stop + PROPERTY( bool , tsRecirculate , true ) ///< TREATMENT_STOP_RECIRC_STATE = 0 # Dialysate re-circulation state of the treatment stop sub-mode state machine + PROPERTY( bool , tsRecirculateNo , false) ///< TREATMENT_STOP_NO_RECIRC_STATE = 1 # No dialysate re-circulation state of the treatment stop sub-mode state machine + + // class definition + VIEW_DEC_CLASS(VHDTreatmentStates) + + // slots for received data messages (onActionReceive) + VIEW_DEC_SLOT (TreatmentStatesData ) // Treatment States Broadcast messages (This class original receiver) + VIEW_DEC_SLOT (AdjustUltrafiltrationStateResponseData ) // Ultrafiltration state Adjustment response message +}; +} Index: sources/view/hd/data/treatment/VTreatmentBloodFlow.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentBloodFlow.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentBloodFlow.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,32 @@ +/*! + * + * 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 VTreatmentBloodFlow.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentBloodFlow.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentBloodFlow, BloodFlowData) + +void VTreatmentBloodFlow::onActionReceive(const BloodFlowData &vData) +{ + bloodFlow_FlowSetPoint (vData.mFlowSetPoint ); + bloodFlow_MeasuredFlow (vData.mMeasuredFlow ); + bloodFlow_RotorSpeed (vData.mRotorSpeed ); + bloodFlow_MotorSpeed (vData.mMotorSpeed ); + bloodFlow_MotorCtlSpeed (vData.mMotorCtlSpeed ); + bloodFlow_MotorCtlCurrent (vData.mMotorCtlCurrent ); + bloodFlow_PWMDutyCycle (vData.mPWMDutyCycle ); + bloodFlow_SigStrength (vData.mSigStrength ); +} Index: sources/view/hd/data/treatment/VTreatmentBloodFlow.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentBloodFlow.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentBloodFlow.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,50 @@ +/*! + * + * 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 VTreatmentBloodFlow.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentFlowsData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentBloodFlow class + * \details View for Model's data representation. + * + * \sa Model::MBloodFlow + * + */ +class VTreatmentBloodFlow : public QObject +{ + Q_OBJECT + + PROPERTY( qint32 , bloodFlow_FlowSetPoint , 0) + PROPERTY( float , bloodFlow_MeasuredFlow , 0) + PROPERTY( float , bloodFlow_RotorSpeed , 0) + PROPERTY( float , bloodFlow_MotorSpeed , 0) + PROPERTY( float , bloodFlow_MotorCtlSpeed , 0) + PROPERTY( float , bloodFlow_MotorCtlCurrent, 0) + PROPERTY( float , bloodFlow_PWMDutyCycle , 0) + PROPERTY( float , bloodFlow_SigStrength , 0) + + VIEW_DEC(VTreatmentBloodFlow, BloodFlowData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentBloodPrimeData.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentBloodPrimeData.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentBloodPrimeData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,26 @@ +/*! + * + * 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 VTreatmentBloodPrimeData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "VTreatmentBloodPrimeData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentBloodPrime, TreatmentBloodPrimeData) + +void VTreatmentBloodPrime::onActionReceive(const TreatmentBloodPrimeData &vData) +{ + target (vData.mTarget ); + current(vData.mCurrent); +} Index: sources/view/hd/data/treatment/VTreatmentBloodPrimeData.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentBloodPrimeData.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentBloodPrimeData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,44 @@ +/*! + * + * 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 VTreatmentBloodPrimeData.h + * \author (last) Behrouz NematiPour + * \date (last) 09-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentBloodPrimeData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentBloodPrime class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentBloodPrime + * + */ +class VTreatmentBloodPrime : public QObject +{ + Q_OBJECT + + PROPERTY( float , target , 0) + PROPERTY( float , current , 0) + + VIEW_DEC(VTreatmentBloodPrime, TreatmentBloodPrimeData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentDialysateFlow.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentDialysateFlow.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentDialysateFlow.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,32 @@ +/*! + * + * 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 VTreatmentDialysateFlow.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentDialysateFlow.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentDialysateFlow, DialysateFlowData) + +void VTreatmentDialysateFlow::onActionReceive(const DialysateFlowData &vData) +{ + dialysateFlow_FlowSetPoint (vData.mFlowSetPoint ); + dialysateFlow_MeasuredFlow (vData.mMeasuredFlow ); + dialysateFlow_RotorSpeed (vData.mRotorSpeed ); + dialysateFlow_MotorSpeed (vData.mMotorSpeed ); + dialysateFlow_MotorCtlSpeed (vData.mMotorCtlSpeed ); + dialysateFlow_MotorCtlCurrent (vData.mMotorCtlCurrent ); + dialysateFlow_PWMDutyCycle (vData.mPWMDutyCycle ); + dialysateFlow_SigStrength (vData.mSigStrength ); +} Index: sources/view/hd/data/treatment/VTreatmentDialysateFlow.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentDialysateFlow.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentDialysateFlow.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,50 @@ +/*! + * + * 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 VTreatmentDialysateFlow.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentFlowsData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentDialysateFlow class + * \details View for Model's data representation. + * + * \sa Model::MDialysateFlow + * + */ +class VTreatmentDialysateFlow : public QObject +{ + Q_OBJECT + + PROPERTY( qint32 , dialysateFlow_FlowSetPoint , 0) + PROPERTY( float , dialysateFlow_MeasuredFlow , 0) + PROPERTY( float , dialysateFlow_RotorSpeed , 0) + PROPERTY( float , dialysateFlow_MotorSpeed , 0) + PROPERTY( float , dialysateFlow_MotorCtlSpeed , 0) + PROPERTY( float , dialysateFlow_MotorCtlCurrent, 0) + PROPERTY( float , dialysateFlow_PWMDutyCycle , 0) + PROPERTY( float , dialysateFlow_SigStrength , 0) + + VIEW_DEC(VTreatmentDialysateFlow, DialysateFlowData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentHeparinData.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentHeparinData.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentHeparinData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,25 @@ +/*! + * + * 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 VTreatmentHeparinData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "VTreatmentHeparinData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentHeparin, TreatmentHeparinData) + +void VTreatmentHeparin::onActionReceive(const TreatmentHeparinData &vData) +{ + cumulative (vData.mCumulative); +} Index: sources/view/hd/data/treatment/VTreatmentHeparinData.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentHeparinData.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentHeparinData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,43 @@ +/*! + * + * 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 VTreatmentHeparinData.h + * \author (last) Behrouz NematiPour + * \date (last) 20-Nov-2020 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentHeparinData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentHeparin class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentHeparin + * + */ +class VTreatmentHeparin : public QObject +{ + Q_OBJECT + + PROPERTY( float , cumulative , 0) + + VIEW_DEC(VTreatmentHeparin, TreatmentHeparinData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentPressureOcclusion.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentPressureOcclusion.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentPressureOcclusion.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,29 @@ +/*! + * + * 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 VTreatmentPressureOcclusion.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentPressureOcclusion.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentPressureOcclusion, PressureOcclusionData) + +void VTreatmentPressureOcclusion::onActionReceive(const PressureOcclusionData &vData) +{ + arterialPressure ( vData.mArterialPressure ); + venousPressure ( vData.mVenousPressure ); + bloodPumpOcclusion ( vData.mBloodPumpOcclusion ); + dialysateInletPumpOcclusion ( vData.mDialysateInletPumpOcclusion ); + dialysateOutletPumpOcclusion ( vData.mDialysateOutletPumpOcclusion ); +} Index: sources/view/hd/data/treatment/VTreatmentPressureOcclusion.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentPressureOcclusion.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentPressureOcclusion.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,50 @@ +/*! + * + * 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 VTreatmentPressureOcclusion.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentPressureOcclusionData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentPressureOcclusion class + * \details View for Model's data representation. + * + * \sa Model::MPressureOcclusion + * + */ +class VTreatmentPressureOcclusion : public QObject +{ + Q_OBJECT + + PROPERTY( float , arterialPressure , 0) + PROPERTY( float , venousPressure , 0) + // coco begin validated: These three properties have not been used in GUI. + // has been manually tested that it works perfectly fine if used. + PROPERTY( quint32 , bloodPumpOcclusion , 0) + PROPERTY( quint32 , dialysateInletPumpOcclusion , 0) + PROPERTY( quint32 , dialysateOutletPumpOcclusion , 0) + // coco end + + VIEW_DEC(VTreatmentPressureOcclusion, PressureOcclusionData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentRecirculateData.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentRecirculateData.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentRecirculateData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,26 @@ +/*! + * + * 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 VTreatmentRecirculateData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#include "VTreatmentRecirculateData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentRecirculate, TreatmentRecirculateData) + +void VTreatmentRecirculate::onActionReceive(const TreatmentRecirculateData &vData) +{ + timeoutTotal ( vData.mTimeoutTotal ); + timeoutCountDown( vData.mTimeoutCountDown ); +} Index: sources/view/hd/data/treatment/VTreatmentRecirculateData.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentRecirculateData.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentRecirculateData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,44 @@ +/*! + * + * 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 VTreatmentRecirculateData.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 10-Feb-2021 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentRecirculateData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentRecirculate class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentRecirculate + * + */ +class VTreatmentRecirculate : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , timeoutTotal , 0) + PROPERTY( quint32 , timeoutCountDown, 0) + + VIEW_DEC(VTreatmentRecirculate, TreatmentRecirculateData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentRinsebackData.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentRinsebackData.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentRinsebackData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,29 @@ +/*! + * + * 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 VTreatmentRinsebackData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#include "VTreatmentRinsebackData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentRinseback, TreatmentRinsebackData) + +void VTreatmentRinseback::onActionReceive(const TreatmentRinsebackData &vData) +{ + target ( vData.mTarget ); + current ( vData.mCurrent ); + rate ( vData.mRate ); + timeoutTotal ( vData.mTimeoutTotal ); + timeoutCountDown( vData.mTimeoutCountDown ); +} Index: sources/view/hd/data/treatment/VTreatmentRinsebackData.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentRinsebackData.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentRinsebackData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,47 @@ +/*! + * + * 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 VTreatmentRinsebackData.h + * \author (last) Behrouz NematiPour + * \date (last) 10-Feb-2021 + * \author (original) Behrouz NematiPour + * \date (original) 20-Nov-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentRinsebackData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentRinseback class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentRinseback + * + */ +class VTreatmentRinseback : public QObject +{ + Q_OBJECT + + PROPERTY( float , target , 0) + PROPERTY( float , current , 0) + PROPERTY( quint32 , rate , 0) + PROPERTY( quint32 , timeoutTotal , 0) + PROPERTY( quint32 , timeoutCountDown, 0) + + VIEW_DEC(VTreatmentRinseback, TreatmentRinsebackData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentSalineData.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentSalineData.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentSalineData.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VTreatmentSalineData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#include "VTreatmentSalineData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentSaline, TreatmentSalineData) + +void VTreatmentSaline::onActionReceive(const TreatmentSalineData &vData) +{ + target (vData.mTarget ); + cumulative (vData.mCumulative); + delivered (vData.mDelivered ); +} Index: sources/view/hd/data/treatment/VTreatmentSalineData.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentSalineData.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentSalineData.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VTreatmentSalineData.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 13-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentSalineData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentSaline class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentSaline + * + */ +class VTreatmentSaline : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , target , 0) + PROPERTY( float , cumulative , 0) + PROPERTY( float , delivered , 0) + + VIEW_DEC(VTreatmentSaline, TreatmentSalineData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentTime.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentTime.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentTime.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VTreatmentTime.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentTime.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentTime, TreatmentTimeData) + +void VTreatmentTime::onActionReceive(const TreatmentTimeData &vData) +{ + time_Total (vData.mTotal ); + time_Elapsed (vData.mElapsed ); + time_Remaining (vData.mRemaining ); +} Index: sources/view/hd/data/treatment/VTreatmentTime.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentTime.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentTime.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -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 VTreatmentTime.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentTimeData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentTime class + * \details View for Model's data representation. + * + * \sa Model::MTreatmentTime + * + */ +class VTreatmentTime : public QObject +{ + Q_OBJECT + + PROPERTY( quint32 , time_Total , 0) + PROPERTY( quint32 , time_Elapsed , 0) + PROPERTY( quint32 , time_Remaining , 0) + + VIEW_DEC(VTreatmentTime, TreatmentTimeData) +}; +} Index: sources/view/hd/data/treatment/VTreatmentUltrafiltration.cpp =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentUltrafiltration.cpp (revision 0) +++ sources/view/hd/data/treatment/VTreatmentUltrafiltration.cpp (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,31 @@ +/*! + * + * 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 VTreatmentUltrafiltration.cpp + * \author (last) Behrouz NematiPour + * \date (last) 31-Aug-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#include "VTreatmentUltrafiltration.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTreatmentUltrafiltration, OutletFlowData) + +void VTreatmentUltrafiltration::onActionReceive(const OutletFlowData &vData) +{ + ultrafiltration_RefUFVol ( vData.mRefUFVol / 1000 ); // mL => L + ultrafiltration_MeasUFVol ( vData.mMeasUFVol / 1000 ); // mL => L + ultrafiltration_RotorSpeed ( vData.mRotorSpeed ); + ultrafiltration_MotorSpeed ( vData.mMotorSpeed ); + ultrafiltration_MotorCtlSpeed ( vData.mMotorCtlSpeed ); + ultrafiltration_MotorCtlCurrent ( vData.mMotorCtlCurrent ); + ultrafiltration_PWMDtCycle ( vData.mPWMDtCycle ); +} Index: sources/view/hd/data/treatment/VTreatmentUltrafiltration.h =================================================================== diff -u --- sources/view/hd/data/treatment/VTreatmentUltrafiltration.h (revision 0) +++ sources/view/hd/data/treatment/VTreatmentUltrafiltration.h (revision 88563177f10f20ced98750b2e40036201728131d) @@ -0,0 +1,54 @@ +/*! + * + * 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 VTreatmentUltrafiltration.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Sep-2020 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : don't remove +#include "VView.h" +#include "MTreatmentOutletFlowData.h" + +// namespace +namespace View { + +/*! + * \brief The VTreatmentUltrafiltration class + * \details View for Model's data representation. + * + * \sa Model::MOutletFlow + * + */ +class VTreatmentUltrafiltration : public QObject +{ + Q_OBJECT + + // coco begin validated : Manually validated + PROPERTY( float, minimum , 0.000 ) // no message to update this value and is 0 for now. + // coco end + PROPERTY( float, maximum , 0.600 ) + + PROPERTY( float, ultrafiltration_RefUFVol , 0) + PROPERTY( float, ultrafiltration_MeasUFVol , 0) + PROPERTY( float, ultrafiltration_RotorSpeed , 0) + PROPERTY( float, ultrafiltration_MotorSpeed , 0) + PROPERTY( float, ultrafiltration_MotorCtlSpeed , 0) + PROPERTY( float, ultrafiltration_MotorCtlCurrent, 0) + PROPERTY( float, ultrafiltration_PWMDtCycle , 0) + + VIEW_DEC(VTreatmentUltrafiltration, OutletFlowData) +}; +}