ITS
ParameterApplication.cpp
Go to the documentation of this file.
1 #include "ParameterApplication.h"
2 
4 {
5  read();
6  //readDebug();
7 }
8 
10 {
11  mutex->lock();
12  read();
13  //readDebug();
14  mutex->unlock();
15 }
16 
18 {
19 }
20 
22 {
23  unsigned int i;
24 
25  cfg_opt_t causeCode_opts[] =
26  {
27  CFG_INT("causeCodeType", NULL, CFGF_IGNORE_UNKNOWN),
28 
29  CFG_INT("subCauseCodeType", NULL, CFGF_IGNORE_UNKNOWN),
30 
31  CFG_END()
32  };
33 
34  cfg_opt_t closedLanes_opts[] =
35  {
36  CFG_BOOL_LIST("drivingLaneStatus", NULL, CFGF_NONE),
37 
38  CFG_INT("hardShoulderStatus", -1, CFGF_IGNORE_UNKNOWN),
39 
40  CFG_END()
41  };
42 
43  cfg_opt_t dangerousGoodExtended_opt[] =
44  {
45  CFG_INT_LIST("companyName", NULL, CFGF_IGNORE_UNKNOWN),
46 
47  CFG_INT("dangerousGoodsType", -1, CFGF_NONE),
48 
49  CFG_BOOL("elevatedTemperature", cfg_false, CFGF_NONE),
50 
51  CFG_INT_LIST("emergencyActionCode", NULL, CFGF_IGNORE_UNKNOWN),
52 
53  CFG_BOOL("limitedQuantity", cfg_false, CFGF_NONE),
54 
55  CFG_INT_LIST("phoneNumber", NULL, CFGF_IGNORE_UNKNOWN),
56 
57  CFG_BOOL("tunnelsRestricted", cfg_false, CFGF_NONE),
58 
59  CFG_INT("unNumber", -1, CFGF_NONE),
60 
61  CFG_END()
62  };
63 
64  cfg_opt_t ptActivation_opts[] =
65  {
66  CFG_INT_LIST("ptActivationData", NULL, CFGF_NONE),
67 
68  CFG_INT("ptActivationType", NULL, CFGF_NONE),
69 
70  CFG_END()
71  };
72 
73  cfg_opt_t vehicleIdentification_opt[] =
74  {
75  CFG_INT_LIST("vDS", NULL, CFGF_IGNORE_UNKNOWN),
76 
77  CFG_INT_LIST("wMInumber", NULL, CFGF_IGNORE_UNKNOWN),
78 
79  CFG_END()
80  };
81 
82  cfg_opt_t protectedCommunicationZone_opt[] =
83  {
84  CFG_INT("protectedZoneType", 0, CFGF_NONE),
85 
86  CFG_INT("expiryTime", 0, CFGF_NODEFAULT | CFGF_IGNORE_UNKNOWN),
87 
88  CFG_INT("protectedZoneLatitude", 0, CFGF_NONE),
89 
90  CFG_INT("protectedZoneLongitude", 0, CFGF_NONE),
91 
92  CFG_INT("protectedZoneRadius", 0, CFGF_NODEFAULT | CFGF_IGNORE_UNKNOWN),
93 
94  CFG_INT("protectedZoneID", 0, CFGF_NODEFAULT | CFGF_IGNORE_UNKNOWN),
95 
96  CFG_END()
97  };
98 
99  cfg_opt_t protectedCommunicationZonesRSU_opt[] =
100  {
101  CFG_SEC("protectedCommunicationZone", protectedCommunicationZone_opt, CFGF_MULTI),
102 
103  CFG_END()
104  };
105 
106  cfg_opt_t opts[] =
107  {
108  CFG_SEC("causeCodeEmergency", causeCode_opts, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
109 
110  CFG_SEC("causeCodeSafety", causeCode_opts, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
111 
112  CFG_SEC("causeCodeStationary", causeCode_opts, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
113 
114  CFG_SEC("closedLanes", closedLanes_opts, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
115 
116  CFG_INT("dangerousGoodsBasic", DangerousGoodsBasic_miscellaneousDangerousSubstances, CFGF_NONE),
117 
118  CFG_SEC("dangerousGoodsExtended", dangerousGoodExtended_opt, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
119 
120  CFG_BOOL("embarkationStatus", cfg_false, CFGF_NONE),
121 
122  CFG_BOOL_LIST("emergencyPriority", "", CFGF_NODEFAULT | CFGF_IGNORE_UNKNOWN),
123 
124  CFG_BOOL("itsGnIsMobile", cfg_false, CFGF_NONE),
125 
126  CFG_SEC("protectedCommunicationZonesRSU", protectedCommunicationZonesRSU_opt, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
127 
128  CFG_SEC("ptActivation", ptActivation_opts, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
129 
130  CFG_INT("roadworksSubCauseCode", -1, CFGF_IGNORE_UNKNOWN),
131 
132  CFG_INT("speedLimit", -1, CFGF_IGNORE_UNKNOWN),
133 
134  CFG_BOOL_LIST("specialTransportType", "", CFGF_NODEFAULT | CFGF_IGNORE_UNKNOWN),
135 
136  CFG_INT("stationarySince", -1, CFGF_NODEFAULT | CFGF_IGNORE_UNKNOWN),
137 
138  CFG_INT("stationID", 0, CFGF_NONE),
139 
140  CFG_INT("stationType", StationType_unknown, CFGF_NONE),
141 
142  CFG_INT("trafficRule", -1, CFGF_IGNORE_UNKNOWN),
143 
144  CFG_SEC("vehicleIdentification", vehicleIdentification_opt, CFGF_MULTI | CFGF_IGNORE_UNKNOWN),
145 
146  CFG_INT("vehicleRole", VehicleRole_default, CFGF_NONE),
147 
148  CFG_END()
149  };
150 
151  cfg_t *cfg;
152  cfg_t *cfg_closedLanes;
153  cfg_t *cfg_causeCodeEmergency;
154  cfg_t *cfg_causeCodeSafety;
155  cfg_t *cfg_causeCodeStationary;
156  cfg_t *cfg_dangerousGoodExtended;
157  cfg_t *cfg_ptActivation;
158  cfg_t *cfg_protectedCommunicationZone[16];
159  cfg_t *cfg_protectedCommunicationZonesRSU;
160  cfg_t *cfg_vehicleIdentification;
161 
162  cfg = cfg_init(opts, CFGF_NONE);
163 
164  cfg_set_validate_func(cfg, "dangerousGoodsBasic", validate_unsigned_int);
165 
166  cfg_set_validate_func(cfg, "roadworksSubCauseCode", validate_unsigned_int);
167 
168  cfg_set_validate_func(cfg, "speedLimit", validate_unsigned_int);
169 
170  cfg_set_validate_func(cfg, "stationarySince", validate_unsigned_int);
171 
172  cfg_set_validate_func(cfg, "stationID", validate_unsigned_int);
173 
174  cfg_set_validate_func(cfg, "stationType", validate_unsigned_int);
175 
176  cfg_set_validate_func(cfg, "trafficRule", validate_unsigned_int);
177 
178  cfg_set_validate_func(cfg, "vehicleRole", validate_unsigned_int);
179 
180  cfg_add_searchpath(cfg, "/etc/its/config");
181  if(cfg_parse(cfg, "appli.conf") == CFG_PARSE_ERROR)
182  printf("PARSE_ERROR\n");
183 
184  cfg_closedLanes = cfg_getsec(cfg, "closedLanes");
185 
186  cfg_dangerousGoodExtended = cfg_getsec(cfg, "dangerousGoodsExtended");
187 
188  cfg_ptActivation = cfg_getsec(cfg, "ptActivation");
189 
190  cfg_causeCodeEmergency = cfg_getsec(cfg, "causeCodeEmergency");
191 
192  cfg_causeCodeSafety = cfg_getsec(cfg, "causeCodeSafety");
193 
194  cfg_causeCodeStationary = cfg_getsec(cfg, "causeCodeStationary");
195 
196  cfg_vehicleIdentification = cfg_getsec(cfg, "vehicleIdentification");
197 
198  cfg_protectedCommunicationZonesRSU = cfg_getsec(cfg, "protectedCommunicationZonesRSU");
199 
200  if(cfg_protectedCommunicationZonesRSU)
201  for(i = 0 ; i < cfg_size(cfg_protectedCommunicationZonesRSU, "protectedCommunicationZone") ; i++)
202  cfg_protectedCommunicationZone[i] = cfg_getnsec(cfg_protectedCommunicationZonesRSU, "protectedCommunicationZone", i);
203 
204  if(cfg_causeCodeEmergency)
205  {
206  m_causeCodeEmergency = (CauseCode_t*) calloc(1, sizeof(CauseCode_t));
207  m_causeCodeEmergency->causeCode = cfg_getint(cfg_causeCodeEmergency, "causeCodeType");
208  m_causeCodeEmergency->subCauseCode = cfg_getint(cfg_causeCodeEmergency, "subCauseCodeType");
209  }
210  else
212 
213  if(cfg_causeCodeSafety)
214  {
215  m_causeCodeSafety = (CauseCode_t*) calloc(1, sizeof(CauseCode_t));
216  m_causeCodeSafety->causeCode = cfg_getint(cfg_causeCodeSafety, "causeCodeType");
217  m_causeCodeSafety->subCauseCode = cfg_getint(cfg_causeCodeSafety, "subCauseCodeType");
218  }
219  else
220  m_causeCodeSafety = 0;
221 
222  if(cfg_causeCodeStationary)
223  {
224  m_causeCodeStationary = (CauseCode_t*) calloc(1, sizeof(CauseCode_t));
225  m_causeCodeStationary->causeCode = cfg_getint(cfg_causeCodeStationary, "causeCodeType");
226  m_causeCodeStationary->subCauseCode = cfg_getint(cfg_causeCodeStationary, "subCauseCodeType");
227  }
228  else
230 
231  if(cfg_closedLanes)
232  {
233  m_closedLanes = (ClosedLanes*) calloc(1, sizeof(ClosedLanes));
234  m_closedLanes->drivingLaneStatus = makeBitString(cfg_size(cfg_closedLanes, "drivingLaneStatus"), cfg_closedLanes, "drivingLaneStatus");
235  if(cfg_getint(cfg_closedLanes, "hardShoulderStatus") == -1)
237  else
238  {
240  *m_closedLanes->hardShoulderStatus = cfg_getint(cfg_closedLanes, "hardShoulderStatus");
241  }
242  }
243  else
244  m_closedLanes = 0;
245 
246  m_dangerousGoodsBasic= cfg_getint(cfg, "dangerousGoodsBasic");
247 
248  if(cfg_dangerousGoodExtended)
249  {
251 
252  if(cfg_size(cfg_dangerousGoodExtended, "companyName") != 0)
253  {
255  m_dangerousGoodsExtended->companyName->size = cfg_size(cfg_dangerousGoodExtended, "companyName");
257  for(int i=0; i<m_dangerousGoodsExtended->companyName->size; i++)
258  m_dangerousGoodsExtended->companyName->buf[i] = cfg_getnint(cfg_dangerousGoodExtended, "companyName", i);
259  }
260  else
262 
263  m_dangerousGoodsExtended->dangerousGoodsType = cfg_getint(cfg_dangerousGoodExtended, "dangerousGoodsType");
264  m_dangerousGoodsExtended->elevatedTemperature = cfg_getbool(cfg_dangerousGoodExtended, "elevatedTemperature");
265 
266  if(cfg_size(cfg_dangerousGoodExtended, "emergencyActionCode") != 0)
267  {
269  m_dangerousGoodsExtended->emergencyActionCode->size = cfg_size(cfg_dangerousGoodExtended, "emergencyActionCode");
271  for(int i=0; i<m_dangerousGoodsExtended->emergencyActionCode->size; i++)
272  m_dangerousGoodsExtended->emergencyActionCode->buf[i] = cfg_getnint(cfg_dangerousGoodExtended, "emergencyActionCode", i);
273  }
274  else
276 
277  m_dangerousGoodsExtended->limitedQuantity = cfg_getbool(cfg_dangerousGoodExtended, "limitedQuantity");
278 
279  if(cfg_size(cfg_dangerousGoodExtended, "phoneNumber") != 0)
280  {
282  m_dangerousGoodsExtended->phoneNumber->size = cfg_size(cfg_dangerousGoodExtended, "phoneNumber");
284  for(int i=0; i<m_dangerousGoodsExtended->phoneNumber->size; i++)
285  m_dangerousGoodsExtended->phoneNumber->buf[i] = cfg_getnint(cfg_dangerousGoodExtended, "phoneNumber", i);
286  }
287  else
289 
290  m_dangerousGoodsExtended->tunnelsRestricted = cfg_getbool(cfg_dangerousGoodExtended, "tunnelsRestricted");
291  m_dangerousGoodsExtended->unNumber = cfg_getint(cfg_dangerousGoodExtended, "unNumber");
292  }
293  else
295 
296  m_embarkationStatus = cfg_getbool(cfg, "embarkationStatus");
297 
298  if(cfg_size(cfg,"emergencyPriority"))
299  {
301  *m_emergencyPriority = makeBitString(cfg_size(cfg,"emergencyPriority"), cfg, "emergencyPriority");
302  }
303  else
305 
306  m_itsGnIsMobile = cfg_getbool(cfg, "itsGnIsMobile");
307 
308  if(cfg_size(cfg, "protectedCommunicationZonesRSU"))
309  {
311  m_protectedCommunicationZones->list.array = (ProtectedCommunicationZone_t**)calloc(1, sizeof *m_protectedCommunicationZones->list.array);
312  m_protectedCommunicationZones->list.count = 0;
313  m_protectedCommunicationZones->list.free = 0;
314  m_protectedCommunicationZones->list.size = 0;
315  for(i = 0 ; i < cfg_size(cfg_protectedCommunicationZonesRSU, "protectedCommunicationZone") ; i++)
316  {
318  p->protectedZoneType = cfg_getint(cfg_protectedCommunicationZone[i], "protectedZoneType");
319  if(cfg_size(cfg_protectedCommunicationZone[i], "expiryTime"))
320  {
321  p->expiryTime = (TimestampIts_t*)calloc(1, sizeof *p->expiryTime);
322  asn_long2INTEGER(p->expiryTime, cfg_getint(cfg_protectedCommunicationZone[i], "expiryTime"));
323  }
324  p->protectedZoneLatitude = cfg_getint(cfg_protectedCommunicationZone[i], "protectedZoneLatitude");
325  p->protectedZoneLongitude = cfg_getint(cfg_protectedCommunicationZone[i], "protectedZoneLongitude");
326  if(cfg_size(cfg_protectedCommunicationZone[i], "protectedZoneRadius"))
327  {
329  *p->protectedZoneRadius = cfg_getint(cfg_protectedCommunicationZone[i], "protectedZoneRadius");
330  }
331  if(cfg_size(cfg_protectedCommunicationZone[i], "protectedZoneID"))
332  {
333  p->protectedZoneID = (ProtectedZoneID_t*)calloc(1, sizeof *p->protectedZoneID);
334  *p->protectedZoneID = cfg_getint(cfg_protectedCommunicationZone[i], "protectedZoneID");
335  }
336  m_protectedCommunicationZones->list.array[i] = (ProtectedCommunicationZone_t*)calloc(1, sizeof *m_protectedCommunicationZones->list.array[i]);
338  }
339  }
340  else
342 
343  if(cfg_ptActivation)
344  {
345  m_ptActivation = (PtActivation_t*)calloc(1, sizeof *m_ptActivation);
346  m_ptActivation->ptActivationType = cfg_getint(cfg_ptActivation, "ptActivationType");
347  m_ptActivation->ptActivationData.size = cfg_size(cfg_ptActivation, "ptActivationData");
349  for(int i=0; i<m_ptActivation->ptActivationData.size; i++)
350  m_ptActivation->ptActivationData.buf[i] = cfg_getnint(cfg_ptActivation, "ptActivationData", i);
351  }
352  else
353  m_ptActivation = 0;
354 
355  if(cfg_getint(cfg, "roadworksSubCauseCode") == -1)
357  else
358  {
360  *m_roadworksSubCauseCode = cfg_getint(cfg, "roadworksSubCauseCode");
361  //constr_RoadworksSubCauseCode(m_roadworksSubCauseCode);
362  }
363 
364  if(cfg_getint(cfg, "speedLimit") == -1)
365  m_speedLimit = 0;
366  else
367  {
368  m_speedLimit = (SpeedLimit_t*) calloc(1, sizeof(SpeedLimit_t));
369  *m_speedLimit = cfg_getint(cfg, "speedLimit");
370  //constr_SpeedLimit(m_speedLimit);
371  }
372 
373  if(cfg_getint(cfg, "stationarySince") == -1)
374  m_stationarySince = 0;
375  else
376  {
377  m_stationarySince = (StationarySince_t*) calloc(1, sizeof(StationarySince_t));
378  *m_stationarySince = cfg_getint(cfg, "stationarySince");
379  //constr_SpeedLimit(m_speedLimit);
380  }
381 
382  m_stationID = cfg_getint(cfg, "stationID");
383 
384  m_stationType = cfg_getint(cfg, "stationType");
385 
386  m_specialTransportType = makeBitString(cfg_size(cfg,"specialTransportType"), cfg, "specialTransportType");
387 
388  if(cfg_getint(cfg, "trafficRule") == -1)
389  m_trafficRule = 0;
390  else
391  {
392  m_trafficRule = (TrafficRule_t*) calloc(1, sizeof(TrafficRule_t));
393  *m_trafficRule = cfg_getint(cfg, "trafficRule");
394  //constr_TrafficRule(m_trafficRule);
395  }
396 
397  if(cfg_vehicleIdentification)
398  {
400  if(cfg_size(cfg_vehicleIdentification, "vDS") != 0)
401  {
402  m_vehicleIdentification->vDS = (VDS_t*) calloc(1, sizeof(VDS_t));
403  m_vehicleIdentification->vDS->size = cfg_size(cfg_vehicleIdentification, "vDS");
404  m_vehicleIdentification->vDS->buf = (uint8_t*) calloc(m_vehicleIdentification->vDS->size, 1);
405  for(int i=0; i<m_vehicleIdentification->vDS->size; i++)
406  m_vehicleIdentification->vDS->buf[i] = cfg_getnint(cfg_vehicleIdentification, "vDS", i);
407  }
408  else
410 
411  if(cfg_size(cfg_vehicleIdentification, "wMInumber") != 0)
412  {
413  m_vehicleIdentification->wMInumber = (WMInumber_t*) calloc(1, sizeof(WMInumber_t));
414  m_vehicleIdentification->wMInumber->size = cfg_size(cfg_vehicleIdentification, "wMInumber");
416  for(int i=0; i<m_vehicleIdentification->wMInumber->size; i++)
417  m_vehicleIdentification->wMInumber->buf[i] = cfg_getnint(cfg_vehicleIdentification, "wMInumber", i);
418  }
419  else
421  }
422  else
424 
425  m_vehicleRole = cfg_getint(cfg, "vehicleRole");
426 
427  cfg_free(cfg);
428 }
429 
431 {
432  printf("-----------------------------------------------------------------\n\t\tReadAppliUpperTester\n\n");
433 
434  if(m_causeCodeEmergency != 0)
435  printf("causeCodeEmergency\n{\n\tcauseCodeType = %ld\n\tsubCauseCodeType = %ld\n}\n\n", m_causeCodeEmergency->causeCode, m_causeCodeEmergency->subCauseCode);
436 
437  if(m_causeCodeSafety != 0)
438  printf("causeCodeSafety\n{\n\tcauseCodeType = %ld\n\tsubCauseCodeType = %ld\n}\n\n", m_causeCodeSafety->causeCode, m_causeCodeSafety->subCauseCode);
439 
440  if(m_causeCodeStationary != 0)
441  printf("causeCodeStationary\n{\n\tcauseCodeType = %ld\n\tsubCauseCodeType = %ld\n}\n\n", m_causeCodeStationary->causeCode, m_causeCodeStationary->subCauseCode);
442 
443  if(m_closedLanes != 0)
444  {
445  printf("closedLanes\n{\n\tdrivingLaneStatus = %s\n", printBitString(m_closedLanes->drivingLaneStatus).toStdString().c_str());
447  printf("\thardShoulderStatus = %ld\n", *m_closedLanes->hardShoulderStatus);
448  printf("}\n\n");
449  }
450 
451  printf("dangerousGoodsBasic = %ld\n\n", m_dangerousGoodsBasic);
452 
453  if(m_dangerousGoodsExtended != 0)
454  {
455  printf("dangerousGoodsExtended\n{\n");
457  {
458  printf("\tcompanyName = {");
459  int i;
460  for(i=0; i<m_dangerousGoodsExtended->companyName->size-1; i++)
461  printf("%d, ", m_dangerousGoodsExtended->companyName->buf[i]);
462  printf("%d}\n\n", m_dangerousGoodsExtended->companyName->buf[i]);
463  }
464 
465  printf("\tdangerousGoodsType = %ld\n\n", m_dangerousGoodsExtended->dangerousGoodsType);
466 
467  printf("\televatedTemperature = ");m_dangerousGoodsExtended->elevatedTemperature?printf("true\n\n"):printf("false\n\n");
468 
470  {
471  printf("\temergencyActionCode = {");
472  int i;
474  printf("%d, ", m_dangerousGoodsExtended->emergencyActionCode->buf[i]);
475  printf("%d}\n\n", m_dangerousGoodsExtended->emergencyActionCode->buf[i]);
476  }
477 
478  printf("\tlimitedQuantity = ");m_dangerousGoodsExtended->limitedQuantity?printf("true\n\n"):printf("false\n\n");
479 
481  {
482  printf("\tphoneNumber = {");
483  int i;
484  for(i=0; i<m_dangerousGoodsExtended->phoneNumber->size-1; i++)
485  printf("%d, ", m_dangerousGoodsExtended->phoneNumber->buf[i]);
486  printf("%d}\n\n", m_dangerousGoodsExtended->phoneNumber->buf[i]);
487  }
488 
489  printf("\ttunnelsResticted = ");m_dangerousGoodsExtended->tunnelsRestricted?printf("true\n\n"):printf("false\n\n");
490 
491  printf("\tunNumber = %ld\n", m_dangerousGoodsExtended->unNumber);
492 
493  printf("}\n\n");
494  }
495 
496  printf("embarkationStatus = "); m_embarkationStatus?printf("true\n\n"):printf("false\n\n");
497 
498  if(m_emergencyPriority != 0)
499  printf("emergencyPriority = %s\n\n", printBitString(*m_emergencyPriority).toStdString().c_str());
500 
501  printf("itsGnIsMobile = %d\n\n", m_itsGnIsMobile);
502  if(m_ptActivation != 0)
503  {
504  printf("ptActivation\n{\n\tptActivationType = %ld\n\tptActivationDataLength = %d\n\tptActivationData = {", m_ptActivation->ptActivationType, m_ptActivation->ptActivationData.size);
505  int i;
506  for(i=0; i<m_ptActivation->ptActivationData.size-1; i++)
507  printf("%d, ", m_ptActivation->ptActivationData.buf[i]);
508  printf("%d}\n}\n\n", m_ptActivation->ptActivationData.buf[i]);
509  }
510 
511  if(m_roadworksSubCauseCode != 0)
512  printf("roadworksSubCauseCode = %ld\n\n", *m_roadworksSubCauseCode);
513 
514  if(m_speedLimit != 0)
515  printf("speedLimit = %ld\n\n", *m_speedLimit);
516 
517  printf("stationID = %ld\n\n", m_stationID);
518 
519  printf("stationType = %ld\n\n", m_stationType);
520 
521  printf("specialTransportType = %s\n\n", printBitString(m_specialTransportType).toStdString().c_str());
522 
523  if(m_trafficRule != 0)
524  printf("trafficRule = %ld\n\n", *m_trafficRule);
525 
526  if(m_vehicleIdentification != 0)
527  {
528  printf("vehicleIdentification\n{\n");
529  if(m_vehicleIdentification->vDS != 0)
530  {
531  printf("\tvDS = {");
532  int i;
533  for(i=0; i<m_vehicleIdentification->vDS->size-1; i++)
534  printf("%d, ", m_vehicleIdentification->vDS->buf[i]);
535  printf("%d}\n\n", m_vehicleIdentification->vDS->buf[i]);
536  }
537 
539  {
540  printf("\twMInumber = {");
541  int i;
542  for(i=0; i<m_vehicleIdentification->wMInumber->size-1; i++)
543  printf("%d, ", m_vehicleIdentification->wMInumber->buf[i]);
544  printf("%d}\n", m_vehicleIdentification->wMInumber->buf[i]);
545  }
546  printf("}\n\n");
547  }
548 
549  printf("vehicleRole = %ld\n\n", m_vehicleRole);
550 
551 }
552 
554 {
556  this->m_causeCodeSafety = other.m_causeCodeSafety;
558  this->m_closedLanes = other.m_closedLanes;
563  this->m_itsGnIsMobile = other.m_itsGnIsMobile;
565  this->m_ptActivation = other.m_ptActivation;
568  this->m_speedLimit = other.m_speedLimit;
569  this->m_stationarySince = other.m_stationarySince;
570  this->m_stationID = other.m_stationID;
571  this->m_stationType = other.m_stationType;
573  this->m_vehicleRole = other.m_vehicleRole;
574  return *this;
575 }
#define ASN_SEQUENCE_ADD(headptr, ptr)
void read()
read Configuration file reading.
PtActivation_t * m_ptActivation
VehicleIdentification_t * m_vehicleIdentification
int validate_unsigned_int(cfg_t *cfg, cfg_opt_t *opt)
validate_unsigned_int Check if an option is an unsigned int
Definition: api.cpp:186
CauseCode_t * m_causeCodeEmergency
long RoadworksSubCauseCode_t
long HardShoulderStatus_t
SpecialTransportType_t m_specialTransportType
long StationarySince_t
QString printBitString(BIT_STRING_t b)
printBitString Print a BIT_STRING into a QString.
Definition: api.cpp:175
RoadworksSubCauseCode_t * m_roadworksSubCauseCode
long ProtectedZoneID_t
int asn_long2INTEGER(INTEGER_t *i, long l)
Definition: INTEGER.c:882
ProtectedCommunicationZonesRSU_t * m_protectedCommunicationZones
ParameterApplication()
ParameterApplication ParameterApplication default constructor.
long ProtectedZoneRadius_t
CauseCode_t * m_causeCodeStationary
long TrafficRule_t
Definition: TrafficRule.h:32
void readDebug()
readDebug Configuration printing.
HardShoulderStatus_t * hardShoulderStatus
Definition: ClosedLanes.h:24
CauseCodeType_t causeCode
Definition: CauseCode.h:24
BIT_STRING_t makeBitString(int nbits, cfg_t *cfg, const char *opt_name)
makeBitString Generate a BIT_STRING from configuration.
Definition: api.cpp:198
ProtectedZoneRadius_t * protectedZoneRadius
EmergencyPriority_t * m_emergencyPriority
CauseCode_t * m_causeCodeSafety
PtActivationType_t ptActivationType
Definition: PtActivation.h:24
DangerousGoodsExtended_t * m_dangerousGoodsExtended
ParameterApplication & operator=(const ParameterApplication &other)
operator= Affectation operator.
long SpeedLimit_t
Definition: SpeedLimit.h:26
PtActivationData_t ptActivationData
Definition: PtActivation.h:25
DangerousGoodsBasic_t m_dangerousGoodsBasic
TrafficRule_t * m_trafficRule
StationarySince_t * m_stationarySince
EmbarkationStatus_t m_embarkationStatus
uint8_t * buf
Definition: OCTET_STRING.h:15
DangerousGoodsBasic_t dangerousGoodsType
DrivingLaneStatus_t drivingLaneStatus
Definition: ClosedLanes.h:25
SubCauseCodeType_t subCauseCode
Definition: CauseCode.h:25
ClosedLanes_t * m_closedLanes
~ParameterApplication()
~ParameterApplication ParameterApplication destructor.