ITS
caBasicService Class Reference

#include <caBasicService.h>

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

Public Slots

void execute ()
 execute Slot used for the first loop. More...
 
void checkToSendCAM ()
 checkToSendCAM Slot used when there need to check if we need to send CAM. More...
 

Public Member Functions

 caBasicService (GeoNet *geonet, FakeGPSProvider *paramGPS, ParameterConfiguration *paramConf, FakeApplicationProvider *paramAppli, FakeCANProvider *paramCAN)
 caBasicService caBasicService constructor. More...
 
quint16 T_GenCam_DCC () const
 T_GenCam_DCC T_GenCam_DCC getter. More...
 
quint16 T_GenCam () const
 T_GenCam T_GenCam getter. More...
 
quint16 N_GenCam () const
 N_GenCam N_GenCam getter. More...
 
quint16 T_CheckGenCam () const
 T_CheckGenCam T_CheckCamm getter. More...
 
CAM_t currentCAM () const
 currentCAM Current CAM getter. More...
 
CAM_t previousCAM () const
 previousCAM Previous CAM getter More...
 
QTime previousTime () const
 previousTime Time of the previous CAM getter. More...
 
QTime lastLF () const
 lastLF Last time where a CAM had a LowFrequencyContainer. More...
 
quint64 timestamp () const
 timestamp Current timestamp getter. More...
 
void setT_GenCam_DCC (quint16 t)
 setT_GenCam_DCC Set the T_GenCam_DCC. More...
 
void setT_GenCam (quint16 t)
 setT_GenCam Set the T_GenCam. More...
 
void setN_GenCam (quint16 n)
 setN_GenCam Set the N_GenCam More...
 
void setT_CheckGenCam (quint16 t)
 setT_CheckGenCam Set the T_CheckGenCam. More...
 
void setCurrentCAM (CAM_t c)
 setCurrentCAM Set the current CAM. More...
 
void setPreviousCAM (CAM_t c)
 setPreviousCAM Set the previous CAM. More...
 
void setPreviousTime (QTime p)
 setPreviousTime Set the time where the previous CAM was sent. More...
 
void setLastLF (QTime l)
 setLastLF Set the time where the last CAM had a LowFrequencyContainer. More...
 
bool checkCamGeneration ()
 checkCamGeneration Check if a CAM needs to be generated. More...
 
CAM_t collectMandatoryData ()
 collectMandatoryData Collect the CAM mandatory data. More...
 
bool checkForOptionalContainers ()
 checkForOptionalContainers Check if there need optional data. More...
 
void checkAndCollectDataForOptionalContainers (CAM_t *cam)
 checkAndCollectDataForOptionalContainers Check and collect data for optional containers. More...
 
void PassCamToNetworkAndTransportLayer (char *cam, int camLength)
 PassCamToNetworkAndTransportLayer Pass the encoded CAM to the N&T layer. More...
 
BasicContainer_t collectMandatoryData_BasicContainer ()
 collectMandatoryData_BasicContainer Collect mandatory data for the BasicContainer. More...
 
BasicVehicleContainerHighFrequency_t collectMandatoryData_BasicVehicleContainerHighFrequency ()
 collectMandatoryData_BasicVehicleContainerHighFrequency Collect mandatory data for the BasicVehicleContainerHighFrequency. More...
 
RSUContainerHighFrequency_t collectMandatoryData_RSUContainerHighFrequency ()
 collectMandatoryData_RSUContainerHighFrequency Collect mandatory data for the RSUContainerHighFrequency. More...
 
BasicVehicleContainerLowFrequency_t collectOptionalData_BasicVehicleContainerLowFrequency ()
 collectOptionalData_BasicVehicleContainerLowFrequency Collect optional data for the BasicVehicleContainerLowFrequency. More...
 
SpecialVehicleContainer_t collectOptionalData_SpecialVehicleContainer (VehicleRole_t v)
 collectOptionalData_SpecialVehicleContainer Collect optional data for the SpecialVehicleContainer. More...
 
PublicTransportContainer_t collectOptionalData_PublicTransportContainer ()
 collectOptionalData_PublicTransportContainer Collect optional data for the PublicTransportContainer. More...
 
SpecialTransportContainer_t collectOptionalData_SpecialTransportContainer ()
 collectOptionalData_SpecialTransportContainer Collect optional data for the SpecialTransportContainer. More...
 
DangerousGoodsContainer_t collectOptionalData_DangerousGoodsContainer ()
 collectOptionalData_DangerousGoodsContainer Collect optional data for the DangerousGoodsContainer. More...
 
RoadWorksContainerBasic_t collectOptionalData_RoadWorksContainerbasic ()
 collectOptionalData_RoadWorksContainerbasic Collect optional data for the RoadWorksContainerBasic. More...
 
RescueContainer_t collectOptionalData_RescueContainer ()
 collectOptionalData_RescueContainer Collect optional data for the RescueContainer. More...
 
EmergencyContainer_t collectOptionalData_EmergencyContainer ()
 collectOptionalData_EmergencyContainer Collect optional data for the EmergencyContainer. More...
 
SafetyCarContainer_t collectOptionalData_SafetyCarContainer ()
 collectOptionalData_SafetyCarContainer Collect optional data for the SafetyCarContainer. More...
 
bool needSpecialVehicleContainer (VehicleRole_t role)
 needSpecialVehicleContainer Check if there need SpecialVehicleContainer. More...
 
PathHistory_t getPathHistory ()
 getPathHistory PathHistory getter. More...
 
PathPoint_t getPathPoint (int i)
 getPathPoint PathPoint getter. More...
 
void checkPathPoint (int i)
 checkPathPoint Check a PathPoint. More...
 
void utInitialize ()
 utInitialize Initialize the CA Basic Service. More...
 

Private Member Functions

void reset ()
 

Private Attributes

quint16 m_T_GenCam_DCC
 
quint16 m_T_GenCam
 
quint16 m_N_GenCam
 
quint16 m_T_CheckGenCam
 
CAM_t m_currentCAM
 
CAM_t m_previousCAM
 
QUdpSocket * udpSocket
 
QTime m_previousTime
 
QTime m_lastLF
 
ItsPduHeader_t header
 
QElapsedTimer m_elapsed
 
bool m_quick
 
int m_generedCam
 
QTimer m_timer
 
FakeGPSProviderm_paramGPS
 
GeoNetm_geonet
 
ParameterConfigurationm_paramConf
 
FakeApplicationProviderm_paramAppli
 
FakeCANProviderm_paramCAN
 
QList< ReferencePosition_tm_listReferencePosition
 
QList< GenerationDeltaTime_tm_listGenerationDeltaTime
 
PathPoint_t m_listPathPoint [MAX_REFERENCEPOSITION]
 

Detailed Description

Definition at line 33 of file caBasicService.h.

Constructor & Destructor Documentation

◆ caBasicService()

caBasicService::caBasicService ( GeoNet geonet,
FakeGPSProvider paramGPS,
ParameterConfiguration paramConf,
FakeApplicationProvider paramAppli,
FakeCANProvider paramCAN 
)

caBasicService caBasicService constructor.

Parameters
geonetThe GeoNetworking layer.
paramGPSThe GPS.
paramConfThe global configuration.
paramAppliThe application configuration.
paramCANThe CAN bus.

Definition at line 10 of file caBasicService.cpp.

References checkToSendCAM(), FakeApplicationProvider::data(), DEFAULT_N_GEN_CAM, firstCAM, header, m_geonet, m_paramAppli, m_paramCAN, m_paramConf, m_paramGPS, m_T_GenCam, m_T_GenCam_DCC, ItsPduHeader::messageID, messageID_cam, ItsPduHeader::protocolVersion, protocolVersion_currentVersion, setN_GenCam(), setT_CheckGenCam(), ItsPduHeader::stationID, ParameterApplication::stationID(), T_GenCamMax, and udpSocket.

Here is the call graph for this function:

Member Function Documentation

◆ checkAndCollectDataForOptionalContainers()

void caBasicService::checkAndCollectDataForOptionalContainers ( CAM_t cam)

◆ checkCamGeneration()

bool caBasicService::checkCamGeneration ( )

checkCamGeneration Check if a CAM needs to be generated.

Returns
True if a CAM needs to be generated.

Definition at line 153 of file caBasicService.cpp.

References CamParameters::basicContainer, HighFrequencyContainer::HighFrequencyContainer_u::basicVehicleContainerHighFrequency, CAM::cam, CoopAwareness::camParameters, HighFrequencyContainer::choice, FakeGPSProvider::data(), dist(), firstCAM, BasicVehicleContainerHighFrequency::heading, ParameterGPS::heading(), Heading::headingValue, CamParameters::highFrequencyContainer, ReferencePosition::latitude, ReferencePosition::longitude, m_elapsed, m_generedCam, m_N_GenCam, m_paramGPS, m_quick, m_T_GenCam, MIN, previousCAM(), BasicContainer::referencePosition, ParameterGPS::referencePosition(), reset(), ParameterGPS::speed(), Speed::speedValue, T_GenCam_DCC(), T_GenCamMax, and T_GenCamMin.

Referenced by checkToSendCAM().

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

◆ checkForOptionalContainers()

bool caBasicService::checkForOptionalContainers ( )

checkForOptionalContainers Check if there need optional data.

Returns
True if there need optional data.

Definition at line 365 of file caBasicService.cpp.

References FakeApplicationProvider::data(), firstCAM, lastLF(), m_paramAppli, ParameterApplication::stationType(), and StationType_roadSideUnit.

Referenced by checkToSendCAM().

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

◆ checkPathPoint()

void caBasicService::checkPathPoint ( int  i)

checkPathPoint Check a PathPoint.

Parameters
iThe i-th PathPoint to check.

Definition at line 649 of file caBasicService.cpp.

References DeltaReferencePosition::deltaAltitude, DeltaAltitude_unavailable, DeltaReferencePosition::deltaLatitude, DeltaLatitude_unavailable, DeltaReferencePosition::deltaLongitude, DeltaLongitude_unavailable, m_listPathPoint, and PathPoint::pathPosition.

Referenced by getPathHistory().

Here is the caller graph for this function:

◆ checkToSendCAM

void caBasicService::checkToSendCAM ( )
slot

checkToSendCAM Slot used when there need to check if we need to send CAM.

Definition at line 62 of file caBasicService.cpp.

References asn_DEF_CAM, checkAndCollectDataForOptionalContainers(), checkCamGeneration(), checkForOptionalContainers(), collectMandatoryData(), cpy_CAM(), asn_enc_rval_s::encoded, asn_enc_rval_s::failed_type, firstCAM, m_elapsed, m_previousCAM, m_timer, MSG_LENGTH, asn_TYPE_descriptor_s::name, PassCamToNetworkAndTransportLayer(), setLastLF(), setPreviousTime(), T_GenCamMin, and uper_encode_to_buffer().

Referenced by caBasicService(), and execute().

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

◆ collectMandatoryData()

CAM_t caBasicService::collectMandatoryData ( )

collectMandatoryData Collect the CAM mandatory data.

Returns
A CAM with mandatory data.

Definition at line 239 of file caBasicService.cpp.

References CamParameters::basicContainer, HighFrequencyContainer::HighFrequencyContainer_u::basicVehicleContainerHighFrequency, CAM::cam, CoopAwareness::camParameters, HighFrequencyContainer::choice, collectMandatoryData_BasicContainer(), collectMandatoryData_BasicVehicleContainerHighFrequency(), collectMandatoryData_RSUContainerHighFrequency(), FakeApplicationProvider::data(), firstCAM, CoopAwareness::generationDeltaTime, CAM::header, CamParameters::highFrequencyContainer, HighFrequencyContainer_PR_basicVehicleContainerHighFrequency, HighFrequencyContainer_PR_NOTHING, HighFrequencyContainer_PR_rsuContainerHighFrequency, CamParameters::lowFrequencyContainer, m_listGenerationDeltaTime, m_paramAppli, m_paramGPS, make_CAM(), make_HighFrequencyContainer(), MAX_REFERENCEPOSITION, HighFrequencyContainer::present, HighFrequencyContainer::HighFrequencyContainer_u::rsuContainerHighFrequency, CamParameters::specialVehicleContainer, ItsPduHeader::stationID, ParameterApplication::stationID(), BasicContainer::stationType, StationType_bus, StationType_cyclist, StationType_heavyTruck, StationType_lightTruck, StationType_moped, StationType_motorcycle, StationType_passengerCar, StationType_pedestrian, StationType_roadSideUnit, StationType_specialVehicles, StationType_trailer, StationType_tram, and FakeGPSProvider::timestamp().

Referenced by checkToSendCAM().

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

◆ collectMandatoryData_BasicContainer()

BasicContainer_t caBasicService::collectMandatoryData_BasicContainer ( )

collectMandatoryData_BasicContainer Collect mandatory data for the BasicContainer.

Returns
The filled BasicContainer.

Definition at line 286 of file caBasicService.cpp.

References FakeApplicationProvider::data(), FakeGPSProvider::data(), firstCAM, m_listReferencePosition, m_paramAppli, m_paramGPS, make_BasicContainer(), MAX_REFERENCEPOSITION, BasicContainer::referencePosition, ParameterGPS::referencePosition(), BasicContainer::stationType, and ParameterApplication::stationType().

Referenced by collectMandatoryData().

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

◆ collectMandatoryData_BasicVehicleContainerHighFrequency()

BasicVehicleContainerHighFrequency_t caBasicService::collectMandatoryData_BasicVehicleContainerHighFrequency ( )

collectMandatoryData_BasicVehicleContainerHighFrequency Collect mandatory data for the BasicVehicleContainerHighFrequency.

Returns
The filled BasicVehicleContainerHighFrequency.

Definition at line 305 of file caBasicService.cpp.

References BasicVehicleContainerHighFrequency::accelerationControl, ParameterCAN::accelerationControl(), BasicVehicleContainerHighFrequency::cenDsrcTollingZone, cpy_AccelerationControl(), cpy_LateralAcceleration(), cpy_VerticalAcceleration(), BasicVehicleContainerHighFrequency::curvature, ParameterCAN::curvature(), BasicVehicleContainerHighFrequency::curvatureCalculationMode, ParameterCAN::curvatureCalculationMode(), FakeCANProvider::data(), FakeGPSProvider::data(), BasicVehicleContainerHighFrequency::driveDirection, ParameterCAN::driveDirection(), BasicVehicleContainerHighFrequency::heading, ParameterGPS::heading(), BasicVehicleContainerHighFrequency::lanePosition, BasicVehicleContainerHighFrequency::lateralAcceleration, ParameterCAN::lateralAcceleration(), BasicVehicleContainerHighFrequency::longitudinalAcceleration, ParameterCAN::longitudinalAcceleration(), m_paramCAN, m_paramConf, m_paramGPS, make_BasicVehicleContainerHighFrequency(), BasicVehicleContainerHighFrequency::performanceClass, BasicVehicleContainerHighFrequency::speed, ParameterGPS::speed(), BasicVehicleContainerHighFrequency::steeringWheelAngle, ParameterCAN::steeringWheelAngle(), BasicVehicleContainerHighFrequency::vehicleLength, ParameterConfiguration::vehicleLength(), BasicVehicleContainerHighFrequency::vehicleWidth, ParameterConfiguration::vehicleWidth(), BasicVehicleContainerHighFrequency::verticalAcceleration, ParameterCAN::verticalAcceleration(), BasicVehicleContainerHighFrequency::yawRate, and ParameterCAN::yawRate().

Referenced by collectMandatoryData().

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

◆ collectMandatoryData_RSUContainerHighFrequency()

RSUContainerHighFrequency_t caBasicService::collectMandatoryData_RSUContainerHighFrequency ( )

collectMandatoryData_RSUContainerHighFrequency Collect mandatory data for the RSUContainerHighFrequency.

Returns
The filled RSUContainerHighFrequency.

Definition at line 353 of file caBasicService.cpp.

References FakeApplicationProvider::data(), m_paramAppli, ParameterApplication::protectedCommunicationZones(), and RSUContainerHighFrequency::protectedCommunicationZonesRSU.

Referenced by collectMandatoryData().

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

◆ collectOptionalData_BasicVehicleContainerLowFrequency()

BasicVehicleContainerLowFrequency_t caBasicService::collectOptionalData_BasicVehicleContainerLowFrequency ( )

collectOptionalData_BasicVehicleContainerLowFrequency Collect optional data for the BasicVehicleContainerLowFrequency.

Returns
The filled BasicVehicleContainerLowFrequency.

Definition at line 448 of file caBasicService.cpp.

References FakeCANProvider::data(), FakeApplicationProvider::data(), BasicVehicleContainerLowFrequency::exteriorLights, ParameterCAN::exteriorLights(), getPathHistory(), m_paramAppli, m_paramCAN, make_BasicVehicleContainerLowFrequency(), BasicVehicleContainerLowFrequency::pathHistory, BasicVehicleContainerLowFrequency::vehicleRole, and ParameterApplication::vehicleRole().

Referenced by checkAndCollectDataForOptionalContainers().

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

◆ collectOptionalData_DangerousGoodsContainer()

DangerousGoodsContainer_t caBasicService::collectOptionalData_DangerousGoodsContainer ( )

collectOptionalData_DangerousGoodsContainer Collect optional data for the DangerousGoodsContainer.

Returns
The filled DangerousGoodsContainer.

Definition at line 528 of file caBasicService.cpp.

References DangerousGoodsContainer::dangerousGoodsBasic, ParameterApplication::dangerousGoodsBasic(), FakeApplicationProvider::data(), m_paramAppli, and make_DangerousGoodsContainer().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_EmergencyContainer()

EmergencyContainer_t caBasicService::collectOptionalData_EmergencyContainer ( )

collectOptionalData_EmergencyContainer Collect optional data for the EmergencyContainer.

Returns
The filled EmergencyContainer.

Definition at line 563 of file caBasicService.cpp.

References ParameterApplication::causeCodeEmergency(), FakeCANProvider::data(), FakeApplicationProvider::data(), EmergencyContainer::emergencyPriority, ParameterApplication::emergencyPriority(), EmergencyContainer::incidentIndication, EmergencyContainer::lightBarSirenInUse, ParameterCAN::lightBarSirenInUse(), m_paramAppli, m_paramCAN, and make_EmergencyContainer().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_PublicTransportContainer()

PublicTransportContainer_t caBasicService::collectOptionalData_PublicTransportContainer ( )

collectOptionalData_PublicTransportContainer Collect optional data for the PublicTransportContainer.

Returns
The filled PublicTransportContainer.

Definition at line 503 of file caBasicService.cpp.

References FakeApplicationProvider::data(), PublicTransportContainer::embarkationStatus, ParameterApplication::embarkationStatus(), m_paramAppli, make_PublicTransportContainer(), PublicTransportContainer::ptActivation, and ParameterApplication::ptActivation().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_RescueContainer()

RescueContainer_t caBasicService::collectOptionalData_RescueContainer ( )

collectOptionalData_RescueContainer Collect optional data for the RescueContainer.

Returns
The filled RescueContainer.

Definition at line 553 of file caBasicService.cpp.

References FakeCANProvider::data(), RescueContainer::lightBarSirenInUse, ParameterCAN::lightBarSirenInUse(), m_paramCAN, and make_RescueContainer().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_RoadWorksContainerbasic()

RoadWorksContainerBasic_t caBasicService::collectOptionalData_RoadWorksContainerbasic ( )

collectOptionalData_RoadWorksContainerbasic Collect optional data for the RoadWorksContainerBasic.

Returns
The filled RoadWorksContainerBasic.

Definition at line 538 of file caBasicService.cpp.

References RoadWorksContainerBasic::closedLanes, ParameterApplication::closedLanes(), FakeCANProvider::data(), FakeApplicationProvider::data(), RoadWorksContainerBasic::lightBarSirenInUse, ParameterCAN::lightBarSirenInUse(), m_paramAppli, m_paramCAN, make_RoadWorksContainerBasic(), RoadWorksContainerBasic::roadworksSubCauseCode, and ParameterApplication::roadworksSubCauseCode().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_SafetyCarContainer()

SafetyCarContainer_t caBasicService::collectOptionalData_SafetyCarContainer ( )

collectOptionalData_SafetyCarContainer Collect optional data for the SafetyCarContainer.

Returns
The filled SafetyCarContainer.

Definition at line 578 of file caBasicService.cpp.

References ParameterApplication::causeCodeSafety(), FakeCANProvider::data(), FakeApplicationProvider::data(), SafetyCarContainer::incidentIndication, SafetyCarContainer::lightBarSirenInUse, ParameterCAN::lightBarSirenInUse(), m_paramAppli, m_paramCAN, make_SafetyCarContainer(), SafetyCarContainer::speedLimit, ParameterApplication::speedLimit(), SafetyCarContainer::trafficRule, and ParameterApplication::trafficRule().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_SpecialTransportContainer()

SpecialTransportContainer_t caBasicService::collectOptionalData_SpecialTransportContainer ( )

collectOptionalData_SpecialTransportContainer Collect optional data for the SpecialTransportContainer.

Returns
The filled SpecialTransportContainer.

Definition at line 516 of file caBasicService.cpp.

References FakeCANProvider::data(), FakeApplicationProvider::data(), SpecialTransportContainer::lightBarSirenInUse, ParameterCAN::lightBarSirenInUse(), m_paramAppli, m_paramCAN, make_SpecialTransportContainer(), SpecialTransportContainer::specialTransportType, and ParameterApplication::specialTransportType().

Referenced by collectOptionalData_SpecialVehicleContainer().

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

◆ collectOptionalData_SpecialVehicleContainer()

SpecialVehicleContainer_t caBasicService::collectOptionalData_SpecialVehicleContainer ( VehicleRole_t  v)

collectOptionalData_SpecialVehicleContainer Collect optional data for the SpecialVehicleContainer.

Parameters
vThe vehicle role of the ITS-S.
Returns
The filled SpecialVehicleContainer.

Definition at line 461 of file caBasicService.cpp.

References SpecialVehicleContainer::choice, collectOptionalData_DangerousGoodsContainer(), collectOptionalData_EmergencyContainer(), collectOptionalData_PublicTransportContainer(), collectOptionalData_RescueContainer(), collectOptionalData_RoadWorksContainerbasic(), collectOptionalData_SafetyCarContainer(), collectOptionalData_SpecialTransportContainer(), SpecialVehicleContainer::SpecialVehicleContainer_u::dangerousGoodsContainer, SpecialVehicleContainer::SpecialVehicleContainer_u::emergencyContainer, SpecialVehicleContainer::present, SpecialVehicleContainer::SpecialVehicleContainer_u::publicTransportContainer, SpecialVehicleContainer::SpecialVehicleContainer_u::rescueContainer, SpecialVehicleContainer::SpecialVehicleContainer_u::roadWorksContainerBasic, SpecialVehicleContainer::SpecialVehicleContainer_u::safetyCarContainer, SpecialVehicleContainer::SpecialVehicleContainer_u::specialTransportContainer, SpecialVehicleContainer_PR_dangerousGoodsContainer, SpecialVehicleContainer_PR_emergencyContainer, SpecialVehicleContainer_PR_publicTransportContainer, SpecialVehicleContainer_PR_rescueContainer, SpecialVehicleContainer_PR_roadWorksContainerBasic, SpecialVehicleContainer_PR_safetyCarContainer, SpecialVehicleContainer_PR_specialTransportContainer, VehicleRole_dangerousGoods, VehicleRole_emergency, VehicleRole_publicTransport, VehicleRole_rescue, VehicleRole_roadWork, VehicleRole_safetyCar, and VehicleRole_specialTransport.

Referenced by checkAndCollectDataForOptionalContainers().

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

◆ currentCAM()

CAM_t caBasicService::currentCAM ( ) const
inline

currentCAM Current CAM getter.

Returns
The current CAM.

Definition at line 73 of file caBasicService.h.

References m_currentCAM.

◆ execute

void caBasicService::execute ( )
slot

execute Slot used for the first loop.

caBasicService::execute General protocol operation

Definition at line 36 of file caBasicService.cpp.

References checkToSendCAM(), m_elapsed, m_quick, m_timer, and T_GenCamMin.

Here is the call graph for this function:

◆ getPathHistory()

PathHistory_t caBasicService::getPathHistory ( )

getPathHistory PathHistory getter.

Returns
The PathHistory.

Definition at line 594 of file caBasicService.cpp.

References asn_sequence_add, checkPathPoint(), getPathPoint(), m_listPathPoint, and m_listReferencePosition.

Referenced by collectOptionalData_BasicVehicleContainerLowFrequency().

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

◆ getPathPoint()

PathPoint_t caBasicService::getPathPoint ( int  i)

getPathPoint PathPoint getter.

Parameters
ii-th point.
Returns
The i-th PathPoint.

Definition at line 614 of file caBasicService.cpp.

References ReferencePosition::altitude, Altitude::altitudeValue, CamParameters::basicContainer, CAM::cam, CoopAwareness::camParameters, DeltaReferencePosition::deltaAltitude, DeltaReferencePosition::deltaLatitude, DeltaReferencePosition::deltaLongitude, CoopAwareness::generationDeltaTime, ReferencePosition::latitude, ReferencePosition::longitude, m_listGenerationDeltaTime, m_listReferencePosition, PathPoint::pathDeltaTime, PathPoint::pathPosition, previousCAM(), and BasicContainer::referencePosition.

Referenced by getPathHistory().

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

◆ lastLF()

QTime caBasicService::lastLF ( ) const
inline

lastLF Last time where a CAM had a LowFrequencyContainer.

Returns
The last time where a CAM had a LowFrequencyContainer.

Definition at line 88 of file caBasicService.h.

References m_lastLF.

Referenced by checkForOptionalContainers().

Here is the caller graph for this function:

◆ N_GenCam()

quint16 caBasicService::N_GenCam ( ) const
inline

N_GenCam N_GenCam getter.

Returns
The N_GenCam.

Definition at line 63 of file caBasicService.h.

References m_N_GenCam.

◆ needSpecialVehicleContainer()

bool caBasicService::needSpecialVehicleContainer ( VehicleRole_t  role)

needSpecialVehicleContainer Check if there need SpecialVehicleContainer.

Parameters
roleThe vehicle role.
Returns
True if there need SpecialVehicleContainer.

Definition at line 420 of file caBasicService.cpp.

References VehicleRole_agriculture, VehicleRole_commercial, VehicleRole_dangerousGoods, VehicleRole_default, VehicleRole_emergency, VehicleRole_military, VehicleRole_publicTransport, VehicleRole_rescue, VehicleRole_reserved1, VehicleRole_reserved2, VehicleRole_reserved3, VehicleRole_roadOperator, VehicleRole_roadWork, VehicleRole_safetyCar, VehicleRole_specialTransport, and VehicleRole_taxi.

Referenced by checkAndCollectDataForOptionalContainers().

Here is the caller graph for this function:

◆ PassCamToNetworkAndTransportLayer()

void caBasicService::PassCamToNetworkAndTransportLayer ( char *  cam,
int  camLength 
)

◆ previousCAM()

CAM_t caBasicService::previousCAM ( ) const
inline

previousCAM Previous CAM getter

Returns
The previous CAM.

Definition at line 78 of file caBasicService.h.

References m_previousCAM.

Referenced by checkCamGeneration(), and getPathPoint().

Here is the caller graph for this function:

◆ previousTime()

QTime caBasicService::previousTime ( ) const
inline

previousTime Time of the previous CAM getter.

Returns
The time of the previous CAM.

Definition at line 83 of file caBasicService.h.

References m_previousTime.

◆ reset()

void caBasicService::reset ( )
private

Reset the list of previous points.

Definition at line 52 of file caBasicService.cpp.

References m_listGenerationDeltaTime, m_listPathPoint, m_listReferencePosition, m_quick, m_T_GenCam, MAX_REFERENCEPOSITION, and T_GenCamMax.

Referenced by checkCamGeneration().

Here is the caller graph for this function:

◆ setCurrentCAM()

void caBasicService::setCurrentCAM ( CAM_t  c)
inline

setCurrentCAM Set the current CAM.

Parameters
cThe current CAM.

Definition at line 120 of file caBasicService.h.

References m_currentCAM, and setCAM().

Here is the call graph for this function:

◆ setLastLF()

void caBasicService::setLastLF ( QTime  l)
inline

setLastLF Set the time where the last CAM had a LowFrequencyContainer.

Parameters
lThe time where the last CAM had a LowFrequencyContainer.

Definition at line 135 of file caBasicService.h.

References m_lastLF.

Referenced by checkToSendCAM().

Here is the caller graph for this function:

◆ setN_GenCam()

void caBasicService::setN_GenCam ( quint16  n)
inline

setN_GenCam Set the N_GenCam

Parameters
nThe new N_GenCam.

Definition at line 110 of file caBasicService.h.

References m_N_GenCam.

Referenced by caBasicService().

Here is the caller graph for this function:

◆ setPreviousCAM()

void caBasicService::setPreviousCAM ( CAM_t  c)
inline

setPreviousCAM Set the previous CAM.

Parameters
cThe previous CAM.

Definition at line 125 of file caBasicService.h.

References m_previousCAM, and setCAM().

Here is the call graph for this function:

◆ setPreviousTime()

void caBasicService::setPreviousTime ( QTime  p)
inline

setPreviousTime Set the time where the previous CAM was sent.

Parameters
pThe time where the previous CAM was sent.

Definition at line 130 of file caBasicService.h.

References m_previousTime.

Referenced by checkToSendCAM().

Here is the caller graph for this function:

◆ setT_CheckGenCam()

void caBasicService::setT_CheckGenCam ( quint16  t)
inline

setT_CheckGenCam Set the T_CheckGenCam.

Parameters
tThe new T_CheckGenCam.

Definition at line 115 of file caBasicService.h.

References m_T_CheckGenCam.

Referenced by caBasicService().

Here is the caller graph for this function:

◆ setT_GenCam()

void caBasicService::setT_GenCam ( quint16  t)
inline

setT_GenCam Set the T_GenCam.

Parameters
tThe new T_GenCam.

Definition at line 105 of file caBasicService.h.

References m_T_GenCam.

◆ setT_GenCam_DCC()

void caBasicService::setT_GenCam_DCC ( quint16  t)
inline

setT_GenCam_DCC Set the T_GenCam_DCC.

Parameters
tThe new T_GenCam_DCC.

Definition at line 100 of file caBasicService.h.

References m_T_GenCam_DCC.

◆ T_CheckGenCam()

quint16 caBasicService::T_CheckGenCam ( ) const
inline

T_CheckGenCam T_CheckCamm getter.

Returns
The T_CheckGenCam.

Definition at line 68 of file caBasicService.h.

References m_T_CheckGenCam.

◆ T_GenCam()

quint16 caBasicService::T_GenCam ( ) const
inline

T_GenCam T_GenCam getter.

Returns
The T_GenCam.

Definition at line 58 of file caBasicService.h.

References m_T_GenCam.

◆ T_GenCam_DCC()

quint16 caBasicService::T_GenCam_DCC ( ) const
inline

T_GenCam_DCC T_GenCam_DCC getter.

Returns
The T_GenCam_DCC.

Definition at line 53 of file caBasicService.h.

References m_T_GenCam_DCC.

Referenced by checkCamGeneration().

Here is the caller graph for this function:

◆ timestamp()

quint64 caBasicService::timestamp ( ) const
inline

timestamp Current timestamp getter.

Returns
The current timestamp.

Definition at line 93 of file caBasicService.h.

References m_paramGPS, and FakeGPSProvider::timestamp().

Here is the call graph for this function:

◆ utInitialize()

void caBasicService::utInitialize ( )

utInitialize Initialize the CA Basic Service.

Definition at line 46 of file caBasicService.cpp.

References firstCAM, and m_timer.

Referenced by Facilities::utInitialize().

Here is the caller graph for this function:

Member Data Documentation

◆ header

ItsPduHeader_t caBasicService::header
private

ItsPduHeader of the CAMs.

Definition at line 275 of file caBasicService.h.

Referenced by caBasicService().

◆ m_currentCAM

CAM_t caBasicService::m_currentCAM
private

Current CAM.

Definition at line 270 of file caBasicService.h.

Referenced by currentCAM(), and setCurrentCAM().

◆ m_elapsed

QElapsedTimer caBasicService::m_elapsed
private

Time elapsed since last changes.

Definition at line 276 of file caBasicService.h.

Referenced by checkCamGeneration(), checkToSendCAM(), execute(), and PassCamToNetworkAndTransportLayer().

◆ m_generedCam

int caBasicService::m_generedCam
private

Number of generated CAM in a N_GenCam situation.

Definition at line 278 of file caBasicService.h.

Referenced by checkCamGeneration().

◆ m_geonet

GeoNet* caBasicService::m_geonet
private

N&T layer.

Definition at line 284 of file caBasicService.h.

Referenced by caBasicService(), and PassCamToNetworkAndTransportLayer().

◆ m_lastLF

QTime caBasicService::m_lastLF
private

Last time where a CAM had a LowFrequencyContainer.

Definition at line 274 of file caBasicService.h.

Referenced by lastLF(), and setLastLF().

◆ m_listGenerationDeltaTime

QList<GenerationDeltaTime_t> caBasicService::m_listGenerationDeltaTime
private

List of generation delta times.

Definition at line 290 of file caBasicService.h.

Referenced by collectMandatoryData(), getPathPoint(), and reset().

◆ m_listPathPoint

PathPoint_t caBasicService::m_listPathPoint[MAX_REFERENCEPOSITION]
private

List of previous points.

Definition at line 291 of file caBasicService.h.

Referenced by checkPathPoint(), getPathHistory(), and reset().

◆ m_listReferencePosition

QList<ReferencePosition_t> caBasicService::m_listReferencePosition
private

List of reference positions.

Definition at line 289 of file caBasicService.h.

Referenced by collectMandatoryData_BasicContainer(), getPathHistory(), getPathPoint(), and reset().

◆ m_N_GenCam

quint16 caBasicService::m_N_GenCam
private

N_GenCam.

Definition at line 268 of file caBasicService.h.

Referenced by checkCamGeneration(), N_GenCam(), and setN_GenCam().

◆ m_paramAppli

◆ m_paramCAN

◆ m_paramConf

ParameterConfiguration* caBasicService::m_paramConf
private

Global configuration.

Definition at line 285 of file caBasicService.h.

Referenced by caBasicService(), and collectMandatoryData_BasicVehicleContainerHighFrequency().

◆ m_paramGPS

◆ m_previousCAM

CAM_t caBasicService::m_previousCAM
private

Previous CAM.

Definition at line 271 of file caBasicService.h.

Referenced by checkToSendCAM(), previousCAM(), and setPreviousCAM().

◆ m_previousTime

QTime caBasicService::m_previousTime
private

Time where last CAM was generated.

Definition at line 273 of file caBasicService.h.

Referenced by previousTime(), and setPreviousTime().

◆ m_quick

bool caBasicService::m_quick
private

Do we need to send N_GenCam?

Definition at line 277 of file caBasicService.h.

Referenced by checkCamGeneration(), execute(), and reset().

◆ m_T_CheckGenCam

quint16 caBasicService::m_T_CheckGenCam
private

T_CheckGenCam.

Definition at line 269 of file caBasicService.h.

Referenced by setT_CheckGenCam(), and T_CheckGenCam().

◆ m_T_GenCam

quint16 caBasicService::m_T_GenCam
private

T_GenCam.

Definition at line 267 of file caBasicService.h.

Referenced by caBasicService(), checkCamGeneration(), reset(), setT_GenCam(), and T_GenCam().

◆ m_T_GenCam_DCC

quint16 caBasicService::m_T_GenCam_DCC
private

T_GenCam_DCC.

Definition at line 266 of file caBasicService.h.

Referenced by caBasicService(), setT_GenCam_DCC(), and T_GenCam_DCC().

◆ m_timer

QTimer caBasicService::m_timer
private

Timer used to sleep.

Definition at line 280 of file caBasicService.h.

Referenced by checkToSendCAM(), execute(), and utInitialize().

◆ udpSocket

QUdpSocket* caBasicService::udpSocket
private

UDP socket to communicate with the Application / UpperTester layer.

Definition at line 272 of file caBasicService.h.

Referenced by caBasicService().


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