Index: sources/drydemo/StateController.h =================================================================== diff -u -ra271469db538bfc35eba9a56308760893ecbc68e -rbb80bbccaf1c911be48493868c18c656d84b2ec1 --- sources/drydemo/StateController.h (.../StateController.h) (revision a271469db538bfc35eba9a56308760893ecbc68e) +++ sources/drydemo/StateController.h (.../StateController.h) (revision bb80bbccaf1c911be48493868c18c656d84b2ec1) @@ -31,46 +31,49 @@ private: struct Treatment_Status_Vars { - bool hasTxParamsBeenInitialized; + bool hasTxParamsBeenInitialized; User_Command_ID userCmd; - QString stateTransitionEvent; - bool requestTreatmentReset; + QString stateTransitionEvent; + bool requestTreatmentReset; // Treatment time variable(s) - quint32 treatmentElapsedTimeMS; - bool isTreatmentComplete; + quint32 treatmentElapsedTimeMS; + bool isTreatmentComplete; // Fluid bolus - Fluid_Bolus_States fluidBolusState; - float accumFluidBolusDeliveredML; - float totalFluidBolusDeliveredML; - // Treatment states - Treatment_States txState; - Dialysis_States dialysisSubState; + float accumFluidBolusDeliveredML; + float totalFluidBolusDeliveredML; // UF variables - float presUFRateMLPM; - float ufVolDeliveredL; - bool validateUFVolReceived; - float validateUFVolGoalL; - float validateUFRateLHR; + float presUFRateMLPM; + float ufVolDeliveredL; + bool validateUFVolReceived; + float validateUFVolGoalL; + float validateUFRateLHR; // Treatment duration variables - bool validateTxDurReceived; - quint32 validateTxDurMin; - quint32 validateHepDurMin; + bool validateTxDurReceived; + quint32 validateTxDurMin; + quint32 validateHepDurMin; // Alarm variables - Alarm_List activeAlarm; + Alarm_List activeAlarm; // Rinseback variables - Rinseback_States rinsebackState; - quint32 rinsebackFlowMLPM; - float rinsebackAccumVolML; - float rinsebackAdditionalVolML; - bool isRinsebackComplete; - quint32 rinsebackTimerCounter; - quint32 rinsebackAdditionalTimerCounter; - float rinsebackTgtVolPlusAddVolML; + quint32 rinsebackFlowMLPM; + float rinsebackAccumVolML; + float rinsebackAdditionalVolML; + bool isRinsebackComplete; + quint32 rinsebackTimerCounter; + quint32 rinsebackAdditionalTimerCounter; + float rinsebackTgtVolPlusAddVolML; // Recirculation variables - bool hasRecircBeenRequested; - Recirculate_States recircState; + bool hasRecircBeenRequested; }; + struct Treatment_Sub_State_Vars { + Treatment_States txStates; + Blood_Prime_States bloodPrimeStates; + Fluid_Bolus_States fluidBolusState; + Dialysis_States dialysisSubState; + Rinseback_States rinsebackState; + Recirculate_States recircState; + }; + struct Treatment_Params { bool finalConfirmation; quint32 treatmentModality; @@ -108,6 +111,7 @@ QRandomGenerator _randNumGenerator; Treatment_Params _treatmentParams; Treatment_Status_Vars _treatmentStatus; + Treatment_Sub_State_Vars _treatmentSubStates; bool _isBroadcastListReady; // TODO use a mutex? bool _isSendListReady; // Todo use a mutex? drydemoXMLStates _dryDemo; @@ -152,7 +156,7 @@ void setTreatmentParametersToDefault(); void initializeTreatmentTimeAndUltrafiltration(); void handleTreatmentSetpointsBroadcastData(const quint32 bloodFlowMLPM, const quint32 dialFlowMLPM, const float dialTempC, const Broadcast_Type BCType); - void handleTreatmentStatesBroadcastData(const QList &txStates, const Broadcast_Type BCType); + void handleTreatmentStatesBroadcastData(const Broadcast_Type BCType); void handleFluidBolusRequestMessage(); void handleFluidBolusFluidDelivery(const quint32 bloodFlowMLPM); void handleFluidBolusBroadcastData(const Broadcast_Type BCType);