Index: sources/drydemo/StateController.h =================================================================== diff -u -rbf271a558491a83b39eb30748784f1b744736dd2 -r6c0428ed8c6430924d54d5a42c45c8ec0c16c7c2 --- sources/drydemo/StateController.h (.../StateController.h) (revision bf271a558491a83b39eb30748784f1b744736dd2) +++ sources/drydemo/StateController.h (.../StateController.h) (revision 6c0428ed8c6430924d54d5a42c45c8ec0c16c7c2) @@ -86,9 +86,15 @@ quint32 bicartDepresInProgress; }; - struct HDF_vars { - float hdfManualRateMLPM; - float hdfCurrentVolumeML; + struct Treatment_HDF_vars { + float hdfManualRateMLPM; + float hdfCurrentVolumeML; + HDF_Control_States hdfControlState; + float hdfMaxFiltrationFraction; + float hdfCurrentRateMLPM; + quint32 hdfControlTimeCtr; + bool hdfHasMaxVolumeBeenReached; + bool hdfIsRequested; }; struct Pressure_Vars { @@ -154,7 +160,7 @@ quint32 rinsebackVolumeML; quint32 hepatitisBStatus; quint32 acidConcentrate; - float substitutionFluidVolumeL; + float hdfSubstitutionFluidVolumeL; float heparinBolusVolumeML; float heparinDeliveryRateMLHR; float dialysateTemperatureC; @@ -175,6 +181,7 @@ Treatment_Params _treatmentParams; Treatment_Status_Vars _treatmentStatus; Treatment_Sub_State_Vars _treatmentSubStates; + Treatment_HDF_vars _treatmentHDFVars; bool _isBroadcastListReady; // TODO use a mutex? bool _isSendListReady; // Todo use a mutex? quint32 _elapsedTimeCtr; @@ -203,7 +210,7 @@ void handleBackToStandbyEvent(State_Status &status); quint32 extractU32DataFromReceivedMessage(const Can::Message_ID_Enum msgID, qint32 index); float extractF32DataFromReceivedMessage(const Can::Message_ID_Enum msgID, qint32 index); - void triggerAnAlarm(Alarm_List alarmID); + void triggerAnAlarm(const Alarm_List alarmID); void handleAlarmUserAction(State_Status &status, bool isFromTxPause = false); void handleTriggeredAlarmsToTxPause(State_Status &status); void handleChemsReplacementAlarmsSequence(State_Status &status); @@ -213,6 +220,7 @@ void handleUIConfirmMessage(const Generic_Confirm_Id confirmID, State_Status &status); bool hasUIConfirmMessageTimedout(const Generic_Confirm_Id confirmID); void handleSendUIConfirmationMessage(const Generic_Confirm_Id confirmID, const Generic_Confirm_Command confirmCmd, const Reject_Reasons rejectReason = REQUEST_REJECT_REASON_NONE); + void handleTDWaterSampleResultRequest(); // Pre-treatment methods void handleSetupTubingSetConnectionsRequestMessage(); @@ -259,8 +267,12 @@ void handleVitalsDataRquest(); // HDF Treatment methods - void handleTreatmentHDF(); - void handleHemodialfiltrationBroadcastData(const Broadcast_Type BCType); + void initializeTreatmentHDFVariables(); + float handleHDFCheckRate(const float proposedRateMLPM, const bool initRate); + void handleHDFTreatment(); + void handleHDFBroadcastData(const Broadcast_Type BCType); + void handleHDFAdjustmentRequestMessage(); + void hadnleHDFPauseResumeRequestMessage(); // Treatment pause methods void handleDryBicartBroadcastData(const Broadcast_Type BCType);