@startuml lowBicarb 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.] == Low Bicarb Alarm == TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop=LOW_BICARB_ALARM \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags |= OK_BUTTON SW -> UI: ACT: Display Alarm Dialog \ \n\t - OK Button visible UI -> US: ACT: Display Alarm Dialog \ \n\t - OK Button visible US -> UI: TCH: OK Button UI -> SW: ACT: doUserActionOk ( \ \n\tALARM_USER_ACTION_OK \ \n) SW -> TD: MSG: [x06: #1] AlarmUserAction \ \n\t(U32) action TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect : \ \n\t(BOOL) mShowDialog = 1 [CLOSE (0)/ OPEN(1)] \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress \ \n\t(BOOL) mDrainInProgress = 1 [NOT_IN_PROGRESS (0)/ IN_PROGRESS(1)] \ \n\t(BOOL) mDepressurizeInProgress = 0 [NOT_IN_PROGRESS (0)/ IN_PROGRESS(1)] SW -> UI: ACT: Dry Bicart Disconnect Dialog \ \n\t Show Progress of Drain \ \n\t Disable Depressurize & Done buttons UI -> US: ACT: Display Dry Bicart Disconnect Dialog \ \n\t Show Progress of Drain \ \n\t Show Disabled Depressurize & Done buttons UI -> UI: ⟲: Wait for Drain Competion TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect : \ \n\t(BOOL) mShowDialog = 1 (OPEN) \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress = 0 \ \n\t(BOOL) mDrainInProgress = 0 (NOT_IN_PROGRESS) \ \n\t(BOOL) mDepressurizeInProgress = 0 (NOT_IN_PROGRESS) SW -> UI: ACT: Dry Bicart Disconnect Dialog idle UI -> US: ACT: Display idle Dry Bicart Disconnect Dialog == Drain Button == US -> UI: TCH: Drain Button UI -> SW: ACT: request Drain SW -> TD: MSG: [xxx: #1] Req\n DryBicard Disconnect Request \ \n\t(U32) action=0 (DRAIN) TD -> SW: MSG: [xXX: #2] Rsp\nDryBicard Disconnect Response: \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason alt accepted TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect Broadcast: \ \n\t(BOOL) mShowDialog = 1 (OPEN) \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress \ \n\t(BOOL) mDrainInProgress = 1 (IN_PROGRESS) \ \n\t(BOOL) mDepressurizeInProgress = 0 (NOT_IN_PROGRESS) SW -> UI: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Show Progress of Drain \ \n\t Disable Depressurize & Done buttons UI -> US: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Show Progress of Drain \ \n\t Show Disabled Depressurize & Done buttons else #pink reject SW -> UI: ACT: Send Rejection Reason UI -> US: ACT: Display rejection reason end == Depressurize Button == US -> UI: TCH: Depressurize Button UI -> SW: ACT: request Depressurize SW -> TD: MSG: [xxx: #1] DryBicardDisconnectAction \ \n\t(U32) action=1 (DEPRESSURIZE) TD -> SW: MSG: [xXX: #2] Rsp\nDryBicard Disconnect Response: \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason alt accepted TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect Broadcast: \ \n\t(BOOL) mShowDialog = 1 (OPEN) \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress \ \n\t(BOOL) mDrainInProgress = 0 (NOT_IN_PROGRESS) \ \n\t(BOOL) mDepressurizeInProgress = 1 (IN_PROGRESS) SW -> UI: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Disable Drain & Done buttons UI -> US: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Show Disabled Drain & Done buttons else #pink reject SW -> UI: ACT: Send Rejection Reason UI -> US: ACT: Display rejection reason end == Cancel Button == TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect Broadcast: \ \n\t(BOOL) mShowDialog = 1 (OPEN) \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress \ \n\t(BOOL) mDrainInProgress = 1 (IN_PROGRESS) \ \n\t(BOOL) mDepressurizeInProgress = 0 (NOT_IN_PROGRESS) SW -> UI: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Show Progress of Drain \ \n\t Disable Depressurize & Done buttons UI -> US: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Show Progress of Drain \ \n\t Show Disabled Depressurize & Done buttons US -> UI: TCH: Cancel Button UI -> SW: ACT: request Cancel Drain SW -> TD: MSG: [xxx: #1] DryBicardDisconnectAction \ \n\t(U32) action=2 (CANCEL) TD -> SW: MSG: [xXX: #2] Rsp\nDryBicard Disconnect Response: \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason alt accepted TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect Broadcast: \ \n\t(BOOL) mShowDialog = 1 (OPEN) \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress = 0 \ \n\t(BOOL) mDrainInProgress = 0 (NOT_IN_PROGRESS) \ \n\t(BOOL) mDepressurizeInProgress = 0 (NOT_IN_PROGRESS) SW -> UI: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Button Enabled UI -> US: ACT: Update Dry Bicart Disconnect Dialog \ \n\t Show Button Enabled else #pink reject SW -> UI: ACT: Send Rejection Reason UI -> US: ACT: Display rejection reason end == Done Button == US -> UI: TCH: Done Button UI -> SW: ACT: request Done SW -> TD: MSG: [xxx: #1] DryBicardDisconnectAction \ \n\t(U32) action=3 (DONE) TD -> SW: MSG: [xXX: #2] Rsp\nDryBicard Disconnect Response: \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason alt accepted TD -> SW: MSG: [xXX: #5] Broadcast \nDry Bicart Disconnect Broadcast: \ \n\t(BOOL) mShowDialog = 0 (CLOSE) \ \n\t(U32) mTotal \ \n\t(U32) mCurrentProgress = 0 \ \n\t(BOOL) mDrainInProgress = 0 (NOT_IN_PROGRESS) \ \n\t(BOOL) mDepressurizeInProgress = 0 (NOT_IN_PROGRESS) SW -> UI: ACT: Close Dialog UI -> US: ACT: Close Dry Bicart Disconnect Dialog TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop=REPLACE_BICARB_ALARM \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags |= OK_BUTTON SW -> UI: ACT: Display Alarm Dialog \ \n\t - OK Button visible UI -> US: ACT: Display Alarm Dialog \ \n\t - OK Button visible US -> UI: TCH: OK Button UI -> SW: ACT: doUserActionOk ( \ \n\tALARM_USER_ACTION_OK \ \n) SW -> TD: MSG: [x06: #1] AlarmUserAction \ \n\t(U32) action TD -> SW: MSG: [x01: #4] \nTD AlarmStatus : \ \n\t(U32) mState \ \n\t(U32) mTop=Dialysate_Proportioning_In_Progress \ \n\t(U32) mMuteTimeout \ \n\t(U16) mFlags |= NO_BUTTONS SW -> UI: ACT: Display Alarm Dialog \ \n\t - NO_BUTTONS visible UI -> US: ACT: Display Alarm Dialog \ \n\t - NO_BUTTONS visible else #pink reject SW -> UI: ACT: Send Rejection Reason UI -> US: ACT: Display rejection reason end @enduml