ITS
denReceptionManagement Class Reference

#include <denReceptionManagement.h>

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

Public Slots

void utInitialize ()
 utInitialize Slot used to initialize the DEN Reception Management. More...
 
void setSequenceNumberSlot (quint16)
 setSequenceNumberSlot Slot used when a new sequenceNumber is made. More...
 
void discardDENMFromReceivedTable (ActionID_t)
 discardDENMFromReceivedTable Slot used when a DENM is discarded from Received Table. More...
 
void readDatagram ()
 readDatagram Slot used to receive DENM. More...
 

Signals

void setSequenceNumberSignal (quint16)
 setSequenceNumberSignal Signal used when a new sequenceNumber is set. More...
 
void appendTriggeredDenm (denMessageTableSource *)
 appendTriggeredDenm Signal used when a DENM is appended to the set DEN Message Table Source. More...
 
void appDenmResult (QByteArray)
 appDenmResult Signal used when notification is made to the Application layer. More...
 
void kaf (DENM_t *)
 kaf Signal used to invoke KAF. More...
 

Public Member Functions

 denReceptionManagement (FakeGPSProvider *gps, FakeApplicationProvider *appli, ParameterDENM *denm, GeoNet *gn, ParameterConfiguration *conf, FakeCANProvider *can, ParameterNetwork *network)
 denReceptionManagement denReceptionManagement constructor. More...
 
 ~denReceptionManagement ()
 
void decodeDenm (QByteArray data)
 decodeDenm Decode DENM. More...
 
void denmReception (DENM_t *)
 denmReception Reception of a DENM. More...
 
void AppDENM_negation (AppDenmTerminationData termination, ActionID_t actionID)
 AppDENM_negation Negation of a DENM. More...
 
void sendRequestResponseIndication_Response (SituationContainer_t *s, ActionID_t originatingActionID)
 sendRequestResponseIndication_Response Sends a RequestResponIndication DENM of type Response when a DENM with a RequestResponIndication DENM of type Request is received ( More...
 
bool PassDenmToNetworkAndTransportLayerTrigger (AppDenmTriggerData data, char *msg, int denmLength)
 PassDenmToNetworkAndTransportLayerTrigger Pass the response DENM to the N&T layer. More...
 
void AppDENM_result (ActionID_t actionID, bool success, AppDenmResultData::e_failureNotification failureNotification, DENM_t *denm)
 AppDENM_result Notification to the Application layer of the success of DENM sent. More...
 
void setSequenceNumber (SequenceNumber_t s)
 setSequenceNumber Set the local sequenceNumber More...
 
void discardDENM (int index)
 discardDENM Discard DENM from DEN Message Table Reception. More...
 
void killReceptionThreads ()
 killReceptionThreads Kills active threads. More...
 

Private Attributes

QVector< denMessageTableReception * > m_receivedDENM
 
SequenceNumber_t m_sequenceNumber
 
GeoNetm_geonet
 
QMutex * m_mutexReception
 
FakeGPSProviderm_paramGPS
 
FakeApplicationProviderm_paramAppli
 
ParameterDENMm_paramDENM
 
ParameterConfigurationm_paramConf
 
FakeCANProviderm_paramCan
 
QUdpSocket * denm2app
 
QUdpSocket * m_internalSocket
 
quint16 appPort
 

Detailed Description

Definition at line 31 of file denReceptionManagement.h.

Constructor & Destructor Documentation

◆ denReceptionManagement()

denReceptionManagement::denReceptionManagement ( FakeGPSProvider gps,
FakeApplicationProvider appli,
ParameterDENM denm,
GeoNet gn,
ParameterConfiguration conf,
FakeCANProvider can,
ParameterNetwork network 
)

denReceptionManagement denReceptionManagement constructor.

Parameters
gpsGPS.
appliApplication parameters.
denmDENM configuration.
gnN&T layer.
confConfiguration parameters.
canCAN bus.
networkNetwork configuration.

Definition at line 3 of file denReceptionManagement.cpp.

References ParameterNetwork::addBTPPort(), ParameterNetwork::addPort(), appPort, denm2app, ParameterNetwork::denmDestinationPort(), ParameterNetwork::denmDestinationPortInfo(), ParameterNetwork::internalBTPPort(), ParameterNetwork::internalPort(), m_geonet, m_internalSocket, m_mutexReception, m_paramAppli, m_paramCan, m_paramConf, m_paramDENM, m_paramGPS, m_sequenceNumber, and readDatagram().

Here is the call graph for this function:

◆ ~denReceptionManagement()

denReceptionManagement::~denReceptionManagement ( )

~denReceptionManagement denReceptionManagement destructor.

Definition at line 30 of file denReceptionManagement.cpp.

References denm2app, and m_internalSocket.

Member Function Documentation

◆ AppDENM_negation()

void denReceptionManagement::AppDENM_negation ( AppDenmTerminationData  termination,
ActionID_t  actionID 
)

◆ AppDENM_result()

void denReceptionManagement::AppDENM_result ( ActionID_t  actionID,
bool  success,
AppDenmResultData::e_failureNotification  failureNotification,
DENM_t denm 
)

AppDENM_result Notification to the Application layer of the success of DENM sent.

Parameters
actionIDThe DENM's ActionID.
successThe result.
failureNotificationUsed when success is false.
denmThe DENM which needs result.

Definition at line 355 of file denReceptionManagement.cpp.

References appDenmResult(), m_paramDENM, and AppDenmResultData::toBin().

Referenced by AppDENM_negation().

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

◆ appDenmResult

void denReceptionManagement::appDenmResult ( QByteArray  )
signal

appDenmResult Signal used when notification is made to the Application layer.

Referenced by AppDENM_result().

Here is the caller graph for this function:

◆ appendTriggeredDenm

void denReceptionManagement::appendTriggeredDenm ( denMessageTableSource )
signal

appendTriggeredDenm Signal used when a DENM is appended to the set DEN Message Table Source.

◆ decodeDenm()

void denReceptionManagement::decodeDenm ( QByteArray  data)

decodeDenm Decode DENM.

Parameters
dataThe DENM to decode.

Definition at line 73 of file denReceptionManagement.cpp.

References asn_DEF_DENM, asn_fprint(), asn_dec_rval_s::code, denmReception(), m_receivedDENM, messageID_denm, protocolVersion_currentVersion, RC_OK, and uper_decode_complete().

Referenced by readDatagram().

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

◆ denmReception()

◆ discardDENM()

void denReceptionManagement::discardDENM ( int  index)

discardDENM Discard DENM from DEN Message Table Reception.

Parameters
indexThe index of the DENM.

Definition at line 364 of file denReceptionManagement.cpp.

References appPort, denm2app, and m_receivedDENM.

Referenced by denmReception(), and discardDENMFromReceivedTable().

Here is the caller graph for this function:

◆ discardDENMFromReceivedTable

void denReceptionManagement::discardDENMFromReceivedTable ( ActionID_t  actionID)
slot

discardDENMFromReceivedTable Slot used when a DENM is discarded from Received Table.

Definition at line 377 of file denReceptionManagement.cpp.

References discardDENM(), haveDENM(), m_mutexReception, m_receivedDENM, ActionID::originatingStationID, and ActionID::sequenceNumber.

Here is the call graph for this function:

◆ kaf

void denReceptionManagement::kaf ( DENM_t )
signal

kaf Signal used to invoke KAF.

Referenced by denmReception().

Here is the caller graph for this function:

◆ killReceptionThreads()

void denReceptionManagement::killReceptionThreads ( )

killReceptionThreads Kills active threads.

Definition at line 45 of file denReceptionManagement.cpp.

References m_receivedDENM.

Referenced by utInitialize().

Here is the caller graph for this function:

◆ PassDenmToNetworkAndTransportLayerTrigger()

bool denReceptionManagement::PassDenmToNetworkAndTransportLayerTrigger ( AppDenmTriggerData  data,
char *  msg,
int  denmLength 
)

PassDenmToNetworkAndTransportLayerTrigger Pass the response DENM to the N&T layer.

Parameters
dataData to fill the GN DataRequest.
msgThe encoded DENM.
denmLengthThe length of the encoded DENM.
Returns
True if N&T succeeds to send DENM.

Definition at line 340 of file denReceptionManagement.cpp.

References FakeGPSProvider::data(), GeoNet::geonetError_success, gnDataRequestFromAppDenmTriggerData(), m_geonet, m_paramGPS, gnDataRequest_s::payload, and GeoNet::send().

Referenced by AppDENM_negation(), and sendRequestResponseIndication_Response().

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

◆ readDatagram

void denReceptionManagement::readDatagram ( )
slot

readDatagram Slot used to receive DENM.

Definition at line 59 of file denReceptionManagement.cpp.

References decodeDenm(), and m_internalSocket.

Referenced by denReceptionManagement().

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

◆ sendRequestResponseIndication_Response()

void denReceptionManagement::sendRequestResponseIndication_Response ( SituationContainer_t s,
ActionID_t  originatingActionID 
)

sendRequestResponseIndication_Response Sends a RequestResponIndication DENM of type Response when a DENM with a RequestResponIndication DENM of type Request is received (

See also
ETSI EN 302 637-3 v1.2.2 (2014-11) B40).
Parameters
sThe SituationContainer containing the RequestResponseIndication.
originatingActionIDThe ActionID of the received DENM.

Definition at line 238 of file denReceptionManagement.cpp.

References ManagementContainer::actionID, DecentralizedEnvironmentalNotificationMessage::alacarte, asn_DEF_DENM, asn_fprint(), asn_INTEGER2ulong(), asn_long2INTEGER(), ASN_SEQUENCE_ADD, FakeCANProvider::data(), FakeApplicationProvider::data(), FakeGPSProvider::data(), DefaultValidity, DENM::denm, ManagementContainer::detectionTime, asn_enc_rval_s::encoded, asn_enc_rval_s::failed_type, fill_AlacarteContainer(), fill_ItsPduHeader(), fill_ManagementContainer(), DENM::header, DecentralizedEnvironmentalNotificationMessage::location, m_paramAppli, m_paramCan, m_paramConf, m_paramDENM, m_paramGPS, m_sequenceNumber, DecentralizedEnvironmentalNotificationMessage::management, MSG_LENGTH, asn_TYPE_descriptor_s::name, PassDenmToNetworkAndTransportLayerTrigger(), ManagementContainer::referenceTime, denMessageTableSource::setActionID(), denMessageTableSource::setDENM(), setSequenceNumberSignal(), denMessageTableSource::setT_O_Validity(), denMessageTableSource::setTrafficClass(), DecentralizedEnvironmentalNotificationMessage::situation, ParameterApplication::stationID(), FakeGPSProvider::timestamp(), TrafficClassData::toInt(), LocationContainer::traces, AppDenmTriggerData::trafficClass(), and uper_encode_to_buffer().

Referenced by denmReception().

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

◆ setSequenceNumber()

void denReceptionManagement::setSequenceNumber ( SequenceNumber_t  s)
inline

setSequenceNumber Set the local sequenceNumber

Parameters
sThe new sequenceNumber.

Definition at line 95 of file denReceptionManagement.h.

References m_sequenceNumber.

◆ setSequenceNumberSignal

void denReceptionManagement::setSequenceNumberSignal ( quint16  )
signal

setSequenceNumberSignal Signal used when a new sequenceNumber is set.

Referenced by sendRequestResponseIndication_Response().

Here is the caller graph for this function:

◆ setSequenceNumberSlot

void denReceptionManagement::setSequenceNumberSlot ( quint16  sequenceNumber)
slot

setSequenceNumberSlot Slot used when a new sequenceNumber is made.

Definition at line 52 of file denReceptionManagement.cpp.

References m_sequenceNumber.

◆ utInitialize

void denReceptionManagement::utInitialize ( )
slot

utInitialize Slot used to initialize the DEN Reception Management.

Definition at line 36 of file denReceptionManagement.cpp.

References killReceptionThreads(), m_mutexReception, m_receivedDENM, and m_sequenceNumber.

Referenced by denBasicService::utInitialize().

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

Member Data Documentation

◆ appPort

quint16 denReceptionManagement::appPort
private

Application layer port.

Definition at line 160 of file denReceptionManagement.h.

Referenced by AppDENM_negation(), denmReception(), denReceptionManagement(), and discardDENM().

◆ denm2app

QUdpSocket* denReceptionManagement::denm2app
private

UDP socket interfacing with the Application layer.

Definition at line 158 of file denReceptionManagement.h.

Referenced by AppDENM_negation(), denmReception(), denReceptionManagement(), discardDENM(), and ~denReceptionManagement().

◆ m_geonet

GeoNet* denReceptionManagement::m_geonet
private

N&T layer.

Definition at line 149 of file denReceptionManagement.h.

Referenced by denReceptionManagement(), and PassDenmToNetworkAndTransportLayerTrigger().

◆ m_internalSocket

QUdpSocket* denReceptionManagement::m_internalSocket
private

Internal socket used to received DENM.

Definition at line 159 of file denReceptionManagement.h.

Referenced by denReceptionManagement(), readDatagram(), and ~denReceptionManagement().

◆ m_mutexReception

QMutex* denReceptionManagement::m_mutexReception
private

Mutex used when looking at the DEN Message Table Reception.

Definition at line 150 of file denReceptionManagement.h.

Referenced by AppDENM_negation(), denmReception(), denReceptionManagement(), discardDENMFromReceivedTable(), and utInitialize().

◆ m_paramAppli

FakeApplicationProvider* denReceptionManagement::m_paramAppli
private

Application parameters.

Definition at line 153 of file denReceptionManagement.h.

Referenced by AppDENM_negation(), denReceptionManagement(), and sendRequestResponseIndication_Response().

◆ m_paramCan

FakeCANProvider* denReceptionManagement::m_paramCan
private

CAN bus.

Definition at line 156 of file denReceptionManagement.h.

Referenced by denReceptionManagement(), and sendRequestResponseIndication_Response().

◆ m_paramConf

ParameterConfiguration* denReceptionManagement::m_paramConf
private

Global configuration.

Definition at line 155 of file denReceptionManagement.h.

Referenced by denReceptionManagement(), and sendRequestResponseIndication_Response().

◆ m_paramDENM

ParameterDENM* denReceptionManagement::m_paramDENM
private

◆ m_paramGPS

◆ m_receivedDENM

QVector<denMessageTableReception*> denReceptionManagement::m_receivedDENM
private

◆ m_sequenceNumber

SequenceNumber_t denReceptionManagement::m_sequenceNumber
private

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