Index: sources/view/hd/data/VHDTreatmentStatesData.h =================================================================== diff -u -rc70a3e2ca2b9a679b042bf543dc331cffbd937ac -r2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95 --- sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision c70a3e2ca2b9a679b042bf543dc331cffbd937ac) +++ sources/view/hd/data/VHDTreatmentStatesData.h (.../VHDTreatmentStatesData.h) (revision 2c9421bd6da03c7e0bd0bfa1f49fa95c2bd18a95) @@ -49,20 +49,48 @@ // 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. - // also start UF_START_STATE has been intentionally ignored + // 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. - PROPERTY( bool , ufPaused , false) - PROPERTY( bool , ufRunning , false) - PROPERTY( bool , ufOff , true ) // default state - PROPERTY( bool , ufCompleted , false) - // treatment paused state - // normally paused - PROPERTY( bool , txPaused , true ) + // Ultrafiltration states + PROPERTY( bool , ufStart , false) ///< UF_START_STATE Start state of the ultrafiltration state machine + 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 - VIEW_DEC(VHDTreatmentStates, TreatmentStatesData) + // Saline Bolus states + PROPERTY( bool , sbOff , 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 + // Treatment states + // Treatment states - Basics + 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 , txStop , false) ///< TREATMENT_STOP_STATE Treatment stopped. All pumps off. Dializer bypassed + PROPERTY( bool , txEnd , false) ///< TREATMENT_END_STATE Treatment has ended. All pumps off. Dialyzer is bypassed. Blood lines are closed. User to disconnect + // Treatment states - Dialysis + PROPERTY( bool , txDialysis_Running , false) ///< TREATMENT_DIALYSIS_STATE Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested + PROPERTY( bool , txDialysis_End , false) ///< TREATMENT_DIALYSIS_END_STATE Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback + // Treatment states - Rinse back + PROPERTY( bool , txRinseback_Running , false) ///< TREATMENT_RINSEBACK_STATE Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating + PROPERTY( bool , txRinseback_Pause , false) ///< TREATMENT_RINSEBACK_PAUSE_STATE Rinseback paused. Blood pump off. Dialyzer bypassed. Dialysate recirculating + // Treatment states - Recirculate + PROPERTY( bool , txRecirculate_Setup , false) ///< TREATMENT_RECIRC_SETUP_STATE Rinseback complete. Blood pump off. Blood lines closed. User to disconnect and shunt blood lines + PROPERTY( bool , txRecirculate_Running , false) ///< TREATMENT_RECIRC_STATE Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed + PROPERTY( bool , txRecirculate_Pause , false) ///< TREATMENT_RECIRC_PAUSE_STATE Recirculate paused. Blood pump off. Blood lines closed and shunted. Dialyzer is bypassed + PROPERTY( bool , txRecirculate_Stop , false) ///< TREATMENT_RECIRC_STOP_STATE Recirculate stopped. Blood pump off. Blood lines open. Waiting for patient to unshunt and connect and resume treatment + + // 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 (AdjustSalineResponseData ) // Saline Bolus Adjustment response message + VIEW_DEC_SLOT (AdjustUltrafiltrationStateResponseData ) // Ultrafiltration state adjustment response message + public slots: }; }