ITS
caBasicService.cpp
Go to the documentation of this file.
1 #include "caBasicService.h"
2 
3 #include <QTimer>
4 
5 static bool firstCAM = true;
6 #define T_GenCamMin 100
7 #define T_GenCamMax 1000
8 #define MSG_LENGTH 500
9 
11  FakeApplicationProvider* paramAppli, FakeCANProvider* paramCAN)
12 {
15  firstCAM = true;
16  m_geonet = geonet;
17  m_paramGPS = paramGPS;
18  m_paramConf = paramConf;
19  m_paramAppli = paramAppli;
20  m_paramCAN = paramCAN;
21  udpSocket = new QUdpSocket;
22  udpSocket->bind(QHostAddress::LocalHost);
28 
29  QObject::connect(m_paramGPS, SIGNAL(positionChanged()), this, SLOT(checkToSendCAM()));
30  QObject::connect(m_paramCAN, SIGNAL(canChanged()), this, SLOT(checkToSendCAM()));
31 }
32 
37 {
38  qDebug() << "caBasicService start!\n";
39 
40  /* 1) Set T_CheckGenCam and start the timer. */
41  m_quick = false;
42  m_elapsed.start();
43  m_timer.singleShot(T_GenCamMin, this, SLOT(checkToSendCAM()));
44 }
45 
47 {
48  firstCAM = true;
49  m_timer.stop();
50 }
51 
53 {
54  for(int i = 0 ; i < MAX_REFERENCEPOSITION ; i++)
55  memset(&m_listPathPoint[i], 0, sizeof m_listPathPoint[i]);
58  m_quick = false;
60 }
61 
63 {
64  CAM_t cam;
65  asn_enc_rval_t rval;
66  char msg[MSG_LENGTH];
67  int msgLength;
68 
69  m_timer.stop();
70 
71  /* 2) When the timer T_CheckGenCam expires, check the CAM generation conditions */
72  if(checkCamGeneration())
73  {
74  qDebug() << "true";
75  /*
76  * 2)a. If any of the condition is satisfied, continues the operation
77  *
78  * 3) Collect data for mandatory containers.
79  */
80 // qDebug() << "Collect mandatory data";
81  cam = collectMandatoryData();
82  /* 4) Check if optional containers are to be added for CAM generation. */
83 // qDebug() << "Check for optional containers";
85  {
86  /*
87  * 4)a. If yes, check the ITS-S type and ITS-S role and collect data for optional
88  * containers.
89  */
90 // qDebug() << "Collect optional data";
92  setLastLF(QTime::currentTime());
93  }
94  /*
95  * 4)b. If no, continue the operation;
96  * 5) Encode CAM.
97  */
98 // qDebug() << "Encode CAM";
99  memset(&msg, '\0', MSG_LENGTH);
100  rval = uper_encode_to_buffer(&asn_DEF_CAM, &cam, &msg, MSG_LENGTH);
101  if(rval.encoded < 1)
102  {
103  qCritical("Failed to encode %s\n", rval.failed_type->name);
104  }
105  else
106  {
107  /* 6). Pass CAM to the ITS networking & transport layer. */
108 // qDebug() << "Pass CAM to the ITS networking & transport layer";
109  msgLength = (rval.encoded + 7) / 8;
110  PassCamToNetworkAndTransportLayer(msg, msgLength);
111  firstCAM = false;
112  m_previousCAM = cpy_CAM(cam);
113  setPreviousTime(QTime::currentTime());
114  m_elapsed.start();
115  m_timer.singleShot(T_GenCamMin, this, SLOT(checkToSendCAM()));
116  }
117  }
118  else
119  {
120  m_timer.singleShot(T_GenCamMin, this, SLOT(checkToSendCAM()));
121  }
122 }
123 
125 {
126  QByteArray payload(cam, camLength);
127 
128  LifeTime* lt = new LifeTime(1, LifeTime::base_1_s);
129 
130  gnDataRequest_t packet;
134  packet.destinationPort = btpPort_CAM;
135  packet.destinationPortInfo = 0;
138  packet.maximumPacketLifeTime = lt;
139  packet.repetitionInterval = 0;
140  packet.maximumRepetitionTime = 0;
141  packet.maximumHopLimit = 0;
143  packet.payload = payload;
144 
145  if(m_geonet != 0)
146  m_geonet->send(packet);
147  m_elapsed.start();
148  qDebug() << "Message sent to the ITS networking & transport layer:";
149  //print_hexa((const unsigned char*)cam, camLength);
150  qDebug() << "Of size" << camLength;
151 }
152 
154 {
155 
156  /* First CAM to send. */
157  if(firstCAM)
158  {
159  reset();
160  return true;
161  }
162  /*
163  * The CAM generation trigger conditions shall be as follow:
164  * 1) The time elapsed since the last CAM generation is equal to or greater than T_GenCam_DCC…
165  */
166  quint64 elapTime = m_elapsed.elapsed();
167  if(elapTime >= T_GenCamMin)
168  {
169  if(!m_paramGPS)
170  return false;
171 
173  currentH = m_paramGPS->data().heading().headingValue;
174  int minH = MIN(prevH, currentH), maxH = minH == prevH ? currentH : prevH,
175  offsetH = MIN((maxH - minH), (3600 - maxH + minH));
176  /*
177  * … and one of the following ITS-S dynamics related conditions is given:
178  * - the absolute difference between the current heading of the originating ITS-S and
179  * the heading including in the CAM previously transmitted by the originating ITS-S
180  * exceeds 4°;
181  */
182  if(offsetH > 40)
183  {
184  m_T_GenCam = elapTime;
185  m_generedCam = 1;
186  m_quick = true;
187  return true;
188  }
189  /*
190  * - the distance between the current position of the originating ITS-S and the position
191  * included in the CAM previously transmitted by the originating ITS-S exceed 4 m;
192  */
196  {
197  m_T_GenCam = elapTime;
198  m_generedCam = 1;
199  m_quick = true;
200  return true;
201  }
202  /*
203  * - the absolute difference between the current speed of the originating ITS-S and the speed
204  * included in the CAM previously transmitted by the originating ITS-S exceed 0,5 m/s.
205  */
207  basicVehicleContainerHighFrequency.speed.speedValue) > 50)
208  {
209  m_T_GenCam = elapTime;
210  m_generedCam = 1;
211  m_quick = true;
212  return true;
213  }
214 
215  if(m_quick && elapTime >= m_T_GenCam)
216  {
217  m_generedCam++;
218  if(m_generedCam > m_N_GenCam - 1)
219  {
220  m_generedCam = 0;
222  m_quick = false;
223  }
224  return true;
225  }
226  }
227 
228  /*
229  * 2) The time elapsed since the last CAM generation is equal to or greater than T_GenCam and
230  * equal to or greater than T_GenCam_DCC.
231  */
232  // TODO: rechercher tgencamdcc dans paramcam
233  if(elapTime >= m_T_GenCam && elapTime >= T_GenCam_DCC())
234  return true;
235 
236  return false;
237 }
238 
240 {
241  CAM_t c = make_CAM();
242 
243  if(m_paramAppli)
245  if(m_paramGPS)
247 
248  if(!firstCAM)
249  {
251  m_listGenerationDeltaTime.removeLast();
253  }
254 
257  {
261  break;
265  break;
267  case StationType_cyclist:
268  case StationType_moped:
270  case StationType_bus:
273  case StationType_trailer:
275  case StationType_tram:
276  default:
278  break;
279  }
282 
283  return c;
284 }
285 
287 {
289 
290  if(m_paramAppli)
292  if(m_paramGPS)
294 
295  if(!firstCAM)
296  {
298  m_listReferencePosition.removeLast();
300  }
301 
302  return b;
303 }
304 
306 {
308 
309  if(m_paramGPS)
310  {
311  b.heading = m_paramGPS->data().heading();
312  b.speed = m_paramGPS->data().speed();
313  }
314  if(m_paramCAN)
315  {
321  b.yawRate = m_paramCAN->data().yawRate();
323 
324  if(m_paramCAN->data().accelerationControl() != 0x0)
325  {
328  }
329 
331 
332  if(m_paramCAN->data().lateralAcceleration()!= 0x0)
333  {
336  }
337 
338  if(m_paramCAN->data().verticalAcceleration()!= 0x0)
339  {
342  }
343  }
344 
345  b.lanePosition = 0;
346 
347  b.performanceClass = 0;
348  b.cenDsrcTollingZone = 0;
349 
350  return b;
351 }
352 
354 {
356 
357  memset (&r, 0, sizeof r);
358 
361 
362  return r;
363 }
364 
366 {
368  {
369  if(firstCAM)
370  return true;
371  if(abs(QTime::currentTime().msecsTo(lastLF())) >= 500)
372  return true;
373  }
374  return false;
375 }
376 
378 {
382  {
388  break;
390  case StationType_cyclist:
391  case StationType_moped:
393  case StationType_bus:
396  case StationType_trailer:
398  case StationType_tram:
400  default:
402  break;
403  }
404 
406  {
409  {
414  }
415  else
417  }
418 }
419 
421 {
422  switch (role)
423  {
428  case VehicleRole_rescue:
431  return true;
432  break;
433  case VehicleRole_default:
438  case VehicleRole_taxi:
442  default:
443  break;
444  }
445  return false;
446 }
447 
449 {
451 
452  if(m_paramAppli)
454  if(m_paramCAN)
457 
458  return b;
459 }
460 
462  VehicleRole_t v)
463 {
465 
466  switch (v)
467  {
471  break;
475  break;
479  break;
483  break;
484  case VehicleRole_rescue:
487  break;
491  break;
495  break;
496  default:
497  break;
498  }
499 
500  return s;
501 }
502 
504 {
506 
507  if(m_paramAppli)
508  {
511  }
512 
513  return p;
514 }
515 
517 {
519 
520  if(m_paramAppli)
522  if(m_paramCAN)
524 
525  return s;
526 }
527 
529 {
531 
532  if(m_paramAppli)
534 
535  return d;
536 }
537 
539 {
541 
542  if(m_paramAppli)
543  {
546  }
547  if(m_paramCAN)
549 
550  return r;
551 }
552 
554 {
556 
557  if(m_paramCAN)
559 
560  return r;
561 }
562 
564 {
566 
567  if(m_paramCAN)
569  if(m_paramAppli)
570  {
573  }
574 
575  return e;
576 }
577 
579 {
581 
582  if(m_paramCAN)
584  if(m_paramAppli)
585  {
589  }
590 
591  return s;
592 }
593 
595 {
596  int i;
597  PathHistory_t ret;
598 
599  ret.list.array = (PathPoint_t**)calloc(1, sizeof *ret.list.array);
600  ret.list.count = 0;
601  ret.list.free = 0;
602  ret.list.size = 0;
603  for(i = 0 ; i < m_listReferencePosition.count() ; i++)
604  {
606  checkPathPoint(i);
607  ret.list.array[i] = (PathPoint_t*)calloc(1, sizeof *ret.list.array[i]);
609  }
610 
611  return ret;
612 }
613 
615 {
616  PathPoint_t p;
617 
618  p.pathDeltaTime = (PathDeltaTime_t*)calloc(1, sizeof *p.pathDeltaTime);
619  if(i)
620  {
621  *p.pathDeltaTime = abs(m_listGenerationDeltaTime.at(i) - m_listGenerationDeltaTime.at(i - 1)) / 10;
622  *p.pathDeltaTime %= 65536;
623  if(*p.pathDeltaTime == 0)
624  *p.pathDeltaTime = 1;
626  m_listReferencePosition.at(i - 1).longitude;
628  m_listReferencePosition.at(i - 1).latitude;
629  p.pathPosition.deltaAltitude = m_listReferencePosition.at(i).altitude.altitudeValue -
630  m_listReferencePosition.at(i - 1).altitude.altitudeValue;
631  }
632  else
633  {
635  *p.pathDeltaTime %= 65536;
636  if(*p.pathDeltaTime == 0)
637  *p.pathDeltaTime = 1;
642  p.pathPosition.deltaAltitude = m_listReferencePosition.at(i).altitude.altitudeValue -
644  }
645 
646  return p;
647 }
648 
650 {
651  if(m_listPathPoint[i].pathPosition.deltaLatitude < -131071 ||
654  if(m_listPathPoint[i].pathPosition.deltaLongitude < -131071 ||
657  if(m_listPathPoint[i].pathPosition.deltaAltitude < -12700 ||
660 }
PathPoint_t m_listPathPoint[MAX_REFERENCEPOSITION]
HighFrequencyContainer_t make_HighFrequencyContainer(HighFrequencyContainer_PR present)
make_HighFrequencyContainer Make a default HighFrequencyContainer_t.
Definition: apiCAM.cpp:927
CurvatureCalculationMode_t curvatureCalculationMode() const
curvatureCalculationMode Curvature calculation mode getter.
Definition: ParameterCAN.h:93
gnDataRequest_t structure is the GN data request definition.
Definition: GNDataRequest.h:46
LifeTime * maximumPacketLifeTime
Definition: GNDataRequest.h:55
PathHistory_t getPathHistory()
getPathHistory PathHistory getter.
quint16 * repetitionInterval
Definition: GNDataRequest.h:56
#define itsGnDefaultTrafficClass
Definition: constantes.h:128
struct CauseCode * incidentIndication
CamParameters_t camParameters
Definition: CoopAwareness.h:25
long protocolVersion
Definition: ItsPduHeader.h:38
bool checkForOptionalContainers()
checkForOptionalContainers Check if there need optional data.
HighFrequencyContainer_PR present
void setLastLF(QTime l)
setLastLF Set the time where the last CAM had a LowFrequencyContainer.
void execute()
execute Slot used for the first loop.
struct asn_TYPE_descriptor_s * failed_type
Definition: asn_codecs.h:55
EmbarkationStatus_t embarkationStatus
#define MSG_LENGTH
StationType_t stationType
RoadworksSubCauseCode_t * roadworksSubCauseCode
RescueContainer_t make_RescueContainer()
make_RescueContainer Make a default RescueContainer_t.
Definition: apiCAM.cpp:980
RoadworksSubCauseCode_t * roadworksSubCauseCode() const
roadworksSubCauseCode Roadworks cause code getter.
quint16 * maximumRepetitionTime
Definition: GNDataRequest.h:57
struct SpecialVehicleContainer * specialVehicleContainer
Definition: CamParameters.h:31
quint16 m_T_GenCam_DCC
SpeedValue_t speedValue
Definition: Speed.h:24
PublicTransportContainer_t make_PublicTransportContainer()
make_PublicTransportContainer Make a default PublicTransportContainer_t.
Definition: apiCAM.cpp:969
LowFrequencyContainer_PR present
StationID_t stationID
Definition: ItsPduHeader.h:40
asn_TYPE_descriptor_t asn_DEF_CAM
Definition: CAM.c:45
AccelerationControl_t * accelerationControl() const
accelerationControl Acceleration control getter.
Definition: ParameterCAN.h:83
Definition: CAM.h:23
FakeGPSProvider * m_paramGPS
HighFrequencyContainer_t highFrequencyContainer
Definition: CamParameters.h:29
void PassCamToNetworkAndTransportLayer(char *cam, int camLength)
PassCamToNetworkAndTransportLayer Pass the encoded CAM to the N&T layer.
CAM_t previousCAM() const
previousCAM Previous CAM getter
SpecialVehicleContainer_t collectOptionalData_SpecialVehicleContainer(VehicleRole_t v)
collectOptionalData_SpecialVehicleContainer Collect optional data for the SpecialVehicleContainer.
ProtectedCommunicationZonesRSU_t * protectedCommunicationZones() const
protectedCommunicationZones Protected communicaiton zones getter.
double dist(qint32 x1, qint32 y1, qint32 x2, qint32 y2)
dist This function calculate the euclidian distance between two points ([x1, y1], [x2...
Definition: api.cpp:228
quint16 T_GenCam_DCC() const
T_GenCam_DCC T_GenCam_DCC getter.
QElapsedTimer m_elapsed
SpecialTransportContainer_t make_SpecialTransportContainer()
make_SpecialTransportContainer Make a default SpecialTransportContainer_t.
Definition: apiCAM.cpp:1025
QList< GenerationDeltaTime_t > m_listGenerationDeltaTime
BasicVehicleContainerLowFrequency_t basicVehicleContainerLowFrequency
bool checkCamGeneration()
checkCamGeneration Check if a CAM needs to be generated.
CauseCode_t * causeCodeEmergency() const
causeCodeEmergency Emergency cause code getter.
LightBarSirenInUse_t lightBarSirenInUse
FakeCANProvider * m_paramCAN
EmergencyPriority_t * emergencyPriority
SpecialTransportType_t specialTransportType
VerticalAcceleration_t * verticalAcceleration() const
verticalAcceleration Vertical acceleration getter.
Definition: ParameterCAN.h:153
EmergencyPriority_t * emergencyPriority() const
emergencyPriority Emergency priority getter.
YawRate_t yawRate() const
yawRate Yaw rate getter.
Definition: ParameterCAN.h:158
quint64 timestamp()
timestamp Timestamp getter.
RoadWorksContainerBasic_t collectOptionalData_RoadWorksContainerbasic()
collectOptionalData_RoadWorksContainerbasic Collect optional data for the RoadWorksContainerBasic.
VehicleRole_t vehicleRole() const
vehicleRole Vehicle role getter.
VehicleLength_t vehicleLength() const
vehicleLength Vehicle length getter.
ssize_t encoded
Definition: asn_codecs.h:48
FakeApplicationProvider * m_paramAppli
EmergencyContainer_t collectOptionalData_EmergencyContainer()
collectOptionalData_EmergencyContainer Collect optional data for the EmergencyContainer.
struct LowFrequencyContainer * lowFrequencyContainer
Definition: CamParameters.h:30
SteeringWheelAngle_t * steeringWheelAngle() const
steeringWheelAngle Steering wheel angle getter.
Definition: ParameterCAN.h:148
ParameterCAN & data()
data CAN bus data getter.
#define T_GenCamMin
BasicVehicleContainerLowFrequency_t collectOptionalData_BasicVehicleContainerLowFrequency()
collectOptionalData_BasicVehicleContainerLowFrequency Collect optional data for the BasicVehicleConta...
AccelerationControl_t cpy_AccelerationControl(AccelerationControl_t a)
cpy_AccelerationControl Make a copy of an AccelerationControl_t.
Definition: apiCDD.cpp:486
union LowFrequencyContainer::LowFrequencyContainer_u choice
ClosedLanes_t * closedLanes() const
closedLanes Closed lanes getter.
bool needSpecialVehicleContainer(VehicleRole_t role)
needSpecialVehicleContainer Check if there need SpecialVehicleContainer.
TrafficRule_t * trafficRule
SpecialTransportContainer_t collectOptionalData_SpecialTransportContainer()
collectOptionalData_SpecialTransportContainer Collect optional data for the SpecialTransportContainer...
DriveDirection_t driveDirection() const
driveDirection Drive direction getter.
Definition: ParameterCAN.h:98
CAM_t cpy_CAM(CAM_t c)
cpy_CAM Make a copy of a CAM_t.
Definition: apiCAM.cpp:275
TrafficRule_t * trafficRule() const
trafficRule Traffic rule getter.
struct ClosedLanes * closedLanes
LateralAcceleration_t * lateralAcceleration() const
lateralAcceleration Lateral acceleration getter.
Definition: ParameterCAN.h:113
#define MIN(a, b)
Definition: asn_system.h:123
static bool firstCAM
ExteriorLights_t exteriorLights() const
exteriorLights Exterior lights status getter.
Definition: ParameterCAN.h:103
CAM_t collectMandatoryData()
collectMandatoryData Collect the CAM mandatory data.
VehicleWidth_t vehicleWidth() const
vehicleWidth Vehicle width getter.
LongitudinalAcceleration_t longitudinalAcceleration() const
longitudinalAcceleration Longitudinal acceleration getter.
Definition: ParameterCAN.h:123
BasicContainer_t basicContainer
Definition: CamParameters.h:28
QUdpSocket * udpSocket
HeadingValue_t headingValue
Definition: Heading.h:24
void checkToSendCAM()
checkToSendCAM Slot used when there need to check if we need to send CAM.
ItsPduHeader_t header
Definition: CAM.h:24
PathDeltaTime_t * pathDeltaTime
Definition: PathPoint.h:25
ParameterConfiguration * m_paramConf
SpecialTransportType_t specialTransportType() const
specialTransportType Special transport type getter.
struct CauseCode * incidentIndication
GenerationDeltaTime_t generationDeltaTime
Definition: CoopAwareness.h:24
VerticalAcceleration_t cpy_VerticalAcceleration(VerticalAcceleration_t v)
cpy_VerticalAcceleration Make a copy of a VerticalAcceleration_t.
Definition: apiCDD.cpp:1071
ParameterGPS & data()
data GPS data getter.
CommonHeader::e_upperProtocolEntity upperProtocolEntity
Definition: GNDataRequest.h:48
SpeedLimit_t * speedLimit
CoopAwareness_t cam
Definition: CAM.h:25
BasicContainer_t collectMandatoryData_BasicContainer()
collectMandatoryData_BasicContainer Collect mandatory data for the BasicContainer.
void checkPathPoint(int i)
checkPathPoint Check a PathPoint.
LateralAcceleration_t cpy_LateralAcceleration(LateralAcceleration_t l)
cpy_LateralAcceleration Make a copy of a LateralAcceleration_t.
Definition: apiCDD.cpp:850
QTime lastLF() const
lastLF Last time where a CAM had a LowFrequencyContainer.
AltitudeValue_t altitudeValue
Definition: Altitude.h:24
PtActivation_t * ptActivation() const
ptActivation Priority activation getter.
LightBarSirenInUse_t lightBarSirenInUse
CAM_t make_CAM()
make_CAM Make a default CAM_t.
Definition: apiCAM.cpp:870
QList< ReferencePosition_t > m_listReferencePosition
RoadWorksContainerBasic_t make_RoadWorksContainerBasic()
make_RoadWorksContainerBasic Make a default RoadWorksContainerBasic_t.
Definition: apiCAM.cpp:990
CA Basic Service.
destinationAddress_t destinationAddress
Definition: GNDataRequest.h:53
quint8 packetTransportSubType
Definition: GNDataRequest.h:50
StationType_t stationType() const
stationType Station type getter.
quint8 * maximumHopLimit
Definition: GNDataRequest.h:58
#define DEFAULT_N_GEN_CAM
long VehicleRole_t
Definition: VehicleRole.h:41
DangerousGoodsBasic_t dangerousGoodsBasic() const
dangerousGoodsBasic Dangerous goods for CAM getter.
#define asn_sequence_add
void setPreviousTime(QTime p)
setPreviousTime Set the time where the previous CAM was sent.
union HighFrequencyContainer::HighFrequencyContainer_u choice
Speed_t speed() const
speed ITS-S speed getter.
Definition: ParameterGPS.h:86
BasicVehicleContainerHighFrequency_t basicVehicleContainerHighFrequency
quint16 destinationPort
Definition: GNDataRequest.h:51
ItsPduHeader_t header
ReferencePosition_t referencePosition() const
referencePosition ITS-S position getter.
Definition: ParameterGPS.h:81
void setT_CheckGenCam(quint16 t)
setT_CheckGenCam Set the T_CheckGenCam.
asn_enc_rval_t uper_encode_to_buffer(struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, void *buffer, size_t buffer_size)
Definition: per_encoder.c:33
SafetyCarContainer_t collectOptionalData_SafetyCarContainer()
collectOptionalData_SafetyCarContainer Collect optional data for the SafetyCarContainer.
SpecialVehicleContainer_PR present
StationID_t stationID() const
stationID Station ID getter.
union SpecialVehicleContainer::SpecialVehicleContainer_u choice
ReferencePosition_t referencePosition
BasicContainer_t make_BasicContainer()
make_BasicContainer Make a default BasicContainer_t.
Definition: apiCAM.cpp:822
long PathDeltaTime_t
Definition: PathDeltaTime.h:26
ParameterApplication & data()
data Returns the vehicle status.
CommonHeader::e_headerType packetTransportType
Definition: GNDataRequest.h:49
e_destinationAddress_PR_present present
Definition: GNDataRequest.h:32
EmergencyContainer_t make_EmergencyContainer()
make_EmergencyContainer Make a default EmergencyContainer_t.
Definition: apiCAM.cpp:915
PathPoint_t getPathPoint(int i)
getPathPoint PathPoint getter.
BasicVehicleContainerHighFrequency_t collectMandatoryData_BasicVehicleContainerHighFrequency()
collectMandatoryData_BasicVehicleContainerHighFrequency Collect mandatory data for the BasicVehicleCo...
RescueContainer_t collectOptionalData_RescueContainer()
collectOptionalData_RescueContainer Collect optional data for the RescueContainer.
#define T_GenCamMax
quint16 destinationPortInfo
Definition: GNDataRequest.h:52
BasicVehicleContainerLowFrequency_t make_BasicVehicleContainerLowFrequency()
make_BasicVehicleContainerLowFrequency Make a default BasicVehicleContainerLowFrequency_t.
Definition: apiCAM.cpp:858
PublicTransportContainer_t collectOptionalData_PublicTransportContainer()
collectOptionalData_PublicTransportContainer Collect optional data for the PublicTransportContainer.
SpeedLimit_t * speedLimit() const
speedLimit Speed limit getter.
struct PtActivation * ptActivation
int send(gnDataRequest_t gnDR)
send Creates the BTP and then select the correct packet send option.
Definition: Geonet.cpp:497
caBasicService(GeoNet *geonet, FakeGPSProvider *paramGPS, ParameterConfiguration *paramConf, FakeApplicationProvider *paramAppli, FakeCANProvider *paramCAN)
caBasicService caBasicService constructor.
void checkAndCollectDataForOptionalContainers(CAM_t *cam)
checkAndCollectDataForOptionalContainers Check and collect data for optional containers.
DangerousGoodsContainer_t collectOptionalData_DangerousGoodsContainer()
collectOptionalData_DangerousGoodsContainer Collect optional data for the DangerousGoodsContainer.
Heading_t heading() const
heading ITS-S heading getter.
Definition: ParameterGPS.h:71
void setN_GenCam(quint16 n)
setN_GenCam Set the N_GenCam
QByteArray payload
Definition: GNDataRequest.h:60
SafetyCarContainer_t make_SafetyCarContainer()
make_SafetyCarContainer Make a default SafetyCarContainer_t.
Definition: apiCAM.cpp:1012
e_gnCommunicationProfile gnCommunicationProfile
Definition: GNDataRequest.h:54
DangerousGoodsBasic_t dangerousGoodsBasic
DangerousGoodsContainer_t make_DangerousGoodsContainer()
make_DangerousGoodsContainer Make a default DangerousGoodsContainer_t.
Definition: apiCAM.cpp:905
Definition: Geonet.h:42
LightBarSirenInUse_t lightBarSirenInUse() const
lightBarSirenInUse Light bar and siren status getter.
Definition: ParameterCAN.h:118
void utInitialize()
utInitialize Initialize the CA Basic Service.
RSUContainerHighFrequency_t collectMandatoryData_RSUContainerHighFrequency()
collectMandatoryData_RSUContainerHighFrequency Collect mandatory data for the RSUContainerHighFrequen...
LightBarSirenInUse_t lightBarSirenInUse
TrafficClass trafficClass
Definition: GNDataRequest.h:59
struct ProtectedCommunicationZonesRSU * protectedCommunicationZonesRSU
CauseCode_t * causeCodeSafety() const
causeCodeSafety Safety car cause code getter.
BasicVehicleContainerHighFrequency_t make_BasicVehicleContainerHighFrequency()
make_BasicVehicleContainerHighFrequency Make a default BasicVehicleContainerHighFrequency_t.
Definition: apiCAM.cpp:833
#define MAX_REFERENCEPOSITION
Curvature_t curvature() const
curvature Curvature getter.
Definition: ParameterCAN.h:88
LightBarSirenInUse_t lightBarSirenInUse
EmbarkationStatus_t embarkationStatus() const
embarkationStatus Embarkation status getter.
LightBarSirenInUse_t lightBarSirenInUse
DeltaReferencePosition_t pathPosition
Definition: PathPoint.h:24