Index: sources/view/hd/data/VHDTreatmentStatesData.h =================================================================== diff -u -r28a383251ad37c669202c0a717ff90b8fc21a442 -r07e0c7bd409782cab96a4ae761ee3f819bdb8639 --- sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 28a383251ad37c669202c0a717ff90b8fc21a442) +++ sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 07e0c7bd409782cab96a4ae761ee3f819bdb8639) @@ -47,71 +47,74 @@ PROPERTY( quint32, salineState , 0) // coco end - // these properties are mutually exclusive + // 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 Start state of the ultrafiltration state machine + PROPERTY( bool , ufStart , false) ///< UF_START_STATE = 0 # Start state of the ultrafiltration state machine // coco end - PROPERTY( bool , ufPaused , false) ///< UF_PAUSED_STATE Paused state of the ultrafiltration state machine - PROPERTY( bool , ufRunning , false) ///< UF_RUNNING_STATE Running state of the ultrafiltration state machine - PROPERTY( bool , ufOff , true ) ///< UF_OFF_STATE Completed/off state of the ultrafiltration state machine (default state) - PROPERTY( bool , ufCompleted , false) ///< UF_COMPLETED_STATE Completed state of ultrafiltration state machine + 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 + PROPERTY( bool , ufOff , true ) ///< UF_OFF_STATE = 3 # Completed/off state of the ultrafiltration state machine + PROPERTY( bool , ufCompleted , false) ///< UF_COMPLETED_STATE = 4 # Completed state of ultrafiltration state machine // ---- Saline Bolus states - PROPERTY( bool , sbIdle , true ) ///< SALINE_BOLUS_STATE_IDLE No saline bolus delivery is in progress (default state) - PROPERTY( bool , sbWaitPump , false) ///< SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP Wait for pumps to stop before starting bolus - PROPERTY( bool , sbRunning , false) ///< SALINE_BOLUS_STATE_IN_PROGRESS A saline bolus delivery is in progress - PROPERTY( bool , sbMaxReached , false) ///< SALINE_BOLUS_STATE_MAX_DELIVERED Maximum saline bolus volume reached - no more saline bolus deliveries allowed + 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 ) ///< No heparin delivery is in progress - PROPERTY( bool , hpPaused , false) ///< Heparin delivery paused - PROPERTY( bool , hpInitial_bolus , false) ///< Initial heparin bolus delivery in progress - PROPERTY( bool , hpDispensing , false) ///< Gradual heparin dispensing in progress - PROPERTY( bool , hpCompleted , false) ///< Heparin delivery stopped due to the set stop time before treatment end - PROPERTY( bool , hpEmpty , false) ///< Heparin Syringe empty + PROPERTY( bool , hpOff , true ) ///< HEPARIN_STATE_OFF = 0 # No heparin delivery is in progress + PROPERTY( bool , hpPaused , false) ///< HEPARIN_STATE_PAUSED = 1 # Heparin delivery paused + PROPERTY( bool , hpInitial_bolus , false) ///< HEPARIN_STATE_INITIAL_BOLUS = 2 # Initial heparin bolus delivery in progress + PROPERTY( bool , hpDispensing , false) ///< HEPARIN_STATE_DISPENSING = 3 # Gradual heparin dispensing in progress + PROPERTY( bool , hpCompleted , false) ///< HEPARIN_STATE_COMPLETED = 4 # Heparin delivery stopped due to the set stop time before treatment end + PROPERTY( bool , hpEmpty , false) ///< HEPARIN_STATE_EMPTY = 5 # Heparin Syringe empty - // ---- 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 Start treatment, prime blood side with gradual ramp for 1 min. while Dialyzer is bypassed. No dialysis or UF taking place - PROPERTY( bool , txBloodPrime , false) ///< TREATMENT_BLOOD_PRIME_STATE 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 , txStop , false) ///< TREATMENT_STOP_STATE Treatment stopped. All pumps off. Dialyzer bypassed - PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE Treatment has ended. All pumps off. Dialyzer is bypassed. Blood lines are closed. User to disconnect - // coco end + // 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 - // ---- Treatment states - Dialysis - PROPERTY( bool , txDialysisRunning , false) ///< TREATMENT_DIALYSIS_STATE Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested - // coco begin validated: Manually tested - // not used yet since the Treatment Start/stop/end has not been implemented yet. - PROPERTY( bool , txDialysisEnd , false) ///< TREATMENT_DIALYSIS_END_STATE Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback - // coco end - // ---- Treatment states - Rinse back - PROPERTY( bool , txRinseback , false) ///< TREATMENT_RINSEBACK_STATE Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating + // 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 - // Rinseback States - PROPERTY( bool , rbInit , false) ///< Start state (stopped) of the rinseback sub-mode state machine - PROPERTY( bool , rbRun , false) ///< Rinseback running state of the rinseback sub-mode state machine - PROPERTY( bool , rbPaused , false) ///< Rinseback paused state of the rinseback sub-mode state machine - PROPERTY( bool , rbStop , false) ///< Rinseback stopped (done) state of the rinseback sub-mode state machine - PROPERTY( bool , rbAdditional , false) ///< Additional rinseback volume (10 mL) state of the rinseback 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 states - Recirculate - PROPERTY( bool , txRecirculate , false) ///< TREATMENT_RECIRC_STATE Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed + // 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 - // Recirculate states - PROPERTY( bool , rcStarted , false) ///< Re-circulate state of the treatment re-circulate sub-mode state machine - PROPERTY( bool , rcStopped , false) ///< Stopped state of the treatment re-circulate 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