Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r981de1f5228152ec6877aceae3d66ebf5efc7101 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 981de1f5228152ec6877aceae3d66ebf5efc7101) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -97,8 +97,6 @@ static UF_STATE_T handleUFStartState( DIALYSIS_STATE_T *dialysisState ); static UF_STATE_T handleUFPausedState( DIALYSIS_STATE_T *dialysisState ); static UF_STATE_T handleUFRunningState( DIALYSIS_STATE_T *dialysisState ); -static UF_STATE_T handleUFOffState( DIALYSIS_STATE_T *dialysisState ); -static UF_STATE_T handleUFCompletedState( DIALYSIS_STATE_T *dialysisState ); static SALINE_BOLUS_STATE_T handleSalineBolusIdleState( DIALYSIS_STATE_T *dialysisState ); static SALINE_BOLUS_STATE_T handleSalineBolusWait4Pumps2Stop( DIALYSIS_STATE_T *dialysisState ); @@ -577,17 +575,9 @@ currentUFState = handleUFRunningState( &result ); break; - case UF_OFF_STATE: - currentUFState = handleUFOffState( &result ); - break; - - case UF_COMPLETED_STATE: - currentUFState = handleUFCompletedState( &result ); - break; - default: SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_DIALYSIS_INVALID_UF_STATE, currentUFState ) - currentUFState = UF_COMPLETED_STATE; + currentUFState = UF_PAUSED_STATE; break; } @@ -647,16 +637,9 @@ { UF_STATE_T result; - if ( maxUFVolumeML < NEARLY_ZERO ) - { - result = UF_OFF_STATE; - } - else - { - lastUFTimeStamp = getMSTimerCount(); - uFTimeMS = 0; - result = UF_RUNNING_STATE; - } + lastUFTimeStamp = getMSTimerCount(); + uFTimeMS = 0; + result = UF_RUNNING_STATE; return result; } @@ -735,42 +718,9 @@ // If we have reached target UF volume, UF is complete if ( measUFVolume >= maxUFVolumeML ) { - result = UF_COMPLETED_STATE; + setUFRate = 0.0; } - // Handle saline bolus start request from user - else if ( TRUE == salineBolusStartRequested ) - { - if ( SALINE_BOLUS_STATE_IDLE == currentSalineBolusState ) - { - // Since we were doing UF prior to saline bolus, we want to auto-resume when done - salineBolusAutoResumeUF = TRUE; - // Go to UF paused state - result = UF_PAUSED_STATE; - // Go to saline bolus state - *dialysisState = DIALYSIS_SALINE_BOLUS_STATE; - } - else - { - salineBolusStartRequested = FALSE; - } - } - return result; -} - -/*********************************************************************//** - * @brief - * The handleUFCompletedOrOffState function handles the UF Off state - * of the ultrafiltration state machine. - * @details Inputs: none - * @details Outputs: UF volumes updated and provided to DPo pump controller. - * @param dialysisState next dialysis state - * @return next ultrafiltration state - *************************************************************************/ -static UF_STATE_T handleUFOffState( DIALYSIS_STATE_T *dialysisState ) -{ - UF_STATE_T result = UF_OFF_STATE; - // Calculate UF volumes and provide to dialysate outlet pump controller updateUFVolumes(); @@ -794,40 +744,6 @@ /*********************************************************************//** * @brief - * The handleUFCompletedState function handles the UF Completed - * state of the ultrafiltration state machine. This is a terminal state. - * @details Inputs: none - * @details Outputs: UF volumes updated and provided to DPo pump controller. - * @param dialysisState next dialysis state - * @return next ultrafiltration state - *************************************************************************/ -static UF_STATE_T handleUFCompletedState( DIALYSIS_STATE_T *dialysisState ) -{ - UF_STATE_T result = UF_COMPLETED_STATE; - - // Calculate UF volumes and provide to dialysate outlet pump controller - updateUFVolumes(); - - // Handle saline bolus start request from user - if ( TRUE == salineBolusStartRequested ) - { - salineBolusAutoResumeUF = FALSE; - // Go to saline bolus state - if ( SALINE_BOLUS_STATE_IDLE == currentSalineBolusState ) - { - *dialysisState = DIALYSIS_SALINE_BOLUS_STATE; - } - else - { - salineBolusStartRequested = FALSE; - } - } - - return result; -} - -/*********************************************************************//** - * @brief * The handleSalineBolusIdleState function handles the idle state of the * saline bolus state machine. * @details Inputs: none Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -rb70bf4c5a7cdb4218d812546b3bc5d7dad152700 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision b70bf4c5a7cdb4218d812546b3bc5d7dad152700) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -36,7 +36,7 @@ // ********** private definitions ********** /// Interval (ms/task time) at which the pre-treatment state data is published on the CAN bus. -#define PRE_TREATMENT_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) +#define PRE_TREATMENT_DATA_PUB_INTERVAL ( 250 / TASK_GENERAL_INTERVAL ) #define DIP_PATIENT_CONNECTION_FLOW_RATE_ML_MIN 100 ///< Patient connection sub-mode dialysate inlet pump flow rate in mL/min. @@ -302,9 +302,9 @@ * The signalUserStartTreatment function handles user requests to start treatment. * @details Inputs: patientConnectionConfirm, currentPreTreatmentState * @details Outputs: handled and send response to treatment start request - * @return TRUE if signal accepted, FALSE if not + * @return none *************************************************************************/ -BOOL signalUserStartTreatment( void ) +void signalUserStartTreatment( void ) { BOOL accepted = FALSE; REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NO_PATIENT_CONNECTION_CONFIRM; @@ -325,9 +325,7 @@ } } - sendTreatmentStartResponseMsg( accepted, rejReason ); - - return accepted; + sendStartTreatmentResponse( accepted, rejReason ); } /*********************************************************************//** @@ -497,7 +495,7 @@ if ( ( DG_MODE_STAN == dgOpMode ) && ( DG_STANDBY_MODE_STATE_IDLE == dgSubMode ) ) { state = HD_PRE_TREATMENT_SELF_TEST_CONSUMABLE_STATE; - F32 const trimmerHeaterTemp = getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_TEMPERATURE ); + F32 const trimmerHeaterTemp = getTreatmentParameterF32( TREATMENT_PARAM_DIALYSATE_TEMPERATURE ); F32 const primaryHeaterTemp = trimmerHeaterTemp + PRIMARY_HEATER_TARGET_TEMP_OFFSET; cmdStartDG(); Index: firmware/App/Modes/ModePreTreat.h =================================================================== diff -u -r9e2667ac9d2f1b2add9811f93477f0365f1b4eb7 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/ModePreTreat.h (.../ModePreTreat.h) (revision 9e2667ac9d2f1b2add9811f93477f0365f1b4eb7) +++ firmware/App/Modes/ModePreTreat.h (.../ModePreTreat.h) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -56,7 +56,7 @@ void signalUserContinueToTreatment( void ); // Signal that user requests to continue to treatment void setUserSetUFVolumeStatus( BOOL status ); // Set status that indicates UF volume setting has been set void signalUserConfirmPatientConnection( void ); // Signal that user confirms patient connection has been completed -BOOL signalUserStartTreatment( void ); // Signal that user requests to start treatment +void signalUserStartTreatment( void ); // Signal that user requests to start treatment void signalAlarmActionToPreTreatmentMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for pre-treatment mode Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -rf7b149d8b8c9ea6ac58e4739101693d251d7a355 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision f7b149d8b8c9ea6ac58e4739101693d251d7a355) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -223,23 +223,33 @@ /*********************************************************************//** * @brief - * The signalUserStartingTreatment function handles user initiation of a + * The signalUserInitiateTreatment function handles user initiation of a * treatment. * @details Inputs: none - * @details Outputs: requested mode transition to treatment parameters mode + * @details Outputs: treatStartReqReceived * @return TRUE if signal accepted, FALSE if not *************************************************************************/ -BOOL signalUserStartingTreatment( void ) +BOOL signalUserInitiateTreatment( void ) { BOOL result = FALSE; + REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NOT_ALLOWED_IN_CURRENT_MODE; if ( ( MODE_STAN == getCurrentOperationMode() ) && ( STANDBY_WAIT_FOR_TREATMENT_STATE == currentStandbyState ) ) { - treatStartReqReceived = TRUE; - result = TRUE; + if ( TRUE == isDGCommunicating() ) + { + treatStartReqReceived = TRUE; + result = TRUE; + rejReason = REQUEST_REJECT_REASON_NONE; + } + else + { + rejReason = REQUEST_REJECT_REASON_DG_COMM_LOST; + } } - sendTreatmentStartResponseMsg( result, 0 ); // TODO - provide reason code if rejected + sendInitiateTreatmentResponseMsg( result, rejReason ); + return result; } Index: firmware/App/Modes/ModeStandby.h =================================================================== diff -u -r30f049651877229042e3f8700c8596e5b9a1e0f4 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision 30f049651877229042e3f8700c8596e5b9a1e0f4) +++ firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -35,7 +35,7 @@ void transitionToStandbyMode( void ); // Prepares for transition to standby mode U32 execStandbyMode( void ); // Execute the standby mode state machine (call from OperationModes) -BOOL signalUserStartingTreatment( void ); // User has initiated a treatment - go to treatment parameters mode +BOOL signalUserInitiateTreatment( void ); // User has initiated a treatment - go to treatment parameters mode void signalAlarmActionToStandbyMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for Standby mode /**@}*/ Index: firmware/App/Modes/ModeTreatmentParams.c =================================================================== diff -u -r766708fceb0bdf1af8c7897df29d4f5036bfd3db -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision 766708fceb0bdf1af8c7897df29d4f5036bfd3db) +++ firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -221,14 +221,17 @@ BOOL signalUserCancelTreatment( void ) { BOOL result = FALSE; + REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NOT_ALLOWED_IN_CURRENT_MODE; if ( MODE_TPAR == getCurrentOperationMode() ) { treatmentCancelled = TRUE; result = TRUE; + rejReason = REQUEST_REJECT_REASON_NONE; } - sendTreatmentStartResponseMsg( result, 0 ); // TODO - provide reason code if rejected + sendInitiateTreatmentResponseMsg( result, rejReason ); + return result; } Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -rb70bf4c5a7cdb4218d812546b3bc5d7dad152700 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision b70bf4c5a7cdb4218d812546b3bc5d7dad152700) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -55,7 +55,7 @@ /* INIT */{ MODE_FAUL, MODE_NLEG, MODE_INIT, MODE_STAN, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_NLEG, }, /* STAN */{ MODE_FAUL, MODE_SERV, MODE_NLEG, MODE_STAN, MODE_TPAR, MODE_NLEG, MODE_NLEG, MODE_NLEG, }, /* TPAR */{ MODE_FAUL, MODE_NLEG, MODE_NLEG, MODE_STAN, MODE_TPAR, MODE_PRET, MODE_NLEG, MODE_NLEG, }, -/* PRET */{ MODE_FAUL, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_PRET, MODE_TREA, MODE_NLEG, }, +/* PRET */{ MODE_FAUL, MODE_NLEG, MODE_NLEG, MODE_STAN, MODE_NLEG, MODE_PRET, MODE_TREA, MODE_POST, }, /* TREA */{ MODE_FAUL, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_TREA, MODE_POST, }, /* POST */{ MODE_FAUL, MODE_NLEG, MODE_NLEG, MODE_STAN, MODE_NLEG, MODE_NLEG, MODE_NLEG, MODE_POST, }, }; Index: firmware/App/Modes/Prime.h =================================================================== diff -u -r6a43b24baa34ac9d842e2bdf8396aad333571d6b -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/Prime.h (.../Prime.h) (revision 6a43b24baa34ac9d842e2bdf8396aad333571d6b) +++ firmware/App/Modes/Prime.h (.../Prime.h) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -37,8 +37,8 @@ /// Payload record structure for a priming status data broadcast message. typedef struct { - U32 remainingTime; ///< Remaining time for priming in seconds. U32 totalTime; ///< Total priming time in seconds. + U32 remainingTime; ///< Remaining time for priming in seconds. } PRIMING_DATA_PAYLOAD_T; #pragma pack(pop) Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -rfa41b85cf47fb01cd905b2ed53d472a9cb0c1706 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision fa41b85cf47fb01cd905b2ed53d472a9cb0c1706) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -240,6 +240,7 @@ case NO_CART_SELF_TESTS_DIALYSATE_FLOW_METERS_STATE: execDialInFlowTest(); + currentNoCartSelfTestsState = NO_CART_SELF_TESTS_PUMPS_STATE; break; case NO_CART_SELF_TESTS_PUMPS_STATE: Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r936acbb405970a406c8b1f557ea727e7cbf74c94 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 936acbb405970a406c8b1f557ea727e7cbf74c94) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -1185,8 +1185,8 @@ handleTreatmentParametersFromUI( message ); break; - case MSG_ID_UI_START_TREATMENT: - handleUIStartTreatmentMsg( message ); + case MSG_ID_UI_INITIATE_TREATMENT_REQUEST: + handleInitiateTreatmentRequest( message ); break; case MSG_ID_UI_USER_CONFIRM_TREATMENT_PARAMS: @@ -1221,14 +1221,18 @@ handleStartPrimeCmd( message ); break; - case MSG_ID_UI_CONTINUE_TO_TREATMENT_REQUEST: + case MSG_ID_UI_PATIENT_CONNECTION_BEGIN_REQUEST: handleContinueToTreatmentCmd( message ); break; case MSG_ID_UI_PATIENT_CONNECTION_CONFIRM: handlePatientConnectionConfirmCmd( message ); break; + case MSG_ID_UI_START_TREATMENT_REQUEST: + handleStartTreatmentRequest( message ); + break; + case MSG_ID_DG_COMMAND_RESPONSE: handleDGCmdResp( message ); break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r936acbb405970a406c8b1f557ea727e7cbf74c94 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 936acbb405970a406c8b1f557ea727e7cbf74c94) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -671,7 +671,7 @@ *************************************************************************/ BOOL sendContinueToTreatmentCmdResponse( BOOL accepted, U32 reason ) { - return sendUIResponseMsg( MSG_ID_HD_CONTINUE_TO_TREATMENT_RESPONSE, accepted, reason ); + return sendUIResponseMsg( MSG_ID_HD_PATIENT_CONNECTION_BEGIN_RESPONSE, accepted, reason ); } /*********************************************************************//** @@ -708,6 +708,39 @@ return sendUIResponseMsg( MSG_ID_HD_PATIENT_CONNECTION_CONFIRM_RESPONSE, accepted, reason ); } +/*********************************************************************//** + * @brief + * The handleStartTreatmentRequest function handles user requests to start treatment. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none. + *************************************************************************/ +void handleStartTreatmentRequest( MESSAGE_T *message ) +{ + if ( 0 == message->hdr.payloadLen ) + { + signalUserStartTreatment(); + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); +} + +/*********************************************************************//** + * @brief + * The sendStartTreatmentResponse function constructs a start treatment user action + * response to the UI and queues the msg for transmit on the appropriate CAN channel. + * @details Inputs: none + * @details Outputs: Patient connection confirm response msg constructed and queued. + * @param accepted T/F - was patient connection confirm accepted? + * @param reason reason why request was rejected (or zero if accepted) + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendStartTreatmentResponse( BOOL accepted, U32 reason ) +{ + return sendUIResponseMsg( MSG_ID_HD_START_TREATMENT_RESPONSE, accepted, reason ); +} + /*********************************************************************//** * @brief * The sendDialysateTempTargetsToDG function constructs a dialysate temperature @@ -1966,14 +1999,14 @@ /*********************************************************************//** * @brief - * The handleUIStartTreatmentMsg function handles a treatment start/cancel + * The handleInitiateTreatmentRequest function handles a treatment initiate/cancel * message from the UI. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleUIStartTreatmentMsg( MESSAGE_T *message ) +void handleInitiateTreatmentRequest( MESSAGE_T *message ) { BOOL result = FALSE; @@ -1983,17 +2016,13 @@ memcpy( &cmd, message->payload, sizeof(U32) ); - if ( 0 == cmd ) // Initiate treatment (go to treatment params mode) + if ( 0 == cmd ) // Cancel treatment (return from aborted treatment params mode) { - result = signalUserStartingTreatment(); - } - else if ( 1 == cmd ) // Cancel treatment (return from aborted treatment params mode) - { result = signalUserCancelTreatment(); } - else if ( 2 == cmd ) // Start treatment + else if ( 1 == cmd ) // Initiate treatment (go to treatment params mode) { - result = signalUserStartTreatment(); + result = signalUserInitiateTreatment(); } } @@ -2002,34 +2031,18 @@ /*********************************************************************//** * @brief - * The sendTreatmentStartResponseMsg function constructs a treatment start - * request response message to the UI and queues the msg for transmit on + * The sendInitiateTreatmentResponseMsg function constructs a initiate treatment + * response message to the UI and queues the msg for transmit on * the appropriate CAN channel. * @details Inputs: none * @details Outputs: Treatment start response msg constructed and queued. * @param accepted T/F - request accepted? * @param reason reason code if rejected * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL sendTreatmentStartResponseMsg( BOOL accepted, U32 reason ) +BOOL sendInitiateTreatmentResponseMsg( BOOL accepted, U32 reason ) { - BOOL result; - MESSAGE_T msg; - U08 *payloadPtr = msg.payload; - - // Create a message record - blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_START_TREATMENT_RESPONSE; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ); - - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, sizeof( U32 ) ); - - // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer - result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); - - return result; + return sendUIResponseMsg( MSG_ID_HD_INITIATE_TREATMENT_RESPONSE, accepted, reason ); } /*********************************************************************//** Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r936acbb405970a406c8b1f557ea727e7cbf74c94 -rbb114842e73659f097bb8b8ec0d670bfa4f8cb73 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 936acbb405970a406c8b1f557ea727e7cbf74c94) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision bb114842e73659f097bb8b8ec0d670bfa4f8cb73) @@ -92,11 +92,11 @@ // MSG_ID_DG_RESERVOIR_DATA: void handleDGReservoirData( MESSAGE_T *message ); -// MSG_ID_UI_START_TREATMENT -void handleUIStartTreatmentMsg( MESSAGE_T *message ); +// MSG_ID_UI_INITIATE_TREATMENT_REQUEST +void handleInitiateTreatmentRequest( MESSAGE_T *message ); -// MSG_ID_HD_START_TREATMENT_RESPONSE -BOOL sendTreatmentStartResponseMsg( BOOL accepted, U32 reason ); +// MSG_ID_UI_INITIATE_TREATMENT_RESPONSE +BOOL sendInitiateTreatmentResponseMsg( BOOL accepted, U32 reason ); // MSG_ID_UI_NEW_TREATMENT_PARAMS void handleTreatmentParametersFromUI( MESSAGE_T *message ); @@ -191,6 +191,12 @@ // MSG_ID_HD_PATIENT_CONNECTION_CONFIRM_RESPONSE BOOL sendPatientConnectionConfirmCmdResponse( BOOL accepted, U32 reason ); +// MSG_ID_UI_START_TREATMENT_REQUEST +void handleStartTreatmentRequest( MESSAGE_T *message ); + +// MSG_ID_HD_START_TREATMENT_RESPONSE +BOOL sendStartTreatmentResponse( BOOL accepted, U32 reason ); + // *********** public DG command functions ********** // MSG_ID_SET_DG_DIALYSATE_TEMP_TARGETS