doc: add state diagrams
All checks were successful
/ build-hamnet70 (push) Successful in 27s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped

This commit is contained in:
Thomas Kolb 2024-09-21 00:55:25 +02:00
parent a455fac050
commit 1ae421e876

View file

@ -524,6 +524,75 @@ msc {
}
....
=== State Diagrams
This section documents state diagrams for the digipeater and the clients.
They are only informational; different implementations are possible and allowed as long as the procedures defined by the <<_message_sequence_charts,message sequence charts>> are obeyed.
However, the state diagrams shown here reflect the reference implementation.
==== Connection State Diagram
[graphviz,format=svg,svg-type=interactive,scale=1.0]
.Connection state diagram
....
digraph connection {
uninitd [label="Uninitialized"];
connecting [label="Connecting"];
wait_client [label="Wait for\nclient"];
estab [label="Two-way communication\nestablished"];
closed [label="Closed"];
uninitd -> connecting [label="Connection request\nsent [client]"];
uninitd -> wait_client [label="Connection request\nreceived [digipeater]"];
connecting -> estab [label="Connection\nacknowledgement sent"];
wait_client -> estab [label="Connection\nacknowledged"];
connecting -> closed [label="Timeout"];
wait_client -> closed [label="Timeout"];
estab -> closed [label="Disconnect/Timeout"];
closed -> uninitd [label="State erased"];
}
....
==== Digipeater Connection Multiplexing
[graphviz,layout=neato,format=svg,svg-type=interactive,scale=1.0]
.Handling of multiple connections at the digipeater
....
digraph multiclient {
overlap=false;
idle [label="Idle"];
send_beacon [label="Send Beacon"];
accept_new [label="Check for\nnew clients"];
check_conn [label="Check connection timers"];
send_to_client [label="Send queued packets\nto client"];
receive_from_client [label="Receive packets\nfrom client"];
check_timeout [label="Check connection\ntimeout"];
reset_timeout [label="Reset connection\ntimeout"];
close_conn [label="Close\nconnection"];
idle -> send_beacon [label="Beacon timeout\nexpired"];
send_beacon -> accept_new;
accept_new -> idle;
idle -> check_conn [label="Any contact\ntimer expired"];
check_conn -> send_to_client [label="Contact timer\nexpired"];
send_to_client -> receive_from_client;
receive_from_client -> reset_timeout [label="Packets received"];
reset_timeout -> check_conn;
receive_from_client -> check_timeout [label="Nothing received"];
check_timeout -> check_conn [label="No timeout yet"];
check_timeout -> close_conn [label="Timed out"];
close_conn -> check_conn;
check_conn -> idle [label="All expired\nconnections handled"];
}
....
== Higher Layer Protocols
[appendix]