X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FMPEGDVBBundle%2FSNDUPacket.hh;h=27e1d09742d9c9494155f98eaa0a654860231d0a;hb=4d90b955bf3590e215488395d1c9cec827476e07;hp=1b699128c511788e9a5d0a0d4a6f608eb31636b7;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Packets/MPEGDVBBundle/SNDUPacket.hh b/senf/Packets/MPEGDVBBundle/SNDUPacket.hh index 1b69912..27e1d09 100644 --- a/senf/Packets/MPEGDVBBundle/SNDUPacket.hh +++ b/senf/Packets/MPEGDVBBundle/SNDUPacket.hh @@ -29,8 +29,8 @@ // Custom includes #include #include -#include "../../Packets/Packets.hh" -#include "../DefaultBundle/EthernetPacket.hh" +#include +#include //#include "SNDUPacket.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -38,9 +38,9 @@ namespace senf { /** \brief parse ULE SNDU Packet - + Parser implementing the header and trailer of a ULE SNDU Packet - + \see SNDUPacketType */ struct SNDUPacketParser : public PacketParserBase @@ -53,11 +53,11 @@ namespace senf { SENF_PARSER_PRIVATE_BITFIELD ( d_bit_ , 1 , unsigned ); SENF_PARSER_BITFIELD ( length , 15 , unsigned ); SENF_PARSER_FIELD ( type , UInt16Parser ); - SENF_PARSER_PRIVATE_VARIANT ( destination_ , d_bit_ , + SENF_PARSER_PRIVATE_VARIANT ( destination_ , d_bit_ , (MACAddressParser) (VoidPacketParser) ); - + SENF_PARSER_FINALIZE( SNDUPacketParser ); - + MACAddressParser destination() /// Only defined if d_bit() == \c false { return destination_().get<0>(); } @@ -66,23 +66,23 @@ namespace senf { void withDestination() /// Clear destination absent bit { destination_().init<0>(); } - + void withoutDestination() /// Set destination absent bit { destination_().init<1>(); } - UInt32Parser crc() + UInt32Parser crc() { return parse( data().size() - 4 ); } boost::uint32_t calcCrc() const; }; - + struct ULEExtHeaderTypes { typedef boost::uint16_t key_t; }; - + /** \brief ULE SNDU Packet - + \par Packet type (typedef): \ref SNDUPacket @@ -103,30 +103,30 @@ namespace senf { // using mixin::nextPacketRange; // using mixin::nextPacketType; // using mixin::init; - + // static 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 - ULE End Indicator; indicates to the receiver that there are no + \def ULE_END_INDICATOR + ULE End Indicator; indicates to the receiver that there are no further SNDUs present within the current TS packet. */ # define ULE_END_INDICATOR 0xffff