@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 SW -> UI: ACT: Display Alarm Dialog \ \n\t - End Treatment Button visible UI -> US: ACT: Display Alarm Dialog \ \n\t - End Treatment Button visible 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: [xBA: #3] \nTD Confirmation : \ \n\t(U32) mId = END_TREATMENT(6) \ \n\t(U32) mCommand = GENERIC_CONFIRM_CMD_REQUEST_OPEN \ \n\t(U32) mReason alt CONFIRM US -> SW: MSG: [xBB: #2] \nEnd Treatment \ \n\t(U32) mId \ \n\t(U32) mConfirm = 1 SW -> TD: MSG: [xBB: #2] \nEnd Treatment \ \n\t(U32) mId \ \n\t(U32) mConfirm = 1 TD -> TD: End the treatment else CANCEL US -> SW: MSG: [xBB: #2] \nEnd Treatment \ \n\t(U32) mId \ \n\t(U32) mConfirm = 0 SW -> TD: MSG: [xBB: #2] \nEnd Treatment \ \n\t(U32) mId \ \n\t(U32) mConfirm = 0 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 @enduml