From: dw6 Date: Tue, 27 Nov 2007 10:40:46 +0000 (+0000) Subject: integrated sub-parser for variants X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=5f03b4507c4b92cf18156876538aca0ba3763d3b;p=senf.git integrated sub-parser for variants git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@538 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/MPEGDVBBundle/GREPacket.hh b/Packets/MPEGDVBBundle/GREPacket.hh index f5617e3..0c63d87 100644 --- a/Packets/MPEGDVBBundle/GREPacket.hh +++ b/Packets/MPEGDVBBundle/GREPacket.hh @@ -41,6 +41,13 @@ namespace senf { \see GREPacketType */ + struct GREChecksumParser : public PacketParserBase { +# include SENF_PARSER() + SENF_PARSER_PRIVATE_FIELD ( checksum1_, Parse_UInt16 ); + SENF_PARSER_PRIVATE_FIELD ( reserved1_, Parse_UInt16 ); + SENF_PARSER_FINALIZE(GREChecksumParser); + }; + struct Parse_GREPacket : public PacketParserBase { # include SENF_PARSER() @@ -50,10 +57,8 @@ namespace senf { SENF_PARSER_BITFIELD_RO ( version_number, 3, unsigned ); // TODO: Always Zero !! SENF_PARSER_FIELD ( protocol_type, Parse_UInt16 ); SENF_PARSER_PRIVATE_VARIANT ( checksum_, checksum_present, - (VoidPacketParser) (Parse_UInt16) ); - SENF_PARSER_PRIVATE_VARIANT ( reserved1_, checksum_present, - (VoidPacketParser) (Parse_UInt16) ); - + (VoidPacketParser) (GREChecksumParser) ); + SENF_PARSER_FINALIZE( Parse_GREPacket ); private: