Index: firmware/App/Services/Messaging.c =================================================================== diff -u -rde6b47e92a4bffac2ae7238aba9d522bda3ae4df -r0cc67ce4bbaac3aeae8a3324e50e1b31e5ab49c3 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision de6b47e92a4bffac2ae7238aba9d522bda3ae4df) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 0cc67ce4bbaac3aeae8a3324e50e1b31e5ab49c3) @@ -116,6 +116,7 @@ { MSG_ID_UI_VERSION_INFO_RESPONSE, &handleUIVersionResponse }, { MSG_ID_DD_GEN_DIALYSATE_MODE_DATA, &setDialysateData }, { MSG_ID_DD_PRESSURES_DATA, &setDialysatePressure }, + { MSG_ID_UI_PATIENT_DISCONNECT_CONFIRM_REQUEST, &handlePatientDisconnectionConfirmCmd }, { MSG_ID_UI_TREATMENT_PARAMS_TO_VALIDATE, &validateAndSetTreatmentParameters }, { MSG_ID_UI_TREATMENT_UF_VOLUME_VALIDATE_REQUEST, &validateAndSetUFVolume }, { MSG_ID_UI_ULTRAFILTRATION_CHANGE_CONFIRM_REQUEST, &signalUserConfirmationOfUFVolume }, @@ -141,6 +142,7 @@ { MSG_ID_FFU_SIGNAL_TD_UPDATE_AVAILABLE, &handleUpdateAvailable }, { MSG_ID_UI_FLUID_BOLUS_REQUEST, &handleFluidBolusRequest }, { MSG_ID_UI_GENERIC_CONFIRMATION_RESULT_RESPONSE, &handleUIConfirmationResponse }, + { MSG_ID_UI_POST_TREATMENT_DISPOSABLE_REMOVAL_CONFIRM_REQUEST, &handleDisposableRemovalConfirmCmd }, { MSG_ID_TD_SOFTWARE_RESET_REQUEST, &testTDSoftwareResetRequest }, { MSG_ID_TD_BUBBLE_OVERRIDE_REQUEST, &testBubbleDetectOverride }, { MSG_ID_TD_BUBBLE_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testBubblesDataPublishIntervalOverride }, @@ -533,8 +535,8 @@ * @brief * The handleUIVersionResponse function handles a response to request for * UI version information. - * @details Inputs: none - * @details Outputs: none + * @details \b Inputs: none + * @details \b Outputs: none * @param message a pointer to the message to handle. * @return none *************************************************************************/ @@ -554,6 +556,48 @@ return result; } +/*********************************************************************//** + * @brief + * The handlePatientDisconnectionConfirmCmd function handles user confirms + * patient disconnection. + * @details \b Inputs: none + * @details \b Outputs: message handled + * @param message a pointer to the message to handle + * @return none. + *************************************************************************/ +void handlePatientDisconnectionConfirmCmd( MESSAGE_T *message ) +{ + if ( 0 == message->hdr.payloadLen ) + { + signalUserConfirmPatientDisconnection(); + } + else + { + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_TD_2_UI, FALSE ); + } +} + +/*********************************************************************//** + * @brief + * The handleDisposableRemovalConfirmCmd function handles user confirms + * disposable removal. + * @details \b Inputs: none + * @details \b Outputs: message handled + * @param message a pointer to the message to handle + * @return none. + *************************************************************************/ +void handleDisposableRemovalConfirmCmd( MESSAGE_T *message ) +{ + if ( 0 == message->hdr.payloadLen ) + { + signalUserConfirmDisposableRemoval(); + } + else + { + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_TD_2_UI, FALSE ); + } +} + // *********************************************************************** // ***************** Message Sending Helper Functions ******************** // ***********************************************************************