From: g0dil Date: Fri, 30 Jan 2009 14:06:51 +0000 (+0000) Subject: Packets: Add missing packet diagrams X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=d600f990c9e9ec8ef059e2c2e6b9b05b31d50a08;p=senf.git Packets: Add missing packet diagrams git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1090 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/MPEGDVBBundle/GREPacket.hh b/Packets/MPEGDVBBundle/GREPacket.hh index 446ef03..32b8c11 100644 --- a/Packets/MPEGDVBBundle/GREPacket.hh +++ b/Packets/MPEGDVBBundle/GREPacket.hh @@ -74,6 +74,7 @@ namespace senf { \par Fields: \ref GREPacketParser + \image html GREPacket.png \ingroup protocolbundle_mpegdvb */ diff --git a/Packets/MPEGDVBBundle/MPESection.hh b/Packets/MPEGDVBBundle/MPESection.hh index 7b7879d..e617691 100644 --- a/Packets/MPEGDVBBundle/MPESection.hh +++ b/Packets/MPEGDVBBundle/MPESection.hh @@ -113,6 +113,7 @@ namespace senf { \par Fields: \ref MPESectionParser + \image html MPESection.png \ingroup protocolbundle_mpegdvb */ diff --git a/Packets/MPEGDVBBundle/SNDUPacket.hh b/Packets/MPEGDVBBundle/SNDUPacket.hh index 4f296ac..1b69912 100644 --- a/Packets/MPEGDVBBundle/SNDUPacket.hh +++ b/Packets/MPEGDVBBundle/SNDUPacket.hh @@ -88,6 +88,7 @@ namespace senf { \par Fields: \ref SNDUPacketParser + \image html SNDUPacket.png \ingroup protocolbundle_mpegdvb */ diff --git a/Packets/MPEGDVBBundle/TransportPacket.hh b/Packets/MPEGDVBBundle/TransportPacket.hh index ae1f540..13eff46 100644 --- a/Packets/MPEGDVBBundle/TransportPacket.hh +++ b/Packets/MPEGDVBBundle/TransportPacket.hh @@ -117,6 +117,7 @@ namespace senf { \par Fields: \ref TransportPacketParser + \image html TransportPacket.png \ingroup protocolbundle_mpegdvb */ diff --git a/Packets/SConscript b/Packets/SConscript index 2850c57..21b1900 100644 --- a/Packets/SConscript +++ b/Packets/SConscript @@ -46,6 +46,10 @@ SENFSCons.Doxygen(env, extra_sources = [ PKGDRAWPACKETS = "MIHPacketParser"), env.PkgDraw("80211Bundle/WLANPacket.hh"), env.PkgDraw("80211Bundle/RadiotapPacket.hh"), + env.PkgDraw("MPEGDVBBundle/GREPacket.hh"), + env.PkgDraw("MPEGDVBBundle/MPESection.hh"), + env.PkgDraw("MPEGDVBBundle/SNDUPacket.hh"), + env.PkgDraw("MPEGDVBBundle/TransportPacket.hh"), ]) SENFSCons.InstallIncludeFiles(env, includes) diff --git a/doclib/pkgdraw b/doclib/pkgdraw index 35a6b92..ecadad7 100755 --- a/doclib/pkgdraw +++ b/doclib/pkgdraw @@ -158,7 +158,7 @@ def makeTex(rows): if sides == "lrtb" : sides = "" else : sides = "[%s]" % sides if area.get('filled', False): - line.append(r"\bitbox%s{%s}{\color[gray]{0.7}\rule{\width}{\height}}" % (sides, area['size'])) + line.append(r"\bitbox%s{%s}{\color[gray]{0.93}\rule{\width}{\height}}" % (sides, area['size'])) elif area.get('skip', False): line.append(r"\skippedwords") elif area.get('dots', False): @@ -355,17 +355,37 @@ PARSER_END_RE = re.compile(r"PKGDRAW_PARSER_FINALIZE\s*\(([^)]*)\)\s*;") PARSER_FIELD_RE = re.compile(r"(?:@@>pkgdraw:(.*)$\s*)?PKGDRAW_PARSER_([A-Z_]+)\s*\(([^;]*)\)\s*;(?:\s*@@ [...] [ -- ...]\n") + sys.stderr.write("Usage: %s
[...] [-- ...]\n" + % sys.argv[0]) sys.exit(1) source = args.pop(0) @@ -420,15 +441,15 @@ target = args.pop(0) while args and args[0] != '--' : names.append(args.pop(0)) if args : gccopts = args[1:] -data = scanPackets(cppExpand(quoteMacros(stripComments(file(source).read())), - gccopts, os.path.dirname(source))) +data, order = scanPackets(cppExpand(quoteMacros(stripComments(file(source).read())), + gccopts, os.path.dirname(source))) texf = file(os.path.join(tmpdir, "fields.tex"),"w") texf.write(TEX_HEADER) if not names: - names = data.keys() - names.sort() + order.reverse() + names = order for name in names: texf.write("\\textbf{%s}\n\\bigskip\\par\n" % texquote(name))