diff options
author | Cory Benfield <lukasaoz@gmail.com> | 2016-12-06 13:55:49 +0000 |
---|---|---|
committer | Cory Benfield <lukasaoz@gmail.com> | 2016-12-06 13:55:49 +0000 |
commit | 86ad875090d78e2ed395c33c422bc1590d83c9dd (patch) | |
tree | 12d9ad17ebd4a5a21f90b1dbef2ffb7c0cd45d54 /visualizer | |
parent | 0d207072e6c2c038b900036421f50beb253d1a47 (diff) |
Render our own state machines.
Diffstat (limited to 'visualizer')
-rw-r--r-- | visualizer/__init__.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/visualizer/__init__.py b/visualizer/__init__.py index d5ef2cd..dece320 100644 --- a/visualizer/__init__.py +++ b/visualizer/__init__.py @@ -23,7 +23,19 @@ import sys import graphviz import graphviz.files -from ._discover import findMachines +import h2.connection +import h2.stream + + +# This is all the state machines we currently know about and will render. +# If any new state machines are added, they should be inserted here. +STATE_MACHINES = [ + ( + "h2.connection.H2ConnectionStateMachine", + h2.connection.H2ConnectionStateMachine + ), + ("h2.stream.H2StreamStateMachine", h2.stream.H2StreamStateMachine), +] def _gvquote(s): @@ -179,10 +191,10 @@ def main(): ) ) - for fqpn, machine in _findMachines(args.fqpn): + for fqpn, machine in STATE_MACHINES: print(fqpn, '...discovered') - digraph = machine.asDigraph() + digraph = build_digraph(machine) if explicitly_save_dot: digraph.save(filename="{}.dot".format(fqpn), |