Vanetza
 
Loading...
Searching...
No Matches
mib.hpp
1#ifndef MIB_HPP_U3WJ4WES
2#define MIB_HPP_U3WJ4WES
3
4#include <vanetza/common/clock.hpp>
5#include <vanetza/geonet/address.hpp>
6#include <vanetza/geonet/lifetime.hpp>
7#include <vanetza/geonet/station_type.hpp>
8#include <vanetza/geonet/traffic_class.hpp>
9#include <vanetza/units/angle.hpp>
10#include <vanetza/units/area.hpp>
11#include <vanetza/units/frequency.hpp>
12#include <vanetza/units/length.hpp>
13#include <vanetza/units/time.hpp>
14#include <cstdint>
15#include <string>
16
17namespace vanetza
18{
19namespace geonet
20{
21
22enum class UnicastForwarding {
23 Unspecified = 0,
24 Greedy = 1,
25 CBF = 2
26};
27
28enum class BroadcastForwarding {
29 Unspecified = 0,
30 SIMPLE = 1,
31 CBF = 2,
32 Advanced = 3
33};
34
35enum class AddrConfMethod {
36 Auto = 0,
37 Managed = 1,
38 Anonymous = 2
39};
40
41enum class InterfaceType {
42 Unspecified = 0,
43 ITS_G5 = 1
44};
45
46enum class SecurityDecapHandling {
47 Strict = 0,
48 Non_Strict = 1
49};
50
51/**
52 * The Management Information Base (MIB) defines the GeoNetworking protocol constants.
53 *
54 * \see EN 302 636-4-1 v1.3.1 Annex H
55 */
57{
59
60 Address itsGnLocalGnAddr;
61 AddrConfMethod itsGnLocalAddrConfMethod;
62 unsigned itsGnProtocolVersion;
63 bool itsGnIsMobile;
64 InterfaceType itsGnIfType;
65 units::Frequency itsGnMinimumUpdateFrequencyEPV;
66 units::Length itsGnPaiInterval;
67 unsigned itsGnMaxSduSize;
68 unsigned itsGnMaxGeoNetworkingHeaderSize;
69 units::Duration itsGnLifetimeLocTE;
70 bool itsGnSecurity;
71 SecurityDecapHandling itsGnSnDecapResultHandling;
72 unsigned itsGnLocationServiceMaxRetrans;
73 units::Duration itsGnLocationServiceRetransmitTimer;
74 unsigned itsGnLocationServicePacketBufferSize; // byte
75 units::Duration itsGnBeaconServiceRetransmitTimer;
76 units::Duration itsGnBeaconServiceMaxJitter;
77 unsigned itsGnDefaultHopLimit;
78 unsigned itsGnDPLLength;
79 Lifetime itsGnMaxPacketLifetime;
80 Lifetime itsGnDefaultPacketLifetime;
81 unsigned itsGnMaxPacketDataRate; // kbyte/s
82 double itsGnMaxPacketDataRateEmaBeta; // percentage ]0; 1[
83 units::Area itsGnMaxGeoAreaSize;
84 units::Duration itsGnMinPacketRepetitionInterval;
85 UnicastForwarding itsGnNonAreaForwardingAlgorithm;
86 BroadcastForwarding itsGnAreaForwardingAlgorithm;
87 units::Duration itsGnCbfMinTime;
88 units::Duration itsGnCbfMaxTime;
89 units::Length itsGnDefaultMaxCommunicationRange;
90 units::Angle itsGnBroadcastCBFDefSectorAngle;
91 unsigned itsGnUcForwardingPacketBufferSize; // kbyte
92 unsigned itsGnBcForwardingPacketBufferSize; // kbyte
93 unsigned itsGnCbfPacketBufferSize; // kbyte
94 TrafficClass itsGnDefaultTrafficClass;
95 std::uint32_t vanetzaDefaultSeed; /*< default seed for internal random number generator */
96 std::size_t vanetzaCbfMaxCounter; /*< maximum counter value used for Advanced routing */
97 bool vanetzaDeferInitialBeacon; /*< defer first beacon up to itsGnBeaconServiceRetransmitTimer */
98 bool vanetzaDisableBeaconing; /*< disable transmission of beacons entirely */
99 bool vanetzaMultiHopDuplicateAddressDetection; /*< execute DAD for multi-hop packets */
100 bool vanetzaFadingCbfCounter; /*< use fading counters for CBF packet buffer */
101 units::Duration vanetzaFadingCbfCounterLifetime; /*< lifetime until counter vanishes */
102 Clock::duration vanetzaNeighbourFlagExpiry; /*< reset LocTE neighbour state without explicit updates */
103 std::size_t vanetzaGbcMemoryCapacity; /*< do not pass up duplicate GBC packets (0 to disable this filter) */
104};
105
106// This name is too clumsy to write it out every time
108
109} // namespace geonet
110} // namespace vanetza
111
112#endif /* MIB_HPP_U3WJ4WES */
113