AnnotationsPacket.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_Ext_NetEmu_AnnotationsPacket_
18 #define HH_SENF_Ext_NetEmu_AnnotationsPacket_ 1
19 
20 // Custom includes
22 
23 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 
25 namespace senf {
33  {
34 # include SENF_FIXED_PARSER()
35 
44 
45  SENF_PARSER_BITFIELD( corrupt, 1, bool );
47  SENF_PARSER_BITFIELD( duplicated, 1, bool );
48  SENF_PARSER_BITFIELD( reordered, 1, bool );
49  SENF_PARSER_BITFIELD( aggregated, 1, bool );
50  SENF_PARSER_BITFIELD( unused, 7, unsigned );
51  SENF_PARSER_BITFIELD( gap, 8, unsigned );
52  SENF_PARSER_BITFIELD( length, 12, unsigned );
53 
55  };
56 
75  : public PacketTypeBase,
76  public PacketTypeMixin<AnnotationsPacketType>
77  {
81 
82  using mixin::nextPacketRange;
83  using mixin::initSize;
84  using mixin::init;
85 
86  static factory_t nextPacketType(packet p);
88  static void dump(packet p, std::ostream & os);
89  static void finalize(packet p);
90 
91  static const std::uint16_t extType = 0x50;
92  };
93 
98  SENF_PACKET_PREVENT_TEMPLATE_INSTANTIATION( AnnotationsPacket );
99 
101 }
102 //-/////////////////////////////////////////////////////////////////////////////////////////////////
103 //#include "AnnotationsPacket.cci"
104 //#include "AnnotationsPacket.ct"
105 //#include "AnnotationsPacket.cti"
106 #endif
107 
108 
109 // Local Variables:
110 // mode: c++
111 // fill-column: 100
112 // c-file-style: "senf"
113 // indent-tabs-mode: nil
114 // ispell-local-dictionary: "american"
115 // compile-command: "scons -u test"
116 // comment-column: 40
117 // End:
static MACAddress const None
senf::UInt8Parser type() const
#define SENF_PARSER_BITFIELD(name, bits, type)
SENF_PACKET_PREVENT_TEMPLATE_INSTANTIATION(AnnotationsPacket)
senf::UIntFieldParser<?,?+7 > unused() const
senf::UInt64Parser timestampMAC() const
senf::FlagParser<?> duplicated() const
senf::FlagParser<?> retransmitted() const
#define SENF_PARSER_FIELD(name, type)
PacketTypeMixin< AnnotationsPacketType > mixin
EthernetPacket prependAnnotationsPacket(Packet const &pkt, MACAddress const &src_=senf::MACAddress::None, MACAddress const &dst_=senf::MACAddress::Broadcast)
AnnotationsPacketParser parser
senf::FlagParser<?> corrupt() const
#define SENF_PARSER_FINALIZE(name)
senf::UInt32Parser modulationId() const
void dump(std::ostream &os, DirectoryNode &dir=root())
senf::FlagParser<?> reordered() const
senf::UIntFieldParser<?,?+12 > length() const
ConcretePacket< AnnotationsPacketType > packet
senf::Int64Parser timestamp() const
senf::UInt16Parser snr() const
senf::UIntFieldParser<?,?+8 > gap() const
senf::UInt16Parser airTime() const
senf::FlagParser<?> aggregated() const
PacketInterpreterBase::factory_t factory_t
ConcretePacket< EthernetPacketType > EthernetPacket
MACAddressParser interfaceId() const
senf::Int16Parser rssi() const
Parse an Annotations packet.
static MACAddress const Broadcast