Commit 34d8b001 authored by garciay's avatar garciay
Browse files

Merge with C2C project

parent faf5e0e9
......@@ -31,6 +31,9 @@
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsBtp {
//deactivate btpPort default alts
vc_btpDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
......@@ -47,12 +50,11 @@
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate btpPort default alts
vc_btpDefaultActive := true;
}
/**
......@@ -61,6 +63,9 @@
*/
function f_utTriggerEvent(template (value) UtBtpTrigger p_event) runs on ItsBtp {
//deactivate btpPort default alts
vc_btpDefaultActive := false;
utPort.send(p_event);
alt {
[] utPort.receive(UtBtpTriggerResult:true) {
......@@ -71,11 +76,11 @@
}
[] tc_wait.timeout {
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate btpPort default alts
vc_btpDefaultActive := true;
}
} // End of group utFunctions
......@@ -113,7 +118,7 @@
*/
altstep a_default() runs on ItsBtp {
[] btpPort.receive {
[vc_btpDefaultActive] btpPort.receive {
log("*** a_default: ERROR: Received an unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
......@@ -138,12 +143,12 @@
*/
altstep a_utDefault() runs on ItsBtp {
var UtBtpEventInd v_ind;
[] utPort.receive(UtBtpEventInd:?) -> value v_ind {
[vc_utDefaultActive] utPort.receive(UtBtpEventInd:?) -> value v_ind {
//store every upper tester indication received
vc_utEvents[lengthof(vc_utEvents)] := v_ind;
repeat;
}
[] utPort.receive {
[vc_utDefaultActive] utPort.receive {
log("*** " & testcasename() & ": INFO: Received unhandled/unknown UT message from IUT ***");
repeat;
}
......
......@@ -80,6 +80,9 @@ module LibItsBtp_TestSystem {
var UtBtpEventIndList vc_utEvents := {};
var boolean vc_utDefaultActive := true;
var boolean vc_btpDefaultActive := true;
} // End of component ItsBtp
group networkAndTransportPrimitives {
......
......@@ -32,6 +32,9 @@ module LibItsCam_Functions {
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
......@@ -48,12 +51,11 @@ module LibItsCam_Functions {
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate camPort default alts
vc_camDefaultActive := true;
}
/**
......@@ -62,6 +64,9 @@ module LibItsCam_Functions {
*/
function f_utTriggerEvent(template (value) UtCamTrigger p_event) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
......@@ -73,11 +78,11 @@ module LibItsCam_Functions {
}
[] tc_wait.timeout {
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate camPort default alts
vc_camDefaultActive := true;
}
/**
......@@ -86,6 +91,9 @@ module LibItsCam_Functions {
*/
function f_utChangePosition(template (value) UtChangePosition p_position) runs on ItsCam {
//deactivate camPort default alts
vc_camDefaultActive := false;
utPort.send(p_position);
alt {
[] utPort.receive(UtChangePositionResult:?) {
......@@ -98,11 +106,11 @@ module LibItsCam_Functions {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate camPort default alts
vc_camDefaultActive := true;
}
} // End of group utFunctions
......
......@@ -108,6 +108,9 @@ module LibItsCam_TestSystem {
var UtCamEventIndList vc_utEvents := {};
var boolean vc_utDefaultActive := true;
var boolean vc_camDefaultActive := true;
} // End of component ItsCam
group facilityPrimitives {
......
......@@ -33,6 +33,9 @@ module LibItsDenm_Functions {
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
......@@ -47,11 +50,11 @@ module LibItsDenm_Functions {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
// //f_sleep(0.050); // 50 ms
repeat;
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
/**
......@@ -60,6 +63,9 @@ module LibItsDenm_Functions {
*/
function f_utChangePseudonym ( template (value) UtChangePseudonym p_change ) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_change);
tc_wait.start;
alt {
......@@ -79,12 +85,11 @@ module LibItsDenm_Functions {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
// //f_sleep(0.050); // 50 ms
repeat;
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
/**
......@@ -95,6 +100,9 @@ module LibItsDenm_Functions {
var ActionID v_actionId;
var UtDenmTriggerResult v_result;
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
......@@ -112,12 +120,11 @@ module LibItsDenm_Functions {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
// //f_sleep(0.050); // 50 ms
repeat;
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
return v_actionId;
}
......@@ -129,6 +136,9 @@ module LibItsDenm_Functions {
var ActionID v_actionId;
var UtDenmUpdateResult v_result;
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
......@@ -143,12 +153,11 @@ module LibItsDenm_Functions {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
// //f_sleep(0.050); // 50 ms
repeat;
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
return v_actionId;
}
......@@ -158,6 +167,9 @@ module LibItsDenm_Functions {
*/
function f_utTerminateEvent(template (value) UtDenmTermination p_event) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
......@@ -171,11 +183,11 @@ module LibItsDenm_Functions {
[] a_utDefault() {
//empty on purpose
}
[else] { // Shortcut defaults
// //f_sleep(0.050); // 50 ms
repeat;
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
/**
......@@ -186,6 +198,9 @@ module LibItsDenm_Functions {
*/
function f_utChangePosition(template (value) UtChangePosition p_position) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_position);
tc_wait.start;
alt {
......@@ -199,11 +214,11 @@ module LibItsDenm_Functions {
[] a_utDefault() {
//empty on purpose
}
[else] { // Shortcut defaults
// //f_sleep(0.050); // 50 ms
repeat;
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
} // End of group utFunctions
......@@ -362,12 +377,12 @@ module LibItsDenm_Functions {
* @desc The base default.
*/
altstep a_default() runs on ItsDenm {
[] denmPort.receive(mw_denmInd(mw_denmPdu(mw_anyDenm))) {
[vc_denmDefaultActive] denmPort.receive(mw_denmInd(mw_denmPdu(mw_anyDenm))) {
log("*** " & testcasename() & ": INFO: DENM message received in default ***");
vc_denmReceived := true;
repeat;
}
[] denmPort.receive {
[vc_denmDefaultActive] denmPort.receive {
log("*** " & testcasename() & ": ERROR: Received an unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
......@@ -392,12 +407,12 @@ module LibItsDenm_Functions {
*/
altstep a_utDefault() runs on ItsDenm {
var UtDenmEventInd v_event;
[] utPort.receive(UtDenmEventInd:?) -> value v_event {
[vc_utDefaultActive] utPort.receive(UtDenmEventInd:?) -> value v_event {
//store every upper tester indication received
vc_utEvents[lengthof(vc_utEvents)] := v_event;
repeat;
}
[] utPort.receive {
[vc_utDefaultActive] utPort.receive {
log("*** " & testcasename() & ": INFO: Received unhandled/unknown UT message from IUT ***");
repeat;
}
......
......@@ -9,12 +9,6 @@ module LibItsDenm_Pics {
group denmPics {
/**
* @desc Default expiry time of DENM generations
* @see ETSI TS 102 869-2 Table 3
*/
modulepar integer PICS_DENM_DEFAULT_EXPIRY_TIME := 60000;
/**
* @desc Support for DENM generation
* @see ETSI TS 102 869-2 Table 3
......@@ -43,7 +37,7 @@ module LibItsDenm_Pics {
* @desc Support for DENM NEGATION
* @see ETSI TS 102 869-2 Table 3
*/
modulepar boolean PICS_DENM_NEGATION := true;
modulepar boolean PICS_DENM_NEGATION := false;
/**
* @desc Support for DENM RECEPTION
......@@ -55,7 +49,7 @@ module LibItsDenm_Pics {
* @desc Support for Keep-Alive Forwarding
* @see ETSI TS 102 869-2 Table 3
*/
modulepar boolean PICS_DENM_KAF := true;
modulepar boolean PICS_DENM_KAF := false;
/**
* @desc Support for impact recuction
......
......@@ -810,26 +810,6 @@ module LibItsDenm_Templates {
group sspTemplates {
// template (present) DenmInd mw_denmInd_SSP (
// template (present) DENM p_denMsg,
// template (present) bitstring p_SSP := ?
// ) := {
// msgIn := p_denMsg,
// gnNextHeader := *,
// gnHeaderType := *,
// gnHeaderSubtype := *,
// gnLifetime := *,
// gnTrafficClass := *,
// btpDestinationPort := *,
// btpInfo := *,
//// TODO: add support for SSP
//// ssp := p_SSP,
// ssp := *,
//// TODO: add support for ItsAid
//// its_aid := c_denmItsAid
// its_aid := *
// }
//
template (present) bitstring mw_sspTrafficCondition := '*1'B;
template (present) bitstring mw_sspAccident := '*1?'B;
template (present) bitstring mw_sspRoadworks := '*1??'B;
......
......@@ -111,6 +111,9 @@ module LibItsDenm_TestSystem {
var UtDenmActionIDList vc_utActionIDs := {};
var boolean vc_utDefaultActive := true;
var boolean vc_denmDefaultActive := true;
} // End of component ItsDenm
group facilityPrimitives {
......
......@@ -43,6 +43,9 @@ module LibItsGeoNetworking_Functions {
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsBaseGeoNetworking {
//deactivate gnPort default alts
vc_gnDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
......@@ -59,11 +62,11 @@ module LibItsGeoNetworking_Functions {
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate gnPort default alts
vc_gnDefaultActive := true;
}
/**
......@@ -71,6 +74,9 @@ module LibItsGeoNetworking_Functions {
*/
function f_utChangePosition() runs on ItsBaseGeoNetworking {
//deactivate gnPort default alts
vc_gnDefaultActive := false;
utPort.send(m_changePosition);
tc_wait.start;
alt {
......@@ -89,22 +95,25 @@ module LibItsGeoNetworking_Functions {
log("*** f_utChangePosition: INFO: IUT position not changed in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate gnPort default alts
vc_gnDefaultActive := true;
}
/**
* @desc Triggers event from the application layer
* @param p_event The event to trigger.
*/
function f_utTriggerEvent(template (value) UtGnTrigger p_event) runs on ItsGeoNetworking return boolean {
function f_utTriggerEvent(template (value) UtGnTrigger p_event) runs on ItsBaseGeoNetworking return boolean {
// Variables
var boolean v_return := true;
//deactivate gnPort default alts
vc_gnDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
......@@ -121,11 +130,11 @@ module LibItsGeoNetworking_Functions {
[] tc_wait.timeout {
v_return := false;
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
}
//activate gnPort default alts
vc_gnDefaultActive := true;
return v_return;
}
......@@ -1156,12 +1165,12 @@ module LibItsGeoNetworking_Functions {
var LongPosVector v_longPosVectorIut;
[] a_receiveLsRequest(
[vc_gnDefaultActive] a_receiveLsRequest(
?, ?, v_longPosVectorIut
) {
repeat;
}
[] geoNetworkingPort.receive(
[vc_gnDefaultActive] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwSecPdu(
mdw_securedMessage_CAMs,
......@@ -1171,7 +1180,7 @@ module LibItsGeoNetworking_Functions {
log("*** a_default: WARNING: Skip secured CAM messages ***");
repeat;
}
[] geoNetworkingPort.receive {
[vc_gnDefaultActive] geoNetworkingPort.receive {
log("*** a_default: WARNING: Received an unexpected message ***");
repeat;
}
......@@ -1194,15 +1203,14 @@ module LibItsGeoNetworking_Functions {
*/
altstep a_neighbourDefault() runs on ItsGeoNetworking {
[] a_receiveLsRequestAndReply(
?,
f_getPosition(vc_componentName).gnAddr.mid,
[vc_gnDefaultActive] a_receiveLsRequestAndReply(
?, f_getPosition(vc_componentName).gnAddr.mid,
f_getPosition(vc_componentName),
f_getPosition(vc_componentName)
) {
repeat;
}
[vc_componentName == c_compNodeB] a_receiveLsRequestAndReply(
[vc_componentName == c_compNodeB and vc_gnDefaultActive] a_receiveLsRequestAndReply(
?, f_getPosition(c_compNodeA).gnAddr.mid,
f_getPosition(c_compNodeA),
f_getPosition(vc_componentName)
......@@ -1218,12 +1226,12 @@ module LibItsGeoNetworking_Functions {
*/
altstep a_utDefault() runs on ItsBaseGeoNetworking {
var UtGnEventInd v_ind;
[] utPort.receive(UtGnEventInd:?) -> value v_ind {
[vc_utDefaultActive] utPort.receive(UtGnEventInd:?) -> value v_ind {
//store every upper tester indication received
vc_utInds[lengthof(vc_utInds)] := v_ind;
repeat;
}
[] utPort.receive {
[vc_utDefaultActive] utPort.receive {
log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***");
repeat;
}
......@@ -1319,7 +1327,7 @@ module LibItsGeoNetworking_Functions {
in template (present) UInt16 p_seqNumber
) runs on ItsGeoNetworking {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket(
[vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket(
p_destinationShortPosVec,
p_seqNumber)))) {
}
......@@ -1331,7 +1339,7 @@ module LibItsGeoNetworking_Functions {
*/
altstep a_receiveGeoUnicastWithDestination(in template (present) ShortPosVector p_destinationShortPosVec) runs on ItsGeoNetworking {
[] a_receiveGeoUnicast(p_destinationShortPosVec, ?) {}
[vc_gnDefaultActive] a_receiveGeoUnicast(p_destinationShortPosVec, ?) {}
}
/**
......@@ -1339,7 +1347,7 @@ module LibItsGeoNetworking_Functions {
*/
altstep a_receiveAnyGeoUnicast() runs on ItsGeoNetworking {
[] a_receiveGeoUnicast(?, ?) {}
[vc_gnDefaultActive] a_receiveGeoUnicast(?, ?) {}
}
} // end geoGeoUnicastAltsteps
......@@ -1356,7 +1364,7 @@ module LibItsGeoNetworking_Functions {
in template (present) UInt16 p_seqNumber
) runs on ItsGeoNetworking {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket(
[vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket(
p_srcLongPosVec,
p_seqNumber
)))) {
......@@ -1379,7 +1387,7 @@ module LibItsGeoNetworking_Functions {
in template (present) UInt8 p_maxHopLimit := ?
) runs on ItsGeoNetworking {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithAreaAndHl(
[vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithAreaAndHl(
p_srcLongPosVec,
p_seqNumber,
p_broadcastArea,
......@@ -1403,7 +1411,7 @@ module LibItsGeoNetworking_Functions {
in template (present) GeoBroadcastArea p_broadcastArea
) runs on ItsGeoNetworking {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
[vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
p_srcLongPosVec,
p_seqNumber,
p_broadcastArea
......@@ -1427,7 +1435,7 @@ module LibItsGeoNetworking_Functions {
in template (present) UInt16 p_seqNumber
) runs on ItsGeoNetworking {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacket(
[vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacket(
p_srcLongPosVec,
p_seqNumber
)))) {
......@@ -1451,7 +1459,7 @@ module LibItsGeoNetworking_Functions {
in template (present) UInt8 p_maxHopLimit := ?
) runs on ItsGeoNetworking {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea(