TransportPacket.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Packets_MPEGDVBBundle_TransportPacket_
18 #define HH_SENF_Packets_MPEGDVBBundle_TransportPacket_ 1
19 
20 // Custom includes
21 #include <senf/Packets/Packets.hh>
22 
23 //#include "TransportPacket.mpp"
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
26 namespace senf {
27 
36  {
37 # include SENF_PARSER()
38 
40 
42  SENF_PARSER_BITFIELD_RO( pusi, 1, bool );
44  SENF_PARSER_BITFIELD ( pid, 13, unsigned );
48 
51 
53 
54  UInt8Parser pointer_field() const;
55  void init_fields() const;
56  void setPUSI(bool pusi) const;
57 
59  defaultInit();
60  init_fields();
61  }
62  };
63 
109  : public PacketTypeBase,
110  public PacketTypeMixin<TransportPacketType>
111  {
115 
116  using mixin::nextPacketRange;
117  using mixin::init;
118  using mixin::initSize;
119 
121  static void dump(packet p, std::ostream & os);
122  static const byte SYNC_BYTE = 0x47;
123  };
124 
128 }
129 
130 
131 //-/////////////////////////////////////////////////////////////////////////////////////////////////
132 //#include "TransportPacket.cci"
133 //#include "TransportPacket.ct"
134 //#include "TransportPacket.cti"
135 #endif
136 
137 
138 // Local Variables:
139 // mode: c++
140 // fill-column: 100
141 // c-file-style: "senf"
142 // indent-tabs-mode: nil
143 // ispell-local-dictionary: "american"
144 // compile-command: "scons -u test"
145 // comment-column: 40
146 // End:
senf::detail::packet::byte byte
Definition: PacketType.hh:108
#define SENF_PARSER_BITFIELD(name, bits, type)
Define bit-field.
senf::Parse_Variant_Direct< pusi_t,?,(VoidPacketParser)(UInt8Parser) >::parser pointer_field_() const
senf::UIntFieldParser<?,?+2 > transport_scrmbl_ctrl() const
Mixin to provide standard implementations for nextPacketRange and nextPacketType. ...
Definition: PacketType.hh:300
Parse 8bit unsigned byte aligned integer.
Definition: IntParser.hh:91
PacketTypeMixin< TransportPacketType > mixin
TransportPacketParser parser
typedef to the parser of Transport packet
Packets public header.
senf::UIntFieldParser<?,?+13 > pid() const
void setPUSI(bool pusi) const
#define SENF_PARSER_FIELD(name, type)
Define normal parser field.
#define SENF_PARSER_PRIVATE_VARIANT(name, chooser, types)
Define private VariantParser field.
senf::FlagParser<?> transport_error_indicator() const
#define SENF_PARSER_FINALIZE(name)
Generate parser control members.
ConcretePacket< TransportPacketType > TransportPacket
Transport packet typedef.
senf::FlagParser<?>::value_type pusi() const
void dump(std::ostream &os, DirectoryNode &dir=root())
Protocol specific packet handle.
Definition: Packet.hh:87
UInt8Parser pointer_field() const
void defaultInit() const
Default implementation.
Helper base-class implementing the PacketType interface.
Definition: PacketType.hh:100
senf::FlagParser<?> transport_priority() const
UInt8Parser sync_byte() const
#define SENF_PARSER_BITFIELD_RO(name, bits, type)
Define bit-field (read-only)
#define SENF_PARSER_INIT()
Define parser initialization routine.
senf::UIntFieldParser<?,?+4 > continuity_counter() const
Default parser parsing nothing.
SENF_PACKET_PREVENT_TEMPLATE_INSTANTIATION(RadiotapPacket)
Parser Base class.
senf::UIntFieldParser<?,?+2 > adaptation_field_ctrl() const
ConcretePacket< TransportPacketType > packet
Transport packet typedef.
Parse a Transport Stream packet.
Transport Stream packet.