Index: firmware/App/Services/AlarmMgmtTD.c =================================================================== diff -u -rcda13e3e3b9219fbac05354d8d1f8a25f45276cb -rb30f390acbd6c972d4ecea536b875a409a2c8e77 --- firmware/App/Services/AlarmMgmtTD.c (.../AlarmMgmtTD.c) (revision cda13e3e3b9219fbac05354d8d1f8a25f45276cb) +++ firmware/App/Services/AlarmMgmtTD.c (.../AlarmMgmtTD.c) (revision b30f390acbd6c972d4ecea536b875a409a2c8e77) @@ -158,6 +158,7 @@ alarmStatus.noBloodRecirc = FALSE; alarmStatus.noDialRecirc = FALSE; alarmStatus.ok = FALSE; + alarmStatus.noTempBreak = FALSE; alarmsBlockedTimer = 0; lastUserAlarmActionReceivedTime = 0; @@ -501,6 +502,13 @@ } break; + case ALARM_USER_ACTION_TEMPORARY_BREAK: + if ( ( alarmStatus.noTempBreak != TRUE ) && ( alarmStatus.noRinseback != TRUE ) ) + { + alarmActionIsValid = TRUE; + } + break; + default: SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_ALARM_USER_ACTION1, action ); break; @@ -547,7 +555,8 @@ break; case ALARM_USER_ACTION_RINSEBACK: - initiateAlarmAction( ALARM_ACTION_RINSEBACK ); + // Send message to UI to get user confirmation to rinseback (blood return & end treatment) - action initiated only upon receipt of user confirmation from UI + addConfirmationRequest( GENERIC_CONFIRM_ID_RINSEBACK, GENERIC_CONFIRM_CMD_REQUEST_OPEN, 0 ); break; case ALARM_USER_ACTION_END_TREATMENT: @@ -559,6 +568,11 @@ initiateAlarmAction( ALARM_ACTION_ACK ); break; + case ALARM_USER_ACTION_TEMPORARY_BREAK: + // Send message to UI to get user confirmation to temporary break - action initiated only upon receipt of user confirmation from UI + addConfirmationRequest( GENERIC_CONFIRM_ID_TEMPORARY_BREAK, GENERIC_CONFIRM_CMD_REQUEST_OPEN, 0 ); + break; + // This default cannot be reached in VectorCAST due to check above for alarmActionIsValid #ifndef _VECTORCAST_ default: @@ -893,7 +907,7 @@ } } -/*********************************************************************//** +/*********************************************************************//** * @brief * The getAlarmStartTime function gets the start time of a given alarm. * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given alarm ID is invalid. @@ -928,7 +942,8 @@ /*********************************************************************//** * @brief * The monitorAlarms function monitors alarm audio current and also looks - * for and executes a user confirmation of user request to end treatment. + * for and executes a user confirmation of user request to shutdown, + * end treatment, temporary break, rinseback. * @details \b Inputs: none * @details \b Outputs: none * @return none @@ -946,6 +961,20 @@ initiateAlarmAction( ALARM_ACTION_END_TREATMENT ); } + // Check for user confirmation of rinseback (Blood return & end treatment) alarm response + if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == getConfirmationRequestStatus( GENERIC_CONFIRM_ID_RINSEBACK ) ) + { + clearAllRecoverableAlarms( ALARM_USER_ACTION_RINSEBACK ); + initiateAlarmAction( ALARM_ACTION_RINSEBACK ); + } + + // Check for user confirmation of temp break alarm response + if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == getConfirmationRequestStatus( GENERIC_CONFIRM_ID_TEMPORARY_BREAK ) ) + { + clearAllRecoverableAlarms( ALARM_USER_ACTION_TEMPORARY_BREAK ); + initiateAlarmAction( ALARM_ACTION_TEMPORARY_BREAK ); + } + // TODO - Check current vs. expected audio output } @@ -1153,6 +1182,7 @@ BOOL endTxOnlyAlarmActive = FALSE; BOOL usrAckReq = FALSE; BOOL noMinimize = TRUE; + BOOL noTempBreak = FALSE; TD_OP_MODE_T currentMode = getCurrentOperationMode(); ALARM_T propsTop = getAlarmProperties( alarmStatus.alarmTop ); ALARM_ID_T a; @@ -1161,10 +1191,12 @@ alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_RESUME ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RESUME ] ? FALSE : TRUE ); alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_RINSEBACK ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RINSEBACK ] ? FALSE : TRUE ); alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_END_TREATMENT ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_END_TREATMENT ] ? FALSE : TRUE ); + alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_TEMP_BREAK ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_TEMPORARY_BREAK ] ? FALSE : TRUE ); // Reset user alarm recovery actions allowed by active alarms flags alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RESUME ] = FALSE; alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RINSEBACK ] = FALSE; alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_END_TREATMENT ] = FALSE; + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_TEMP_BREAK ] = FALSE; // Determine alarm flags for ( a = ALARM_ID_NO_ALARM; a < NUM_OF_ALARM_IDS; a++ ) @@ -1181,6 +1213,7 @@ alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RESUME ] |= props.alarmNoResume; alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RINSEBACK ] |= props.alarmNoRinseback; alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_END_TREATMENT ] |= props.alarmNoEndTreatment; + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_TEMP_BREAK ] |= props.alarmNoRinseback; if ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RESUME ] ) { noResume = ( TRUE == props.alarmNoResume ? TRUE : noResume ); @@ -1205,6 +1238,14 @@ { noEndTreatment = TRUE; } + if ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_TEMPORARY_BREAK ] ) + { + noTempBreak = ( TRUE == props.alarmNoRinseback ? TRUE : noTempBreak ); + } + else + { + noTempBreak = TRUE; + } // if there are any active alarms that only allow end treatment, set flag so we can ensure we do not allow OK option. if ( ( TRUE == props.alarmNoResume ) && ( TRUE == props.alarmNoRinseback ) && @@ -1230,6 +1271,7 @@ noResume = TRUE; noRinseback = TRUE; noEndTreatment = TRUE; + noTempBreak = TRUE; } // if OK option enabled and there are any active alarms that only allow end treatment, block OK option and allow end treatment option (DEN-16594). @@ -1246,6 +1288,7 @@ noResume = TRUE; noRinseback = TRUE; noEndTreatment = TRUE; + noTempBreak = TRUE; } // If in Treatment-Stop state or Fault/Service/Standby Mode, allow user to minimize the alarm window @@ -1264,6 +1307,7 @@ alarmStatus.noEndTreatment = noEndTreatment; alarmStatus.ok = usrAckReq; alarmStatus.noMinimize = noMinimize; + alarmStatus.noTempBreak = noTempBreak; resumeBlockedByAlarmProperty = noResumePerAlarmPropertyOnly; } @@ -1402,6 +1446,7 @@ payload.alarmsFlags |= ( almStatus.noResume ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_NO_RESUME) : 0 ); payload.alarmsFlags |= ( almStatus.noRinseback ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_NO_RINSEBACK) : 0 ); payload.alarmsFlags |= ( almStatus.noEndTreatment ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_NO_END_TREATMENT) : 0 ); + payload.alarmsFlags |= ( almStatus.noTempBreak ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_NO_TEMPORARY_BREAK) : 0 ); payload.alarmsFlags |= ( almStatus.ok ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_OK_BUTTON_ONLY) : 0 ); payload.alarmsFlags |= ( almStatus.alarmsSilenced ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_ALARMS_SILENCED) : 0 ); payload.alarmsFlags |= ( almStatus.lampOn ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_LAMP_ON) : 0 );