4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Thorsten Horstmann <tho@berlios.de>
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.
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.
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.
24 \brief TransportPacket non-inline non-template implementation */
26 #include "TransportPacket.hh"
27 //#include "TransportPacket.ih"
31 #include <boost/io/ios_state.hpp>
34 ///////////////////////////////cc.p////////////////////////////////////////
36 prefix_ void senf::TransportPacketParser::init_fields()
39 sync_byte() = TransportPacketType::SYNC_BYTE;
40 transport_error_indicator() = 0;
41 transport_scrmbl_ctrl() = 0;
42 adaptation_field_ctrl() = 0x1u;
45 prefix_ senf::UInt8Parser senf::TransportPacketParser::pointer_field()
48 return pointer_field_().get<1>();
51 prefix_ void senf::TransportPacketParser::setPUSI(bool pusi)
54 if (pusi) pointer_field_().init<1>();
55 else pointer_field_().init<0>();
58 prefix_ void senf::TransportPacketType::dump(packet p, std::ostream & os)
60 boost::io::ios_all_saver ias(os);
61 os << "TransportPacket:\n"
63 << " syncByte : 0x" << unsigned(p->sync_byte()) << "\n"
64 << " transport error ind. : 0x" << unsigned(p->transport_error_indicator()) << "\n"
65 << " payload unit start ind. : 0x" << unsigned(p->pusi()) << "\n"
66 << " transport priority : 0x" << unsigned(p->transport_priority()) << "\n"
68 << " pid : " << unsigned(p->pid()) << "\n"
70 << " transport scrambling c. : 0x" << unsigned(p->transport_scrmbl_ctrl()) << "\n"
71 << " adaptation field ctrl : 0x" << unsigned(p->adaptation_field_ctrl()) << "\n"
72 << " continuity counter : 0x" << unsigned(p->continuity_counter()) << "\n";
74 os << " pointer field : 0x" << unsigned(p->pointer_field()) << "\n";
77 ///////////////////////////////cc.e////////////////////////////////////////
84 // c-file-style: "senf"
85 // indent-tabs-mode: nil
86 // ispell-local-dictionary: "american"
87 // compile-command: "scons -u test"