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,6 +76,7 @@ module ItsRSUsSimulator_Functions { ...@@ -72,6 +76,7 @@ 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
if (PICS_GENERATE_DENM) {
// Build the list of the DENM events // Build the list of the DENM events
for (v_counter := 0; v_counter < lengthof(PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1]); v_counter := v_counter + 1) { for (v_counter := 0; v_counter < lengthof(PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1]); v_counter := v_counter + 1) {
v_denmParmContainers := m_denmParmContainers( v_denmParmContainers := m_denmParmContainers(
...@@ -89,10 +94,10 @@ module ItsRSUsSimulator_Functions { ...@@ -89,10 +94,10 @@ module ItsRSUsSimulator_Functions {
v_denmParmContainers.locationContainer v_denmParmContainers.locationContainer
))); )));
} // End of 'for' loop } // End of 'for' loop
// Build the messages value list for this RSU }
vc_rsuMessagesValueList[PX_RSU_ID - 1] := valueof( if (PICS_GENERATE_CAM) {
m_rsuProfile( // Build the list of the CAM events
valueof( v_cam := valueof(
m_camParm( m_camParm(
PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID, PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID,
m_rsuPosition( m_rsuPosition(
...@@ -101,8 +106,16 @@ module ItsRSUsSimulator_Functions { ...@@ -101,8 +106,16 @@ module ItsRSUsSimulator_Functions {
), ),
PICS_RSU_PARAMS[PX_RSU_ID - 1].pathHistory PICS_RSU_PARAMS[PX_RSU_ID - 1].pathHistory
) )
), );
v_denms }
// Build the messages value list for this RSU
vc_rsuMessagesValueList[PX_RSU_ID - 1] := valueof(
m_rsuProfile(
v_cam,
v_denms/*,
v_mapem,
v_spatems
v_ssem*/
)); ));
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
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].cam)) {
tc_cam.start; tc_cam.start;
}
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].denm)) {
tc_denm.start; 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;
} }
......
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