doc: translate message sequence diagrams to mscgen

Mermaid is more beautiful, but the tool stack is really annoying. A Chrome
browser should not be necessary to generate some SVGs.
This commit is contained in:
Thomas Kolb 2024-08-27 18:07:12 +02:00
parent 79c340c20d
commit 10f634d144

View file

@ -267,108 +267,109 @@ To be defined:
==== Connection Establishment
[mermaid,format=svg,svg-type=interactive]
[msc,format=svg,svg-type=interactive, scale=1.4]
.Connection establishment
....
sequenceDiagram
participant digi as Digipeater
participant client as Client
msc {
digi [label="Digipeater"],
client [label="Client"];
digi -->> client: Beacon (Broadcast)
digi -->> client: Beacon (Broadcast)
digi -->> client: Beacon (Broadcast)
digi -> client [label="Beacon (Broadcast)"];
digi -> client [label="Beacon (Broadcast)"];
Note over client: Decides to connect
client box client [label="Decides to connect"];
...;
client ->> digi: Connection Request
digi -> client [label="Beacon (Broadcast)"];
digi <- client [label="Connection Request"];
alt Connection accepted
digi ->> client: Connection Parameters
client ->> digi: Connection Acknowledgement
Note over digi,client: Connection established
else Connection rejected
digi ->> client: Connection Refusal
end
--- [label="Alternative 1: Connection is accepted"];
digi -> client [label="Connection Parameters"];
digi <- client [label="Connection Acknowledgement"];
digi box client [label="Connection established"];
--- [label="Alternative 2: Connection is rejected"];
digi -> client [label="Connection Refusal"];
}
....
==== Communication during a Connection
[mermaid,format=svg,svg-type=interactive]
[msc,format=svg,svg-type=interactive, scale=1.4]
.In-connection communication
....
sequenceDiagram
participant digi as Digipeater
participant client as Client
msc {
digi [label="Digipeater"],
client [label="Client"];
Note over digi,client: Connection established
--- [label="Connection established"];
digi => client [label="Up to 14 packets without Transmission Request"];
digi -> client [label="Packet with Transmission Request"];
loop For up to 14 packets
digi ->> client: Packet without Transmission Request
end
digi box digi [label="Start timeout timer"];
digi ->> client: Packet with Transmission Request
--- [label="Alternative 1: Normal reply"];
Note over digi: Start timeout timer
digi <= client [label="Up to 14 packets without Transmission Request"];
digi <- client [label="Packet with Transmission Request"];
alt Normal reply
loop For up to 14 packets
client ->> digi: Packet without Transmission Request
end
--- [label="Alternative 2: Partial reply"];
client ->> digi: Packet with Transmission Request
else Partial reply
loop For up to 14 packets
client ->> digi: Packet without Transmission Request
end
digi <= client [label="Up to 14 packets without Transmission Request"];
digi x- client [label="Packet with Transmission Request"];
...;
digi rbox digi [label="Timeout expired"];
client --x digi: Packet with Transmission Request (lost)
--- [label="Alternative 3: No reply"];
Note over digi: Timeout expired
else No reply
Note over digi: Timeout expired
end
digi x- client [label="Packets from client"];
...;
digi rbox digi [label="Timeout expired"];
Note over digi: Query next client
--- [label="Finally"];
digi box digi [label="Query next client"];
}
....
==== Connection Shutdown
===== Client-initiated
[mermaid,format=svg,svg-type=interactive]
[msc,format=svg,svg-type=interactive, scale=1.4]
.Client-initiated shutdown
....
sequenceDiagram
participant digi as Digipeater
participant client as Client
msc {
digi [label="Digipeater"],
client [label="Client"];
Note over digi,client: Connection established
--- [label="Connection established"];
client box client [label="Decides to disconnect"];
...;
digi -> client [label="Transmission request"];
digi <- client [label="Disconnect"];
Note over client: Decides to disconnect
digi ->> client: Transmission Request
client ->> digi: Disconnect
Note over digi,client: Connection closed
--- [label="Connection closed"];
}
....
===== Digipeater-initiated
[mermaid,format=svg,svg-type=interactive]
[msc,format=svg,svg-type=interactive, scale=1.4]
.Digipeater-initiated shutdown
....
sequenceDiagram
participant digi as Digipeater
participant client as Client
msc {
digi [label="Digipeater"],
client [label="Client"];
Note over digi,client: Connection established
--- [label="Connection established"];
digi box digi [label="Decides to disconnect Client"];
Note over digi: Decides to disconnect client
digi -> client [label="Disconnect request"];
digi <- client [label="Disconnect"];
digi ->> client: Disconnect Request
client ->> digi: Disconnect
Note over digi,client: Connection closed
--- [label="Connection closed"];
}
....
== Higher Layer Protocols