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 LTE_V2X = 2
45};
46
47enum class SecurityDecapHandling {
48 Strict = 0,
49 Non_Strict = 1
50};
51
52/**
53 * The Management Information Base (MIB) defines the GeoNetworking protocol constants.
54 *
55 * \see EN 302 636-4-1 v1.3.1 Annex H
56 */
57struct ManagementInformationBase
58{
59 ManagementInformationBase();
60
61 Address itsGnLocalGnAddr;
62 AddrConfMethod itsGnLocalAddrConfMethod;
63 unsigned itsGnProtocolVersion;
64 bool itsGnIsMobile;
65 InterfaceType itsGnIfType;
66 units::Frequency itsGnMinimumUpdateFrequencyEPV;
67 units::Length itsGnPaiInterval;
68 unsigned itsGnMaxSduSize;
69 unsigned itsGnMaxGeoNetworkingHeaderSize;
70 units::Duration itsGnLifetimeLocTE;
71 bool itsGnSecurity;
72 SecurityDecapHandling itsGnSnDecapResultHandling;
73 unsigned itsGnLocationServiceMaxRetrans;
74 units::Duration itsGnLocationServiceRetransmitTimer;
75 unsigned itsGnLocationServicePacketBufferSize; // byte
76 units::Duration itsGnBeaconServiceRetransmitTimer;
77 units::Duration itsGnBeaconServiceMaxJitter;
78 unsigned itsGnDefaultHopLimit;
79 unsigned itsGnDPLLength;
80 Lifetime itsGnMaxPacketLifetime;
81 Lifetime itsGnDefaultPacketLifetime;
82 unsigned itsGnMaxPacketDataRate; // kbyte/s
83 double itsGnMaxPacketDataRateEmaBeta; // percentage ]0; 1[
84 units::Area itsGnMaxGeoAreaSize;
85 units::Duration itsGnMinPacketRepetitionInterval;
86 UnicastForwarding itsGnNonAreaForwardingAlgorithm;
87 BroadcastForwarding itsGnAreaForwardingAlgorithm;
88 units::Duration itsGnCbfMinTime;
89 units::Duration itsGnCbfMaxTime;
90 units::Length itsGnDefaultMaxCommunicationRange;
91 units::Angle itsGnBroadcastCBFDefSectorAngle;
92 unsigned itsGnUcForwardingPacketBufferSize; // kbyte
93 unsigned itsGnBcForwardingPacketBufferSize; // kbyte
94 unsigned itsGnCbfPacketBufferSize; // kbyte
95 TrafficClass itsGnDefaultTrafficClass;
96 std::uint32_t vanetzaDefaultSeed; /*< default seed for internal random number generator */
97 std::size_t vanetzaCbfMaxCounter; /*< maximum counter value used for Advanced routing */
98 Clock::duration vanetzaDeferInitialBeacon; /*< defer first beacon by given duration */
99 bool vanetzaDisableBeaconing; /*< disable transmission of beacons entirely */
100 bool vanetzaMultiHopDuplicateAddressDetection; /*< execute DAD for multi-hop packets */
101 bool vanetzaFadingCbfCounter; /*< use fading counters for CBF packet buffer */
102 units::Duration vanetzaFadingCbfCounterLifetime; /*< lifetime until counter vanishes */
103 Clock::duration vanetzaNeighbourFlagExpiry; /*< reset LocTE neighbour state without explicit updates */
104 std::size_t vanetzaGbcMemoryCapacity; /*< do not pass up duplicate GBC packets (0 to disable this filter) */
105};
106
107// This name is too clumsy to write it out every time
108typedef ManagementInformationBase MIB;
109
110} // namespace geonet
111} // namespace vanetza
112
113#endif /* MIB_HPP_U3WJ4WES */
114