Commit 2e1a0f62 authored by garciay's avatar garciay

RSUsimulator: Add PICS_GENERATE_xxx

parent a1fdee3c
......@@ -50,7 +50,11 @@ module ItsRSUsSimulator_Functions {
// Local variables
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;
// Map
......@@ -72,37 +76,46 @@ module ItsRSUsSimulator_Functions {
vc_longPosVectorRsu := PICS_RSU_PARAMS[PX_RSU_ID - 1].longPosVector;
// TODO MAPEM
// TODO IVIM
// 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) {
v_denmParmContainers := m_denmParmContainers(
PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID,
f_getDenmSequenceNumber(),
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventPosition,
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].causeCodeType,
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventHistory
if (PICS_GENERATE_DENM) {
// 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) {
v_denmParmContainers := m_denmParmContainers(
PICS_RSU_PARAMS[PX_RSU_ID - 1].stationID,
f_getDenmSequenceNumber(),
PICS_DENM_EVENTS_RSU[PX_RSU_ID - 1][v_counter].eventPosition,
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
vc_rsuMessagesValueList[PX_RSU_ID - 1] := valueof(
m_rsuProfile(
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_cam,
v_denms/*,
v_mapem,
v_spatems
v_ssem*/
));
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);
......@@ -111,20 +124,6 @@ module ItsRSUsSimulator_Functions {
setverdict(inconc);
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
......@@ -282,6 +281,7 @@ module ItsRSUsSimulator_Functions {
function f_processSrem(
in GeoNetworkingPdu p_geoNetworkingPdu
) runs on ItsRSUsSimulator {
log("SREM=", p_geoNetworkingPdu)
// TODO Process message, and send SSEM
}
......
......@@ -287,6 +287,16 @@ module ItsRSUsSimulator_Pics {
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
*/
......
......@@ -38,8 +38,12 @@ module ItsRSUsSimulator_TestCases {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_cam.start;
tc_denm.start;
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].cam)) {
tc_cam.start;
}
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].denm)) {
tc_denm.start;
}
if (isbound(vc_rsuMessagesValueList[PX_RSU_ID - 1].mapem)) {
tc_mapem.start;
}
......
......@@ -6,7 +6,7 @@
*
*/
module ItsSrem_TpFunctions {
module ItsSrem_TpFunctions {
// LibCommon
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