// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Thorsten Horstmann <tho@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
#include "ULEdec.hh"
+#include <cassert>
#include <linux/dvb/dmx.h>
#include <boost/format.hpp>
-#include "Packets/PacketData.hh"
-#include "Utils/hexdump.hh"
-#include "Utils/membind.hh"
+#include <senf/Packets.hh>
+#include <senf/Utils/hexdump.hh>
+#include <senf/Utils/membind.hh>
#define PID 271
#define TRANSPORT_PACKET_SIZE 188
this->priv_sndu_type_1 = false;
}
-void ULEdec::handleEvent(senf::FileHandle, senf::Scheduler::EventId event)
+void ULEdec::handleEvent(senf::Scheduler::EventId event)
{
senf::TransportPacket ts_packet (
- senf::TransportPacket::create(188, senf::TransportPacket::noinit));
+ senf::TransportPacket::create(188, senf::noinit));
dvrHandle.read( ts_packet.data() );
// Check TS error conditions: sync_byte, transport_error_indicator, scrambling_control.
if ( (*payload_iter++ << 8 | *payload_iter++) != ULE_END_INDICATOR )
std::cerr << "delimiting error\n";
} else {
- BOOST_ASSERT( std::distance( payload_iter, payload_end ) == 0 );
+ assert( std::distance( payload_iter, payload_end ) == 0 );
}
}
break;
std::advance(payload_iter, payload_pointer);
} else {
payload_iter = readContSNDUPacket( payload_iter, payload_end );
- BOOST_ASSERT( isSDNUPacketComplete() );
+ assert( isSDNUPacketComplete() );
try {
handleSNDUPacket();
} catch (ULEdecException const & ex) {
do {
payload_iter = readNewSNDUPacket( payload_iter, payload_end );
if (! isSDNUPacketComplete()) {
- BOOST_ASSERT( std::distance( payload_iter, payload_end ) == 0 );
+ assert( std::distance( payload_iter, payload_end ) == 0 );
this->receiver_state = Reassembly;
break;
}
"SNDU length error. length=%d") % sndu_length) );
}
this->snduPacket = senf::SNDUPacket::create(sndu_length+4);
- this->snduPacket->d_bit() = dbit;
+
+ if (dbit)
+ this->snduPacket->withoutDestination();
+ // else not needed since default on newly created packet is withDestination()
+
this->snduPacket->length() = sndu_length;
this->snduPacketData_iter = boost::next(this->snduPacket.data().begin(), 2);
this->priv_sndu_type_1 = false;
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
-// compile-command: "scons -u test"
+// compile-command: "scons -U"
// comment-column: 40
// End: