From: ssauer Date: Fri, 30 Jul 2010 10:29:35 +0000 (+0000) Subject: Changed to colour every module ending with Source or Sink red X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=ff4249b4a9c23236b2e56dcd593c91a5c58f7b75 Changed to colour every module ending with Source or Sink red git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1653 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/tools/drawmodules.py b/tools/drawmodules.py index 30709c7..49da65f 100755 --- a/tools/drawmodules.py +++ b/tools/drawmodules.py @@ -3,7 +3,6 @@ import sys COLOR_SCHEME = 'pastel19' # see http://www.graphviz.org/doc/info/colors.html -SOURCE_SINK = ["ActiveSocketSource", "PassiveSocketSource", "ActiveSocketSink", "PassiveSocketSink"] NETEMU = ["InterfaceAnnotater" , "PacketMonitor" , "PacketTypeChecker"] mode = "MODULE" @@ -49,13 +48,12 @@ for line in sys.stdin: for moduleid, (module, cs) in modules.iteritems(): module = module.split('<',1)[0] - if "senf" not in module.split('::',1)[0]: - if module.rsplit('::',1)[-1] in NETEMU: - color = 5 - else: - color = 6 - elif module.rsplit('::',1)[-1] in SOURCE_SINK: + if module.rsplit('::',1)[-1] in NETEMU: + color = 5 + elif module.endswith("Source") or module.endswith("Sink"): color = 1 + elif "senf" not in module.split('::',1)[0]: + color = 6 else: color = 3 module = module.rsplit('::',1)[-1]