Commit 2e1a0f62 authored by garciay's avatar garciay
Browse files

RSUsimulator: Add PICS_GENERATE_xxx

parent a1fdee3c
...@@ -50,7 +50,11 @@ module ItsRSUsSimulator_Functions { ...@@ -50,7 +50,11 @@ module ItsRSUsSimulator_Functions {
// Local variables // Local variables
var template (value) DenmParmContainers v_denmParmContainers; var template (value) DenmParmContainers v_denmParmContainers;
var DENMs v_denms := {}; var template (omit) DENMs v_denms := omit;
var template (omit) CAM v_cam := omit;
// var template (omit) MAPEM v_mapem := omit;
// var template (omit) SPATEMs v_spatems := omit;
// var template (omit) SSEM v_ssem := omit;
var integer v_counter; var integer v_counter;
// Map // Map
...@@ -72,37 +76,46 @@ module ItsRSUsSimulator_Functions { ...@@ -72,37 +76,46 @@ module ItsRSUsSimulator_Functions {
vc_longPosVectorRsu := PICS_RSU_PARAMS[PX_RSU_ID - 1].longPosVector; vc_longPosVectorRsu := PICS_RSU_PARAMS[PX_RSU_ID - 1].longPosVector;
// TODO MAPEM // TODO MAPEM
// TODO IVIM // TODO IVIM
// Build the list of the DENM events if (PICS_GENERATE_DENM) {
for (v_counter := 0; v_counter < lengthof(PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1]); v_counter := v_counter + 1) { // Build the list of the DENM events
v_denmParmContainers := m_denmParmContainers( for (v_counter := 0; v_counter < lengthof(PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1]); v_counter := v_counter + 1) {
PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID, v_denmParmContainers := m_denmParmContainers(
f_getDenmSequenceNumber(), PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID,
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventPosition, f_getDenmSequenceNumber(),
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].causeCodeType, PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventPosition,
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventHistory PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].causeCodeType,
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventHistory
);
v_denms[v_counter] := valueof(
m_denmPdu(
m_denm(
v_denmParmContainers.managementContainer,
v_denmParmContainers.situationContainer,
v_denmParmContainers.locationContainer
)));
} // End of 'for' loop
}
if (PICS_GENERATE_CAM) {
// Build the list of the CAM events
v_cam := valueof(
m_camParm(
PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID,
m_rsuPosition(
vc_longPosVectorRsu.latitude,
vc_longPosVectorRsu.longitude
),
PICS_RSU_PARAMS[PX_RSU_ID - 1].pathHistory
)
); );
v_denms[v_counter] := valueof( }
m_denmPdu(
m_denm(
v_denmParmContainers.managementContainer,
v_denmParmContainers.situationContainer,
v_denmParmContainers.locationContainer
)));
} // End of 'for' loop
// Build the messages value list for this RSU // Build the messages value list for this RSU
vc_rsuMessagesValueList[PX_RSU_ID - 1] := valueof( vc_rsuMessagesValueList[PX_RSU_ID - 1] := valueof(
m_rsuProfile( m_rsuProfile(
valueof( v_cam,
m_camParm( v_denms/*,
PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID, v_mapem,
m_rsuPosition( v_spatems
vc_longPosVectorRsu.latitude, v_ssem*/
vc_longPosVectorRsu.longitude
),
PICS_RSU_PARAMS[PX_RSU_ID - 1].pathHistory
)
),
v_denms
)); ));
if (PICS_RSU_PARAMS[PX_RSU_ID - 1].geoShape == e_geoCircle) { if (PICS_RSU_PARAMS[PX_RSU_ID - 1].geoShape == e_geoCircle) {
vc_geoArea := f_computeCircularArea(vc_longPosVectorRsu, PICS_RSU_PARAMS[PX_RSU_ID - 1].geoParms.radius); vc_geoArea := f_computeCircularArea(vc_longPosVectorRsu, PICS_RSU_PARAMS[PX_RSU_ID - 1].geoParms.radius);
...@@ -111,20 +124,6 @@ module ItsRSUsSimulator_Functions { ...@@ -111,20 +124,6 @@ module ItsRSUsSimulator_Functions {
setverdict(inconc); setverdict(inconc);
stop; stop;
} }
// Sanity checks
if (not isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1])) {
log("*** " & testcasename() & ": INCONC: Wrong profiles initialisation ***");
setverdict(inconc);
stop;
} else if (not isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].cam)) {
log("*** " & testcasename() & ": INCONC: Wrong CAM initialisation ***");
setverdict(inconc);
stop;
} else if (not isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].denms)) {
log("*** " & testcasename() & ": INCONC: Wrong DENM initialisation ***");
setverdict(inconc);
stop;
}
} // End of function f_cf01Up } // End of function f_cf01Up
...@@ -282,6 +281,7 @@ module ItsRSUsSimulator_Functions { ...@@ -282,6 +281,7 @@ module ItsRSUsSimulator_Functions {
function f_processSrem( function f_processSrem(
in GeoNetworkingPdu p_geoNetworkingPdu in GeoNetworkingPdu p_geoNetworkingPdu
) runs on ItsRSUsSimulator { ) runs on ItsRSUsSimulator {
log("SREM=", p_geoNetworkingPdu)
// TODO Process message, and send SSEM // TODO Process message, and send SSEM
} }
......
...@@ -287,6 +287,16 @@ module ItsRSUsSimulator_Pics { ...@@ -287,6 +287,16 @@ module ItsRSUsSimulator_Pics {
group generationFrequencies { group generationFrequencies {
modulepar boolean PICS_GENERATE_CAM := true;
modulepar boolean PICS_GENERATE_DENM := true;
modulepar boolean PICS_GENERATE_IVIM := true;
modulepar boolean PICS_GENERATE_MAPEM_SPATEM := true;
modulepar boolean PICS_GENERATE_SSEM := true;
/** /**
* @desc CAM frequency timer * @desc CAM frequency timer
*/ */
......
...@@ -38,8 +38,12 @@ module ItsRSUsSimulator_TestCases { ...@@ -38,8 +38,12 @@ module ItsRSUsSimulator_TestCases {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body // Test Body
tc_cam.start; if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].cam)) {
tc_denm.start; tc_cam.start;
}
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].denm)) {
tc_denm.start;
}
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].mapem)) { if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].mapem)) {
tc_mapem.start; tc_mapem.start;
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
*/ */
module ItsSrem_TpFunctions { module ItsSrem_TpFunctions {
// LibCommon // LibCommon
import from LibCommon_BasicTypesAndValues all; import from LibCommon_BasicTypesAndValues all;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment