@startuml StopState participant TD as TD participant SW as SW participant UI as UI actor USER as US 'Possible actions and interaction types ' TD -> SW: MSG: Message ' SW -> UI: CMD: command ' UI -> UI: ACT: Action ' US -> UI: User actions are: ' ENT: User enters a value or string ' TCH: User touches a button (RadioButton, CheckBox, ...) ' SET: User sets/slides a slider ' SCL: User scrolls a flipable area ' 'Messages conventions: '[x \n ,] '[x \n ,# certain amount of parameters according to the content] '[x \n ,X The rest of the parameters do not matter.] ''''' Confirm Dialog properties for the End Treatment ' [6] ' Title = Treatment End ' Message = Are you sure you want to end the treatment? ' Confirm = CONFIRM ' Cancel = CANCEL ''''' Confirm Dialog commands ' enum Generic_Confirm_Command ' { ' GENERIC_CONFIRM_CMD_REQUEST_OPEN = 0, ///< Generic Confirm command to display the confirmation ' GENERIC_CONFIRM_CMD_TIMEOUT_CLOSE = 1, ///< Generic Confirm command to hide the confirmation, due to timeout user confirmation ' GENERIC_CONFIRM_CMD_REJECT = 2, ///< Generic Confirm command to display the confirmation rejection in case the request in not valid/accepted anymore. ' GENERIC_CONFIRM_CMD_ACCEPT_CLOSE = 3, ///< Generic Confirm command to hide the confirmation, due to accept user confirmation. ' NUM_OF_GENERIC_CONFIRM_COMMAND ///< Total number of generic confirm commands ' }; ''''' Alarm User Action actions ' enum Alarm_User_Actions ' { ' ALARM_USER_ACTION_RESUME = 0, ///< User selected resume from alarm recovery options ' ALARM_USER_ACTION_RINSEBACK = 1, ///< User selected rinseback from alarm recovery options ' ALARM_USER_ACTION_END_TREATMENT = 2, ///< User selected end treatment from alarm recovery options ' ALARM_USER_ACTION_ACK = 3, ///< User selected acknowledge (ok) from alarm recovery options ' NUMBER_OF_ALARM_USER_ACTIONS ///< Number of alarm user actions ' }; == User presses Hardware Stop Button == US -> TD: PRS: Hardware Stop Button TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags |= END_TREATMENT_BUTTON \ \n\t |= RESUME_BUTTON \ \n\t |= TEMPROARY_BREAK_BUTTON \ \n\t |= RETURN_BLOOD_END_TREATMENT_BUTTON SW -> UI: ACT: Display Alarm Dialog \ \n\t - End Treatment Button visible \ \n\t - Resume Button visible \ \n\t - Temporary Break Button visible \ \n\t - Return Blood Button visible UI -> US: ACT: Display Alarm Dialog \ \n\t - End Treatment Button visible\ \n\t - Resume Button visible \ \n\t - Temporary Break Button visible \ \n\t - Return Blood Button visible alt #LightSalmon User Presses Resume US -> UI: TCH: Resume Button UI -> SW: ACT: doUserActionResume ( \ \n\tALARM_USER_ACTION_RESUME \ \n) SW -> TD: MSG: [x06: #1] AlarmUserAction \ \n\t(U32) action TD -> SW: ACT: Resume Treatment SW -> UI: ACT: Resume Treatment UI -> US: ACT: Treatment resumed else #LightBlue User Presses End Treatment US -> UI: TCH: End Treatment Button UI -> SW: ACT: doUserActionEnd ( \ \n\tALARM_USER_ACTION_END_TREATMENT \ \n) SW -> TD: MSG: [x06: #1] AlarmUserAction \ \n\t(U32) action TD -> SW: MSG: [xB5: #3] \nTD Confirmation : \ \n\t(U32) mId =2 (END_TREATMENT) \ \n\t(U32) mCommand =0 (GENERIC_CONFIRM_CMD_REQUEST_OPEN) \ \n\t(U32) mReason SW -> UI: ACT: Open Confirm Dialog UI -> US: ACT: Display Confirm Dialog alt #LightGray CONFIRM US -> UI: ACT: Press confirm UI -> SW: ACT: Confirm Response SW -> TD: MSG: [xB6: #2] Response \ \n\t(U32) mId =2 (END_TREATMENT) \ \n\t(U32) mConfirm =1 (CONFIRM) TD -> TD: End the treatment else #LightPink CANCEL US -> UI: ACT: Press cancel UI -> SW: ACT: Cancel Response SW -> TD: MSG: [xB6: #2] Response \ \n\t(U32) mId =2 (END_TREATMENT) \ \n\t(U32) mConfirm =0 (CANCEL) TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop = 0 \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags SW -> UI: ACT: Hide Alarm Dialog UI -> US: ACT: Hide Alarm Dialog end else #LightGreen User Presses Return Blood US -> UI: TCH: Return Blood Button UI -> SW: ACT: doUserActionRinseback ( \ \n\tALARM_USER_ACTION_RINSEBACK \ \n) SW -> TD: MSG: [x06: #1] AlarmUserAction \ \n\t(U32) action TD -> SW: MSG: [xB5: #3] \nTD Confirmation : \ \n\t(U32) mId =3 (RETURN_BLOOD) \ \n\t(U32) mCommand =0 (GENERIC_CONFIRM_CMD_REQUEST_OPEN) \ \n\t(U32) mReason SW -> UI: ACT: Open Confirm Dialog UI -> US: ACT: Display Confirm Dialog alt #LightGray CONFIRM US -> UI: ACT: Press confirm UI -> SW: ACT: Confirm Response SW -> TD: MSG: [xB6: #2] Response \ \n\t(U32) mId =3 (RETURN_BLOOD) \ \n\t(U32) mConfirm =1 (CONFIRM) TD -> TD: Blood Return else #LightPink CANCEL US -> UI: ACT: Press cancel UI -> SW: ACT: Cancel Response SW -> TD: MSG: [xB6: #2] Response \ \n\t(U32) mId =3 (RETURN_BLOOD) \ \n\t(U32) mConfirm =0 (CANCEL) TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop = 0 \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags SW -> UI: ACT: Hide Alarm Dialog UI -> US: ACT: Hide Alarm Dialog end else #LightCyan User Presses Temporary Break US -> UI: TCH: Temporary Break Button UI -> SW: ACT: doUserActionTemporaryBreak ( \ \n\tALARM_USER_ACTION_TEMPOARY_BREAK \ \n) SW -> TD: MSG: [x06: #1] AlarmUserAction \ \n\t(U32) action TD -> SW: MSG: [xB5: #3] \nTD Confirmation : \ \n\t(U32) mId =4 (TEMPORARY_BREAK) \ \n\t(U32) mCommand =0 (GENERIC_CONFIRM_CMD_REQUEST_OPEN) \ \n\t(U32) mReason SW -> UI: ACT: Open Confirm Dialog UI -> US: ACT: Display Confirm Dialog alt #LightGray CONFIRM US -> UI: ACT: Press confirm UI -> SW: ACT: Confirm Response SW -> TD: MSG: [xB6: #2] Response \ \n\t(U32) mId =4 (TEMPORARY_BREAK) \ \n\t(U32) mConfirm =1 (CONFIRM) TD -> TD: Go to Blood Return else #LightPink CANCEL US -> UI: ACT: Press cancel UI -> SW: ACT: Cancel Response SW -> TD: MSG: [xB6: #2] Response \ \n\t(U32) mId =4 (TEMPORARY_BREAK) \ \n\t(U32) mConfirm =0 (CANCEL) TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop = 0 \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags SW -> UI: ACT: Hide Alarm Dialog UI -> US: ACT: Hide Alarm Dialog end end @enduml