From b51b3214ba33df9d8ca3577cbb8ca29d94b377c1 Mon Sep 17 00:00:00 2001 From: andsel Date: Sat, 5 Nov 2016 17:06:08 +0100 Subject: [PATCH] Added FSM documentation --- documentation/connect_fsm.dot | 10 ++++++++++ documentation/disconnect_fsm.dot | 11 +++++++++++ documentation/how_to.txt | 7 +++++++ 3 files changed, 28 insertions(+) create mode 100644 documentation/connect_fsm.dot create mode 100644 documentation/disconnect_fsm.dot create mode 100644 documentation/how_to.txt diff --git a/documentation/connect_fsm.dot b/documentation/connect_fsm.dot new file mode 100644 index 00000000..ea6b99af --- /dev/null +++ b/documentation/connect_fsm.dot @@ -0,0 +1,10 @@ +digraph finite_state_machine { + rankdir=TB; + size="8,5" + node [shape = doublecircle]; DISCONNECTED CONNECTED; + node [shape = circle]; + DISCONNECTED -> INITIALIZED [ label = "receiveMsgConnect" ]; + INITIALIZED -> DROPPED [ label = "dropExitingConnection" ]; + INITIALIZED -> CONNECTED [ label = "createClientSession" ]; + DROPPED -> CONNECTED [ label = "createClientSession" ]; +} diff --git a/documentation/disconnect_fsm.dot b/documentation/disconnect_fsm.dot new file mode 100644 index 00000000..e38a87ac --- /dev/null +++ b/documentation/disconnect_fsm.dot @@ -0,0 +1,11 @@ +digraph finite_state_machine { + rankdir=TB; + size="8,5" + node [shape = doublecircle]; CONNECTED DISCONNECTED; + node [shape = circle]; + CONNECTED -> DISCONNECTED [ label = "abortConnection" ]; + CONNECTED -> CLEANED_MESSAGES [ label = "cleanStorage" ]; + CLEANED_MESSAGES -> DISCONNECTED [ label = "abortConnection" ]; + CLEANED_MESSAGES -> LISTENERS_NOTIFIED [ label = "notifyListerners" ]; + LISTENERS_NOTIFIED -> DISCONNECTED [ label = "dropConnection" ]; +} diff --git a/documentation/how_to.txt b/documentation/how_to.txt new file mode 100644 index 00000000..176a94c0 --- /dev/null +++ b/documentation/how_to.txt @@ -0,0 +1,7 @@ +# to install Graphviz +sudo apt-get install graphviz + +#to create svg or others like pdf, ps +dot -Tps connect_fsm.dot -o connect_fsm.svg +dot -Tps disconnect_fsm.dot -o disconnect_fsm.svg +