ITS
GeoNet Class Reference

#include <Geonet.h>

Inheritance diagram for GeoNet:
[legend]
Collaboration diagram for GeoNet:
[legend]

Classes

union  destinationAddress_u
 The destinationAddress_u union is used by the ForwardingalgorithmResponse, and so is an union, but since we send only if the response is a MAC address, we have only the MAC address. More...
 

Public Types

enum  e_networkError { networkError_success, networkError_rawsocket_open, networkError_rawsocket_siocgifindex, networkError_rawsocket_send }
 The e_networkError enum is used for networking debug purpose. More...
 
enum  e_hybridError { hybridError_success, hybridError_send }
 The e_hybridError enum is used for hybridization debug purpose. More...
 
enum  e_geonetError {
  geonetError_success, geonetError_send_ch_headerType, geonetError_send_ch_headerSubType_geoAnycast_unknown, geonetError_send_ch_headerSubType_geoBroadcast_unknown,
  geonetError_send_ch_headerSubType_TSB_unknown, tmp_geonetError_send_LSRequest_securedPacket, geonetError_send_LSRequest_buffered, geonetError_send_LSRequest_successfullyRespond,
  geonetError_send_LSRequest_noResponse, tmp_geonetError_send_LSReply_securedPacket, geonetError_send_LSReply_destinationUnknown, geonetError_send_LSReply_bufferedPacket,
  geonetError_send_LSReply_discardedPacket, geonetError_send_LSReply_destinationAddress, geonetError_forward_LSReply_bufferedPacket, geonetError_forward_LSReply_discardedPacket,
  geonetError_forward_LSReply_destinationAddress, tmp_geonetError_send_gac_securedPacket, geonetError_send_gac_noDestinationArea, geonetError_send_gac_areaSize,
  geonetError_send_gac_unknownCommunicationProfile, geonetError_send_gac_unicast_bufferedPacket, geonetError_send_gac_unicast_discardedPacket, geonetError_send_gac_broadcast_bufferedPacket,
  geonetError_send_gac_broadcast_discardedPacket, geonetError_send_gac_destinationAddress, geonetError_send_gac_noAreaLineForwarding, geonetError_forward_gac_areaSize,
  geonetError_forward_gac_bufferedPacket, geonetError_forward_gac_discardedPacket, geonetError_forward_gac_destinationAddress, geonetError_forward_gac_noAreaLineForwarding,
  tmp_geonetError_send_gbc_securedPacket, geonetError_send_gbc_noDestinationArea, geonetError_send_gbc_areaSize, geonetError_send_gbc_unknownCommunicationProfile,
  geonetError_send_gbc_bufferedPacket, geonetError_send_gbc_discardedPacket, geonetError_send_gbc_destinationAddress, geonetError_forward_gbc_areaSize,
  geonetError_forward_gbc_bufferedPacket, geonetError_forward_gbc_discardedPacket, geonetError_forward_gbc_destinationAddress, geonetError_send_guc_noMID,
  tmp_geonetError_send_guc_MIDNotFound, tmp_geonetError_send_guc_securedPacket, geonetError_send_guc_unknownCommunicationProfile, geonetError_send_guc_bufferedPacket,
  geonetError_send_guc_discardedPacket, geonetError_send_guc_destinationAddress, geonetError_forward_guc_bufferedPacket, geonetError_forward_guc_discardedPacket,
  geonetError_forward_guc_destinationAddress, tmp_geonetError_send_shb_securedPacket, geonetError_send_shb_unknownCommunicationProfile, geonetError_send_shb_bufferedPacket,
  tmp_geonetError_send_tsb_securedPacket, geonetError_send_tsb_unknownCommunicationProfile, geonetError_send_tsb_bufferedPacket, geonetError_forward_tsb_unknownCommunicationProfile,
  geonetError_forward_tsb_bufferedPacket, geonetError_processing_bh_gnProtocolVersion, geonetError_processing_bh_nextHeader, geonetError_processing_bh_securedHeader,
  geonetError_processing_ch_hopLimit, geonetError_processing_ch_headerType, geonetError_processing_ch_headerSubType_TSB_unknown, geonetError_processing_ch_headerSubType_LS_unknown,
  geonetError_processing_beacon_DAD, geonetError_processing_LSRequest_DAD, geonetError_processing_LSReply_DAD, geonetError_processing_gac_DAD,
  geonetError_processing_gbc_DAD, geonetError_processing_guc_DAD, geonetError_processing_shb_DAD, geonetError_processing_tsb_DAD,
  geonetError_processing_beacon_DPD, geonetError_processing_LSRequest_DPD, geonetError_processing_LSReply_DPD, geonetError_processing_gac_DPD,
  geonetError_processing_gbc_DPD, geonetError_processing_guc_DPD, geonetError_processing_shb_DPD, geonetError_processing_tsb_DPD
}
 The e_geonetError enum is used for header encoding / decoding debug purpose. More...
 

Public Slots

void execute ()
 execute Slot used to execute the Beacon creation and sending. More...
 
void treatPackets (QByteArray)
 treatPackets Slot used to treat received packets. More...
 
void sendPacketFromRPB (gnDataRequest_t rawPacket)
 sendPacketFromRPB Slot used to send packet from repetition packet buffer. More...
 
void lpvUpdate ()
 lpvUpdate Slot used when a packet containing an LPV is sent. More...
 
void sendBeacon ()
 sendBeacon Slot used to send Beacon. More...
 
void utInitialize ()
 utInitialize Slot used to initialize the N&T layer. More...
 
int lsRetransmit (GnAddr destination, QByteArray lsRequestData, BasicHeader bh)
 lsRetransmit Retransmission of an LSRequest. More...
 

Signals

void lpvSent ()
 lpvSent Signal used when a packet containing an LPV is sent. More...
 
void packetReceived (QByteArray)
 packetReceived Signal used when a packet is received. More...
 

Public Member Functions

 GeoNet ()
 GeoNet GeoNet constructor. More...
 
 GeoNet (Manager *m, bool geonetFlag, bool hybridFlag, QMutex *mutex=nullptr)
 GeoNet GeoNet initialization constructor. More...
 
 ~GeoNet ()
 ~GeoNet GeoNet destructor. More...
 
int send (gnDataRequest_t gnDR)
 send Creates the BTP and then select the correct packet send option. More...
 
int send (QByteArray payloadToSend, bool containLPV, BasicHeader bh)
 send Adds security layer if needed and send packet. More...
 
ForwardingAlgorithmResponse greedy (BasicHeader bh, CommonHeader ch, GACPacket packet, QByteArray payload, QByteArray sender, uchar *destination, uchar *forwarder)
 greedy Greedy algorithm. More...
 
ForwardingAlgorithmResponse greedy (BasicHeader bh, CommonHeader ch, GBCPacket packet, QByteArray payload, QByteArray sender, uchar *destination, uchar *forwarder)
 greedy Greedy algorithm. More...
 
ForwardingAlgorithmResponse greedy (BasicHeader bh, CommonHeader ch, GUCPacket packet, QByteArray payload, QByteArray sender)
 greedy Greedy algorithm. More...
 
ForwardingAlgorithmResponse greedy (BasicHeader bh, CommonHeader ch, LSReplyPacket packet, QByteArray sender)
 greedy Greedy algorithm. More...
 
ForwardingAlgorithmResponse simpleForwardingAlgorithm (BasicHeader bh, CommonHeader ch, GBCPacket packet, QByteArray packetPayload, e_shape shape, QByteArray sender, bool flagSrc)
 simpleForwardingAlgorithm Simple algorithm. More...
 
ForwardingAlgorithmResponse contentionBasedForwardingAlgorithm (BasicHeader bh, CommonHeader ch, GBCPacket packet, QByteArray packetPayload, e_shape shape, QByteArray sender, bool flagSrc)
 contentionBasedForwardingAlgorithm CBF algorithm. More...
 
ForwardingAlgorithmResponse advancedForwarding (BasicHeader bh, CommonHeader ch, GBCPacket packet, QByteArray packetPayload, e_shape shape, QByteArray sender, uchar *destEth, uchar *forwarderEth, bool flagSrc)
 advancedForwarding Advanced algorithm. More...
 
ForwardingAlgorithmResponse CBFUnicast (BasicHeader bh, CommonHeader ch, GACPacket packet, QByteArray packetPayload)
 CBFUnicast Unicast CBF algoritm. More...
 
ForwardingAlgorithmResponse CBFUnicast (BasicHeader bh, CommonHeader ch, GUCPacket packet, QByteArray packetPayload)
 CBFUnicast Unicast CBF algoritm. More...
 

Public Attributes

QHash< int, QString > geonetErrors
 

Static Public Attributes

static quint16 sequenceNumber = 0
 

Private Slots

int sendGUC (gnDataRequest_t gnDR)
 sendGUC Send a GUC. More...
 
void socketReadyRead ()
 socketReadyRead Slot used when socket is ready to read. More...
 

Private Member Functions

void initGeoNetErrors ()
 initGeoNetErrors Set the debugging print. More...
 
int sendLsRequest (GnAddr dest, gnDataRequest_t gnDR)
 sendLsRequest Send an LSRequest. More...
 
int sendGAC (gnDataRequest_t gnDR)
 sendGAC Send an LSRequest. More...
 
int sendGBC (gnDataRequest_t gnDR)
 sendGBC Send an LSRequest. More...
 
int sendSHB (gnDataRequest_t gnDR)
 sendSHB Send an LSRequest. More...
 
int sendTSB (gnDataRequest_t gnDR)
 sendTSB Send an LSRequest. More...
 
int basicHeaderProcessing (uchar *packet, int len, sniff_ethernet_t *eth)
 basicHeaderProcessing Basic Header decoding. More...
 
int commonHeaderProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh)
 commonHeaderProcessing Common Header decoding. More...
 
int beaconPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 beaconPacketProcessing Beacon Header decoding. More...
 
int gacPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 gacPacketProcessing GAC Header decoding. More...
 
int gbcPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 gbcPacketProcessing GBC Header decoding. More...
 
int gucPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 gucPacketProcessing GUC Header decoding. More...
 
int shbPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 shbPacketProcessing SHB Header decoding. More...
 
int tsbPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 tsbPacketProcessing TSB Header decoding. More...
 
int LSRequestPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 LSRequestPacketProcessing LSRequest Header decoding. More...
 
int LSReplyPacketProcessing (uchar *packet, sniff_ethernet_t *eth, BasicHeader bh, CommonHeader ch)
 LSReplyProcessing LSReply Header decoding. More...
 
void sendEventIndicationToUT (uchar *packetFull, int packetLen)
 sendEventIndicationToUT Send decoding success notification to the UpperTester. More...
 
int InitRawSocket_send ()
 InitRawSocket_send Set the ITS-G5 socket. More...
 
void verifLocT ()
 verifLocT Checks if the LocT has expired packet. More...
 
void initHybridSocket ()
 initHybridSocket Set the hybridization sockets. More...
 
void sslErrors (const QList< QSslError > &errors)
 sslErrors Print SSL errors. More...
 
void socketError (QAbstractSocket::SocketError)
 socketError Print TCP socket error. More...
 
void setupUnsecureSocket ()
 setupUnsecureSocket Set TCP socket for hybridization. More...
 
void setupSecureSocket ()
 setupSecureSocket Set SSL socket for hybridization. More...
 
int hybridSend (QByteArray payload)
 hybridSend Send packet with the hybridization. More...
 
void flushPB (GnAddr destination)
 flushPB Flush buffer. More...
 
void flushLSPB (GnAddr destination)
 flushLSPB Flush LS packet buffer. More...
 
void checkUCFPB ()
 checkUCFPB Check to flush the unicast forawarding packet buffer. More...
 
void flushUCFPB (GnAddr destination)
 flushUCFPB Flush unicast forawarding packet buffer. More...
 
void checkBCFPB ()
 checkBCFPB Check to flush the broadcast forawarding packet buffer. More...
 
int TO_CBF_GBC (int distance)
 TO_CBF_GBC TO_CBF_GBC computation. More...
 
int TO_CBF_GUC (int distance)
 TO_CBF_GUC TO_CBF_GUC computation. More...
 
void calculAngleThreshold ()
 calculAngleThreshold Compute the ANGLE_TH for the advanced forwarding. More...
 
ForwardingAlgorithmResponse greedy (PacketBuffersEntry packet, QByteArray sender)
 greedy Greedy algorithm. More...
 
QByteArray getSecuredPayload (QByteArray payload, BasicHeader bh)
 getSecuredPayload Send payload to secure to the HSM.jar. More...
 
QByteArray verifySecuredPayload (QByteArray payload, bool *success)
 verifySecuredPayload Send payload to verify to the HSM.jar. More...
 

Private Attributes

QTimer * m_beacon
 
QUdpSocket * gen2fac
 
QUdpSocket * gen2ut
 
QSslSocket * m_sslSocket
 
QTcpSocket * m_tcpSocket
 
ParameterHybridm_paramHybrid
 
bool m_hybridFlag
 
bool m_geonetFlag
 
FakeGPSProviderm_paramGPS
 
FakeCANProviderm_paramCAN
 
FakeApplicationProviderm_paramAppli
 
ParameterConfigurationm_paramConf
 
ParameterUpperTesterm_paramUpperTester
 
ParameterNetworkm_paramNetwork
 
ParameterSecuritym_paramSecu
 
GnAddrm_gnAddr
 
Managerm_manager
 
HistoryPacketBufferm_HPB
 
BroadcastForwardingPacketBufferm_BCFPB
 
UnicastForwardingPacketBufferm_UCFPB
 
CBFPacketBufferm_CBFPB
 
RepetitionPacketBufferm_RPB
 
LocationServicePacketBufferm_LSPB
 
QHash< QByteArray, LocationTableEntry > * m_locationTable
 
ReceivePacketsm_RP
 
QHash< QByteArray, int > m_lsRetransmission
 
QMutex * m_mutex
 
QMutex * m_mutexLocT
 
QHash< QByteArray, int > m_CBFPBCounter
 
int m_angleThreshold
 
QUdpSocket * m_signatureSocket
 
QUdpSocket * m_verifySocket
 
SecurityManager m_securityManager
 

Detailed Description

Definition at line 42 of file Geonet.h.

Member Enumeration Documentation

◆ e_geonetError

The e_geonetError enum is used for header encoding / decoding debug purpose.

Enumerator
geonetError_success 

Success.

geonetError_send_ch_headerType 

The Header Type of Common Header is unknown.

geonetError_send_ch_headerSubType_geoAnycast_unknown 

The Header Sub Type of ANY type is unknown.

geonetError_send_ch_headerSubType_geoBroadcast_unknown 

The Header Sub Type of GBC type is unknown.

geonetError_send_ch_headerSubType_TSB_unknown 

The Header Sub Type of TSB type is unknown.

tmp_geonetError_send_LSRequest_securedPacket 

The security layer is not yet implemented.

geonetError_send_LSRequest_buffered 

The LSRequest is buffered.

geonetError_send_LSRequest_successfullyRespond 

LSRequest successfully responded.

geonetError_send_LSRequest_noResponse 

No response of an LSRequest.

tmp_geonetError_send_LSReply_securedPacket 

The security layer is not yet implemented.

geonetError_send_LSReply_destinationUnknown 

The LSReply destination is unknown.

geonetError_send_LSReply_bufferedPacket 

The LSReply is buffered on sending.

geonetError_send_LSReply_discardedPacket 

The LSReply is discarded on sending.

geonetError_send_LSReply_destinationAddress 

The destination address is not a MAC address on sending.

geonetError_forward_LSReply_bufferedPacket 

The LSReply is buffered on forward.

geonetError_forward_LSReply_discardedPacket 

The LSReply is discarded on forward.

geonetError_forward_LSReply_destinationAddress 

The destination address is not a MAC address on forward.

tmp_geonetError_send_gac_securedPacket 

The security layer is not yet implemented.

geonetError_send_gac_noDestinationArea 

No destiantion area on sending.

geonetError_send_gac_areaSize 

The area size is too big on sending.

geonetError_send_gac_unknownCommunicationProfile 

Unknown communication profile.

geonetError_send_gac_unicast_bufferedPacket 

Packet buffered in UCPB.

geonetError_send_gac_unicast_discardedPacket 

Packet discarded after unicast.

geonetError_send_gac_broadcast_bufferedPacket 

Packet buffered in BCPB.

geonetError_send_gac_broadcast_discardedPacket 

Packet discarded after broadcast.

geonetError_send_gac_destinationAddress 

DestinationAddress isn't MAC.

geonetError_send_gac_noAreaLineForwarding 

Area line forwarding is not enable, can't send.

geonetError_forward_gac_areaSize 

Area size is too large.

geonetError_forward_gac_bufferedPacket 

Packet buffered.

geonetError_forward_gac_discardedPacket 

Packet discarded.

geonetError_forward_gac_destinationAddress 

DestinationAddress isn't MAC.

geonetError_forward_gac_noAreaLineForwarding 

Area line forwarding is not enable, can't send.

tmp_geonetError_send_gbc_securedPacket 

The security layer is not yet implemented.

geonetError_send_gbc_noDestinationArea 

GBC Sending Error : No destination area.

geonetError_send_gbc_areaSize 

GBC Sending Error : Area size is too large.

geonetError_send_gbc_unknownCommunicationProfile 

GBC Sending Error : Communication Profile isn't G5A.

geonetError_send_gbc_bufferedPacket 

GBC Sending : Packet buffered.

geonetError_send_gbc_discardedPacket 

GBC Sending : Packet discarded.

geonetError_send_gbc_destinationAddress 

GBC Sending Error : DestinationAddress isn't MAC.

geonetError_forward_gbc_areaSize 

GBC Forwarding Error : Area size is too large.

geonetError_forward_gbc_bufferedPacket 

GBC Forwarding : Packet buffered.

geonetError_forward_gbc_discardedPacket 

GBC Forwarding : Packet discarded.

geonetError_forward_gbc_destinationAddress 

GBC Forwarding Error : DestinationAddress isn't MAC.

geonetError_send_guc_noMID 

GUC Sending Error : No destination address.

tmp_geonetError_send_guc_MIDNotFound 

TMP GUC Sending Error : Destination not found in LocT.

tmp_geonetError_send_guc_securedPacket 

TMP GUC Processing Error : Can't send secured packet.

geonetError_send_guc_unknownCommunicationProfile 

GUC Sending Error : Communication Profile isn't G5A.

geonetError_send_guc_bufferedPacket 

GUC Sending : Packet buffered.

geonetError_send_guc_discardedPacket 

GUC Sending : Packet discarded.

geonetError_send_guc_destinationAddress 

GUC Sending Error : DestinationAddress isn't MAC.

geonetError_forward_guc_bufferedPacket 

GUC Forwarding : Packet buffered.

geonetError_forward_guc_discardedPacket 

GUC Forwarding : Packet discarded.

geonetError_forward_guc_destinationAddress 

GUC Forwarding Error : DestinationAddress isn't MAC.

tmp_geonetError_send_shb_securedPacket 

TMP SHB Processing Error : Can't send secured packet.

geonetError_send_shb_unknownCommunicationProfile 

SHB Sending Error : Communication Profile isn't G5A.

geonetError_send_shb_bufferedPacket 

SHB Sending : Packet buffered.

tmp_geonetError_send_tsb_securedPacket 

TMP TSB Processing Error : Can't send secured packet.

geonetError_send_tsb_unknownCommunicationProfile 

TSB Sending Error : Communication Profile isn't G5A.

geonetError_send_tsb_bufferedPacket 

TSB Sending : Packet buffered.

geonetError_forward_tsb_unknownCommunicationProfile 

TSB Forward Error : Communication Profile isn't G5A.

geonetError_forward_tsb_bufferedPacket 

TSB Forward : Packet buffered.

geonetError_processing_bh_gnProtocolVersion 

BasicHeader Processing Error : Protocol version is different from the current version (version ").append(QString::number(itsGnProtocolVersion)).append(").

geonetError_processing_bh_nextHeader 

BasicHeader Processing Error : Next header invalide.

geonetError_processing_bh_securedHeader 

BasicHeader Processing Error : Secured header.

geonetError_processing_ch_hopLimit 

CommonHeader Processing Error : RemainingHopLimit is greater than MaximumHopLimit.

geonetError_processing_ch_headerType 

CommonHeader Processing Error : HeaderType is equal to any or isn't known.

geonetError_processing_ch_headerSubType_TSB_unknown 

CommonHeader Processing Error : HeaderSubType TSB is unknown

geonetError_processing_ch_headerSubType_LS_unknown 

CommonHeader Processing Error : HeaderSubType Location Service is unknown.

geonetError_processing_beacon_DAD 

Beacon Processing Error : Duplicate address detected.

geonetError_processing_LSRequest_DAD 

LSRequest Processing Error : Duplicate address detected.

geonetError_processing_LSReply_DAD 

LSReply Processing Error : Duplicate address detected.

geonetError_processing_gac_DAD 

GAC Processing Error : Duplicate address detected.

geonetError_processing_gbc_DAD 

GBC Processing Error : Duplicate address detected.

geonetError_processing_guc_DAD 

GUC Processing Error : Duplicate address detected.

geonetError_processing_shb_DAD 

SHB Processing Error : Duplicate address detected.

geonetError_processing_tsb_DAD 

TSB Processing Error : Duplicate address detected.

geonetError_processing_beacon_DPD 

Beacon Processing Error : Duplicate packet detected.

geonetError_processing_LSRequest_DPD 

LSRequest Processing Error : Duplicate packet detected.

geonetError_processing_LSReply_DPD 

LSReply Processing Error : Duplicate packet detected.

geonetError_processing_gac_DPD 

GAC Processing Error : Duplicate packet detected.

geonetError_processing_gbc_DPD 

GBC Processing Error : Duplicate packet detected.

geonetError_processing_guc_DPD 

GUC Processing Error : Duplicate packet detected.

geonetError_processing_shb_DPD 

SHB Processing Error : Duplicate packet detected.

geonetError_processing_tsb_DPD 

TSB Processing Error : Duplicate packet detected.

Definition at line 78 of file Geonet.h.

◆ e_hybridError

The e_hybridError enum is used for hybridization debug purpose.

Enumerator
hybridError_success 

Success.

hybridError_send 

Can't send with hybridization.

Definition at line 69 of file Geonet.h.

◆ e_networkError

The e_networkError enum is used for networking debug purpose.

Enumerator
networkError_success 

Success.

networkError_rawsocket_open 

The ITS-G5 interface can't be open.

networkError_rawsocket_siocgifindex 

We can't get the index of the ITS-G5 interface.

networkError_rawsocket_send 

We can't send the packet.

Definition at line 58 of file Geonet.h.

Constructor & Destructor Documentation

◆ GeoNet() [1/2]

GeoNet::GeoNet ( )

GeoNet GeoNet constructor.

Definition at line 6 of file Geonet.cpp.

References initGeoNetErrors(), itsGnBroadcastCBFDefSectorAngle, m_angleThreshold, m_BCFPB, m_CBFPB, m_HPB, m_hybridFlag, m_locationTable, m_LSPB, m_manager, m_mutexLocT, m_paramAppli, m_paramCAN, m_paramConf, m_paramGPS, m_paramHybrid, m_RP, m_RPB, and m_UCFPB.

Here is the call graph for this function:

◆ GeoNet() [2/2]

GeoNet::GeoNet ( Manager m,
bool  geonetFlag,
bool  hybridFlag,
QMutex *  mutex = nullptr 
)

GeoNet GeoNet initialization constructor.

Parameters
mThe manager.
geonetFlagITS-G5 is used?
hybridFlagHybridization is used?
mutexMutex used for initialization.

Definition at line 28 of file Geonet.cpp.

References gen2fac, gen2ut, Manager::hashMap, initGeoNetErrors(), initHybridSocket(), InitRawSocket_send(), itsGnBroadcastCBFDefSectorAngle, ParameterConfiguration::itsGnSecurity(), lpvSent(), lpvUpdate(), m_angleThreshold, m_BCFPB, m_CBFPB, m_CBFPBCounter, m_geonetFlag, m_gnAddr, m_HPB, m_hybridFlag, m_locationTable, m_LSPB, m_manager, m_mutex, m_mutexLocT, m_paramAppli, m_paramCAN, m_paramConf, m_paramGPS, m_paramHybrid, m_paramNetwork, m_paramSecu, m_paramUpperTester, m_RP, m_RPB, m_signatureSocket, m_UCFPB, m_verifySocket, networkError_success, packetReceived(), sendPacketFromRPB(), sequenceNumber, treatPackets(), and ParameterUpperTester::upperTesterEventIndicationWritePort().

Here is the call graph for this function:

◆ ~GeoNet()

GeoNet::~GeoNet ( )

~GeoNet GeoNet destructor.

Definition at line 175 of file Geonet.cpp.

References m_paramNetwork, and ParameterNetwork::rawSocket.

Member Function Documentation

◆ advancedForwarding()

ForwardingAlgorithmResponse GeoNet::advancedForwarding ( BasicHeader  bh,
CommonHeader  ch,
GBCPacket  packet,
QByteArray  packetPayload,
e_shape  shape,
QByteArray  sender,
uchar *  destEth,
uchar *  forwarderEth,
bool  flagSrc 
)

advancedForwarding Advanced algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GBC case).
packetPayloadPayload of the packet.
shapeArea shape
senderThe sender.
destEthDestination Ethernet address.
forwarderEthForwarder Ethernet address.
flagSrcAm I the sender?
Returns
The result of the algorithm

Definition at line 2805 of file Geonet.cpp.

References CBFPacketBuffer::addPacket(), DestinationArea::angle(), circAtLat(), FakeGPSProvider::data(), GBCPacket::destinationArea(), diameter(), dist(), DestinationArea::distanceA(), DestinationArea::distanceB(), CBFPacketBuffer::erase(), f(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, ForwardingAlgorithmResponse_PR_Integer, g(), DestinationArea::geoAreaPosLatitude(), DestinationArea::geoAreaPosLongitude(), LongPositionVector::gnAddr(), greedy(), GnAddr::helper_size, CBFPacketBuffer::isDuplicateTimestamp(), itsGnGeoBroadcastCbfMaxTime, LAT2METER, ReferencePosition::latitude, LongPositionVector::latitude(), ReferencePosition::longitude, LongPositionVector::longitude(), m_angleThreshold, m_CBFPB, m_CBFPBCounter, m_gnAddr, m_locationTable, m_mutexLocT, m_paramConf, m_paramGPS, MAC_ADDR_SIZE, ParameterConfiguration::maxRepetitionAdvancedContention(), GnAddr::mid(), ParameterGPS::referencePosition(), GBCPacket::sequenceNumber(), ForwardingAlgorithmResponse::setInteger(), ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), shape_circle, GBCPacket::soPv(), LongPositionVector::timestamp(), TO_CBF_GBC(), GnAddr::toHex(), and CBFPacketBuffer::update().

Referenced by checkBCFPB(), gbcPacketProcessing(), sendGAC(), and sendGBC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ basicHeaderProcessing()

int GeoNet::basicHeaderProcessing ( uchar *  packet,
int  len,
sniff_ethernet_t eth 
)
private

basicHeaderProcessing Basic Header decoding.

BasicHeader processing

Parameters
packetThe packet.
lenThe packet length.
ethThe C style of the Ethernet Header.
Returns
The decoding result code.

Definition at line 1263 of file Geonet.cpp.

References commonHeaderProcessing(), geonetError_processing_bh_gnProtocolVersion, geonetError_processing_bh_nextHeader, geonetError_processing_bh_securedHeader, BasicHeader::helper_size, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), m_paramConf, BasicHeader::nextHeader(), BasicHeader::nextHeader_any, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, verifySecuredPayload(), and BasicHeader::version().

Referenced by treatPackets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ beaconPacketProcessing()

int GeoNet::beaconPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

beaconPacketProcessing Beacon Header decoding.

BeaconPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 1369 of file Geonet.cpp.

References calculAngleThreshold(), Manager::changeMID(), checkBCFPB(), checkUCFPB(), sniff_ethernet_s::ether_shost, BeaconPacket::extract(), geonetError_processing_beacon_DAD, geonetError_processing_beacon_DPD, geonetError_success, LongPositionVector::gnAddr(), GnAddr::helper_size, isDuplicatePacketDetectionTimestamp(), HistoryPacketBuffer::isDuplicateTimestamp(), ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_RP, GnAddr::mid(), GnAddr::MStationTypeCountryCode(), BeaconPacket::soPv(), GnAddr::stationType(), LongPositionVector::timestamp(), GnAddr::toHex(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculAngleThreshold()

void GeoNet::calculAngleThreshold ( )
private

calculAngleThreshold Compute the ANGLE_TH for the advanced forwarding.

Definition at line 191 of file Geonet.cpp.

References itsGnDefaultMaxCommunicationRange, m_angleThreshold, and m_locationTable.

Referenced by beaconPacketProcessing(), shbPacketProcessing(), and verifLocT().

Here is the caller graph for this function:

◆ CBFUnicast() [1/2]

ForwardingAlgorithmResponse GeoNet::CBFUnicast ( BasicHeader  bh,
CommonHeader  ch,
GACPacket  packet,
QByteArray  packetPayload 
)

CBFUnicast Unicast CBF algoritm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GAC case).
packetPayloadPayload of the packet.
Returns
The result of the algorithm

Definition at line 3008 of file Geonet.cpp.

References GBCPacket::destinationArea(), DestinationArea::geoAreaPosLatitude(), DestinationArea::geoAreaPosLongitude(), GBCPacket::sequenceNumber(), and GBCPacket::soPv().

Referenced by checkUCFPB(), flushUCFPB(), gacPacketProcessing(), and gucPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CBFUnicast() [2/2]

ForwardingAlgorithmResponse GeoNet::CBFUnicast ( BasicHeader  bh,
CommonHeader  ch,
GUCPacket  packet,
QByteArray  packetPayload 
)

◆ checkBCFPB()

void GeoNet::checkBCFPB ( )
private

checkBCFPB Check to flush the broadcast forawarding packet buffer.

Definition at line 3267 of file Geonet.cpp.

References BroadcastForwardingPacketBuffer::addPacket(), advancedForwarding(), BroadcastForwardingPacketBuffer::bcForwardPacketBuffer(), contentionBasedForwardingAlgorithm(), FakeGPSProvider::data(), GBCPacket::destinationArea(), DestinationArea::distanceA(), DestinationArea::distanceB(), ParameterNetwork::eh, CommonHeader::headerSubTypeGeoBroadcast_circle, CommonHeader::headerSubTypeGeoBroadcast_ellipse, CommonHeader::headerSubTypeGeoBroadcast_rectangle, CommonHeader::headerSubTypeTopologicallyScopedBroadcast_singleHop, CommonHeader::headerType_geoAnycast, CommonHeader::headerType_geoBroadcast, CommonHeader::headerType_topologicallyScopedBroadcast, ParameterGPS::heading(), Heading::headingValue, ForwardingAlgorithmResponse::integer(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), ParameterConfiguration::itsGnGeoBroadcastForwardingAlgorithm(), itsGnGeoBroadcastForwardingAlgorithm_advanced, itsGnGeoBroadcastForwardingAlgorithm_CBF, itsGnGeoBroadcastForwardingAlgorithm_simple, itsGnGeoBroadcastForwardingAlgorithm_unspecified, itsGnMaxGeoAreaSize, itsGnPaiInterval, ReferencePosition::latitude, ReferencePosition::longitude, m_BCFPB, m_gnAddr, m_locationTable, m_mutex, m_paramConf, m_paramGPS, m_paramNetwork, ForwardingAlgorithmResponse::macAddr(), ReferencePosition::positionConfidenceEllipse, ParameterGPS::referencePosition(), PosConfidenceEllipse::semiMajorConfidence, send(), shape_circle, shape_ellipse, shape_none, shape_rectangle, simpleForwardingAlgorithm(), ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), and GBCPacket::toHex().

Referenced by beaconPacketProcessing(), flushPB(), and shbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkUCFPB()

void GeoNet::checkUCFPB ( )
private

checkUCFPB Check to flush the unicast forawarding packet buffer.

Definition at line 3110 of file Geonet.cpp.

References UnicastForwardingPacketEntry::basicHeader(), CBFUnicast(), UnicastForwardingPacketEntry::commonHeader(), FakeGPSProvider::data(), ParameterNetwork::eh, UnicastForwardingPacketBuffer::erase(), greedy(), UnicastForwardingPacketEntry::gucPacket(), ParameterGPS::heading(), Heading::headingValue, ForwardingAlgorithmResponse::integer(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, itsGnPaiInterval, ReferencePosition::latitude, BasicHeader::lifeTime(), LifeTime::lifeTime(), ReferencePosition::longitude, UnicastForwardingPacketEntry::m_elapsed, m_gnAddr, m_mutex, m_paramConf, m_paramGPS, m_paramNetwork, m_UCFPB, ForwardingAlgorithmResponse::macAddr(), ParameterConfiguration::mid(), UnicastForwardingPacketEntry::payload(), ReferencePosition::positionConfidenceEllipse, ParameterNetwork::rawSocket, ParameterGPS::referencePosition(), PosConfidenceEllipse::semiMajorConfidence, ParameterNetwork::sendbuf, UnicastForwardingPacketEntry::sender(), BasicHeader::setLifeTime(), ParameterNetwork::socket_address, ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), GUCPacket::toHex(), BasicHeader::toHex(), CommonHeader::toHex(), UnicastForwardingPacketBuffer::ucForwardPacketBuffer(), and UnicastForwardingPacketEntry::updateSourcePacketSoPv().

Referenced by beaconPacketProcessing(), and shbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ commonHeaderProcessing()

int GeoNet::commonHeaderProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh 
)
private

commonHeaderProcessing Common Header decoding.

CommonHeader processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
Returns
The decoding result code.

Definition at line 1307 of file Geonet.cpp.

References beaconPacketProcessing(), gacPacketProcessing(), gbcPacketProcessing(), geonetError_processing_ch_headerSubType_LS_unknown, geonetError_processing_ch_headerSubType_TSB_unknown, geonetError_processing_ch_headerType, geonetError_processing_ch_hopLimit, gucPacketProcessing(), CommonHeader::headerSubType(), CommonHeader::headerSubTypeLocationService_Reply, CommonHeader::headerSubTypeLocationService_Request, CommonHeader::headerSubTypeTopologicallyScopedBroadcast_multiHop, CommonHeader::headerSubTypeTopologicallyScopedBroadcast_singleHop, CommonHeader::headerType(), CommonHeader::headerType_any, CommonHeader::headerType_beacon, CommonHeader::headerType_geoAnycast, CommonHeader::headerType_geoBroadcast, CommonHeader::headerType_geoUnicast, CommonHeader::headerType_locationService, CommonHeader::headerType_topologicallyScopedBroadcast, CommonHeader::helper_size, LSReplyPacketProcessing(), LSRequestPacketProcessing(), CommonHeader::maximumHopLimit(), BasicHeader::rhl(), BasicHeader::setRHL(), shbPacketProcessing(), and tsbPacketProcessing().

Referenced by basicHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contentionBasedForwardingAlgorithm()

ForwardingAlgorithmResponse GeoNet::contentionBasedForwardingAlgorithm ( BasicHeader  bh,
CommonHeader  ch,
GBCPacket  packet,
QByteArray  packetPayload,
e_shape  shape,
QByteArray  sender,
bool  flagSrc 
)

contentionBasedForwardingAlgorithm CBF algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GBC case).
packetPayloadPayload of the packet.
shapeArea shape
senderThe sender.
flagSrcAm I the sender?
Returns
The result of the algorithm

Definition at line 2705 of file Geonet.cpp.

References CBFPacketBuffer::addPacket(), DestinationArea::angle(), circAtLat(), FakeGPSProvider::data(), GBCPacket::destinationArea(), diameter(), dist(), DestinationArea::distanceA(), DestinationArea::distanceB(), CBFPacketBuffer::erase(), f(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, ForwardingAlgorithmResponse_PR_Integer, DestinationArea::geoAreaPosLatitude(), DestinationArea::geoAreaPosLongitude(), LongPositionVector::gnAddr(), greedy(), CBFPacketBuffer::isDuplicateTimestamp(), itsGnGeoBroadcastCbfMaxTime, LAT2METER, ReferencePosition::latitude, LongPositionVector::latitude(), ReferencePosition::longitude, LongPositionVector::longitude(), LocationTableEntry::longPositionVector(), m_CBFPB, m_gnAddr, m_locationTable, m_mutexLocT, m_paramGPS, MAC_ADDR_SIZE, GnAddr::mid(), ParameterGPS::referencePosition(), ForwardingAlgorithmResponse::setInteger(), ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), shape_circle, GBCPacket::soPv(), TO_CBF_GBC(), and GnAddr::toHex().

Referenced by checkBCFPB(), gbcPacketProcessing(), and sendGBC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute

void GeoNet::execute ( )
slot

execute Slot used to execute the Beacon creation and sending.

Definition at line 180 of file Geonet.cpp.

References itsGnBeaconServiceMaxJitter, itsGnBeaconServiceRetransmitTimer, m_beacon, m_mutex, m_mutexLocT, and sendBeacon().

Here is the call graph for this function:

◆ flushLSPB()

void GeoNet::flushLSPB ( GnAddr  destination)
private

flushLSPB Flush LS packet buffer.

Parameters
destinationThe destination to flush.

Definition at line 3078 of file Geonet.cpp.

References LocationServicePacketEntry::destination(), LifeTime::lifeTime(), LocationServicePacketBuffer::lsPacketBuffer(), m_LSPB, m_paramGPS, gnDataRequest_s::maximumPacketLifeTime, LocationServicePacketBuffer::nbLSForwardingPacketQueued, LocationServicePacketEntry::packet(), LocationServicePacketBuffer::remove(), sendGUC(), LifeTime::setMultiplierBase(), FakeGPSProvider::timestamp(), and LocationServicePacketEntry::timestamp().

Referenced by flushPB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flushPB()

void GeoNet::flushPB ( GnAddr  destination)
private

flushPB Flush buffer.

Parameters
destinationThe destination to flush.

Definition at line 3071 of file Geonet.cpp.

References checkBCFPB(), flushLSPB(), and flushUCFPB().

Referenced by gacPacketProcessing(), gbcPacketProcessing(), gucPacketProcessing(), LSReplyPacketProcessing(), LSRequestPacketProcessing(), and tsbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flushUCFPB()

void GeoNet::flushUCFPB ( GnAddr  destination)
private

flushUCFPB Flush unicast forawarding packet buffer.

Parameters
destinationThe destination to flush.

Definition at line 3192 of file Geonet.cpp.

References CBFUnicast(), FakeGPSProvider::data(), ParameterNetwork::eh, UnicastForwardingPacketBuffer::erase(), greedy(), ParameterGPS::heading(), Heading::headingValue, ForwardingAlgorithmResponse::integer(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, itsGnPaiInterval, ReferencePosition::latitude, ReferencePosition::longitude, m_gnAddr, m_mutex, m_paramConf, m_paramGPS, m_paramNetwork, m_UCFPB, ForwardingAlgorithmResponse::macAddr(), ParameterConfiguration::mid(), ReferencePosition::positionConfidenceEllipse, ParameterNetwork::rawSocket, ParameterGPS::referencePosition(), PosConfidenceEllipse::semiMajorConfidence, ParameterNetwork::sendbuf, ParameterNetwork::socket_address, ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), and UnicastForwardingPacketBuffer::ucForwardPacketBuffer().

Referenced by flushPB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gacPacketProcessing()

int GeoNet::gacPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

gacPacketProcessing GAC Header decoding.

GACPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 1755 of file Geonet.cpp.

References CBFUnicast(), Manager::changeMID(), circAtLat(), FakeGPSProvider::data(), diameter(), ParameterNetwork::eh, sniff_ethernet_s::ether_dhost, sniff_ethernet_s::ether_shost, GBCPacket::extract(), f(), flushPB(), gen2fac, geonetError_forward_gac_areaSize, geonetError_forward_gac_bufferedPacket, geonetError_forward_gac_destinationAddress, geonetError_forward_gac_discardedPacket, geonetError_forward_gac_noAreaLineForwarding, geonetError_processing_gac_DAD, geonetError_processing_gac_DPD, geonetError_success, get_UINT16(), greedy(), CommonHeader::headerSubType(), CommonHeader::headerSubTypeGeoBroadcast_circle, CommonHeader::headerSubTypeGeoBroadcast_ellipse, CommonHeader::headerSubTypeGeoBroadcast_rectangle, GBCPacket::helper_size, GnAddr::helper_size, ForwardingAlgorithmResponse::integer(), ParameterNetwork::internalBTPPort(), isDuplicatePacketDetectionTimestampSN(), HistoryPacketBuffer::isDuplicateTimestamp(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), ParameterConfiguration::itsGnGeoAreaLineForwarding(), ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, itsGnMaxGeoAreaSize, LAT2METER, ReferencePosition::latitude, ReferencePosition::longitude, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_paramGPS, m_paramNetwork, m_RP, ForwardingAlgorithmResponse::macAddr(), GnAddr::mid(), GnAddr::MStationTypeCountryCode(), CommonHeader::payloadLength(), ParameterGPS::referencePosition(), BasicHeader::rhl(), send(), sendEventIndicationToUT(), shape_circle, shape_ellipse, shape_none, shape_rectangle, CommonHeader::toHex(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gbcPacketProcessing()

int GeoNet::gbcPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

gbcPacketProcessing GBC Header decoding.

GBCPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 1934 of file Geonet.cpp.

References advancedForwarding(), Manager::changeMID(), circAtLat(), contentionBasedForwardingAlgorithm(), FakeGPSProvider::data(), diameter(), ParameterNetwork::eh, sniff_ethernet_s::ether_dhost, sniff_ethernet_s::ether_shost, GBCPacket::extract(), f(), flushPB(), gen2fac, geonetError_forward_gbc_areaSize, geonetError_forward_gbc_bufferedPacket, geonetError_forward_gbc_destinationAddress, geonetError_forward_gbc_discardedPacket, geonetError_processing_gbc_DAD, geonetError_processing_gbc_DPD, geonetError_success, get_UINT16(), CommonHeader::headerSubType(), CommonHeader::headerSubTypeGeoBroadcast_circle, CommonHeader::headerSubTypeGeoBroadcast_ellipse, CommonHeader::headerSubTypeGeoBroadcast_rectangle, GBCPacket::helper_size, GnAddr::helper_size, ForwardingAlgorithmResponse::integer(), ParameterNetwork::internalBTPPort(), isDuplicatePacketDetectionTimestampSN(), HistoryPacketBuffer::isDuplicateTimestamp(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), ParameterConfiguration::itsGnGeoBroadcastForwardingAlgorithm(), itsGnGeoBroadcastForwardingAlgorithm_advanced, itsGnGeoBroadcastForwardingAlgorithm_CBF, itsGnGeoBroadcastForwardingAlgorithm_simple, itsGnGeoBroadcastForwardingAlgorithm_unspecified, ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, itsGnMaxGeoAreaSize, LAT2METER, ReferencePosition::latitude, ReferencePosition::longitude, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_paramGPS, m_paramNetwork, m_RP, ForwardingAlgorithmResponse::macAddr(), GnAddr::mid(), GnAddr::MStationTypeCountryCode(), CommonHeader::payloadLength(), ParameterGPS::referencePosition(), BasicHeader::rhl(), send(), sendEventIndicationToUT(), shape_circle, shape_ellipse, shape_none, shape_rectangle, simpleForwardingAlgorithm(), CommonHeader::toHex(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSecuredPayload()

QByteArray GeoNet::getSecuredPayload ( QByteArray  payload,
BasicHeader  bh 
)
private

getSecuredPayload Send payload to secure to the HSM.jar.

Parameters
payloadThe payload to secure.
bhThe Basic Header to append.
Returns
The secured payload.

Definition at line 3461 of file Geonet.cpp.

References SecurityManager::certificate(), decode_Certificate(), m_securityManager, SecurityProfile::securityProfile_cam, SecurityManager::signPayload(), and BasicHeader::toHex().

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ greedy() [1/5]

ForwardingAlgorithmResponse GeoNet::greedy ( BasicHeader  bh,
CommonHeader  ch,
GACPacket  packet,
QByteArray  payload,
QByteArray  sender,
uchar *  destination,
uchar *  forwarder 
)

greedy Greedy algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GAC case).
payloadPayload of the packet.
senderThe sender.
destinationThe destination of the packet.
forwarderThe packet forwarder.
Returns
The result of the algorithm.

Definition at line 2512 of file Geonet.cpp.

Referenced by advancedForwarding(), checkUCFPB(), contentionBasedForwardingAlgorithm(), flushUCFPB(), gacPacketProcessing(), greedy(), gucPacketProcessing(), LSReplyPacketProcessing(), LSRequestPacketProcessing(), sendGAC(), sendGUC(), and simpleForwardingAlgorithm().

Here is the caller graph for this function:

◆ greedy() [2/5]

ForwardingAlgorithmResponse GeoNet::greedy ( BasicHeader  bh,
CommonHeader  ch,
GBCPacket  packet,
QByteArray  payload,
QByteArray  sender,
uchar *  destination,
uchar *  forwarder 
)

greedy Greedy algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GBC case).
payloadPayload of the packet.
senderThe sender.
destinationThe destination of the packet.
forwarderThe packet forwarder.
Returns
The result of the algorithm.

Definition at line 2515 of file Geonet.cpp.

References greedy().

Here is the call graph for this function:

◆ greedy() [3/5]

ForwardingAlgorithmResponse GeoNet::greedy ( BasicHeader  bh,
CommonHeader  ch,
GUCPacket  packet,
QByteArray  payload,
QByteArray  sender 
)

greedy Greedy algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GUC case).
payloadPayload of the packet.
senderThe sender.
Returns
The result of the algorithm.

Definition at line 2518 of file Geonet.cpp.

References greedy().

Here is the call graph for this function:

◆ greedy() [4/5]

ForwardingAlgorithmResponse GeoNet::greedy ( BasicHeader  bh,
CommonHeader  ch,
LSReplyPacket  packet,
QByteArray  sender 
)

greedy Greedy algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (LSReply case).
senderThe sender.
Returns
The result of the algorithm.

Definition at line 2521 of file Geonet.cpp.

References greedy().

Here is the call graph for this function:

◆ greedy() [5/5]

ForwardingAlgorithmResponse GeoNet::greedy ( PacketBuffersEntry  packet,
QByteArray  sender 
)
private

greedy Greedy algorithm.

Parameters
packetThe packet to send.
senderThe sender.
Returns
The greedy result.

Definition at line 2524 of file Geonet.cpp.

References UnicastForwardingPacketBuffer::addPacket(), BroadcastForwardingPacketBuffer::addPacket(), PacketBuffersEntry::basicHeader(), PacketBuffersEntry::commonHeader(), FakeGPSProvider::data(), GUCPacket::dePv(), PacketBuffersEntry::destination(), GBCPacket::destinationArea(), dist(), PacketBuffersEntry::forwarder(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, ForwardingAlgorithmResponse_PR_Integer, PacketBuffersEntry::gacPacket(), PacketBuffersEntry::gbcPacket(), DestinationArea::geoAreaPosLatitude(), DestinationArea::geoAreaPosLongitude(), PacketBuffersEntry::gucPacket(), CommonHeader::headerSubType(), CommonHeader::headerSubTypeLocationService_Reply, CommonHeader::headerType(), CommonHeader::headerType_any, CommonHeader::headerType_geoAnycast, CommonHeader::headerType_geoBroadcast, CommonHeader::headerType_geoUnicast, CommonHeader::headerType_locationService, ReferencePosition::latitude, ShortPositionVector::latitude(), ReferencePosition::longitude, ShortPositionVector::longitude(), PacketBuffersEntry::lsReplyPacket(), m_BCFPB, m_locationTable, m_mutexLocT, m_paramGPS, m_UCFPB, MAC_ADDR_SIZE, PacketBuffersEntry::payload(), ParameterGPS::referencePosition(), TrafficClass::SCF(), ForwardingAlgorithmResponse::setInteger(), ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), and CommonHeader::trafficClass().

Here is the call graph for this function:

◆ gucPacketProcessing()

int GeoNet::gucPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

gucPacketProcessing GUC Header decoding.

GUCPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 2128 of file Geonet.cpp.

References CBFUnicast(), Manager::changeMID(), ParameterNetwork::eh, GUCPacket::extract(), flushPB(), gen2fac, geonetError_forward_guc_bufferedPacket, geonetError_forward_guc_destinationAddress, geonetError_forward_guc_discardedPacket, geonetError_processing_guc_DAD, geonetError_processing_guc_DPD, geonetError_success, get_UINT16(), greedy(), GUCPacket::helper_size, GnAddr::helper_size, ForwardingAlgorithmResponse::integer(), ParameterNetwork::internalBTPPort(), isDuplicatePacketDetectionTimestampSN(), HistoryPacketBuffer::isDuplicateTimestamp(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), itsGnGeoBroadcastForwardingAlgorithm_simple, itsGnGeoBroadcastForwardingAlgorithm_unspecified, ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_paramNetwork, m_RP, ForwardingAlgorithmResponse::macAddr(), GnAddr::mid(), GnAddr::MStationTypeCountryCode(), BasicHeader::nextHeader(), CommonHeader::payloadLength(), BasicHeader::rhl(), send(), sendEventIndicationToUT(), CommonHeader::toHex(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hybridSend()

int GeoNet::hybridSend ( QByteArray  payload)
private

hybridSend Send packet with the hybridization.

Parameters
payloadThe payload to send.
Returns
The sending result code.

Definition at line 1204 of file Geonet.cpp.

References hybridError_send, hybridError_success, m_paramHybrid, m_sslSocket, m_tcpSocket, ParameterHybrid::serverAddress(), ParameterHybrid::serverPort(), and ParameterHybrid::sslUsed().

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initGeoNetErrors()

void GeoNet::initGeoNetErrors ( )
private

initGeoNetErrors Set the debugging print.

Definition at line 265 of file Geonet.cpp.

References geonetError_forward_gac_areaSize, geonetError_forward_gac_bufferedPacket, geonetError_forward_gac_destinationAddress, geonetError_forward_gac_discardedPacket, geonetError_forward_gac_noAreaLineForwarding, geonetError_forward_gbc_areaSize, geonetError_forward_gbc_bufferedPacket, geonetError_forward_gbc_destinationAddress, geonetError_forward_gbc_discardedPacket, geonetError_forward_guc_bufferedPacket, geonetError_forward_guc_destinationAddress, geonetError_forward_guc_discardedPacket, geonetError_forward_LSReply_bufferedPacket, geonetError_forward_LSReply_destinationAddress, geonetError_forward_LSReply_discardedPacket, geonetError_forward_tsb_bufferedPacket, geonetError_forward_tsb_unknownCommunicationProfile, geonetError_processing_beacon_DAD, geonetError_processing_beacon_DPD, geonetError_processing_bh_gnProtocolVersion, geonetError_processing_bh_nextHeader, geonetError_processing_bh_securedHeader, geonetError_processing_ch_headerSubType_LS_unknown, geonetError_processing_ch_headerSubType_TSB_unknown, geonetError_processing_ch_headerType, geonetError_processing_ch_hopLimit, geonetError_processing_gac_DAD, geonetError_processing_gac_DPD, geonetError_processing_gbc_DAD, geonetError_processing_gbc_DPD, geonetError_processing_guc_DAD, geonetError_processing_guc_DPD, geonetError_processing_LSReply_DAD, geonetError_processing_LSReply_DPD, geonetError_processing_LSRequest_DAD, geonetError_processing_LSRequest_DPD, geonetError_processing_shb_DAD, geonetError_processing_shb_DPD, geonetError_processing_tsb_DAD, geonetError_processing_tsb_DPD, geonetError_send_ch_headerSubType_geoAnycast_unknown, geonetError_send_ch_headerSubType_geoBroadcast_unknown, geonetError_send_ch_headerSubType_TSB_unknown, geonetError_send_ch_headerType, geonetError_send_gac_areaSize, geonetError_send_gac_broadcast_bufferedPacket, geonetError_send_gac_broadcast_discardedPacket, geonetError_send_gac_destinationAddress, geonetError_send_gac_noAreaLineForwarding, geonetError_send_gac_noDestinationArea, geonetError_send_gac_unicast_bufferedPacket, geonetError_send_gac_unicast_discardedPacket, geonetError_send_gac_unknownCommunicationProfile, geonetError_send_gbc_areaSize, geonetError_send_gbc_bufferedPacket, geonetError_send_gbc_destinationAddress, geonetError_send_gbc_discardedPacket, geonetError_send_gbc_noDestinationArea, geonetError_send_gbc_unknownCommunicationProfile, geonetError_send_guc_bufferedPacket, geonetError_send_guc_destinationAddress, geonetError_send_guc_discardedPacket, geonetError_send_guc_noMID, geonetError_send_guc_unknownCommunicationProfile, geonetError_send_LSReply_bufferedPacket, geonetError_send_LSReply_destinationAddress, geonetError_send_LSReply_destinationUnknown, geonetError_send_LSReply_discardedPacket, geonetError_send_LSRequest_buffered, geonetError_send_LSRequest_noResponse, geonetError_send_LSRequest_successfullyRespond, geonetError_send_shb_bufferedPacket, geonetError_send_shb_unknownCommunicationProfile, geonetError_send_tsb_bufferedPacket, geonetError_send_tsb_unknownCommunicationProfile, geonetError_success, geonetErrors, itsGnProtocolVersion, tmp_geonetError_send_gac_securedPacket, tmp_geonetError_send_gbc_securedPacket, tmp_geonetError_send_guc_MIDNotFound, tmp_geonetError_send_guc_securedPacket, tmp_geonetError_send_LSReply_securedPacket, tmp_geonetError_send_LSRequest_securedPacket, tmp_geonetError_send_shb_securedPacket, and tmp_geonetError_send_tsb_securedPacket.

Referenced by GeoNet().

Here is the caller graph for this function:

◆ initHybridSocket()

void GeoNet::initHybridSocket ( )
private

initHybridSocket Set the hybridization sockets.

Definition at line 103 of file Geonet.cpp.

References m_paramHybrid, m_tcpSocket, packetReceived(), setupSecureSocket(), setupUnsecureSocket(), ParameterHybrid::sslUsed(), and treatPackets().

Referenced by GeoNet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitRawSocket_send()

int GeoNet::InitRawSocket_send ( )
private

InitRawSocket_send Set the ITS-G5 socket.

Returns
True on success.

Definition at line 387 of file Geonet.cpp.

References BUF_SIZ, ParameterNetwork::eh, Manager::hashMap, ParameterNetwork::if_idx, ParameterNetwork::ifName, ParameterConfiguration::interface(), m_manager, m_paramConf, m_paramNetwork, networkError_rawsocket_open, networkError_rawsocket_siocgifindex, networkError_success, ParameterNetwork::rawSocket, ParameterNetwork::sendbuf, and ParameterNetwork::socket_address.

Referenced by GeoNet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lpvSent

void GeoNet::lpvSent ( )
signal

lpvSent Signal used when a packet containing an LPV is sent.

Referenced by GeoNet().

Here is the caller graph for this function:

◆ lpvUpdate

void GeoNet::lpvUpdate ( )
slot

lpvUpdate Slot used when a packet containing an LPV is sent.

Definition at line 260 of file Geonet.cpp.

References m_beacon.

Referenced by GeoNet(), and send().

Here is the caller graph for this function:

◆ LSReplyPacketProcessing()

int GeoNet::LSReplyPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

LSReplyProcessing LSReply Header decoding.

LSReplyPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 1607 of file Geonet.cpp.

References Manager::changeMID(), GUCPacket::dePv(), ParameterNetwork::eh, GUCPacket::extract(), flushPB(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, geonetError_forward_LSReply_bufferedPacket, geonetError_forward_LSReply_destinationAddress, geonetError_forward_LSReply_discardedPacket, geonetError_processing_LSReply_DAD, geonetError_processing_LSReply_DPD, geonetError_success, ShortPositionVector::gnAddr(), LongPositionVector::gnAddr(), greedy(), GnAddr::helper_size, ForwardingAlgorithmResponse::integer(), isDuplicatePacketDetectionTimestampSN(), HistoryPacketBuffer::isDuplicateTimestamp(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_paramNetwork, m_RP, MAC_ADDR_SIZE, ForwardingAlgorithmResponse::macAddr(), GnAddr::mid(), GnAddr::MStationTypeCountryCode(), BasicHeader::rhl(), send(), GUCPacket::sequenceNumber(), ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), GUCPacket::soPv(), GnAddr::stationType(), LongPositionVector::timestamp(), GUCPacket::toHex(), GnAddr::toHex(), CommonHeader::toHex(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LSRequestPacketProcessing()

int GeoNet::LSRequestPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

LSRequestPacketProcessing LSRequest Header decoding.

LSRequestPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 1426 of file Geonet.cpp.

References LifeTime::base_1_s, Manager::changeMID(), FakeGPSProvider::data(), FakeApplicationProvider::data(), LSRequestPacket::destination(), ParameterNetwork::eh, LSRequestPacket::extract(), flushPB(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, gen2fac, geonetError_processing_LSRequest_DAD, geonetError_processing_LSRequest_DPD, geonetError_send_LSReply_bufferedPacket, geonetError_send_LSReply_destinationAddress, geonetError_send_LSReply_destinationUnknown, geonetError_send_LSReply_discardedPacket, geonetError_success, get_UINT16(), LongPositionVector::gnAddr(), greedy(), CommonHeader::headerSubTypeLocationService_Reply, CommonHeader::headerType_locationService, ParameterGPS::heading(), Heading::headingValue, LSRequestPacket::helper_size, GnAddr::helper_size, ForwardingAlgorithmResponse::integer(), ParameterNetwork::internalBTPPort(), isDuplicatePacketDetectionTimestampSN(), HistoryPacketBuffer::isDuplicateTimestamp(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), itsGnDefaultHopLimit, ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, ParameterApplication::itsGnIsMobile(), ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, ReferencePosition::latitude, ReferencePosition::longitude, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramAppli, m_paramConf, m_paramGPS, m_paramNetwork, m_RP, MAC_ADDR_SIZE, ForwardingAlgorithmResponse::macAddr(), GnAddr::mid(), GnAddr::MStationTypeCountryCode(), networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, CommonHeader::nextHeaderType_any, CommonHeader::payloadLength(), ReferencePosition::positionConfidenceEllipse, ParameterGPS::referencePosition(), BasicHeader::rhl(), PosConfidenceEllipse::semiMajorConfidence, send(), sendEventIndicationToUT(), TSBPacket::sequenceNumber(), sequenceNumber, ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), TSBPacket::soPv(), ParameterGPS::speed(), Speed::speedValue, GnAddr::stationType(), FakeGPSProvider::timestamp(), LongPositionVector::timestamp(), LSRequestPacket::toHex(), GUCPacket::toHex(), GnAddr::toHex(), CommonHeader::toHex(), ParameterConfiguration::trafficClass(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lsRetransmit

int GeoNet::lsRetransmit ( GnAddr  destination,
QByteArray  lsRequestData,
BasicHeader  bh 
)
slot

lsRetransmit Retransmission of an LSRequest.

Parameters
destinationThe destination.
lsRequestDataThe data to send the LSRequest.
bhThe Basic Header.
Returns
The retransmission success or failure code.

Definition at line 459 of file Geonet.cpp.

References ParameterNetwork::eh, LocationServicePacketBuffer::erase(), geonetError_send_LSRequest_noResponse, geonetError_send_LSRequest_successfullyRespond, itsGnLocationServiceMaxRetrans, itsGnLocationServiceRetransmitTimer, m_locationTable, m_LSPB, m_lsRetransmission, m_mutexLocT, m_paramNetwork, send(), and GnAddr::toHex().

Referenced by sendLsRequest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ packetReceived

void GeoNet::packetReceived ( QByteArray  )
signal

packetReceived Signal used when a packet is received.

Referenced by GeoNet(), initHybridSocket(), and socketReadyRead().

Here is the caller graph for this function:

◆ send() [1/2]

int GeoNet::send ( gnDataRequest_t  gnDR)

send Creates the BTP and then select the correct packet send option.

Parameters
gnDRGN Data Request to set the sending.
Returns
The sending success or error code.

Definition at line 497 of file Geonet.cpp.

References gnDataRequest_s::destinationPort, gnDataRequest_s::destinationPortInfo, format(), geonetError_send_ch_headerSubType_geoAnycast_unknown, geonetError_send_ch_headerSubType_geoBroadcast_unknown, geonetError_send_ch_headerSubType_TSB_unknown, geonetError_send_ch_headerType, CommonHeader::headerSubTypeGeoAnycast_circle, CommonHeader::headerSubTypeGeoAnycast_ellipse, CommonHeader::headerSubTypeGeoAnycast_rectangle, CommonHeader::headerSubTypeGeoBroadcast_circle, CommonHeader::headerSubTypeGeoBroadcast_ellipse, CommonHeader::headerSubTypeGeoBroadcast_rectangle, CommonHeader::headerSubTypeTopologicallyScopedBroadcast_multiHop, CommonHeader::headerSubTypeTopologicallyScopedBroadcast_singleHop, CommonHeader::headerType_beacon, CommonHeader::headerType_geoAnycast, CommonHeader::headerType_geoBroadcast, CommonHeader::headerType_geoUnicast, CommonHeader::headerType_topologicallyScopedBroadcast, gnDataRequest_s::packetTransportSubType, gnDataRequest_s::packetTransportType, gnDataRequest_s::payload, sendGAC(), sendGBC(), sendGUC(), sendSHB(), sendTSB(), and verifLocT().

Referenced by checkBCFPB(), gacPacketProcessing(), gbcPacketProcessing(), gucPacketProcessing(), LSReplyPacketProcessing(), LSRequestPacketProcessing(), lsRetransmit(), caBasicService::PassCamToNetworkAndTransportLayer(), denKAFManagement::PassDenmToNetworkAndTransportLayerTrigger(), denTriggeringManagement::PassDenmToNetworkAndTransportLayerTrigger(), denReceptionManagement::PassDenmToNetworkAndTransportLayerTrigger(), sendBeacon(), UpperTester::sendGAC(), sendGAC(), UpperTester::sendGBC(), sendGBC(), UpperTester::sendGUC(), sendGUC(), sendPacketFromRPB(), UpperTester::sendSHB(), sendSHB(), UpperTester::sendTSB(), sendTSB(), and tsbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send() [2/2]

int GeoNet::send ( QByteArray  payloadToSend,
bool  containLPV,
BasicHeader  bh 
)

send Adds security layer if needed and send packet.

BasicHeader creation

Parameters
payloadToSendThe payload to send.
containLPVDoes the packet containing LPV ?
bhThe Basic Header.
Returns
The sending success or error code.

Definition at line 1157 of file Geonet.cpp.

References ParameterNetwork::eh, getSecuredPayload(), hybridError_success, hybridSend(), ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, lpvUpdate(), m_geonetFlag, m_hybridFlag, m_paramConf, m_paramNetwork, m_tcpSocket, ParameterConfiguration::mid(), networkError_rawsocket_send, networkError_success, ParameterNetwork::rawSocket, ParameterNetwork::sendbuf, ParameterNetwork::socket_address, and BasicHeader::toHex().

Here is the call graph for this function:

◆ sendBeacon

◆ sendEventIndicationToUT()

void GeoNet::sendEventIndicationToUT ( uchar *  packetFull,
int  packetLen 
)
private

sendEventIndicationToUT Send decoding success notification to the UpperTester.

Parameters
packetFullThe packet.
packetLenThe packet length.

Definition at line 442 of file Geonet.cpp.

References gen2ut, m_paramUpperTester, UpperTesterPrimitives::PRIMITIVE_utGnEventInd, and ParameterUpperTester::upperTesterEventIndicationListenPort().

Referenced by gacPacketProcessing(), gbcPacketProcessing(), gucPacketProcessing(), LSRequestPacketProcessing(), shbPacketProcessing(), and tsbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendGAC()

int GeoNet::sendGAC ( gnDataRequest_t  gnDR)
private

sendGAC Send an LSRequest.

GACPacket creation

Parameters
gnDRThe GN Data Request to create the GAC.
Returns
The GAC sending or failure code.

Definition at line 665 of file Geonet.cpp.

References RepetitionPacketBuffer::addPacket(), HistoryPacketBuffer::addPacket(), advancedForwarding(), LifeTime::base_1_s, destinationAddress_s::choice, circAtLat(), FakeGPSProvider::data(), FakeApplicationProvider::data(), gnDataRequest_s::destinationAddress, destinationAddress_PR_DestinationArea, destinationAddress_s::destinationArea, diameter(), ParameterNetwork::eh, f(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, geonetError_send_gac_areaSize, geonetError_send_gac_broadcast_bufferedPacket, geonetError_send_gac_broadcast_discardedPacket, geonetError_send_gac_destinationAddress, geonetError_send_gac_noAreaLineForwarding, geonetError_send_gac_noDestinationArea, geonetError_send_gac_unicast_bufferedPacket, geonetError_send_gac_unicast_discardedPacket, geonetError_send_gac_unknownCommunicationProfile, gnDataRequest_s::gnCommunicationProfile, gnCommunicationProfile_ITS_G5A, greedy(), CommonHeader::headerSubType(), CommonHeader::headerSubTypeGeoBroadcast_circle, CommonHeader::headerSubTypeGeoBroadcast_ellipse, CommonHeader::headerSubTypeGeoBroadcast_rectangle, ParameterGPS::heading(), Heading::headingValue, itsGnDefaultHopLimit, ParameterConfiguration::itsGnGeoBroadcastForwardingAlgorithm(), itsGnGeoBroadcastForwardingAlgorithm_advanced, itsGnGeoBroadcastForwardingAlgorithm_CBF, itsGnGeoBroadcastForwardingAlgorithm_simple, itsGnGeoBroadcastForwardingAlgorithm_unspecified, ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, ParameterApplication::itsGnIsMobile(), itsGnMaxGeoAreaSize, itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, LAT2METER, ReferencePosition::latitude, ReferencePosition::longitude, m_gnAddr, m_HPB, m_paramAppli, m_paramConf, m_paramGPS, m_paramNetwork, m_RPB, MAC_ADDR_SIZE, gnDataRequest_s::maximumHopLimit, gnDataRequest_s::maximumPacketLifeTime, gnDataRequest_s::maximumRepetitionTime, GnAddr::mid(), networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, gnDataRequest_s::packetTransportSubType, gnDataRequest_s::packetTransportType, gnDataRequest_s::payload, ReferencePosition::positionConfidenceEllipse, destinationAddress_s::present, ParameterGPS::referencePosition(), gnDataRequest_s::repetitionInterval, PosConfidenceEllipse::semiMajorConfidence, send(), sequenceNumber, shape_circle, shape_ellipse, shape_none, shape_rectangle, simpleForwardingAlgorithm(), ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), CommonHeader::toHex(), gnDataRequest_s::trafficClass, and gnDataRequest_s::upperProtocolEntity.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendGBC()

int GeoNet::sendGBC ( gnDataRequest_t  gnDR)
private

sendGBC Send an LSRequest.

GBCPacket creation

Parameters
gnDRThe GN Data Request to create the GBC.
Returns
The GAC sending or failure code.

Definition at line 815 of file Geonet.cpp.

References RepetitionPacketBuffer::addPacket(), HistoryPacketBuffer::addPacket(), advancedForwarding(), LifeTime::base_1_s, destinationAddress_s::choice, contentionBasedForwardingAlgorithm(), FakeGPSProvider::data(), FakeApplicationProvider::data(), gnDataRequest_s::destinationAddress, destinationAddress_PR_DestinationArea, destinationAddress_s::destinationArea, ParameterNetwork::eh, geonetError_send_gbc_areaSize, geonetError_send_gbc_bufferedPacket, geonetError_send_gbc_destinationAddress, geonetError_send_gbc_discardedPacket, geonetError_send_gbc_noDestinationArea, geonetError_send_gbc_unknownCommunicationProfile, gnDataRequest_s::gnCommunicationProfile, gnCommunicationProfile_ITS_G5A, CommonHeader::headerSubType(), CommonHeader::headerSubTypeGeoBroadcast_circle, CommonHeader::headerSubTypeGeoBroadcast_ellipse, CommonHeader::headerSubTypeGeoBroadcast_rectangle, ParameterGPS::heading(), Heading::headingValue, ForwardingAlgorithmResponse::integer(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), itsGnDefaultHopLimit, ParameterConfiguration::itsGnGeoBroadcastForwardingAlgorithm(), itsGnGeoBroadcastForwardingAlgorithm_advanced, itsGnGeoBroadcastForwardingAlgorithm_CBF, itsGnGeoBroadcastForwardingAlgorithm_simple, itsGnGeoBroadcastForwardingAlgorithm_unspecified, ParameterApplication::itsGnIsMobile(), itsGnMaxGeoAreaSize, itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, ReferencePosition::latitude, ReferencePosition::longitude, m_gnAddr, m_HPB, m_paramAppli, m_paramConf, m_paramGPS, m_paramNetwork, m_RPB, ForwardingAlgorithmResponse::macAddr(), gnDataRequest_s::maximumHopLimit, gnDataRequest_s::maximumPacketLifeTime, gnDataRequest_s::maximumRepetitionTime, GnAddr::mid(), networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, gnDataRequest_s::packetTransportSubType, gnDataRequest_s::packetTransportType, gnDataRequest_s::payload, ReferencePosition::positionConfidenceEllipse, destinationAddress_s::present, ParameterGPS::referencePosition(), gnDataRequest_s::repetitionInterval, PosConfidenceEllipse::semiMajorConfidence, send(), sequenceNumber, shape_circle, shape_ellipse, shape_none, shape_rectangle, simpleForwardingAlgorithm(), ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), CommonHeader::toHex(), gnDataRequest_s::trafficClass, and gnDataRequest_s::upperProtocolEntity.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendGUC

int GeoNet::sendGUC ( gnDataRequest_t  gnDR)
privateslot

sendGUC Send a GUC.

GUCPacket creation

Parameters
gnDRThe GN Data Request to create the GUC.
Returns
The GUC sending or failure code.

Definition at line 929 of file Geonet.cpp.

References RepetitionPacketBuffer::addPacket(), HistoryPacketBuffer::addPacket(), LifeTime::base_1_s, destinationAddress_s::choice, FakeGPSProvider::data(), FakeApplicationProvider::data(), gnDataRequest_s::destinationAddress, destinationAddress_PR_MID, ParameterNetwork::eh, ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, geonetError_send_guc_bufferedPacket, geonetError_send_guc_destinationAddress, geonetError_send_guc_discardedPacket, geonetError_send_guc_noMID, geonetError_send_guc_unknownCommunicationProfile, destinationAddress_s::gnAddr, gnDataRequest_s::gnCommunicationProfile, gnCommunicationProfile_ITS_G5A, greedy(), ParameterGPS::heading(), Heading::headingValue, ForwardingAlgorithmResponse::integer(), ForwardingAlgorithmResponse::isInteger(), ForwardingAlgorithmResponse::isMacAddr(), itsGnDefaultHopLimit, ParameterConfiguration::itsGnGeoUnicastForwardingAlgorithm(), itsGnGeoUnicastForwardingAlgorithm_CBF, itsGnGeoUnicastForwardingAlgorithm_greedy, itsGnGeoUnicastForwardingAlgorithm_unspecified, ParameterApplication::itsGnIsMobile(), itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, ReferencePosition::latitude, ReferencePosition::longitude, m_gnAddr, m_HPB, m_locationTable, m_paramAppli, m_paramConf, m_paramGPS, m_paramNetwork, m_RPB, MAC_ADDR_SIZE, ForwardingAlgorithmResponse::macAddr(), gnDataRequest_s::maximumHopLimit, gnDataRequest_s::maximumPacketLifeTime, gnDataRequest_s::maximumRepetitionTime, networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, gnDataRequest_s::packetTransportSubType, gnDataRequest_s::packetTransportType, gnDataRequest_s::payload, ReferencePosition::positionConfidenceEllipse, destinationAddress_s::present, ParameterGPS::referencePosition(), gnDataRequest_s::repetitionInterval, PosConfidenceEllipse::semiMajorConfidence, send(), sendLsRequest(), sequenceNumber, ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), GnAddr::toHex(), CommonHeader::toHex(), gnDataRequest_s::trafficClass, and gnDataRequest_s::upperProtocolEntity.

Referenced by flushLSPB(), and send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendLsRequest()

int GeoNet::sendLsRequest ( GnAddr  dest,
gnDataRequest_t  gnDR 
)
private

sendLsRequest Send an LSRequest.

LSRequest creation

Parameters
destThe GN_ADDR destination.
gnDRThe GN Data Request to create the LSRequest.
Returns
The LSRequest sending or failure code.

Definition at line 610 of file Geonet.cpp.

References LocationServicePacketBuffer::addPacket(), HistoryPacketBuffer::addPacket(), LifeTime::base_1_s, FakeGPSProvider::data(), FakeApplicationProvider::data(), geonetError_send_LSRequest_buffered, CommonHeader::headerSubTypeLocationService_Request, CommonHeader::headerType_locationService, ParameterGPS::heading(), Heading::headingValue, itsGnDefaultHopLimit, ParameterApplication::itsGnIsMobile(), itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, ReferencePosition::latitude, ReferencePosition::longitude, lsRetransmit(), m_gnAddr, m_HPB, m_locationTable, m_LSPB, m_lsRetransmission, m_paramAppli, m_paramConf, m_paramGPS, networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, ReferencePosition::positionConfidenceEllipse, ParameterGPS::referencePosition(), PosConfidenceEllipse::semiMajorConfidence, sequenceNumber, ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), GnAddr::toHex(), and ParameterConfiguration::trafficClass().

Referenced by sendGUC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendPacketFromRPB

void GeoNet::sendPacketFromRPB ( gnDataRequest_t  rawPacket)
slot

sendPacketFromRPB Slot used to send packet from repetition packet buffer.

Parameters
rawPacketThe packet to send.

Definition at line 491 of file Geonet.cpp.

References send().

Referenced by GeoNet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendSHB()

int GeoNet::sendSHB ( gnDataRequest_t  gnDR)
private

sendSHB Send an LSRequest.

GUCPacket creation SHBPacket creation

Parameters
gnDRThe GN Data Request to create the SHB.
Returns
The GAC sending or failure code.

Definition at line 1026 of file Geonet.cpp.

References RepetitionPacketBuffer::addPacket(), BroadcastForwardingPacketBuffer::addPacket(), HistoryPacketBuffer::addPacket(), LifeTime::base_1_s, FakeApplicationProvider::data(), FakeGPSProvider::data(), ParameterNetwork::eh, geonetError_send_shb_bufferedPacket, geonetError_send_shb_unknownCommunicationProfile, gnDataRequest_s::gnCommunicationProfile, gnCommunicationProfile_ITS_G5A, ParameterGPS::heading(), Heading::headingValue, ParameterApplication::itsGnIsMobile(), itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, ReferencePosition::latitude, ReferencePosition::longitude, m_BCFPB, m_gnAddr, m_HPB, m_locationTable, m_mutexLocT, m_paramAppli, m_paramConf, m_paramGPS, m_paramNetwork, m_RPB, gnDataRequest_s::maximumHopLimit, gnDataRequest_s::maximumPacketLifeTime, gnDataRequest_s::maximumRepetitionTime, networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, gnDataRequest_s::packetTransportSubType, gnDataRequest_s::packetTransportType, gnDataRequest_s::payload, ReferencePosition::positionConfidenceEllipse, ParameterGPS::referencePosition(), gnDataRequest_s::repetitionInterval, TrafficClass::SCF(), PosConfidenceEllipse::semiMajorConfidence, send(), ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), gnDataRequest_s::trafficClass, and gnDataRequest_s::upperProtocolEntity.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendTSB()

int GeoNet::sendTSB ( gnDataRequest_t  gnDR)
private

sendTSB Send an LSRequest.

TSBPacket creation

Parameters
gnDRThe GN Data Request to create the TSB.
Returns
The GAC sending or failure code.

Definition at line 1090 of file Geonet.cpp.

References RepetitionPacketBuffer::addPacket(), BroadcastForwardingPacketBuffer::addPacket(), HistoryPacketBuffer::addPacket(), LifeTime::base_1_s, FakeApplicationProvider::data(), FakeGPSProvider::data(), ParameterNetwork::eh, geonetError_send_tsb_bufferedPacket, geonetError_send_tsb_unknownCommunicationProfile, gnDataRequest_s::gnCommunicationProfile, gnCommunicationProfile_ITS_G5A, ParameterGPS::heading(), Heading::headingValue, itsGnDefaultHopLimit, ParameterApplication::itsGnIsMobile(), itsGnPaiInterval, itsGnProtocolVersion, ParameterConfiguration::itsGnSecurity(), itsGnSecurity_enabled, ReferencePosition::latitude, ReferencePosition::longitude, m_BCFPB, m_gnAddr, m_HPB, m_locationTable, m_mutexLocT, m_paramAppli, m_paramConf, m_paramGPS, m_paramNetwork, m_RPB, gnDataRequest_s::maximumHopLimit, gnDataRequest_s::maximumPacketLifeTime, gnDataRequest_s::maximumRepetitionTime, networkError_success, BasicHeader::nextHeader_commonHeader, BasicHeader::nextHeader_securedPacket, gnDataRequest_s::packetTransportSubType, gnDataRequest_s::packetTransportType, gnDataRequest_s::payload, ReferencePosition::positionConfidenceEllipse, ParameterGPS::referencePosition(), gnDataRequest_s::repetitionInterval, TrafficClass::SCF(), PosConfidenceEllipse::semiMajorConfidence, send(), sequenceNumber, ParameterGPS::speed(), Speed::speedValue, FakeGPSProvider::timestamp(), gnDataRequest_s::trafficClass, and gnDataRequest_s::upperProtocolEntity.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setupSecureSocket()

void GeoNet::setupSecureSocket ( )
private

setupSecureSocket Set SSL socket for hybridization.

Definition at line 116 of file Geonet.cpp.

References m_paramHybrid, m_sslSocket, m_tcpSocket, ParameterHybrid::serverAddress(), ParameterHybrid::serverPort(), socketError(), socketReadyRead(), and sslErrors().

Referenced by initHybridSocket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setupUnsecureSocket()

void GeoNet::setupUnsecureSocket ( )
private

setupUnsecureSocket Set TCP socket for hybridization.

Definition at line 159 of file Geonet.cpp.

References m_paramHybrid, m_tcpSocket, ParameterHybrid::serverAddress(), ParameterHybrid::serverPort(), socketError(), and socketReadyRead().

Referenced by initHybridSocket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shbPacketProcessing()

int GeoNet::shbPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

shbPacketProcessing SHB Header decoding.

SHBPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 2302 of file Geonet.cpp.

References calculAngleThreshold(), Manager::changeMID(), checkBCFPB(), checkUCFPB(), sniff_ethernet_s::ether_shost, SHBPacket::extract(), gen2fac, geonetError_processing_shb_DAD, geonetError_processing_shb_DPD, geonetError_success, get_UINT16(), LongPositionVector::gnAddr(), SHBPacket::helper_size, GnAddr::helper_size, ParameterNetwork::internalBTPPort(), isDuplicatePacketDetectionTimestamp(), HistoryPacketBuffer::isDuplicateTimestamp(), ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_paramNetwork, m_RP, GnAddr::mid(), GnAddr::MStationTypeCountryCode(), CommonHeader::payloadLength(), sendEventIndicationToUT(), SHBPacket::soPv(), GnAddr::stationType(), LongPositionVector::timestamp(), GnAddr::toHex(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simpleForwardingAlgorithm()

ForwardingAlgorithmResponse GeoNet::simpleForwardingAlgorithm ( BasicHeader  bh,
CommonHeader  ch,
GBCPacket  packet,
QByteArray  packetPayload,
e_shape  shape,
QByteArray  sender,
bool  flagSrc 
)

simpleForwardingAlgorithm Simple algorithm.

Parameters
bhBasic Header.
chCommon Header.
packetPacket (GBC case).
packetPayloadPayload of the packet.
shapeArea shape
senderThe sender.
flagSrcAm I the sender?
Returns
The result of the algorithm

Definition at line 2627 of file Geonet.cpp.

References DestinationArea::angle(), circAtLat(), FakeGPSProvider::data(), GBCPacket::destinationArea(), diameter(), DestinationArea::distanceA(), DestinationArea::distanceB(), f(), ForwardingAlgorithmResponse_PR_ForwardingAlgorithmResponseMacAddress, ForwardingAlgorithmResponse_PR_Integer, DestinationArea::geoAreaPosLatitude(), DestinationArea::geoAreaPosLongitude(), greedy(), LAT2METER, ReferencePosition::latitude, LongPositionVector::latitude(), ReferencePosition::longitude, LongPositionVector::longitude(), LocationTableEntry::longPositionVector(), m_gnAddr, m_locationTable, m_paramGPS, MAC_ADDR_SIZE, GnAddr::mid(), ParameterGPS::referencePosition(), ForwardingAlgorithmResponse::setInteger(), ForwardingAlgorithmResponse::setMacAddr(), ForwardingAlgorithmResponse::setPresent(), and shape_circle.

Referenced by checkBCFPB(), gbcPacketProcessing(), sendGAC(), and sendGBC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ socketError()

void GeoNet::socketError ( QAbstractSocket::SocketError  )
private

socketError Print TCP socket error.

Definition at line 142 of file Geonet.cpp.

References m_tcpSocket.

Referenced by setupSecureSocket(), and setupUnsecureSocket().

Here is the caller graph for this function:

◆ socketReadyRead

void GeoNet::socketReadyRead ( )
privateslot

socketReadyRead Slot used when socket is ready to read.

Definition at line 147 of file Geonet.cpp.

References m_tcpSocket, and packetReceived().

Referenced by setupSecureSocket(), and setupUnsecureSocket().

Here is the caller graph for this function:

◆ sslErrors()

void GeoNet::sslErrors ( const QList< QSslError > &  errors)
private

sslErrors Print SSL errors.

Parameters
errorsThe errors.

Definition at line 129 of file Geonet.cpp.

References m_hybridFlag, and m_tcpSocket.

Referenced by setupSecureSocket().

Here is the caller graph for this function:

◆ TO_CBF_GBC()

int GeoNet::TO_CBF_GBC ( int  distance)
private

TO_CBF_GBC TO_CBF_GBC computation.

Parameters
distanceThe distance to the destination.
Returns
TO_CBF_GBC.

Definition at line 2496 of file Geonet.cpp.

References itsGnDefaultMaxCommunicationRange, itsGnGeoBroadcastCbfMaxTime, and itsGnGeoBroadcastCbfMinTime.

Referenced by advancedForwarding(), and contentionBasedForwardingAlgorithm().

Here is the caller graph for this function:

◆ TO_CBF_GUC()

int GeoNet::TO_CBF_GUC ( int  distance)
private

TO_CBF_GUC TO_CBF_GUC computation.

Parameters
distanceThe distance to the destination.
Returns
TO_CBF_GUC.

Definition at line 2504 of file Geonet.cpp.

References itsGnDefaultMaxCommunicationRange, itsGnGeoBroadcastCbfMaxTime, and itsGnGeoBroadcastCbfMinTime.

Referenced by CBFUnicast().

Here is the caller graph for this function:

◆ treatPackets

void GeoNet::treatPackets ( QByteArray  rawPacket)
slot

treatPackets Slot used to treat received packets.

Ethernet processing

Definition at line 1248 of file Geonet.cpp.

References basicHeaderProcessing(), geonetErrors, networkError_success, and SIZE_ETHERNET.

Referenced by GeoNet(), and initHybridSocket().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tsbPacketProcessing()

int GeoNet::tsbPacketProcessing ( uchar *  packet,
sniff_ethernet_t eth,
BasicHeader  bh,
CommonHeader  ch 
)
private

tsbPacketProcessing TSB Header decoding.

TSBPacket processing

Parameters
packetThe packet.
ethThe C style of the Basic Header.
bhThe Basic Header.
chThe Common Header.
Returns
The decoding result code.

Definition at line 2364 of file Geonet.cpp.

References BroadcastForwardingPacketBuffer::addPacket(), Manager::changeMID(), ParameterNetwork::eh, TSBPacket::extract(), flushPB(), gen2fac, geonetError_forward_tsb_bufferedPacket, geonetError_processing_tsb_DAD, geonetError_processing_tsb_DPD, geonetError_success, get_UINT16(), TSBPacket::helper_size, GnAddr::helper_size, ParameterNetwork::internalBTPPort(), isDuplicatePacketDetectionTimestampSN(), HistoryPacketBuffer::isDuplicateTimestamp(), ParameterConfiguration::itsGnLocalAddrConfMethod(), itsGnLocalAddrConfMethod_auto, m_BCFPB, ReceivePackets::m_changeFilter, m_gnAddr, m_HPB, m_locationTable, m_manager, m_mutexLocT, m_paramConf, m_paramNetwork, m_RP, GnAddr::mid(), GnAddr::MStationTypeCountryCode(), CommonHeader::payloadLength(), BasicHeader::rhl(), TrafficClass::SCF(), send(), sendEventIndicationToUT(), CommonHeader::toHex(), CommonHeader::trafficClass(), verifLocT(), and BasicHeader::version().

Referenced by commonHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ utInitialize

void GeoNet::utInitialize ( )
slot

utInitialize Slot used to initialize the N&T layer.

Definition at line 241 of file Geonet.cpp.

References RepetitionPacketBuffer::clear(), UnicastForwardingPacketBuffer::clear(), LocationServicePacketBuffer::clear(), BroadcastForwardingPacketBuffer::clear(), CBFPacketBuffer::clear(), HistoryPacketBuffer::clear(), m_BCFPB, m_beacon, m_CBFPB, m_CBFPBCounter, ReceivePackets::m_changeFilter, m_geonetFlag, m_HPB, m_locationTable, m_LSPB, m_mutexLocT, m_RP, m_RPB, m_UCFPB, and sequenceNumber.

Here is the call graph for this function:

◆ verifLocT()

void GeoNet::verifLocT ( )
private

verifLocT Checks if the LocT has expired packet.

Definition at line 212 of file Geonet.cpp.

References calculAngleThreshold(), itsGnLifetimeLocTE, m_locationTable, m_mutexLocT, m_paramGPS, and FakeGPSProvider::timestamp().

Referenced by beaconPacketProcessing(), gacPacketProcessing(), gbcPacketProcessing(), gucPacketProcessing(), LSReplyPacketProcessing(), LSRequestPacketProcessing(), send(), shbPacketProcessing(), and tsbPacketProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ verifySecuredPayload()

QByteArray GeoNet::verifySecuredPayload ( QByteArray  payload,
bool *  success 
)
private

verifySecuredPayload Send payload to verify to the HSM.jar.

Parameters
payloadThe payload to secure.
successThe verification result.
Returns
The unsecured payload.

Definition at line 3488 of file Geonet.cpp.

References m_paramSecu, m_verifySocket, ParameterSecurity::serverAddress(), ParameterSecurity::timeout(), and ParameterSecurity::verifyPort().

Referenced by basicHeaderProcessing().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ gen2fac

QUdpSocket* GeoNet::gen2fac
private

◆ gen2ut

QUdpSocket* GeoNet::gen2ut
private

N&T to the UpperTester socket.

Definition at line 575 of file Geonet.h.

Referenced by GeoNet(), and sendEventIndicationToUT().

◆ geonetErrors

QHash<int, QString> GeoNet::geonetErrors

◆ m_angleThreshold

int GeoNet::m_angleThreshold
private

The advanced forwarding ANGLE_TH.

Definition at line 681 of file Geonet.h.

Referenced by advancedForwarding(), calculAngleThreshold(), and GeoNet().

◆ m_BCFPB

BroadcastForwardingPacketBuffer* GeoNet::m_BCFPB
private

The broadcast forwarding packet buffer.

Definition at line 621 of file Geonet.h.

Referenced by checkBCFPB(), GeoNet(), greedy(), sendSHB(), sendTSB(), tsbPacketProcessing(), and utInitialize().

◆ m_beacon

QTimer* GeoNet::m_beacon
private

Timer to send Beacon.

Definition at line 572 of file Geonet.h.

Referenced by execute(), lpvUpdate(), sendBeacon(), and utInitialize().

◆ m_CBFPB

CBFPacketBuffer* GeoNet::m_CBFPB
private

The CBF packet buffer.

Definition at line 623 of file Geonet.h.

Referenced by advancedForwarding(), CBFUnicast(), contentionBasedForwardingAlgorithm(), GeoNet(), and utInitialize().

◆ m_CBFPBCounter

QHash<QByteArray, int> GeoNet::m_CBFPBCounter
private

HashMap of CBF packet buffer counts.

Definition at line 636 of file Geonet.h.

Referenced by advancedForwarding(), GeoNet(), and utInitialize().

◆ m_geonetFlag

bool GeoNet::m_geonetFlag
private

Is the ITS-G5 used?

Definition at line 581 of file Geonet.h.

Referenced by GeoNet(), send(), and utInitialize().

◆ m_gnAddr

◆ m_HPB

◆ m_hybridFlag

bool GeoNet::m_hybridFlag
private

Is the hybridization used?

Definition at line 580 of file Geonet.h.

Referenced by GeoNet(), send(), and sslErrors().

◆ m_locationTable

◆ m_LSPB

LocationServicePacketBuffer* GeoNet::m_LSPB
private

The LS packet buffer.

Definition at line 625 of file Geonet.h.

Referenced by flushLSPB(), GeoNet(), lsRetransmit(), sendLsRequest(), and utInitialize().

◆ m_lsRetransmission

QHash<QByteArray, int> GeoNet::m_lsRetransmission
private

HashMap of LSRequest retransmission.

Definition at line 631 of file Geonet.h.

Referenced by lsRetransmit(), and sendLsRequest().

◆ m_manager

◆ m_mutex

QMutex* GeoNet::m_mutex
private

Mutex used for initialization.

Definition at line 633 of file Geonet.h.

Referenced by checkBCFPB(), checkUCFPB(), execute(), flushUCFPB(), and GeoNet().

◆ m_mutexLocT

◆ m_paramAppli

FakeApplicationProvider* GeoNet::m_paramAppli
private

Application parameters.

Definition at line 612 of file Geonet.h.

Referenced by GeoNet(), LSRequestPacketProcessing(), sendBeacon(), sendGAC(), sendGBC(), sendGUC(), sendLsRequest(), sendSHB(), and sendTSB().

◆ m_paramCAN

FakeCANProvider* GeoNet::m_paramCAN
private

CAN bus.

Definition at line 611 of file Geonet.h.

Referenced by GeoNet().

◆ m_paramConf

◆ m_paramGPS

◆ m_paramHybrid

ParameterHybrid* GeoNet::m_paramHybrid
private

Hybridization parameters.

Definition at line 579 of file Geonet.h.

Referenced by GeoNet(), hybridSend(), initHybridSocket(), setupSecureSocket(), and setupUnsecureSocket().

◆ m_paramNetwork

◆ m_paramSecu

ParameterSecurity* GeoNet::m_paramSecu
private

Security configuration.

Definition at line 616 of file Geonet.h.

Referenced by GeoNet(), and verifySecuredPayload().

◆ m_paramUpperTester

ParameterUpperTester* GeoNet::m_paramUpperTester
private

UpperTester parameters.

Definition at line 614 of file Geonet.h.

Referenced by GeoNet(), and sendEventIndicationToUT().

◆ m_RP

◆ m_RPB

RepetitionPacketBuffer* GeoNet::m_RPB
private

The repetition packet buffer.

Definition at line 624 of file Geonet.h.

Referenced by GeoNet(), sendGAC(), sendGBC(), sendGUC(), sendSHB(), sendTSB(), and utInitialize().

◆ m_securityManager

SecurityManager GeoNet::m_securityManager
private

Security manager.

Definition at line 708 of file Geonet.h.

Referenced by getSecuredPayload().

◆ m_signatureSocket

QUdpSocket* GeoNet::m_signatureSocket
private

Socket used to secure payload.

Definition at line 706 of file Geonet.h.

Referenced by GeoNet().

◆ m_sslSocket

QSslSocket* GeoNet::m_sslSocket
private

SSL socket for hybridization.

Definition at line 577 of file Geonet.h.

Referenced by hybridSend(), and setupSecureSocket().

◆ m_tcpSocket

QTcpSocket* GeoNet::m_tcpSocket
private

TCP socket for hybridization.

Definition at line 578 of file Geonet.h.

Referenced by hybridSend(), initHybridSocket(), send(), setupSecureSocket(), setupUnsecureSocket(), socketError(), socketReadyRead(), and sslErrors().

◆ m_UCFPB

UnicastForwardingPacketBuffer* GeoNet::m_UCFPB
private

The unicast forwarding packet buffer.

Definition at line 622 of file Geonet.h.

Referenced by checkUCFPB(), flushUCFPB(), GeoNet(), greedy(), and utInitialize().

◆ m_verifySocket

QUdpSocket* GeoNet::m_verifySocket
private

Socket used to verify payload.

Definition at line 707 of file Geonet.h.

Referenced by GeoNet(), and verifySecuredPayload().

◆ sequenceNumber

quint16 GeoNet::sequenceNumber = 0
static

Local sequence number.

Definition at line 237 of file Geonet.h.

Referenced by GeoNet(), LSRequestPacketProcessing(), sendGAC(), sendGBC(), sendGUC(), sendLsRequest(), sendTSB(), and utInitialize().


The documentation for this class was generated from the following files: