X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FMPEGDVBBundle%2FSNDUPacket.hh;h=d2a00fa15c934106eef4792cd3e412638b4a71a5;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=79833c292ba8902a0e36674039013e39015c1805;hpb=5331a98af6c5cc4c424b3ed834fb1498ea3d83ca;p=senf.git diff --git a/Packets/MPEGDVBBundle/SNDUPacket.hh b/Packets/MPEGDVBBundle/SNDUPacket.hh index 79833c2..d2a00fa 100644 --- a/Packets/MPEGDVBBundle/SNDUPacket.hh +++ b/Packets/MPEGDVBBundle/SNDUPacket.hh @@ -1,4 +1,4 @@ -// $Id:DSMCCSection.hh 327 2007-07-20 10:03:44Z tho $ +// $Id$ // // Copyright (C) 2007 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) @@ -28,6 +28,7 @@ // Custom includes #include +#include #include "Packets/PacketType.hh" #include "Packets/ParseInt.hh" #include "Packets/PacketRegistry.hh" @@ -81,8 +82,15 @@ namespace senf { PacketParserBase::size_type bytes() const; static const size_type init_bytes = 2+2+4; // D-Bit + 15 bits length + 16 bits type field + 32 bits crc + + boost::uint32_t calcCrc() const; }; + + struct ULEExtHeaderTypes { + typedef boost::uint16_t key_t; + }; + /** \brief ULE SNDU Packet \par Packet type (typedef): @@ -94,24 +102,36 @@ namespace senf { \ingroup protocolbundle_mpegdvb */ struct SNDUPacketType - : public PacketTypeBase, - public PacketTypeMixin + : public PacketTypeBase +// public PacketTypeMixin { - typedef PacketTypeMixin mixin; +// typedef PacketTypeMixin mixin; typedef ConcretePacket packet; typedef Parse_SNDUPacket parser; - using mixin::nextPacketRange; -// using mixin::nextPacketType; - using mixin::init; +// using mixin::nextPacketRange; +// using mixin::nextPacketType; +// using mixin::init; + +// static registry_key_t nextPacketKey(packet p); + + static void init(packet p); + + static factory_t nextPacketType(packet p); + + static optional_range nextPacketRange(packet p); static void dump(packet p, std::ostream & os); static PacketParserBase::size_type initSize(); + static PacketParserBase::size_type initHeadSize(); }; typedef SNDUPacketType::packet SNDUPacket; + + typedef boost::crc_optimal<32, 0x04C11DB7, 0xFFFFFFFF, 0, false, false> ule_crc32; + /*! \def ULE_END_INDICATOR