X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Examples%2FDVBAdapter%2FULEdec.hh;h=60f757bb1cd703f1453533424198e9649114357a;hb=5bd0f0d58ba30d95a02b46fc9122a7e981bcbcad;hp=288efaf24b4b8a38391ce5156b1ca16af43a9961;hpb=9cd0c7d8fc22ecf342c5d2a45980c245b827a67f;p=senf.git diff --git a/Examples/DVBAdapter/ULEdec.hh b/Examples/DVBAdapter/ULEdec.hh index 288efaf..60f757b 100644 --- a/Examples/DVBAdapter/ULEdec.hh +++ b/Examples/DVBAdapter/ULEdec.hh @@ -1,9 +1,9 @@ // $Id: ULEdec.cc 355 2007-07-26 14:17:02Z tho $ // -// Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Thorsten Horstmann // // 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 @@ -22,34 +22,21 @@ // Definition of non-inline non-template functions -#include -#include -#include -#include -#include -#include - -#include "Scheduler/Scheduler.hh" -#include "Packets/DefaultBundle/EthernetPacket.hh" -#include "Packets/MPEGDVBBundle/TransportPacket.hh" -#include "Packets/MPEGDVBBundle/SNDUPacket.hh" -#include "Utils/membind.hh" -#include "Socket/Protocols/DVB/DVBDemuxHandles.hh" -#include "Packets/ParseInt.hh" -#include "Packets/Packet.hh" -#include "Packets/PacketData.hh" -#include "Packets/ParseInt.hh" +#include +#include +#include +#include class ULEdec { public: - ULEdec(); + ULEdec(unsigned short adapter=0, unsigned short device=0); private: typedef senf::PacketData::iterator iterator; - enum ReciverState { + enum ReceiverState { Idle, Reassembly }; @@ -59,24 +46,32 @@ private: senf::SNDUPacket snduPacket; - ReciverState receiver_state; + ReceiverState receiver_state; unsigned char priv_tscc; bool priv_sndu_type_1; iterator snduPacketData_iter; - void handleEvent(senf::FileHandle, senf::Scheduler::EventId event); + void handleEvent(senf::Scheduler::EventId event); void handleTSPacket(senf::TransportPacket tsPacket); void handleSNDUPacket(); - iterator readNewSNDUPacket(iterator i_start, iterator i_end); - iterator readContSNDUPacket(iterator i_start, iterator i_end); - iterator readRawSNDUPacketData(iterator i_start, iterator i_end); + iterator readNewSNDUPacket(iterator i, const iterator i_end); + iterator readContSNDUPacket(iterator i, const iterator i_end); + iterator readRawSNDUPacketData(iterator i, iterator const i_end); inline bool isSDNUPacketComplete(); inline iterator::difference_type snduPacketBytesLeft(); }; + +struct ULEdecException : public senf::Exception +{ + ULEdecException(std::string const & what) + : senf::Exception(what) {} +}; + + // Local Variables: // mode: c++ @@ -84,6 +79,6 @@ private: // 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: