Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Packets / MPEGDVBBundle / TransportPacket.cc
1 // $Id$
2 //
3 // Copyright (C) 2007
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Thorsten Horstmann <tho@berlios.de>
7 //
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.
12 //
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.
17 //
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.
22
23 /** \file
24     \brief TransportPacket non-inline non-template implementation */
25
26 #include "TransportPacket.hh"
27 //#include "TransportPacket.ih"
28
29 // Custom includes
30 #include <iomanip>
31 #include <boost/io/ios_state.hpp>
32
33 #define prefix_
34 //-/////////////////////////////////////////////////////////////////////////////////////////////////
35
36 prefix_ void senf::TransportPacketParser::init_fields()
37     const
38 {
39     sync_byte() = TransportPacketType::SYNC_BYTE;
40     transport_error_indicator() = 0;
41     transport_scrmbl_ctrl() = 0;
42     adaptation_field_ctrl() = 0x1u;
43 }
44
45 prefix_ senf::UInt8Parser senf::TransportPacketParser::pointer_field()
46     const
47 {
48     return pointer_field_().get<1>();
49 }
50
51 prefix_ void senf::TransportPacketParser::setPUSI(bool pusi)
52     const
53 {
54     if (pusi) pointer_field_().init<1>();
55     else      pointer_field_().init<0>();
56 }
57
58 prefix_ void senf::TransportPacketType::dump(packet p, std::ostream & os)
59 {
60     boost::io::ios_all_saver ias(os);
61     os << "TransportPacket:\n"
62        << std::hex
63        << senf::fieldName("syncByte")                  << "0x" << unsigned(p->sync_byte()) << "\n"
64        << senf::fieldName("transport error ind.")      << "0x" << unsigned(p->transport_error_indicator()) << "\n"
65        << senf::fieldName("payload unit start ind.")   << "0x" << unsigned(p->pusi()) << "\n"
66        << senf::fieldName("transport priority")        << "0x" << unsigned(p->transport_priority()) << "\n"
67        << std::dec
68        << senf::fieldName("pid")                       << unsigned(p->pid()) << "\n"
69        << std::hex
70        << senf::fieldName("transport scrambling c.")   << "0x" << unsigned(p->transport_scrmbl_ctrl()) << "\n"
71        << senf::fieldName("adaptation field ctrl")     << "0x" << unsigned(p->adaptation_field_ctrl()) << "\n"
72        << senf::fieldName("continuity counter")        << "0x" << unsigned(p->continuity_counter()) << "\n";
73     if (p->pusi())
74         os << senf::fieldName("pointer field")         << "0x" << unsigned(p->pointer_field()) << "\n";
75 }
76
77 //-/////////////////////////////////////////////////////////////////////////////////////////////////
78 #undef prefix_
79
80 \f
81 // Local Variables:
82 // mode: c++
83 // fill-column: 100
84 // c-file-style: "senf"
85 // indent-tabs-mode: nil
86 // ispell-local-dictionary: "american"
87 // compile-command: "scons -u test"
88 // comment-column: 40
89 // End: