ITS
ParameterConfiguration.h
Go to the documentation of this file.
1 
7 #ifndef ParameterConfiguration_H
8 #define ParameterConfiguration_H
9 
10 #include <api.h>
11 #include <sys/ioctl.h>
12 #include <net/if.h>
13 #include <errno.h>
14 #include <unistd.h>
15 #include <QtNetwork>
16 #include <GnAddr.h>
17 #include <constantes.h>
18 #include <TrafficClass.h>
19 #include <EnergyStorageType.h>
20 #include <HeightLonCarr.h>
21 #include <PosCentMass.h>
22 #include <PosFrontAx.h>
23 #include <PosPillar.h>
24 #include <PositionOfPillars.h>
25 #include <PosLonCarr.h>
26 #include <TurningRadius.h>
27 #include <VehicleLength.h>
28 #include <VehicleMass.h>
29 #include <VehicleWidth.h>
30 #include <WheelBaseVehicle.h>
31 
32 class ParameterConfiguration : public QObject
33 {
34 private:
35  /* system.conf */
36  uchar m_mid[6];
37  QString m_interface;
63 public:
78 
82  void getMacAddr();
86  void updateMID(uchar* mid);
90  void read();
94  void readDebug();
95 
96  /* Getters */
101  uchar* mid() {return m_mid;}
107  uchar mid(int i) const {if(i < 0 || i > 6)return m_mid[0];return m_mid[i];}
112  QString interface() const {return m_interface;}
117  ulong countryCode() const {return m_countryCode;}
142  bool itsGnSecurity() const {return m_itsGnSecurity;}
218  PosPillar_t positionOfPillars(int i) const;
219 
225 };
226 
227 #endif // _ParameterConfiguration_H_
long HeightLonCarr_t
Definition: HeightLonCarr.h:27
GeoNet Address class.
ParameterConfiguration & operator=(const ParameterConfiguration &other)
operator= ParameterConfiguration affectation operator.
Usefull functions and declarations.
long TurningRadius_t
Definition: TurningRadius.h:27
bool itsGnGeoAreaLineForwarding() const
itsGnGeoAreaLineForwarding Is the GN geo area line forwarding used?
uchar mid(int i) const
mid Specific byte of the MID getter.
PosCentMass_t posCentMass() const
posCentMass Position of the center mass getter.
long WheelBaseVehicle_t
TrafficClass trafficClass() const
trafficClass ITS-S traffic class getter.
long PosFrontAx_t
Definition: PosFrontAx.h:27
EnergyStorageType_t m_energyStorageType
WheelBaseVehicle_t wheelBaseVehicle() const
wheelBaseVehicle Wheel base of the vehicle getter.
TurningRadius_t turningRadius() const
turningRadius Vehicle turning radius getter.
PositionOfPillars_t positionOfPillars() const
positionOfPillars Position of the pillars getter.
void getMacAddr()
getMacAddr Get MacAddr if itsGnLocalAddrConfMethod = 1 to create GnAddr
uchar * mid()
mid MID getter.
VehicleLength_t vehicleLength() const
vehicleLength Vehicle length getter.
VehicleMass_t vehicleMass() const
vehicleMass Vehicle mass getter.
void read()
read Configuration file reading.
PosLonCarr_t posLonCarrLeft() const
posLonCarrLeft Position of the longitudinal carrier on the left side getter.
HeightLonCarr_t m_heightLonCarrRight
long PosCentMass_t
Definition: PosCentMass.h:27
HeightLonCarr_t m_heightLonCarrLeft
EnergyStorageType_t energyStorageType() const
energyStorageType Energy storage type getter.
VehicleWidth_t vehicleWidth() const
vehicleWidth Vehicle width getter.
PosFrontAx_t posFrontAx() const
posFrontAx Position of the front axis getter.
long PosPillar_t
Definition: PosPillar.h:27
void updateMID(uchar *mid)
updateMacAddr Get GnAddr from security layer if itsGnLocalGnAddrConfMethod = 2 or if DAD is invoked ...
long PosLonCarr_t
Definition: PosLonCarr.h:27
void readDebug()
readDebug Configuration printing.
int maxRepetitionAdvancedContention() const
maxRepetitionAdvancedContention Counter used for the Advance GBC forwarding algorithm getter...
ParameterConfiguration()
ParameterConfiguration Default constructor.
Constantes used everywhere.
ulong countryCode() const
countryCode ITS-S country code getter.
WheelBaseVehicle_t m_wheelBaseVehicle
PositionOfPillars_t m_positionOfPillars
~ParameterConfiguration()
~ParameterConfiguration ParameterConfiguration destructor.
TrafficClass definition.
long VehicleWidth_t
Definition: VehicleWidth.h:28
HeightLonCarr_t heightLonCarrRight() const
heightLonCarrRight Height of the longitudinal carrier on the right side getter.
bool itsGnLocalAddrConfMethod() const
itsGnLocalAddrConfMethod ITS GN-ADDR configuration method getter.
quint8 itsGnGeoUnicastForwardingAlgorithm() const
itsGnGeoUnicastForwardingAlgorithm GUC forwarding algorithm getter.
quint8 itsGnGeoBroadcastForwardingAlgorithm() const
itsGnGeoBroadcastForwardingAlgorithm GBC forwarding algorithm getter.
bool itsGnSecurity() const
itsGnSecurity Is the security layer used?
long VehicleMass_t
Definition: VehicleMass.h:27
QString interface() const
interface ITS-G5 interface name getter.
PosLonCarr_t posLonCarrRight() const
posLonCarrRight Position of the longitudinal carrier on the right side getter.
HeightLonCarr_t heightLonCarrLeft() const
heightLonCarrLeft Height of the longitudinal carrier on the left side getter.