Commit 2324e2d9 authored by garciay's avatar garciay
Browse files

Start SREM/SSEM implementation

parent 0d46db6b
......@@ -182,6 +182,39 @@ module ItsIvim_TestCases {
f_IS_IVI_EVGN_BV_04();
} // End of TC_IS_IVI_EVGN_BV_04
/**
* @desc Check that the timeStamp is set to the current time when generating a new IVM
* <pre>
* PICS Selection: PICS_IVIM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new IVIM
* }
* then {
* the IUT sends a valid IVIM
* containing ivi
* containing mandatory
* containing timeStamp
* indicating CLT
* and containing iviStatus
* indicating 'new'
* }
* }
* </pre>
*
* @see ETSI TS 103 191-2 TP_IS_IVI_EVGN_BV_05, ETSI TS 103 301, clause 7.4.2
*/
testcase TC_IS_IVI_EVGN_BV_05() runs on ItsIvim system ItsIvimSystem {
f_IS_IVI_EVGN_BV_05();
} // End of TC_IS_IVI_EVGN_BV_05
} // End of group iviEventGeneration
group iviEventUpdate {
......@@ -189,7 +222,7 @@ module ItsIvim_TestCases {
/**
* @desc Check that an updated IVIM contains an iviStatus set to 'update'
* <pre>
* PICS Selection: PICS_IVIM_GENERATION
* PICS Selection: PICS_IVIM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
......@@ -227,7 +260,7 @@ module ItsIvim_TestCases {
/**
* @desc Check that an update can change the validity time to the IVIM - validTo information field
* <pre>
* PICS Selection: PICS_IVIM_GENERATION
* PICS Selection: PICS_IVIM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
......@@ -266,7 +299,7 @@ module ItsIvim_TestCases {
/**
* @desc Check that an update can change the validity time to the IVIM - validFrom information field
* <pre>
* PICS Selection: PICS_IVIM_GENERATION
* PICS Selection: PICS_IVIM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
......@@ -302,8 +335,155 @@ module ItsIvim_TestCases {
} // End of TC_IS_IVI_EVUP_BV_07
/**
* @desc Check that the timeStamp is set to the current time when generating an update with some change of information content
* <pre>
* PICS Selection: PICS_IVIM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing ivi
* containing mandatory
* containing timeStamp
* and containing iviStatus
* indicating 'new'
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppIVIM_update
* }
* then {
* the IUT sends a valid IVIM
* containing ivi
* containing mandatory
* containing timeStamp
* indicating CLT
* and containing iviStatus
* indicating 'update'
* }
* }
* </pre>
*
* @see ETSI TS 103 191-2 TP_IS_IVI_EVUP_BV_08, ETSI TS 103 301, clause 7.4.2
*/
testcase TC_IS_IVI_EVUP_BV_08() runs on ItsIvim system ItsIvimSystem {
f_IS_IVI_EVUP_BV_08();
} // End of TC_IS_IVI_EVUP_BV_08
/**
* @desc Check that the iviIdentificationNumber remains unchanged IVIM is updated
* <pre>
* PICS Selection: PICS_IVIM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing ivi
* containing mandatory
* containing iviIdentificationNumber
* inicating IVIM_ID_1
* and containing iviStatus
* indicating 'new'
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppIVIM_update request associated with IVIM_ID_1
* }
* then {
* the IUT sends a valid IVIM
* containing ivi
* containing mandatory
* containing iviIdentificationNumber
* indicating IVIM_ID_1
* and containing iviStatus
* indicating 'update'
* }
* }
* </pre>
*
* @see ETSI TS 103 191-2 TP_IS_IVI_EVUP_BV_09, ETSI TS 103 301, clause 7.4.2
*/
testcase TC_IS_IVI_EVUP_BV_09() runs on ItsIvim system ItsIvimSystem {
f_IS_IVI_EVUP_BV_09();
} // End of TC_IS_IVI_EVUP_BV_09
} // End of group iviEventUpdate
group iviEventTermination {
} // End of group iviEventTermination
group iviGenerationFrequency {
/**
* @desc Check that IVIMs are not generated more frequently than T_GenIvimMin
* <pre>
* Pics Selection: PICS_IVIM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several IVIM
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT sends a IVIM
* }
* then {
* the IUT does not send any IVIM before expiry of T_GenIvimMin
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_GFQ_TI_01
* @reference ETSI TS 103 301 V1.0.4 Clause 7.4.2
*/
testcase TC_IS_IVIM_GFQ_TI_01 () runs on ItsIvim system ItsIvimSystem {
f_IS_IVIM_GFQ_TI_01();
} // End of testcase TC_IS_IVIM_GFQ_TI_01
/**
* @desc Check that IVIMs are not generated less frequently than T_GenIvimMax
* <pre>
* Pics Selection: PICS_IVIM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several IVIM
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT sends a IVIM
* }
* then {
* the IUT sends another IVIM before expiry of T_GenIvimMax
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_GFQ_TI_02
* @reference ETSI TS 103 301 V1.0.4 Clause 7.4.2
*/
testcase TC_IS_IVIM_GFQ_TI_02 () runs on ItsIvim system ItsIvimSystem {
f_IS_IVIM_GFQ_TI_02();
} // End of testcase TC_IS_IVIM_GFQ_TI_02
} // End of group iviGenerationFrequency
group iviCommunication {
/**
......@@ -328,14 +508,14 @@ module ItsIvim_TestCases {
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_COMM_BV_02_01
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_COMM_BV_01_01
* @reference ETSI TS 103 301 V1.0.4 Clause 7.4.3.2
*/
testcase TC_IS_IVIM_COMM_BV_02_01 () runs on ItsIvim system ItsIvimSystem {
testcase TC_IS_IVIM_COMM_BV_01_01 () runs on ItsIvim system ItsIvimSystem {
f_IS_IVIM_COMM_BV_02_01();
f_IS_IVIM_COMM_BV_01_01();
} // End of testcase TC_IS_IVIM_COMM_BV_02_01
} // End of testcase TC_IS_IVIM_COMM_BV_01_01
/**
* @desc Check that the destination port for IVIM is set to 2006
......@@ -361,14 +541,47 @@ module ItsIvim_TestCases {
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_COMM_BV_02_02
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_COMM_BV_01_02
* @reference ETSI TS 103 301 V1.0.4 Clause 7.4.3.2
*/
testcase TC_IS_IVIM_COMM_BV_02_02 () runs on ItsIvim system ItsIvimSystem {
testcase TC_IS_IVIM_COMM_BV_01_02 () runs on ItsIvim system ItsIvimSystem {
f_IS_IVIM_COMM_BV_01_02();
} // End of testcase TC_IS_IVIM_COMM_BV_01_02
/**
* @desc Check that TLM service encapsulates IVIM in a UNC with the HeaderType field set to the value of 2
* <pre>
* Pics Selection: PICS_IVIM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT sending IVIM
* }
* Expected behaviour:
* ensure that {
* when {
* a IVIM is generated
* }
* then {
* the IUT sends a valid IVIM
* encapsulated in a UNC packet
* containing a correctly formatted Common Header
* containing HeaderType field
* indicating the value '2'
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVIM_COMM_BV_02
*/
testcase TC_IS_IVIM_COMM_BV_02 () runs on ItsIvim system ItsIvimSystem {
f_IS_IVIM_COMM_BV_02_02();
f_IS_IVIM_COMM_BV_02();
} // End of testcase TC_IS_IVIM_COMM_BV_02_02
} // End of testcase TC_IS_IVIM_COMM_BV_02
} // End of group iviCommunication
......
......@@ -67,11 +67,11 @@ module ItsIvim_TpFunctions {
mw_itsPduHeader
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected IVIM message received ***");
log("*** " & testcasename() & ": PASS: Expected IVIM received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: IVIM message not received ***");
log("*** " & testcasename() & ": INCONC: IVIM not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
......@@ -91,7 +91,7 @@ module ItsIvim_TpFunctions {
// Local variables
var IviIdentificationNumber v_iviIdentificationNumber;
// Test controlv_iviIdentificationNumber
// Test control
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
setverdict(inconc);
......@@ -156,7 +156,7 @@ module ItsIvim_TpFunctions {
var IvimInd v_ivimInd;
var integer i;
// Test controlv_iviIdentificationNumber
// Test control
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
setverdict(inconc);
......@@ -218,7 +218,7 @@ module ItsIvim_TpFunctions {
var IvimInd v_ivimInd;
var integer i;
// Test controlv_iviIdentificationNumber
// Test control
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
setverdict(inconc);
......@@ -285,7 +285,7 @@ module ItsIvim_TpFunctions {
// Local variables
var IviIdentificationNumber v_iviIdentificationNumber;
// Test controlv_iviIdentificationNumber
// Test control
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
setverdict(inconc);
......@@ -314,7 +314,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.new
IviStatus_new_
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected IVIM. ***");
......@@ -340,6 +340,75 @@ module ItsIvim_TpFunctions {
} // End of function f_IVIM_MSD_FMT_BV_04
function f_IS_IVI_EVGN_BV_05() runs on ItsIvim {
// Local variables
const integer c_epsilon := 500; // maximum c_epsilon cannot exceed 500ms
var IviIdentificationNumber v_iviIdentificationNumber;
var TimestampIts v_timestamp;
var IvimInd v_iviMsg;
// Test control
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_timestamp := f_getCurrentTime();
v_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent());
tc_ac.start;
alt {
[] ivimPort.receive(
mw_ivimInd(
mw_anyIvimPdu(
mw_itsPduHeader,
mw_ivimStructure(
mw_iviManagementContainer_timestamp(
-,
v_iviIdentificationNumber,
IviStatus_new_
))))) -> value v_iviMsg {
tc_ac.stop;
if (f_abs(v_iviMsg.msgIn.ivi.mandatory.timeStamp - v_timestamp) < c_epsilon) {
log("*** " & testcasename() & ": PASS: Successfully received expected IVIM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: TimeStamp value is out of range (" & int2str(c_epsilon) & "). ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] ivimPort.receive(
mw_ivimInd(
mw_anyIvimPdu
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a IVIM with incorrect information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_iviIdentificationNumber);
f_cfDown();
} // End of function f_IVIM_MSD_FMT_BV_05
} // End of group iviEventGeneration
group iviEventUpdate {
......@@ -350,9 +419,9 @@ module ItsIvim_TpFunctions {
var IviIdentificationNumber v_iviIdentificationNumber;
var IvimInd v_rcvdMsg;
// Test controlv_iviIdentificationNumber
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
// Test control
if (not PICS_IVIM_UPDATE) {
log("*** " & testcasename() & ": PICS_IVIM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -372,8 +441,8 @@ module ItsIvim_TpFunctions {
mw_ivimStructure(
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.new
-,
IviStatus_new_
)))),
v_rcvdMsg
);
......@@ -391,8 +460,8 @@ module ItsIvim_TpFunctions {
mw_ivimStructure(
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.update
-,
IviStatus_update_
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected IVIM. ***");
......@@ -425,9 +494,9 @@ module ItsIvim_TpFunctions {
var IvimInd v_rcvdMsg;
var TimestampIts v_validTo;
// Test controlv_iviIdentificationNumber
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
// Test control
if (not PICS_IVIM_UPDATE) {
log("*** " & testcasename() & ": PICS_IVIM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -448,7 +517,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.new
IviStatus_new_
)))),
v_rcvdMsg
);
......@@ -461,7 +530,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.update
IviStatus_update_
)))),
v_rcvdMsg
);
......@@ -481,7 +550,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer_validTo(
-,
v_iviIdentificationNumber,
IviStatus.update,
IviStatus_update_,
v_validTo
))))) {
tc_ac.stop;
......@@ -515,9 +584,9 @@ module ItsIvim_TpFunctions {
var IvimInd v_rcvdMsg;
var TimestampIts v_validFrom;
// Test controlv_iviIdentificationNumber
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
// Test control
if (not PICS_IVIM_UPDATE) {
log("*** " & testcasename() & ": PICS_IVIM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -538,7 +607,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.new
IviStatus_new_
)))),
v_rcvdMsg
);
......@@ -551,7 +620,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus.update
IviStatus_update_
)))),
v_rcvdMsg
);
......@@ -571,7 +640,7 @@ module ItsIvim_TpFunctions {
mw_iviManagementContainer_validFrom(
-,
v_iviIdentificationNumber,
IviStatus.update,
IviStatus_update_,
v_validFrom
))))) {
tc_ac.stop;
......@@ -598,26 +667,357 @@ module ItsIvim_TpFunctions {
} // End of function f_IVIM_MSD_FMT_BV_07
function f_IS_IVI_EVUP_BV_08() runs on ItsIvim {
// Local variables
const integer c_epsilon := 500; // maximum c_epsilon cannot exceed 500ms
var IviIdentificationNumber v_iviIdentificationNumber;
var TimestampIts v_timestamp;
var IvimInd v_rcvdMsg;
// Test control
if (not PICS_IVIM_UPDATE) {
log("*** " & testcasename() & ": PICS_IVIM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent());
f_awaitIviMessage(
mw_ivimInd(
mw_anyIvimPdu(
mw_itsPduHeader,
mw_ivimStructure(
mw_iviManagementContainer(
-,
v_iviIdentificationNumber,
IviStatus_new_
)))),
v_rcvdMsg
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_timestamp := f_getCurrentTime();
f_utUpdateEvent(m_utUpdateEvent(v_iviIdentificationNumber));
tc_ac.start;
alt {
[] ivimPort.receive(
mw_ivimInd(
mw_anyIvimPdu(
mw_itsPduHeader,
mw_ivimStructure(
mw_iviManagementContainer_timestamp(
-,
v_iviIdentificationNumber,
IviStatus_update_
))))) -> value v_rcvdMsg {
tc_ac.stop;
if (f_abs(v_rcvdMsg.msgIn.ivi.mandatory.timeStamp - v_timestamp) < c_epsilon) {
log("*** " & testcasename() & ": PASS: Successfully received expected IVIM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: TimeStamp value is out of range (" & int2str(c_epsilon) & "). ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] ivimPort.receive(
mw_ivimInd(
mw_anyIvimPdu
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a IVIM with incorrect information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_iviIdentificationNumber);
f_cfDown();
} // End of function f_IVIM_MSD_FMT_BV_08
function f_IS_IVI_EVUP_BV_09() runs on ItsIvim {
// Local variables
var IviIdentificationNumber v_iviIdentificationNumber;
var IvimInd v_rcvdMsg;