Skip to content

Instantly share code, notes, and snippets.

@arl
Last active January 5, 2023 14:17
Show Gist options
  • Save arl/3da65f9f2cd25eb4e56835b88458086e to your computer and use it in GitHub Desktop.
Save arl/3da65f9f2cd25eb4e56835b88458086e to your computer and use it in GitHub Desktop.
Esys: test 204 sequence diagram
sequenceDiagram
actor Operator
participant App
participant CU
participant Gateway


activate CU

Operator->>App: Switch to test 204
App->>CU: test_start(204) (via HTTP)

CU-->>CU: wait until 'end cooling timestamp' + delay has been reached
CU->>App: send "end_cooling" message (via websocket)
deactivate CU

Note over App: "Macchina pronta" screen
Operator->>App: Press "Avvia il test"
App->>CU: next_step(204) (via HTTP)


Note over App: "Press any Erogazione button (in primo avvio)" screen
Operator->>Gateway: Press 'Erogazione' button
activate Gateway
Gateway-->>Gateway: ~2 seconds
Gateway->>CU: send "Steam Boiler Autofill Started" message (IOT)
deactivate Gateway
CU->>App: send feedback (via websocket)

CU->>CU: save 'end cooling' timestamp

%% activate CU
%% CU-->>CU: read multimeter values


alt is success
  activate App
  App-->>App: App internal timer running
  CU-->>CU: read multimeter values
  CU->>App: send test_result(success) (via websocket)
  deactivate App
  App->>Operator: Show 'Test Success'
else is CU timer elapsed 
  activate App
  App-->>App: App internal timer running
  CU->>App: send test_result(failed) (via websocket)
  deactivate App
  App->>Operator: Show window 'Spegni Macchina'
else is App timer elapsed 
  activate App
  App-->>App: App internal timer running
  deactivate App
  App->>Operator: Show window 'Spegni Macchina'
end
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment