@startuml HDF participant TD as TD participant SW as SW participant UI as UI actor USER as US 'Possible actions and interaction types ' External on CANBus ' TD -> SW: MSG: Message ' SW -> TD: MSG: Message ' Internal to the application ' XX -> YY: CMD: Command ' XX -> XX: ACT: Action ' External on OS/FS ' SW -> Script: ACT: Command ' Script -> OS: CMD: Command ' Script -> SW: MSG: Message ' OS -> Script: MSG: Message ' US -> UI: User actions are: ' ASK: Display a ' ENT: User enters a value or string ' TCH: User touches a button (RadioButton, CheckBox, ...) ' SCL: User scrolls a flip-able area == Main TX HDF == UI ->o UI: ⟲: Main Treatment Screen US -> UI: TCH: HDF Menu Option UI -> US: ACT: Display HDF Screen \ \n\t - Pressures \ \n\t - Pressures Graph \ \n\t - HDF group Plot Timer (1 min) UI --> UI: ... end group Pressures Data TD --> UI: ... end group HDF Data TD --> UI: ... end == Pause/ Resume Button == US -> UI: TCH: Pause/ Resume HDF button UI -> SW: ACT: : Pause/ Resume Command alt Pause SW -> TD: MSG: [xXX: Req #1] Pause/ Resume Command Request\n\ \t(U32) cmd=HDF_PAUSE_COMMAND (0) else Resume SW -> TD: MSG: [xXX: Req #1] Pause/ Resume Command Request\n\ \t(U32) cmd=HDF_RESUME_COMMAND (1) end TD -> SW: MSG: [xXX: Rsp #2] \nPause/ Resume Command Response \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason SW -> UI: CMD: Pause/ Resume Command Response \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason alt Accept UI -> US: ACT: Display status tags for paused or resumed else #Pink Reject UI -> US: ACT: Show rejection reason end == Auto-Substitution Button == US -> UI: TCH: Auto-Substitution switch UI -> SW: ACT: Auto-Substitution Command alt Off SW -> TD: MSG: [xXX: Req #1] Auto-Substitution Command Request\n\ \t(U32) cmd=HDF_AUTO_SUB_OFF_COMMAND (0) else On SW -> TD: MSG: [xXX: Req #1] Auto-Substitution Command Request\n\ \t(U32) cmd=HDF_AUTO_SUB_ON_COMMAND (1) end TD -> SW: MSG: [xXX: Rsp #2] \nAuto-Substitution Command Response \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason SW -> UI: CMD: Auto-Substitution Command Response \ \n\t(U32) mAccept \ \n\t(U32) mRejectionReason alt Accept group HDF Data TD --> UI: (U32)autoSubState= OFF (0) / ON(1) end UI -> US: ACT: Display state of auto sub else #Pink Reject UI -> US: ACT: Show rejection reason end == Edit HDF Button == US -> UI: TCH: Edit HDF Icon UI -> UI: ACT: Open HDF adjustment dialog US -> UI: TCH: Edit : \ \n\t Treatment Mode \ \n\t Prescribed Substitution Fluid Volume US -> UI: TCH: Confirm Button UI -> SW: ACT: Adjust HDF Request SW -> TD: MSG: [xXX: Req #2] Adjust HDF Request\ \n\t(U32) Treatment Mode \ \n\t(F32) Prescribed Substitution Fluid Volume TD -> SW: MSG: [xXX: Rsp #3] \nAdjust HDF Response \ \n\t(U32) mAccept \ \n\t(U32) mTxModeRejectionReason \ \n\t(U32) mPrescSubFluidVolumeRejectionReason SW -> UI: CMD: Adjust HDF Response \ \n\t(U32) mAccept \ \n\t(U32) mTxModeRejectionReason \ \n\t(U32) mPrescSubFluidVolumeRejectionReason alt Accept UI -> US: ACT: Close Dialog else #Pink Reject UI -> US: ACT: Highlight rejected parameter end == Pressures Data == TD -> SW: MSG: [x24: #12] \nTD Pressures Data\n(F32) artPress, \n(F32) venPres\n(U32) limitState\n(S32) artMin\n(S32) artMax\n(S32) venMin\n(s32) venMax\n(F32) artLong\n(U32) venLong\n(F32) tmpPress\n(F32) tmpMin\n(F32) tmpMax SW -> UI: CMD: Update TD Pressures\n(F32) artPress, \n(F32) venPres\n(U32) limitState\n(S32) artMin\n(S32) artMax\n(S32) venMin\n(s32) venMax\n(F32) artLong\n(U32) venLong\n(F32) tmpPress\n(F32) tmpMin\n(F32) tmpMax == HDF Data == TD -> SW: MSG: [xXX: #5]\nHDF Data \ \n\t(F32) setSubVolume \ \n\t(F32) subRate \ \n\t(F32) subVolumeDelivered \ \n\t(U32) state \ \n\t(U32) autoSubState SW -> UI: CMD: Display HDF Data \ \n\t(F32) setSubVolume \ \n\t(F32) subRate \ \n\t(F32) subVolumeDelivered \ \n\t(U32) state \ \n\t(U32) autoSubState @enduml