1 // $Id:DSMCCSection.hh 327 2007-07-20 10:03:44Z tho $
4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
6 // Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief DSMCCSection public header */
26 #ifndef HH_DSMCCSection_
27 #define HH_DSMCCSection_ 1
31 #include "../../Packets/Packets.hh"
33 //#include "DSMCCSection.mpp"
34 ///////////////////////////////hh.p////////////////////////////////////////
38 /** \brief Parse a DSMCC Section
40 Parser implementing the header of a DSMCC Section
44 struct Parse_DSMCCSection : public PacketParserBase
46 # include SENF_FIXED_PARSER()
48 SENF_PARSE_FIELD( table_id, Parse_UInt8 );
50 SENF_PARSE_BITFIELD( ssi, 1, bool );
51 SENF_PARSE_BITFIELD( private_indicator, 1, bool );
52 SENF_PARSE_BITFIELD( reserved_1, 2, unsigned );
53 SENF_PARSE_BITFIELD( sec_length, 12, unsigned );
55 SENF_PARSE_FIELD( table_id_extension, Parse_UInt16 );
57 SENF_PARSE_BITFIELD( reserved_2, 2, unsigned );
58 SENF_PARSE_BITFIELD( version_num, 5, unsigned );
59 SENF_PARSE_BITFIELD( curr_next_indicator, 1, bool );
61 SENF_PARSE_FIELD( sec_num, Parse_UInt8 );
62 SENF_PARSE_FIELD( last_sec_num, Parse_UInt8 );
64 SENF_PARSER_FINALIZE(Parse_DSMCCSection);
66 Parse_UInt32 crc() const { return parse<Parse_UInt32>( data().size()-4 ); }
69 /** \brief DSMCC Section
71 \par Packet type (typedef):
75 \ref Parse_DSMCCSection
77 \ingroup protocolbundle_mpegdvb
79 struct DSMCCSectionType
80 : public PacketTypeBase,
81 public PacketTypeMixin<DSMCCSectionType>
83 typedef PacketTypeMixin<DSMCCSectionType> mixin;
84 typedef ConcretePacket<DSMCCSectionType> packet;
85 typedef Parse_DSMCCSection parser;
87 using mixin::nextPacketRange;
88 // using mixin::nextPacketType;
91 static void dump(packet p, std::ostream & os);
93 static PacketParserBase::size_type initSize();
94 static PacketParserBase::size_type initHeadSize();
97 typedef DSMCCSectionType::packet DSMCCSection;
101 ///////////////////////////////hh.e////////////////////////////////////////
102 //#include "DSMCCSection.cci"
103 //#include "DSMCCSection.ct"
104 //#include "DSMCCSection.cti"
111 // c-file-style: "senf"
112 // indent-tabs-mode: nil
113 // ispell-local-dictionary: "american"
114 // compile-command: "scons -u test"
115 // comment-column: 40