w4.dot: redraw Connection Machine to match

This commit is contained in:
Brian Warner 2016-12-28 01:58:25 -05:00
parent 0b28137948
commit a9a0bc43c7
3 changed files with 73 additions and 23 deletions

View File

@ -197,26 +197,13 @@ digraph {
P2_P_process_v2 [shape="box" label="process v2"]
*/
/* ConnectionMachine */
C_start [label="Connection\nMachine" style="dotted"]
C_start -> C_S_connecting [label="C_start()"]
C_S_connecting [label="connecting"]
C_S_connecting -> C_P_connected [label="onConnect"]
C_P_connected [shape="box" label="M_connected()"]
C_P_connected -> C_S_connected
C_S_connecting -> C_P_stop_connecting [label="C_stop()"]
C_P_stop_connecting [shape="box" label="cancel\nconnection\nattempt"]
C_P_stop_connecting -> C_S_stopped
C_S_connected [label="connected" color="green"]
C_S_connected -> C_P_lost [label="onClose"]
C_P_lost [shape="box" label="M_lost()\nstart timer"]
C_P_lost -> C_S_waiting
C_S_waiting [label="waiting"]
C_S_waiting -> C_S_connecting [label="expire"]
C_S_waiting -> C_S_stopped [label="C_stop()"]
C_S_connected -> C_S_stopping [label="C_stop()"]
C_S_stopping [label="stopping"]
C_S_stopping -> C_S_stopped [label="onClose"]
C_S_stopped [label="stopped"]
WCM_S_known -> O_WM [style="invis"]
O_WM [label="Wormhole\nMachine" style="dotted"]
O_WM -> O_MM [style="dotted"]
O_WM -> O_MCM [style="dotted"]
O_MM -> O_MCM [style="dotted"]
O_MM [label="Mailbox\nMachine" style="dotted"]
O_MCM [label="Mailbox\nClose\nMachine" style="dotted"]
O_MM -> O_CM [style="dotted"]
O_CM [label="Connection\nMachine" style="dotted"]
}

View File

@ -1,5 +1,7 @@
digraph {
/* M_close pathways */
MC_title [label="Mailbox\nClose\nMachine" style="dotted"]
MC_title -> MC_S2B [style="invis"]
/* All dashed states are from the main Mailbox Machine diagram, and
all dashed lines indicate M_close() pathways in from those states.
@ -56,7 +58,7 @@ digraph {
MC_S2B [label="S2B" color="orange" style="dashed"]
MC_S2B -> MC_SrB [color="orange" style="dashed"]
{rank=same; MC_S3A MC_S4A MC_S3B MC_S4B}
{rank=same; MC_title MC_S3A MC_S4A MC_S3B MC_S4B}
MC_S3A [label="S3A" style="dashed"]
MC_S3B [label="S3B" color="orange" style="dashed"]
MC_S3A -> MC_SrcA [style="dashed"]

61
docs/w4.dot Normal file
View File

@ -0,0 +1,61 @@
digraph {
/* ConnectionMachine */
C_start [label="Connection\nMachine" style="dotted"]
C_start -> C_Pc1 [label="CM_start()" color="orange" fontcolor="orange"]
C_Pc1 [shape="box" label="ep.connect()" color="orange"]
C_Pc1 -> C_Sc1 [color="orange"]
C_Sc1 [label="connecting\n(1st time)" color="orange"]
C_Sc1 -> C_S_negotiating [label="d.callback" color="orange" fontcolor="orange"]
C_Sc1 -> C_P_failed [label="d.errback" color="red"]
C_Sc1 -> C_P_failed [label="p.onClose" color="red"]
C_Sc1 -> C_P_cancel [label="C_stop()"]
C_P_cancel [shape="box" label="d.cancel()"]
C_P_cancel -> C_S_cancelling
C_S_cancelling [label="cancelling"]
C_S_cancelling -> C_P_stopped [label="d.errback"]
C_S_negotiating [label="negotiating" color="orange"]
C_S_negotiating -> C_P_failed [label="p.onClose"]
C_S_negotiating -> C_P_connected [label="p.onOpen" color="orange" fontcolor="orange"]
C_S_negotiating -> C_P_drop2 [label="C_stop()"]
C_P_drop2 [shape="box" label="p.dropConnection()"]
C_P_drop2 -> C_S_disconnecting
C_P_connected [shape="box" label="tx bind\nM_connected()" color="orange"]
C_P_connected -> C_S_open [color="orange"]
C_S_open [label="open" color="green"]
C_S_open -> C_P_lost [label="p.onClose" color="blue" fontcolor="blue"]
C_S_open -> C_P_drop [label="C_stop()" color="orange" fontcolor="orange"]
C_P_drop [shape="box" label="p.dropConnection()\nM_lost()" color="orange"]
C_P_drop -> C_S_disconnecting [color="orange"]
C_S_disconnecting [label="disconnecting" color="orange"]
C_S_disconnecting -> C_P_stopped [label="p.onClose" color="orange" fontcolor="orange"]
C_P_lost [shape="box" label="M_lost()" color="blue"]
C_P_lost -> C_P_wait [color="blue"]
C_P_wait [shape="box" label="start timer" color="blue"]
C_P_wait -> C_S_waiting [color="blue"]
C_S_waiting [label="waiting" color="blue"]
C_S_waiting -> C_Pc2 [label="expire" color="blue" fontcolor="blue"]
C_S_waiting -> C_P_stop_timer [label="C_stop()"]
C_P_stop_timer [shape="box" label="timer.cancel()"]
C_P_stop_timer -> C_P_stopped
C_Pc2 [shape="box" label="ep.connect()" color="blue"]
C_Pc2 -> C_Sc2 [color="blue"]
C_Sc2 [label="connecting" color="blue"]
C_Sc2 -> C_P_reset [label="d.callback" color="blue" fontcolor="blue"]
C_P_reset [shape="box" label="reset\ntimer" color="blue"]
C_P_reset -> C_S_negotiating [color="blue"]
C_Sc2 -> C_P_wait [label="d.errback"]
C_Sc2 -> C_P_cancel [label="C_stop()"]
C_P_stopped [shape="box" label="MC_stopped()" color="orange"]
C_P_stopped -> C_S_stopped [color="orange"]
C_S_stopped [label="stopped" color="orange"]
C_P_failed [shape="box" label="notify_fail" color="red"]
C_P_failed -> C_S_failed
C_S_failed [label="failed" color="red"]
}