Index: firmware/App/Modes/ModeTreatment.h =================================================================== diff -u -rc282822f36836a8127f447c8ac5b8a50e851be63 -re23087e0c17f6ea81d60641fdb52121a8dd5a099 --- firmware/App/Modes/ModeTreatment.h (.../ModeTreatment.h) (revision c282822f36836a8127f447c8ac5b8a50e851be63) +++ firmware/App/Modes/ModeTreatment.h (.../ModeTreatment.h) (revision e23087e0c17f6ea81d60641fdb52121a8dd5a099) @@ -24,7 +24,7 @@ /** * @defgroup HDTreatmentMode HDTreatmentMode - * @brief TreatmentMode module. + * @brief The HDTreatmentMode module manages the treatment mode state machine and treatment related commands and requests. * * @addtogroup HDTreatmentMode * @{ @@ -47,6 +47,11 @@ U32 uFState; U32 salineBolusState; U32 heparinState; + U32 rinsebackState; + U32 txRecircState; + U32 bldPrimeState; + U32 txEndState; + U32 txStopState; } TREATMENT_STATE_DATA_T; /// Payload record structure for an ultrafiltration volume change confirmation message. @@ -76,14 +81,24 @@ S32 venHighLimit; } PRESSURE_LIMIT_CHANGE_RESPONSE_T; -// ********** private function prototypes ********** +// ********** public function prototypes ********** void initTreatmentMode( void ); // Initialize this module void transitionToTreatmentMode( void ); // Prepares for transition to treatment mode U32 execTreatmentMode( void ); // Execute the treatment mode state machine (call from OperationModes) void signalAlarmActionToTreatmentMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for Treatment mode +void signalGoToTreatmentStopped( void ); // Rinseback or Re-circ sub-mode is signaling to return to treatment stopped sub-mode +void signalGoToRinseback( void ); // Requesting transition to rinseback sub-mode from other sub-mode +void signalEndTreatment( void ); // Requesting transition to post-treatment mode +void signalBloodPrimeToDialysis( void ); // Blood prime sub-mode is signaling to move on to dialysis sub-mode +void signalRinsebackToRecirc( void ); // Rinseback sub-mode is signaling to move on to re-circ sub-mode TREATMENT_STATE_T getTreatmentState( void ); // Determine the current treatment sub-mode (state) +BOOL isTreatmentCompleted( void ); // Determine whether the treatment has completed +BOOL getRinsebackCompleted( void ); // Determine whether a rinseback has been completed +void setRinsebackIsCompleted( BOOL flag ); // Set whether a rinseback has been completed (T blocks rinseback option) +BOOL getBloodIsPrimed( void ); // Determine whether the blood-side circuit of the dialyzer has been primed with blood +void setBloodIsPrimed( BOOL flag ); // Set whether the blood-side circuit of the dialyzer has been primed with blood (F causes Tx start/resume to do blood prime first) void broadcastTreatmentTimeAndState( void ); // Broadcast the times and states of this treatment @@ -93,6 +108,8 @@ BOOL verifyBloodAndDialysateRateSettingsChange( U32 bloodRate, U32 dialRate ); BOOL verifyPressureLimitsChange( PRESSURE_LIMIT_CHANGE_REQUEST_T *data ); +BOOL testSetTreatmentTimeRemainingOverride( U32 value ); + /**@}*/ #endif