ITS
|
#include <denReceptionManagement.h>
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 |
GeoNet * | m_geonet |
QMutex * | m_mutexReception |
FakeGPSProvider * | m_paramGPS |
FakeApplicationProvider * | m_paramAppli |
ParameterDENM * | m_paramDENM |
ParameterConfiguration * | m_paramConf |
FakeCANProvider * | m_paramCan |
QUdpSocket * | denm2app |
QUdpSocket * | m_internalSocket |
quint16 | appPort |
Definition at line 31 of file denReceptionManagement.h.
denReceptionManagement::denReceptionManagement | ( | FakeGPSProvider * | gps, |
FakeApplicationProvider * | appli, | ||
ParameterDENM * | denm, | ||
GeoNet * | gn, | ||
ParameterConfiguration * | conf, | ||
FakeCANProvider * | can, | ||
ParameterNetwork * | network | ||
) |
denReceptionManagement denReceptionManagement constructor.
gps | GPS. |
appli | Application parameters. |
denm | DENM configuration. |
gn | N&T layer. |
conf | Configuration parameters. |
can | CAN bus. |
network | Network 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().
denReceptionManagement::~denReceptionManagement | ( | ) |
~denReceptionManagement denReceptionManagement destructor.
Definition at line 30 of file denReceptionManagement.cpp.
References denm2app, and m_internalSocket.
void denReceptionManagement::AppDENM_negation | ( | AppDenmTerminationData | termination, |
ActionID_t | actionID | ||
) |
AppDENM_negation Negation of a DENM.
Definition at line 289 of file denReceptionManagement.cpp.
References AppDENM_result(), appPort, asn_DEF_DENM, asn_fprint(), AppDenmResultData::cannotCreateDENM_unableToEncodeDENM, AppDenmResultData::cannotSendDENM, FakeApplicationProvider::data(), DENM::denm, denm2app, AppDenmTerminationData::destinationArea(), ManagementContainer::detectionTime, asn_enc_rval_s::encoded, AppDenmResultData::eventDoesNotExist, asn_enc_rval_s::failed_type, fill_ItsPduHeader(), fill_ManagementContainer(), haveDENM(), DENM::header, m_mutexReception, m_paramAppli, m_paramGPS, m_receivedDENM, DecentralizedEnvironmentalNotificationMessage::management, MSG_LENGTH, asn_TYPE_descriptor_s::name, ActionID::originatingStationID, PassDenmToNetworkAndTransportLayerTrigger(), print_hexa(), ManagementContainer::referenceTime, ActionID::sequenceNumber, ParameterApplication::stationID(), AppDenmResultData::success, Termination_isNegation, AppDenmTerminationIndication::toBin(), and uper_encode_to_buffer().
Referenced by denBasicService::AppDENM_terminate().
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.
actionID | The DENM's ActionID. |
success | The result. |
failureNotification | Used when success is false. |
denm | The DENM which needs result. |
Definition at line 355 of file denReceptionManagement.cpp.
References appDenmResult(), m_paramDENM, and AppDenmResultData::toBin().
Referenced by AppDENM_negation().
|
signal |
appDenmResult Signal used when notification is made to the Application layer.
Referenced by AppDENM_result().
|
signal |
appendTriggeredDenm Signal used when a DENM is appended to the set DEN Message Table Source.
void denReceptionManagement::decodeDenm | ( | QByteArray | data | ) |
decodeDenm Decode DENM.
data | The 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().
void denReceptionManagement::denmReception | ( | DENM_t * | denm | ) |
denmReception Reception of a DENM.
Definition at line 104 of file denReceptionManagement.cpp.
References ManagementContainer::actionID, DecentralizedEnvironmentalNotificationMessage::alacarte, appPort, asn_DEF_DENM, asn_INTEGER2ulong(), DefaultValidity, DENM::denm, denm2app, ManagementContainer::detectionTime, discardDENM(), asn_enc_rval_s::encoded, haveDENM(), AlacarteContainer::impactReduction, kaf(), m_mutexReception, m_paramGPS, m_receivedDENM, denMessageTableReception::m_reception, denMessageTableReception::m_thread, DecentralizedEnvironmentalNotificationMessage::management, MSG_LENGTH, ManagementContainer::referenceTime, ImpactReductionContainer::requestResponseIndication, RequestResponseIndication_request, sendRequestResponseIndication_Response(), denMessageTableReception::setActionID(), denMessageTableReception::setDENM(), denMessageTableReception::setT_R_Validity(), DecentralizedEnvironmentalNotificationMessage::situation, ManagementContainer::termination, FakeGPSProvider::timestamp(), uper_encode_to_buffer(), and ManagementContainer::validityDuration.
Referenced by decodeDenm().
void denReceptionManagement::discardDENM | ( | int | index | ) |
discardDENM Discard DENM from DEN Message Table Reception.
index | The index of the DENM. |
Definition at line 364 of file denReceptionManagement.cpp.
References appPort, denm2app, and m_receivedDENM.
Referenced by denmReception(), and discardDENMFromReceivedTable().
|
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.
|
signal |
kaf Signal used to invoke KAF.
Referenced by denmReception().
void denReceptionManagement::killReceptionThreads | ( | ) |
killReceptionThreads Kills active threads.
Definition at line 45 of file denReceptionManagement.cpp.
References m_receivedDENM.
Referenced by utInitialize().
bool denReceptionManagement::PassDenmToNetworkAndTransportLayerTrigger | ( | AppDenmTriggerData | data, |
char * | msg, | ||
int | denmLength | ||
) |
PassDenmToNetworkAndTransportLayerTrigger Pass the response DENM to the N&T layer.
data | Data to fill the GN DataRequest. |
msg | The encoded DENM. |
denmLength | The length of the encoded 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().
|
slot |
readDatagram Slot used to receive DENM.
Definition at line 59 of file denReceptionManagement.cpp.
References decodeDenm(), and m_internalSocket.
Referenced by denReceptionManagement().
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 (
s | The SituationContainer containing the RequestResponseIndication. |
originatingActionID | The 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().
|
inline |
setSequenceNumber Set the local sequenceNumber
s | The new sequenceNumber. |
Definition at line 95 of file denReceptionManagement.h.
References m_sequenceNumber.
|
signal |
setSequenceNumberSignal Signal used when a new sequenceNumber is set.
Referenced by sendRequestResponseIndication_Response().
|
slot |
setSequenceNumberSlot Slot used when a new sequenceNumber is made.
Definition at line 52 of file denReceptionManagement.cpp.
References m_sequenceNumber.
|
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().
|
private |
Application layer port.
Definition at line 160 of file denReceptionManagement.h.
Referenced by AppDENM_negation(), denmReception(), denReceptionManagement(), and discardDENM().
|
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().
|
private |
N&T layer.
Definition at line 149 of file denReceptionManagement.h.
Referenced by denReceptionManagement(), and PassDenmToNetworkAndTransportLayerTrigger().
|
private |
Internal socket used to received DENM.
Definition at line 159 of file denReceptionManagement.h.
Referenced by denReceptionManagement(), readDatagram(), and ~denReceptionManagement().
|
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().
|
private |
Application parameters.
Definition at line 153 of file denReceptionManagement.h.
Referenced by AppDENM_negation(), denReceptionManagement(), and sendRequestResponseIndication_Response().
|
private |
CAN bus.
Definition at line 156 of file denReceptionManagement.h.
Referenced by denReceptionManagement(), and sendRequestResponseIndication_Response().
|
private |
Global configuration.
Definition at line 155 of file denReceptionManagement.h.
Referenced by denReceptionManagement(), and sendRequestResponseIndication_Response().
|
private |
DENM configuration.
Definition at line 154 of file denReceptionManagement.h.
Referenced by AppDENM_result(), denReceptionManagement(), and sendRequestResponseIndication_Response().
|
private |
GPS.
Definition at line 152 of file denReceptionManagement.h.
Referenced by AppDENM_negation(), denmReception(), denReceptionManagement(), PassDenmToNetworkAndTransportLayerTrigger(), and sendRequestResponseIndication_Response().
|
private |
DEN Message Table Reception.
Definition at line 146 of file denReceptionManagement.h.
Referenced by AppDENM_negation(), decodeDenm(), denmReception(), discardDENM(), discardDENMFromReceivedTable(), killReceptionThreads(), and utInitialize().
|
private |
Local sequenceNumber.
Definition at line 147 of file denReceptionManagement.h.
Referenced by denReceptionManagement(), sendRequestResponseIndication_Response(), setSequenceNumber(), setSequenceNumberSlot(), and utInitialize().