Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 1917 → Rev 1918

/trunk/javasrc/adapter/org/etsi/its/adapter/layers/BtpLayer.java
8,6 → 8,7
*/
package org.etsi.its.adapter.layers;
 
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
 
121,6 → 122,9
byte[] payload = new byte[payloadLength];
System.arraycopy(message, 4, payload, 0, payloadLength);
lowerInfo.put(BTP_DSTPORT, dstPort);
lowerInfo.put(BTP_DSTPORTINFO, srcPort);
super.receive(payload, lowerInfo);
}
}
/trunk/javasrc/adapter/org/etsi/its/adapter/layers/GnLayer.java
79,7 → 79,16
* Parameter name for destination area's angle
*/
public static final String GN_ANGLE = "GnAngle";
 
/**
* Parameter name for traffic class
*/
public static final String GN_TRAFFICCLASS = "GnTrafficClass";
/**
* Parameter name for packet's lifetime
*/
public static final String GN_LIFETIME = "GnLifetime";
 
/**
* GeoNetworking header type for unknown messages
295,15 → 304,20
public void receive(byte[] message, Map<String, Object> lowerInfo) {
// System.out.println(">>> GnLayer.receive: " + ByteHelper.byteArrayToString(message));
byte[] basicHdr = new byte[4]; // TODO To be removed
byte[] basicHdr = new byte[4];
System.arraycopy(message, 4, basicHdr, 0, 4);
byte[] versionNh = new byte[1];
System.arraycopy(basicHdr, 0, versionNh, 0, 1);
int nextHeader = (int)(versionNh[0] & (byte)0x0F);
byte nextHeader = (byte)(versionNh[0] & (byte)0x0F);
int lt_multiplier = (int)(basicHdr[2] & (byte)0xFC) >> 2;
int lt_base = (int)(basicHdr[2] & (byte)0x03);
int lifetime = computeGnLifeTime(lt_multiplier, lt_base);
if (!management.isSecuredModeSet()) { // Secure mode disabled
byte[] commonHdr = new byte[8];
System.arraycopy(message, 4, commonHdr, 0, 8);
nextHeader = (byte)((commonHdr[0] & (byte)0xF0) >> 4);
int trafficClass = (int)(commonHdr[2]);
byte[] htHst = new byte[1];
System.arraycopy(commonHdr, 1, htHst, 0, 1);
343,6 → 357,10
byte[] payload = new byte[payloadLength];
System.arraycopy(message, message.length - payloadLength, payload, 0, payloadLength);
lowerInfo.put(GN_NEXTHEADER, nextHeader);
lowerInfo.put(GN_TYPE, headerType);
lowerInfo.put(GN_SUBTYPE, headerSubType);
lowerInfo.put(GN_LIFETIME, lifetime);
lowerInfo.put(GN_TRAFFICCLASS, trafficClass);
super.receive(payload, lowerInfo);
}
}
395,6 → 413,8
byte[] commonHdr = new byte[8];
System.arraycopy(message, offset, commonHdr, 0, 8);
// System.out.println("GnLayer.receive: commonHdr: " + ByteHelper.byteArrayToString(commonHdr));
nextHeader = (byte)((commonHdr[0] & (byte)0xF0) >> 4);
int trafficClass = (int)(commonHdr[2]);
byte[] htHst = new byte[1];
System.arraycopy(commonHdr, 1, htHst, 0, 1);
432,9 → 452,11
if(payloadLength > 0) {
byte[] payload = new byte[payloadLength];
System.arraycopy(message, message.length - payloadLength - 68, payload, 0, payloadLength);
// System.out.println("GnLayer.receive: payload: " + ByteHelper.byteArrayToString(payload));
lowerInfo.put(GN_NEXTHEADER, nextHeader);
// System.out.println("GnLayer.receive: call super.receive: " + ByteHelper.byteArrayToString(payload));
lowerInfo.put(GN_TYPE, headerType);
lowerInfo.put(GN_SUBTYPE, headerSubType);
lowerInfo.put(GN_LIFETIME, lifetime);
lowerInfo.put(GN_TRAFFICCLASS, trafficClass);
super.receive(payload, lowerInfo);
}
}
443,6 → 465,19
} // End of method receive
/**
* Computes GN lifetime value
* @param lt_multiplier GN LT multiplier
* @param lt_base GN LT base
* @return GN lifetime value in ms
*/
private int computeGnLifeTime(int lt_multiplier, int lt_base) {
final int[] base = {50, 1000, 10000, 100000};
return base[lt_base] * lt_multiplier;
}
 
/**
* Builds encoded Basic Header
* @return Encoded Basic Header
*/
/trunk/javasrc/adapter/org/etsi/its/adapter/ports/CamPort.java
9,7 → 9,9
package org.etsi.its.adapter.ports;
 
import java.util.HashMap;
import java.util.Map;
 
import org.etsi.common.ByteHelper;
import org.etsi.its.adapter.layers.BtpLayer;
import org.etsi.its.adapter.layers.GnLayer;
 
18,7 → 20,7
*/
public class CamPort extends ProtocolPort {
 
/**
/**
* Constructor
* @param portName Name of the port
* @param componentName Name of the component owning this port instance
29,6 → 31,25
super(portName, componentName, lowerStackDesc, linkLayerAddress);
}
/* (non-Javadoc)
* @see org.etsi.its.adapter.ports.ProtocolPort#receive(byte[], java.util.Map)
*/
@Override
public void receive(byte[] message, Map<String, Object> lowerInfo) {
 
// Encode with CAM indication header
byte[] msgInd = ByteHelper.concat(
message,
(byte[])lowerInfo.get(GnLayer.GN_NEXTHEADER),
(byte[])lowerInfo.get(GnLayer.GN_TYPE),
(byte[])lowerInfo.get(GnLayer.GN_SUBTYPE),
(byte[])lowerInfo.get(GnLayer.GN_LIFETIME),
(byte[])lowerInfo.get(GnLayer.GN_TRAFFICCLASS),
(byte[])lowerInfo.get(BtpLayer.BTP_DSTPORT),
(byte[])lowerInfo.get(BtpLayer.BTP_DSTPORTINFO));
super.receive(msgInd, lowerInfo);
}
/* (non-Javadoc)
* @see org.etsi.its.adapter.ports.IPort#send(byte[])
*/
/trunk/javasrc/adapter/org/etsi/its/adapter/ports/DenmPort.java
9,7 → 9,9
package org.etsi.its.adapter.ports;
 
import java.util.HashMap;
import java.util.Map;
 
import org.etsi.common.ByteHelper;
import org.etsi.its.adapter.layers.BtpLayer;
import org.etsi.its.adapter.layers.GnLayer;
 
29,6 → 31,25
super(portName, componentName, lowerStackDesc, linkLayerAddress);
}
/* (non-Javadoc)
* @see org.etsi.its.adapter.ports.ProtocolPort#receive(byte[], java.util.Map)
*/
@Override
public void receive(byte[] message, Map<String, Object> lowerInfo) {
 
// Encode with CAM indication header
byte[] msgInd = ByteHelper.concat(
message,
(byte[])lowerInfo.get(GnLayer.GN_NEXTHEADER),
(byte[])lowerInfo.get(GnLayer.GN_TYPE),
(byte[])lowerInfo.get(GnLayer.GN_SUBTYPE),
(byte[])lowerInfo.get(GnLayer.GN_LIFETIME),
(byte[])lowerInfo.get(GnLayer.GN_TRAFFICCLASS),
(byte[])lowerInfo.get(BtpLayer.BTP_DSTPORT),
(byte[])lowerInfo.get(BtpLayer.BTP_DSTPORTINFO));
super.receive(msgInd, lowerInfo);
}
/* (non-Javadoc)
* @see org.etsi.its.adapter.ports.IPort#send(byte[])
*/
/trunk/javasrc/codec/org/etsi/ttcn/codec/CodecFactory.java
64,6 → 64,7
org.etsi.ttcn.codec.its.geonetworking.Plugin.init();
org.etsi.ttcn.codec.its.btp.Plugin.init();
org.etsi.ttcn.codec.its.security.Plugin.init();
org.etsi.ttcn.codec.its.facilities.Plugin.init();
}
}
 
/trunk/javasrc/codec/org/etsi/ttcn/codec/its/facilities/FacilitiesInd.java
0,0 → 1,85
/**
* @author ETSI / STF462 / Alexandre Berge
* @version $URL$
* $Id$
*/
package org.etsi.ttcn.codec.its.facilities;
 
import org.etsi.ttcn.codec.CodecBuffer;
import org.etsi.ttcn.codec.MainCodec;
import org.etsi.ttcn.codec.generic.Record;
import org.etsi.ttcn.tci.RecordValue;
import org.etsi.ttcn.tci.Type;
import org.etsi.ttcn.tci.Value;
 
public class FacilitiesInd extends Record {
 
public FacilitiesInd(MainCodec mainCodec) {
super(mainCodec);
}
 
@Override
protected void preDecode(CodecBuffer buf, Type decodingHypothesis) {
int msgLen = buf.getNbBits() - 8 - 8 - 8 - 32 - 8 - 16 - 16;
int offset = 0;
messageBuffer = buf.getBuffer(offset, msgLen); offset += msgLen;
gnNh = buf.getBuffer(offset, 8); offset += 8;
gnHt = buf.getBuffer(offset, 8); offset += 8;
gnHst = buf.getBuffer(offset, 8); offset += 8;
gnLifetime = buf.getBuffer(offset, 32); offset += 32;
gnTc = buf.getBuffer(offset, 8); offset += 8;
btpDestinationPort = buf.getBuffer(offset, 16); offset += 16;
btpInfo = buf.getBuffer(offset, 16); offset += 16;
}
@Override
protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
 
if(fieldName.equals("gnNextHeader")) {
buf.overwriteWith(gnNh);
}
else if(fieldName.equals("gnHeaderType")) {
buf.overwriteWith(gnHt);
}
else if(fieldName.equals("gnHeaderSubtype")) {
buf.overwriteWith(gnHst);
}
else if(fieldName.equals("gnLifetime")) {
buf.overwriteWith(gnLifetime);
}
else if(fieldName.equals("gnTrafficClass")) {
buf.overwriteWith(gnTc);
}
else if(fieldName.equals("btpDestinationPort")) {
buf.overwriteWith(btpDestinationPort);
}
else if(fieldName.equals("btpInfo")) {
buf.overwriteWith(btpInfo);
}
else {
buf.overwriteWith(messageBuffer);
}
}
 
@Override
protected void postDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) {
}
@Override
public CodecBuffer encode(Value value) {
 
return super.encode(value);
}
 
private CodecBuffer messageBuffer = null;
private CodecBuffer gnNh = null;
private CodecBuffer gnHt = null;
private CodecBuffer gnHst = null;
private CodecBuffer gnLifetime = null;
private CodecBuffer gnTc = null;
private CodecBuffer btpDestinationPort = null;
private CodecBuffer btpInfo = null;
}
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+URL Id
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java
===================================================================
--- javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java (nonexistent)
+++ javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java (revision 1918)
@@ -0,0 +1,19 @@
+/**
+ * @author ETSI / STF484 / Alexandre Berge
+ * @version $URL$
+ * $Id$
+ */
+package org.etsi.ttcn.codec.its.facilities;
+
+import org.etsi.ttcn.tci.TciTypeClass;
+import org.etsi.ttcn.codec.CodecFactory;
+
+public class Plugin {
+
+ public static void init() {
+
+ CodecFactory cf = CodecFactory.getInstance();
+ cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "CamInd", FacilitiesInd.class);
+ cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "DenmInd", FacilitiesInd.class);
+ }
+}
\ No newline at end of file
/javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+URL Id
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java
===================================================================
--- javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java (revision 1917)
+++ javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java (revision 1918)
@@ -96,6 +96,7 @@
validityDuration(0x80),
repetitionDuration(0x40),
transmissionInterval(0x04),
+ repetitionInterval(0x02),
/* DenmUpdate */
//validityDuration(0x80),
@@ -104,6 +105,7 @@
relevanceTrafficDirection(0x10),
trafficClass(0x08),
//transmissionInterval(0x04),
+ //repetitionInterval(0x02),
/* Reserved */
reserved(0x00);
/trunk/ttcn/AtsCAM/ItsCam_TestCases.ttcn
1,32 → 1,18
/**
* @author ETSI / STF405 / STF449
* @author ETSI / STF405 / STF449 / STF484
* @version $URL$
* $Id$
* @desc CAM Testcases (TP version: 0.0.1)
* @desc CAM Testcases
*
*/
 
module ItsCam_TestCases {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
import from LibCommon_Time all;
// LibIts
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues {
type UtChangePosition
};
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics {modulepar all};
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// Ats Its
import from ItsCam_TpFunctions all;
 
// 5.2.1
group camMessageDissemination {
37,7 → 23,7
* @desc Check that protocolVersion is set to 1 and messageID is
* set to 2.
* <pre>
* Pics Selection: PICS_CAMHEADER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
58,43 → 44,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-01
* @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-01
* @reference ETSI EN 302 637-2 , Annex B.1
*/
testcase TC_CAM_MSD_FMT_BV_01() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_FMT_BV_01();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_FMT_BV_01
/**
101,7 → 57,7
* @desc Check that LF container is included in 1st CAM since CA
* basic service activation.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
121,48 → 77,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-02
* @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-02
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_02() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_FMT_BV_02();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_FMT_BV_02
/**
170,7 → 91,7
* the generation of the last CAM with the low frequency
* container generation is equal or larger than 500 ms.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
197,104 → 118,20
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-03
* @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-03
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_03() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.05;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithLF := false;
const integer c_cntTimeLimit := 10;
f_CAM_MSD_FMT_BV_03();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
f_utTriggerEvent(m_changeSpeed(v_speedValues[v_cntSpeed]));
v_cntTime := 0;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )) {
tc_ac.stop;
v_cntTime := v_cntTime + 1;
if (v_cntTime == c_cntTimeLimit) { // Exit message loop
log("*** " & testcasename() & ": INFO: The subset of CAM messages including lowFrequencyContainer was received ***");
t_minTransInterval.start;
v_nextCamWithLF := false;
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission with LowFrequency container ***");
tc_ac.start;
t_minTransInterval.start;
v_nextCamWithLF := false;
repeat;
}
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
if(v_nextCamWithLF == true) {
log("*** " & testcasename() & ": FAIL: No LowFrequency container in received CAM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission w/o LowFrequency container ***");
tc_ac.start;
repeat;
}
}
[] t_minTransInterval.timeout {
v_nextCamWithLF := true;
log("*** " & testcasename() & ": INFO: Next CAM shall contain LowFrequency container ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
log("*** " & testcasename() & ": PASS: Generation of CAM messages including lowFrequencyContainer was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_FMT_BV_03
/**
* @desc Check that specialVehicle container is included in 1st CAM
* since CA basic service activation.
* <pre>
* Pics Selection: PICS_SPECIALVEHICLECONTAINER
* Pics Selection: PICS_CAM_GENERATION AND PICS_SPECIALVEHICLECONTAINER
* Initial conditions:
* with {
* the IUT being in the "initial state"
315,50 → 152,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-04
* @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-04
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_04() runs on ItsCam system ItsCamSystem {
// Local variables
var VehicleRole v_vehicleRole := c_vehicleRole_roadWork;
f_CAM_MSD_FMT_BV_04();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER) {
testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_FMT_BV_04
/**
367,7 → 167,7
* special vehicle container generation is equal or larger
* than 500 ms.
* <pre>
* Pics Selection: PICS_SPECIALVEHICLECONTAINER
* Pics Selection: PICS_CAM_GENERATION AND PICS_SPECIALVEHICLECONTAINER
* Initial conditions:
* with {
* the IUT being in the "initial state"
394,102 → 194,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-05
* @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-05
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_FMT_BV_05() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_minTransInterval := c_specialVehicleGenerationTime * 1.05;
var VehicleRole v_vehicleRole := roadWork;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithSVC := false;
const integer c_cntTimeLimit := 10;
f_CAM_MSD_FMT_BV_05();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER) {
testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
f_utTriggerEvent(m_changeSpeed(v_speedValues[v_cntSpeed]));
v_cntTime := 0;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )) {
tc_ac.stop;
v_cntTime := v_cntTime + 1;
if (v_cntTime == c_cntTimeLimit) { // Exit message loop
log("*** " & testcasename() & ": INFO: The subset of CAM messages including specialVehicleContainer was received ***");
t_minTransInterval.start;
v_nextCamWithSVC := false;
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission with SpecialVehicle container ***");
tc_ac.start;
t_minTransInterval.start;
v_nextCamWithSVC := false;
repeat;
}
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
if(v_nextCamWithSVC == true) {
log("*** " & testcasename() & ": FAIL: No SpecialVehicle container in received CAM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission w/o SpecialVehicle container ***");
tc_ac.start;
repeat;
}
}
[] t_minTransInterval.timeout {
v_nextCamWithSVC := true;
log("*** " & testcasename() & ": INFO: Next CAM shall contain SpecialVehicle container ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
log("*** " & testcasename() & ": PASS: Generation of CAM messages including SpecialVehicleContainer was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_FMT_BV_05
} // end group camMessageFormat
498,49 → 209,11
group camInVehicleData {
type record of UtCamTrigger UtCamTriggers;
type record of CAM CamPdus;
function f_CAM_MSD_INA_BV_01(in charstring p_INFO, in template (value) UtCamTriggers p_utTriggers, in template (present) CamPdus p_camPdus) runs on ItsCam {
// Local variables
var integer v_cnt;
log("*** " & testcasename() & ": Checking INFO==" & p_INFO & " ***");
if (lengthof(p_utTriggers) != lengthof(p_camPdus)) {
log("*** " & testcasename() & ": INCONC: Invalid testcase configuration: Number of event triggers and expected CAM messages differs ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
for (v_cnt:=0; v_cnt<lengthof(p_utTriggers); v_cnt:=v_cnt+1) {
f_utTriggerEvent(p_utTriggers[v_cnt]);
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( p_camPdus[v_cnt] )){
tc_ac.stop;
if (v_cnt==lengthof(p_utTriggers)-1) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
}
/**
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
565,63 → 238,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_01() runs on ItsCam system ItsCamSystem {
// Local variables
var CamInd v_camInd;
var template (present) CurvatureValue v_curVal := ?;
var boolean v_initialReceived := false;
const CurvatureValue c_curValOffset := 1;
f_CAM_MSD_INA_BV_01_01();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Curvature value ***");
// change the curvature value to retrieve the current value
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_curvature(v_curVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the curvature value and set the expectation to the measured value
v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue+c_curValOffset;
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_01
/**
628,7 → 251,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
654,36 → 277,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-02
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-02
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_02() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_02();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Brake pedal being activated",
{ m_setAccelerationControlStatus(c_brakePedalEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_02
/**
690,7 → 290,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
716,36 → 316,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-03
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-03
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_03() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_03();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Brake pedal being deactivated",
{ m_setAccelerationControlStatus(c_brakePedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_03
/**
752,7 → 329,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
778,36 → 355,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-04
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-04
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_04() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_04();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Gas pedal being activated",
{ m_setAccelerationControlStatus(c_gasPedalEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_04
/**
814,7 → 368,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
840,36 → 394,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-05
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-05
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_05() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_05();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Gas pedal being deactivated",
{ m_setAccelerationControlStatus(c_gasPedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_05
/**
876,7 → 407,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
902,36 → 433,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-06
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-06
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_06() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_06();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Emergency brake being activated",
{ m_setAccelerationControlStatus(c_emergencyBrakeEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_06
/**
938,7 → 446,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
964,36 → 472,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-07
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-07
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_07() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_07();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Emergency brake being deactivated",
{ m_setAccelerationControlStatus(c_emergencyBrakeEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_07
/**
1000,7 → 485,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1026,36 → 511,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-08
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-08
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_08() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_08();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Collision warning being activated",
{ m_setAccelerationControlStatus(c_collisionWarningEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_08
/**
1062,7 → 524,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1088,36 → 550,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-09
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-09
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_09() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_09();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Collision warning being deactivated",
{ m_setAccelerationControlStatus(c_collisionWarningEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_09
/**
1124,7 → 563,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1150,36 → 589,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-10
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-10
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_10() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_10();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"ACC being activated",
{ m_setAccelerationControlStatus(c_accEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_10
/**
1186,7 → 602,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1212,36 → 628,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-11
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-11
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_11() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_11();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"ACC being deactivated",
{ m_setAccelerationControlStatus(c_accEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_11
/**
1248,7 → 641,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1274,36 → 667,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-12
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-12
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_12() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_12();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Cruise control being activated",
{ m_setAccelerationControlStatus(c_cruiseControlEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_12
/**
1310,7 → 680,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1336,36 → 706,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-13
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-13
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_13() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_13();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Cruise control being deactivated",
{ m_setAccelerationControlStatus(c_cruiseControlEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_13
/**
1372,7 → 719,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1398,36 → 745,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-14
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-14
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_14() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_14();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Speed limiter being activated",
{ m_setAccelerationControlStatus(c_speedLimiterEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_14
/**
1434,7 → 758,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1460,36 → 784,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-15
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-15
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_15() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_15();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Speed limiter control being deactivated",
{ m_setAccelerationControlStatus(c_speedLimiterEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_15
/**
1496,7 → 797,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1522,36 → 823,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-16
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-16
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_16() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_16();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Low beam headlights being activated",
{ m_setExteriorLightsStatus(c_lowBeamHeadlightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_16
/**
1558,7 → 836,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1584,36 → 862,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-17
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-17
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_17() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_17();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Low beam headlights being deactivated",
{ m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_17
/**
1620,7 → 875,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1646,36 → 901,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-18
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-18
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_18() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_18();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"High beam headlights being activated",
{ m_setExteriorLightsStatus(c_highBeamHeadlightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_18
/**
1682,7 → 914,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1708,36 → 940,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-19
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-19
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_19() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_19();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"High beam headlights being deactivated",
{ m_setExteriorLightsStatus(c_highBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_19
/**
1744,7 → 953,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1770,36 → 979,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-20
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-20
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_20() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_20();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Left turn signal being activated",
{ m_setExteriorLightsStatus(c_leftTurnSignalOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_20
/**
1806,7 → 992,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1832,36 → 1018,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-21
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-21
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_21() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_21();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Left turn signal being deactivated",
{ m_setExteriorLightsStatus(c_leftTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_21
/**
1868,7 → 1031,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1894,36 → 1057,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-22
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-22
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_22() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_22();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Right turn signal being activated",
{ m_setExteriorLightsStatus(c_rightTurnSignalOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_22
/**
1930,7 → 1070,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
1956,36 → 1096,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-23
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-23
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_23() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_23();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Right turn signal being deactivated",
{ m_setExteriorLightsStatus(c_rightTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_23
/**
1992,7 → 1109,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2018,36 → 1135,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-24
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-24
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_24() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_24();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being activated",
{ m_setExteriorLightsStatus(c_daytimeRunningLightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_24
/**
2054,7 → 1148,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2080,36 → 1174,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-25
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-25
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_25() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_25();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being deactivated",
{ m_setExteriorLightsStatus(c_daytimeRunningLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_25
/**
2116,7 → 1187,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2142,36 → 1213,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-26
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-26
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_26() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_26();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Reverse light being activated",
{ m_setExteriorLightsStatus(c_reverseLightOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_26
/**
2178,7 → 1226,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2204,36 → 1252,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-27
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-27
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_27() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_27();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Reverese light being deactivated",
{ m_setExteriorLightsStatus(c_reverseLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_27
/**
2240,7 → 1265,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2266,36 → 1291,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-28
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-28
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_28() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_28();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Fog lights being activated",
{ m_setExteriorLightsStatus(c_fogLightOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_28
/**
2302,7 → 1304,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2328,36 → 1330,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-29
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-29
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_29() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_29();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Fog lights being deactivated",
{ m_setExteriorLightsStatus(c_fogLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_29
/**
2364,7 → 1343,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2390,36 → 1369,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-30
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-30
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_30() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_30();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Parking lights being activated",
{ m_setExteriorLightsStatus(c_parkingLightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_30
/**
2426,7 → 1382,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_LOWFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2452,36 → 1408,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-31
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-31
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_31() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_01_31();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Parking lights being deactivated",
{ m_setExteriorLightsStatus(c_parkingLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_31
/**
2488,7 → 1421,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2513,63 → 1446,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-32
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-32
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_32() runs on ItsCam system ItsCamSystem {
// Local variables
var CamInd v_camInd;
var template (present) HeadingValue v_headingVal := ?;
var boolean v_initialReceived := false;
const HeadingValue c_headingValOffset := 1;
f_CAM_MSD_INA_BV_01_32();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Heading value ***");
// change the heading value to retrieve the current value
f_utTriggerEvent(m_changeHeading(c_headingValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_heading(v_headingVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the heading value and set the expectation to the measured value
v_headingVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue+c_headingValOffset) mod 3601;
f_utTriggerEvent(m_changeHeading(c_headingValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_32
/**
2576,7 → 1459,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2601,63 → 1484,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-33
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-33
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_33() runs on ItsCam system ItsCamSystem {
// Local variables
var CamInd v_camInd;
var template (present) SpeedValue v_speedVal := ?;
var boolean v_initialReceived := false;
const SpeedValue c_speedValOffset := 1;
f_CAM_MSD_INA_BV_01_33();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Speed value ***");
// change the speed value to retrieve the current value
f_utTriggerEvent(m_changeSpeed(c_speedValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_speed(v_speedVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the speed value and set the expectation to the measured value
v_speedVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue+c_speedValOffset) mod 16384;
f_utTriggerEvent(m_changeSpeed(c_speedValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_33
/**
2664,7 → 1497,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2689,60 → 1522,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-34
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-34
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_34() runs on ItsCam system ItsCamSystem {
// Local variables
var CamInd v_camInd;
var DriveDirection v_driveVal := backward;
f_CAM_MSD_INA_BV_01_34();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Drive direction value ***");
// change the drive direction
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_driveDirection(v_driveVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_driveVal==forward) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
//change again the drive direction and set the expectation to the measured value
v_driveVal := forward;
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_34
/**
2749,7 → 1535,7
* @desc Check that latest value of in-vehicle data is included
* in CAM.
* <pre>
* Pics Selection: PICS_HIGHFREQUENCYCONTAINER
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state
2774,69 → 1560,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-35
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-35
* @reference ETSI EN 302 637-2 , clause 5.2
*/
testcase TC_CAM_MSD_INA_BV_01_35() runs on ItsCam system ItsCamSystem {
// Local variables
var CamInd v_camInd;
var template (present) YawRateValue v_yawRateVal := ?;
var boolean v_initialReceived := false;
const YawRateValue c_yawRateValOffset := 1;
f_CAM_MSD_INA_BV_01_35();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
log("*** " & testcasename() & ": Checking INFO==Yaw rate value ***");
// change the yaw rate value to retrieve the current value
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_yawRate(v_yawRateVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the yaw rate value and set the expectation to the measured value
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue;
if (valueof(v_yawRateVal)>=32767) {
v_yawRateVal := -32766;
}
else {
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue+c_yawRateValOffset;
}
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_01_35
} // end group camInVehicleData
2845,7 → 1575,7
* @desc Check that publicTransportContainer is included if
* vehicleRole is set to publicTransport(1).
* <pre>
* Pics Selection: PICS_PUBLICTRANS
* Pics Selection: PICS_CAM_GENERATION AND PICS_PUBLICTRANS
* Initial conditions:
* with {
* the IUT being in the "initial state"
2866,51 → 1596,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-02
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-02
* @reference ETSI EN 302 637-2 , Annex B.11
*/
testcase TC_CAM_MSD_INA_BV_02() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_02();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_publicTransport));
// Test Body
log("*** " & testcasename() & ": Expected template: ", mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any )), " ***");
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_02
/**
2917,7 → 1609,7
* @desc Check that specialTransportContainer is included if
* vehicleRole is set to specialTransport(2).
* <pre>
* Pics Selection: PICS_SPECIALTRANS
* Pics Selection: PICS_CAM_GENERATION AND PICS_SPECIALTRANS
* Initial conditions:
* with {
* the IUT being in the "initial state"
2938,50 → 1630,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-03
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-03
* @reference ETSI EN 302 637-2 , Annex B.12
*/
testcase TC_CAM_MSD_INA_BV_03() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_03();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_specialTransport));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_specialTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_03
/**
2988,7 → 1643,7
* @desc Check that dangerousGoodsContainer is included if
* vehicleRole is set to dangerousGoods(3).
* <pre>
* Pics Selection: PICS_DANGEROUSGOODS
* Pics Selection: PICS_CAM_GENERATION AND PICS_DANGEROUSGOODS
* Initial conditions:
* with {
* the IUT being in the "initial state"
3009,50 → 1664,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-04
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-04
* @reference ETSI EN 302 637-2 , Annex B.13
*/
testcase TC_CAM_MSD_INA_BV_04() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_04();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_DANGEROUSGOODS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_DANGEROUSGOODS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_dangerousGoods));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_dangerousGoods_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_04
/**
3059,7 → 1677,7
* @desc Check that roadWorksContainerBasic is included if
* vehicleRole is set to roadWork(4).
* <pre>
* Pics Selection: PICS_ROADWORKS
* Pics Selection: PICS_CAM_GENERATION AND PICS_ROADWORKS
* Initial conditions:
* with {
* the IUT being in the "initial state"
3080,50 → 1698,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-05
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-05
* @reference ETSI EN 302 637-2 , Annex B.14
*/
testcase TC_CAM_MSD_INA_BV_05() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_05();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_ROADWORKS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_ROADWORKS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_roadWork));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_roadWorks_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_05
/**
3130,7 → 1711,7
* @desc Check that rescueContainer is included if vehicleRole is
* set to rescue(5).
* <pre>
* Pics Selection: PICS_RESCUE
* Pics Selection: PICS_CAM_GENERATION AND PICS_RESCUE
* Initial conditions:
* with {
* the IUT being in the "initial state"
3151,50 → 1732,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-06
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-06
* @reference ETSI EN 302 637-2 , Annex B.15
*/
testcase TC_CAM_MSD_INA_BV_06() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_06();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_RESCUE) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_RESCUE need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_rescue));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_rescue_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_06
/**
3201,7 → 1745,7
* @desc Check that emergencyContainer is included if vehicleRole
* is set to emergency(6).
* <pre>
* Pics Selection: PICS_EMERGENCY
* Pics Selection: PICS_CAM_GENERATION AND PICS_EMERGENCY
* Initial conditions:
* with {
* the IUT being in the "initial state"
3222,50 → 1766,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-07
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-07
* @reference ETSI EN 302 637-2 , Annex B.16
*/
testcase TC_CAM_MSD_INA_BV_07() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_07();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_EMERGENCY) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_EMERGENCY need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_emergency));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_emergency_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_07
/**
3272,7 → 1779,7
* @desc Check that safetyCarContainer is included if vehicleRole
* is set to safetyCar(7).
* <pre>
* Pics Selection: PICS_SAFETY_CAR
* Pics Selection: PICS_CAM_GENERATION AND PICS_SAFETY_CAR
* Initial conditions:
* with {
* the IUT being in the "initial state"
3293,50 → 1800,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-08
* @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-08
* @reference ETSI EN 302 637-2 , Annex B.17
*/
testcase TC_CAM_MSD_INA_BV_08() runs on ItsCam system ItsCamSystem {
// Local variables
f_CAM_MSD_INA_BV_08();
// Test control
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SAFETY_CAR) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SAFETY_CAR need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_safetyCar));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_safetyCar_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_INA_BV_08
} // end group camInformationAdaptation
3343,13 → 1813,11
group camGenerationFrequency {
group CAM_MSD_GFQ_BV_01 {
/**
* @desc Check that CAMs are not generated more frequently than
* T_GenCamMin.
* <pre>
* Pics Selection: PICS_T_GENCAMMIN
* Pics Selection: PICS_CAM_GENERATION AND PICS_T_GENCAMMIN
* Initial conditions:
* with {
* the IUT being in the "initial state"
3365,101 → 1833,20
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-01
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-01
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_01() runs on ItsCam system ItsCamSystem {
testcase TC_CAM_MSD_GFQ_TI_01() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_minTransInterval := PICS_T_GENCAMMIN * 0.95;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
f_CAM_MSD_GFQ_TI_01();
// Test control
} // end TC_CAM_MSD_GFQ_TI_01
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) {
v_ret := f_CAM_MSD_GFQ_BV_01(t_minTransInterval);
select (v_ret) {
case (e_error) {
log("*** " & testcasename() & ": FAIL: CAM message received BEFORE expiry of the minimum generation timer interval ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
case (e_timeout) {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
t_minTransInterval.start;
}
f_utTriggerEvent(m_changeSpeed(v_speedValues[v_cntSpeed]));
}
t_minTransInterval.stop;
log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_01
function f_CAM_MSD_GFQ_BV_01(timer t_minTransInterval) runs on ItsCam return FncRetCode {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) {
tc_ac.stop;
if (t_minTransInterval.running) {
return e_error;
}
}
[] t_minTransInterval.timeout {
repeat;
}
[] tc_ac.timeout {
t_minTransInterval.stop;
return e_timeout;
}
}
return e_success;
} // end function f_CAM_MSD_GFQ_BV_01
} // end group CAM_MSD_GFQ_BV_01
group CAM_MSD_GFQ_BV_02 {
/**
* @desc Check that CAMs are not generated less frequently than
* T_GenCamMax.
* <pre>
* Pics Selection: PICS_T_GENCAMMAX
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
3475,93 → 1862,20
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-02
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-02
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_02() runs on ItsCam system ItsCamSystem {
testcase TC_CAM_MSD_GFQ_TI_02() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_maxTransInterval := PICS_T_GENCAMMAX * 1.05;
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
f_CAM_MSD_GFQ_TI_02();
// Test control
} // end TC_CAM_MSD_GFQ_TI_02
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_maxTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) {
v_ret := f_CAM_MSD_GFQ_BV_02(t_maxTransInterval);
select (v_ret) {
case (e_error) {
log("*** " & testcasename() & ": FAIL: No CAM message received BEFORE expiry of the maximum generation timer interval ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
case (e_timeout) {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
t_maxTransInterval.stop;
log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_02
function f_CAM_MSD_GFQ_BV_02(timer t_maxTransInterval) runs on ItsCam return FncRetCode {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) {
tc_ac.stop;
t_maxTransInterval.stop;
t_maxTransInterval.start;
}
[] t_maxTransInterval.timeout {
return e_error;
}
[] tc_ac.timeout {
t_maxTransInterval.stop;
return e_timeout;
}
}
return e_success
} // end function f_CAM_MSD_GFQ_BV_01
} //end group CAM_MSD_GFQ_BV_02
/**
* @desc Check that TGenCam is set to T_GenCamMax after generating
* N_GenCam due to condition 2.
* <pre>
* Pics Selection: PICS_T_GENCAMMAX
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
3580,112 → 1894,15
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-03
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-03
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_03() runs on ItsCam system ItsCamSystem {
testcase TC_CAM_MSD_GFQ_TI_03() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05;
timer t_interval_1_measure := PX_TWAIT;
timer t_interval_1_min;
timer t_interval_1_max;
var float v_interval_1_min;
var float v_interval_1_max;
var integer v_N_GenCam := 3;
var integer v_i;
f_CAM_MSD_GFQ_TI_03();
// Test control
} // end TC_CAM_MSD_GFQ_TI_03
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
t_interval_1_measure.start;
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_utTriggerEvent(m_changeSpeed(1000));
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_interval_1_measure.read;
log("Elapsed time since last CAM: ", v_measured);
tc_ac.stop;
v_interval_1_min := v_measured * 0.8;
v_interval_1_max := v_measured * 1.2;
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 1 CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 1 CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
for (v_i:=1; v_i <= v_N_GenCam; v_i:=v_i+1) {
t_interval_1_min.start(v_interval_1_min);
t_interval_1_max.start(v_interval_1_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_interval_1_min.running) {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message received BEFORE INTERVAL_1 expired ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
t_interval_1_max.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 2 CAM#", v_i, " message received ***");
}
[] t_interval_1_min.timeout {
repeat;
}
[] t_interval_1_max.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_maxTransInterval_min.start;
t_maxTransInterval_max.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_maxTransInterval_min.running) {
log("*** " & testcasename() & ": FAIL: Next CAM message received BEFORE T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
t_maxTransInterval_max.stop;
log("*** " & testcasename() & ": PASS: Next CAM message received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_maxTransInterval_min.timeout {
repeat;
}
[] t_maxTransInterval_max.timeout {
log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_03
/**
* @desc Check that CAM is generated immediately when the time
* elapsed since the last CAM generation is equal or larger
3693,7 → 1910,7
* current direction of the originating ITS-S (towards North)
* and direction included in previous CAM exceeds 4°.
* <pre>
* Pics Selection: PICS_T_GENCAMDCC
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
3717,63 → 1934,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-04
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/BV-04
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_04() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95;
var CamInd v_camPdu;
var HeadingValue v_headingValue;
var HeadingValue v_changeHeadingValue := 50; // 4° == 40
f_CAM_MSD_GFQ_BV_04();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_headingValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue;
t_genCam_Dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_Dcc.timeout;
f_utTriggerEvent(m_changeHeading(v_changeHeadingValue));
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( (v_headingValue + v_changeHeadingValue) mod 3600) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_Dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_04
/**
3782,7 → 1949,7
* than T_GenCam_Dcc and the current position and position
* included in previous CAM exceeds 4 m.
* <pre>
* Pics Selection: PICS_T_GENCAMDCC
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
3805,70 → 1972,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-05
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/BV-05
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_05() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95;
var CamInd v_camPdu;
var ReferencePosition v_referencePosition;
var integer v_changePosValue := 4; // 4m
f_CAM_MSD_GFQ_BV_05();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camPdu {
tc_ac.stop;
v_referencePosition := v_camPdu.msgIn.cam.camParameters.basicContainer.referencePosition;
t_genCam_Dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_Dcc.timeout;
v_referencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue);
f_utChangePosition(
valueof(UtChangePosition: {
latitude := v_referencePosition.latitude,
longitude := v_referencePosition.longitude,
elevation := 0 // FIXME := v_referencePosition.altitude
}
));
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_referencePosition ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_Dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_05
/**
3878,7 → 1988,7
* current speed and speed included in previous CAM
* exceeds 0,5 m/s.
* <pre>
* Pics Selection: PICS_T_GENCAMDCC
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
3902,63 → 2012,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-06
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/BV-06
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_06() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95;
var CamInd v_camPdu;
var SpeedValue v_speedValue;
var SpeedValue v_changeSpeedValue := 50; // 0,5 m/s == 50 cm/s
f_CAM_MSD_GFQ_BV_06();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_speedValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue;
t_genCam_Dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_Dcc.timeout;
f_utTriggerEvent(m_changeSpeed(v_changeSpeedValue));
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( (v_speedValue + v_changeSpeedValue) mod 16384 ) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_Dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_06
/**
3966,7 → 2026,7
* elapsed since the last CAM generation is equal or larger
* than T_GenCam and equal or larger than T_GenCam_Dcc.
* <pre>
* Pics Selection: PICS_T_GENCAM AND PICS_T_GENCAMDCC
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
3984,93 → 2044,20
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-07
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-07
* @reference ETSI EN 302 637-2 , clause 6.1.3
*/
testcase TC_CAM_MSD_GFQ_BV_07() runs on ItsCam system ItsCamSystem {
testcase TC_CAM_MSD_GFQ_TI_07() runs on ItsCam system ItsCamSystem {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05;
timer t_genCam_measure := PX_TWAIT;
timer t_genCam_min;
timer t_genCam_max;
var float v_genCam_min;
var float v_genCam_max;
f_CAM_MSD_GFQ_TI_07();
// Test control
} // end TC_CAM_MSD_GFQ_TI_07
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_genCam_measure.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_utTriggerEvent(m_changeSpeed(1000));
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_genCam_measure.read;
tc_ac.stop;
v_genCam_min := v_measured * 0.9;
v_genCam_max := v_measured * 1.1;
log("*** " & testcasename() & ": INFO: Initial conditions: Anticipated CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_min.start(v_genCam_min);
t_genCam_max.start(v_genCam_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_genCam_min.running) {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message received BEFORE T_GenCam expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
t_genCam_max.stop;
log("*** " & testcasename() & ": PASS: Anticipated CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
repeat;
}
[] t_genCam_max.timeout {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_07
/**
* @desc Check that maximum CAM generation frequency for RSU ITS-S is 1Hz
*
* <pre>
* Pics Selection: PICS_RSU
* Pics Selection: PICS_CAM_GENERATION AND PICS_RSU
* Initial conditions:
* with {
* the IUT being in the "initial state"
4086,66 → 2073,111
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-08
* @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-08
* @reference ETSI EN 302 637-2 , clause 6.1.4
*/
testcase TC_CAM_MSD_GFQ_BV_08() runs on ItsCam system ItsCamSystem {
testcase TC_CAM_MSD_GFQ_TI_08() runs on ItsCam system ItsCamSystem {
// Local constants
const float c_minTime := 0.95;
const float c_maxTime := 1.05;
f_CAM_MSD_GFQ_TI_08();
 
// Local variables
} // end TC_CAM_MSD_GFQ_TI_08
// Test component configuration
f_cfUp();
} // end group camGenerationFrequency
 
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
group camLowerLayerParameters {
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if ( ( tc_ac.read*1000.0 > c_minTime ) and ( tc_ac.read*1000.0 < c_maxTime )) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received in time***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: CAM message not received in time***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
}
/**
* @desc Check that CAM is encapsulated in BTP type B packet
* <pre>
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a CAM
* encapsulated in a BTP-B packet
* }
* }
* </pre>
*
* @see ETSI TS 102 868-2 TP/CAM/MSD/PAR/BV-01
* @reference ETSI EN 302 637-2 , clause 5.3.4.1
*/
testcase TC_CAM_MSD_PAR_BV_01() runs on ItsCam system ItsCamSystem {
// Postamble
f_poDefault();
f_cfDown();
f_CAM_MSD_PAR_BV_01();
} // end TC_CAM_MSD_GFQ_BV_08
} // end TC_CAM_MSD_PAR_BV_01
} // end group camGenerationFrequency
/**
* @desc Check that CAM is encapsulated in SHB packet
* <pre>
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a CAM
* encapsulated in a SHB packet
* }
* }
* </pre>
*
* @see ETSI TS 102 868-2 TP/CAM/MSD/PAR/BV-02
* @reference ETSI EN 302 637-2 , clause 5.3.4.1
*/
testcase TC_CAM_MSD_PAR_BV_02() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_PAR_BV_02();
} // end TC_CAM_MSD_PAR_BV_02
/**
* @desc Check that CAM is encapsulated in GN packet with lifetime lower than 1s
* <pre>
* Pics Selection: PICS_CAM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a CAM is generated
* }
* then {
* the IUT sends a CAM
* encapsulated in a GN packet
* containing Basic Header
* containing Lifetime field
* indicating value lower than 1s
* }
* }
* </pre>
*
* @see ETSI TS 102 868-2 TP/CAM/MSD/PAR/BV-03
* @reference ETSI EN 302 637-2 , clause 5.3.4.1
*/
testcase TC_CAM_MSD_PAR_BV_03() runs on ItsCam system ItsCamSystem {
f_CAM_MSD_PAR_BV_03();
} // end TC_CAM_MSD_PAR_BV_03
 
} // end group camLowerLayerParameters
} // end group camMessageDissemination
group camMessageProcessing {
4154,7 → 2186,7
* @desc Check that content of received CAM is transmitted to
* applications and other facilities.
* <pre>
* Pics Selection: PICS_CANRECEPTION
* Pics Selection: PICS_CAM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
4171,56 → 2203,13
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSP/BV-01
* @see ETSI TS 102 868-2 TP/CAM/MSP/BV-01
* @reference ETSI EN 302 637-2 , clause 4.2.2
*/
testcase TC_CAM_MSP_BV_01() runs on ItsCam system ItsCamSystem {
// Local variables
var CamReq v_camReq;
var integer i;
f_CAM_MSP_BV_01();
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_camReq := valueof(
m_camReq(
m_camMsg_vehicle(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
)
);
camPort.send( v_camReq ) ;
f_sleep(PX_TNOAC);
for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq, vc_utEvents[i].camMsg); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: CAM was transmitted to upper layer ***");
f_clientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: CAM was not transmitted to upper layer ***");
f_clientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSP_BV_01
} // end group camMessageProcessing
/trunk/ttcn/AtsCAM/ItsCam_TestControl.ttcn
16,34 → 16,27
// Test Execution
control {
execute(TC_CAM_MSD_FMT_BV_01());
if ( PICS_LOWFREQUENCYCONTAINER ) {
if(PICS_CAM_GENERATION) {
execute(TC_CAM_MSD_FMT_BV_01());
execute(TC_CAM_MSD_FMT_BV_02());
execute(TC_CAM_MSD_FMT_BV_03());
}
if ( PICS_SPECIALVEHICLECONTAINER ) {
execute(TC_CAM_MSD_FMT_BV_04());
execute(TC_CAM_MSD_FMT_BV_05());
}
execute(TC_CAM_MSD_INA_BV_01_01());
execute(TC_CAM_MSD_INA_BV_01_02());
execute(TC_CAM_MSD_INA_BV_01_03());
execute(TC_CAM_MSD_INA_BV_01_04());
execute(TC_CAM_MSD_INA_BV_01_05());
execute(TC_CAM_MSD_INA_BV_01_06());
execute(TC_CAM_MSD_INA_BV_01_07());
execute(TC_CAM_MSD_INA_BV_01_08());
execute(TC_CAM_MSD_INA_BV_01_09());
execute(TC_CAM_MSD_INA_BV_01_10());
execute(TC_CAM_MSD_INA_BV_01_11());
execute(TC_CAM_MSD_INA_BV_01_12());
execute(TC_CAM_MSD_INA_BV_01_13());
execute(TC_CAM_MSD_INA_BV_01_14());
execute(TC_CAM_MSD_INA_BV_01_15());
if (PICS_LOWFREQUENCYCONTAINER) {
execute(TC_CAM_MSD_INA_BV_01_01());
execute(TC_CAM_MSD_INA_BV_01_02());
execute(TC_CAM_MSD_INA_BV_01_03());
execute(TC_CAM_MSD_INA_BV_01_04());
execute(TC_CAM_MSD_INA_BV_01_05());
execute(TC_CAM_MSD_INA_BV_01_06());
execute(TC_CAM_MSD_INA_BV_01_07());
execute(TC_CAM_MSD_INA_BV_01_08());
execute(TC_CAM_MSD_INA_BV_01_09());
execute(TC_CAM_MSD_INA_BV_01_10());
execute(TC_CAM_MSD_INA_BV_01_11());
execute(TC_CAM_MSD_INA_BV_01_12());
execute(TC_CAM_MSD_INA_BV_01_13());
execute(TC_CAM_MSD_INA_BV_01_14());
execute(TC_CAM_MSD_INA_BV_01_15());
execute(TC_CAM_MSD_INA_BV_01_16());
execute(TC_CAM_MSD_INA_BV_01_17());
execute(TC_CAM_MSD_INA_BV_01_18());
60,14 → 53,11
execute(TC_CAM_MSD_INA_BV_01_29());
execute(TC_CAM_MSD_INA_BV_01_30());
execute(TC_CAM_MSD_INA_BV_01_31());
}
execute(TC_CAM_MSD_INA_BV_01_32());
execute(TC_CAM_MSD_INA_BV_01_33());
execute(TC_CAM_MSD_INA_BV_01_34());
execute(TC_CAM_MSD_INA_BV_01_35());
if (PICS_SPECIALVEHICLECONTAINER) {
execute(TC_CAM_MSD_INA_BV_01_32());
execute(TC_CAM_MSD_INA_BV_01_33());
execute(TC_CAM_MSD_INA_BV_01_34());
execute(TC_CAM_MSD_INA_BV_01_35());
if (PICS_PUBLICTRANS) {
execute(TC_CAM_MSD_INA_BV_02());
}
89,18 → 79,26
if (PICS_SAFETY_CAR) {
execute(TC_CAM_MSD_INA_BV_08());
}
execute(TC_CAM_MSD_GFQ_TI_01());
execute(TC_CAM_MSD_GFQ_TI_02());
execute(TC_CAM_MSD_GFQ_TI_03());
execute(TC_CAM_MSD_GFQ_BV_04());
execute(TC_CAM_MSD_GFQ_BV_05());
execute(TC_CAM_MSD_GFQ_BV_06());
execute(TC_CAM_MSD_GFQ_TI_07());
execute(TC_CAM_MSD_GFQ_TI_08());
execute(TC_CAM_MSD_PAR_BV_01());
execute(TC_CAM_MSD_PAR_BV_02());
execute(TC_CAM_MSD_PAR_BV_03());
}
if(PICS_CAM_RECEPTION) {
execute(TC_CAM_MSP_BV_01());
}
execute(TC_CAM_MSD_GFQ_BV_01());
execute(TC_CAM_MSD_GFQ_BV_02());
execute(TC_CAM_MSD_GFQ_BV_03());
execute(TC_CAM_MSD_GFQ_BV_04());
execute(TC_CAM_MSD_GFQ_BV_05());
execute(TC_CAM_MSD_GFQ_BV_06());
execute(TC_CAM_MSD_GFQ_BV_07());
execute(TC_CAM_MSP_BV_01());
}
} // end ItsCam_TestControl
/trunk/ttcn/AtsCAM/ItsCam_TpFunctions.ttcn
0,0 → 1,3038
/**
* @author ETSI STF484
* @version $URL$
* $Id$
* @desc CAM TP functions
*
*/
 
module ItsCam_TpFunctions {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
import from LibCommon_Time all;
import from LibCommon_BasicTypesAndValues all;
// LibIts
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues {
type UtChangePosition
};
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics {modulepar all};
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
 
// 5.2.1
group camMessageDissemination {
group camMessageFormat {
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_01
*/
function f_CAM_MSD_FMT_BV_01() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_01
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_02
*/
function f_CAM_MSD_FMT_BV_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_02
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_03
*/
function f_CAM_MSD_FMT_BV_03() runs on ItsCam {
// Local variables
timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.05;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithLF := false;
const integer c_cntTimeLimit := 10;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
f_utTriggerEvent(m_changeSpeed(v_speedValues[v_cntSpeed]));
v_cntTime := 0;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_LF_any )) {
tc_ac.stop;
v_cntTime := v_cntTime + 1;
if (v_cntTime == c_cntTimeLimit) { // Exit message loop
log("*** " & testcasename() & ": INFO: The subset of CAM messages including lowFrequencyContainer was received ***");
t_minTransInterval.start;
v_nextCamWithLF := false;
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission with LowFrequency container ***");
tc_ac.start;
t_minTransInterval.start;
v_nextCamWithLF := false;
repeat;
}
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
if(v_nextCamWithLF == true) {
log("*** " & testcasename() & ": FAIL: No LowFrequency container in received CAM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission w/o LowFrequency container ***");
tc_ac.start;
repeat;
}
}
[] t_minTransInterval.timeout {
v_nextCamWithLF := true;
log("*** " & testcasename() & ": INFO: Next CAM shall contain LowFrequency container ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
log("*** " & testcasename() & ": PASS: Generation of CAM messages including lowFrequencyContainer was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_03
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_04
*/
function f_CAM_MSD_FMT_BV_04() runs on ItsCam {
// Local variables
var VehicleRole v_vehicleRole := c_vehicleRole_roadWork;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER) {
testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_04
/**
* @desc TP Function for TC_CAM_MSD_FMT_BV_05
*/
function f_CAM_MSD_FMT_BV_05() runs on ItsCam {
// Local variables
timer t_minTransInterval := c_specialVehicleGenerationTime * 1.05;
var VehicleRole v_vehicleRole := roadWork;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var CamInd v_camInd;
var boolean v_nextCamWithSVC := false;
const integer c_cntTimeLimit := 10;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER) {
testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(v_vehicleRole));
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
f_utTriggerEvent(m_changeSpeed(v_speedValues[v_cntSpeed]));
v_cntTime := 0;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )) {
tc_ac.stop;
v_cntTime := v_cntTime + 1;
if (v_cntTime == c_cntTimeLimit) { // Exit message loop
log("*** " & testcasename() & ": INFO: The subset of CAM messages including specialVehicleContainer was received ***");
t_minTransInterval.start;
v_nextCamWithSVC := false;
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission with SpecialVehicle container ***");
tc_ac.start;
t_minTransInterval.start;
v_nextCamWithSVC := false;
repeat;
}
}
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
tc_ac.stop;
if(v_nextCamWithSVC == true) {
log("*** " & testcasename() & ": FAIL: No SpecialVehicle container in received CAM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": INFO: CAM retransmission w/o SpecialVehicle container ***");
tc_ac.start;
repeat;
}
}
[] t_minTransInterval.timeout {
v_nextCamWithSVC := true;
log("*** " & testcasename() & ": INFO: Next CAM shall contain SpecialVehicle container ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
log("*** " & testcasename() & ": PASS: Generation of CAM messages including SpecialVehicleContainer was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_FMT_BV_05
} // end group camMessageFormat
group camInformationAdaptation {
group camInVehicleData {
type record of UtCamTrigger UtCamTriggers;
type record of CAM CamPdus;
function f_CAM_MSD_INA_BV_01(in charstring p_INFO, in template (value) UtCamTriggers p_utTriggers, in template (present) CamPdus p_camPdus) runs on ItsCam {
// Local variables
var integer v_cnt;
log("*** " & testcasename() & ": Checking INFO==" & p_INFO & " ***");
if (lengthof(p_utTriggers) != lengthof(p_camPdus)) {
log("*** " & testcasename() & ": INCONC: Invalid testcase configuration: Number of event triggers and expected CAM messages differs ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
for (v_cnt:=0; v_cnt<lengthof(p_utTriggers); v_cnt:=v_cnt+1) {
f_utTriggerEvent(p_utTriggers[v_cnt]);
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( p_camPdus[v_cnt] )){
tc_ac.stop;
if (v_cnt==lengthof(p_utTriggers)-1) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
}
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_01
*/
function f_CAM_MSD_INA_BV_01_01() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) CurvatureValue v_curVal := ?;
var boolean v_initialReceived := false;
const CurvatureValue c_curValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
log("*** " & testcasename() & ": Checking INFO==Curvature value ***");
// change the curvature value to retrieve the current value
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_curvature(v_curVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the curvature value and set the expectation to the measured value
v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue+c_curValOffset;
f_utTriggerEvent(m_changeCurvature(c_curValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_01
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_02
*/
function f_CAM_MSD_INA_BV_01_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Brake pedal being activated",
{ m_setAccelerationControlStatus(c_brakePedalEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_02
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_03
*/
function f_CAM_MSD_INA_BV_01_03() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Brake pedal being deactivated",
{ m_setAccelerationControlStatus(c_brakePedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_03
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_04
*/
function f_CAM_MSD_INA_BV_01_04() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Gas pedal being activated",
{ m_setAccelerationControlStatus(c_gasPedalEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_04
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_05
*/
function f_CAM_MSD_INA_BV_01_05() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Gas pedal being deactivated",
{ m_setAccelerationControlStatus(c_gasPedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_05
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_06
*/
function f_CAM_MSD_INA_BV_01_06() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Emergency brake being activated",
{ m_setAccelerationControlStatus(c_emergencyBrakeEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_06
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_07
*/
function f_CAM_MSD_INA_BV_01_07() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Emergency brake being deactivated",
{ m_setAccelerationControlStatus(c_emergencyBrakeEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_07
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_08
*/
function f_CAM_MSD_INA_BV_01_08() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Collision warning being activated",
{ m_setAccelerationControlStatus(c_collisionWarningEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_08
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_09
*/
function f_CAM_MSD_INA_BV_01_09() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Collision warning being deactivated",
{ m_setAccelerationControlStatus(c_collisionWarningEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_09
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_10
*/
function f_CAM_MSD_INA_BV_01_10() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"ACC being activated",
{ m_setAccelerationControlStatus(c_accEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_10
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_11
*/
function f_CAM_MSD_INA_BV_01_11() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"ACC being deactivated",
{ m_setAccelerationControlStatus(c_accEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_11
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_12
*/
function f_CAM_MSD_INA_BV_01_12() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Cruise control being activated",
{ m_setAccelerationControlStatus(c_cruiseControlEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_12
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_13
*/
function f_CAM_MSD_INA_BV_01_13() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Cruise control being deactivated",
{ m_setAccelerationControlStatus(c_cruiseControlEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_13
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_14
*/
function f_CAM_MSD_INA_BV_01_14() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Speed limiter being activated",
{ m_setAccelerationControlStatus(c_speedLimiterEngaged) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_14
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_15
*/
function f_CAM_MSD_INA_BV_01_15() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Speed limiter control being deactivated",
{ m_setAccelerationControlStatus(c_speedLimiterEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) },
{ mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_15
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_16
*/
function f_CAM_MSD_INA_BV_01_16() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Low beam headlights being activated",
{ m_setExteriorLightsStatus(c_lowBeamHeadlightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_16
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_17
*/
function f_CAM_MSD_INA_BV_01_17() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Low beam headlights being deactivated",
{ m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_17
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_18
*/
function f_CAM_MSD_INA_BV_01_18() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"High beam headlights being activated",
{ m_setExteriorLightsStatus(c_highBeamHeadlightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_18
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_19
*/
function f_CAM_MSD_INA_BV_01_19() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"High beam headlights being deactivated",
{ m_setExteriorLightsStatus(c_highBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_19
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_20
*/
function f_CAM_MSD_INA_BV_01_20() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Left turn signal being activated",
{ m_setExteriorLightsStatus(c_leftTurnSignalOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_20
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_21
*/
function f_CAM_MSD_INA_BV_01_21() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Left turn signal being deactivated",
{ m_setExteriorLightsStatus(c_leftTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_21
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_22
*/
function f_CAM_MSD_INA_BV_01_22() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Right turn signal being activated",
{ m_setExteriorLightsStatus(c_rightTurnSignalOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_22
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_23
*/
function f_CAM_MSD_INA_BV_01_23() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Right turn signal being deactivated",
{ m_setExteriorLightsStatus(c_rightTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_23
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_24
*/
function f_CAM_MSD_INA_BV_01_24() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Daytime running lights being activated",
{ m_setExteriorLightsStatus(c_daytimeRunningLightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_24
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_25
*/
function f_CAM_MSD_INA_BV_01_25() runs on ItsCam {
// Local variables
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_CAM_MSD_INA_BV_01(
"Daytime running lights being deactivated",
{ m_setExteriorLightsStatus(c_daytimeRunningLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_25
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_26
*/
function f_CAM_MSD_INA_BV_01_26() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Reverse light being activated",
{ m_setExteriorLightsStatus(c_reverseLightOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_26
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_27
*/
function f_CAM_MSD_INA_BV_01_27() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Reverese light being deactivated",
{ m_setExteriorLightsStatus(c_reverseLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_27
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_28
*/
function f_CAM_MSD_INA_BV_01_28() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Fog lights being activated",
{ m_setExteriorLightsStatus(c_fogLightOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_28
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_29
*/
function f_CAM_MSD_INA_BV_01_29() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Fog lights being deactivated",
{ m_setExteriorLightsStatus(c_fogLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_29
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_30
*/
function f_CAM_MSD_INA_BV_01_30() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Parking lights being activated",
{ m_setExteriorLightsStatus(c_parkingLightsOn) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_30
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_31
*/
function f_CAM_MSD_INA_BV_01_31() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
f_CAM_MSD_INA_BV_01(
"Parking lights being deactivated",
{ m_setExteriorLightsStatus(c_parkingLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) },
{ mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOff)) }
);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_31
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_32
*/
function f_CAM_MSD_INA_BV_01_32() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) HeadingValue v_headingVal := ?;
var boolean v_initialReceived := false;
const HeadingValue c_headingValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
log("*** " & testcasename() & ": Checking INFO==Heading value ***");
// change the heading value to retrieve the current value
f_utTriggerEvent(m_changeHeading(c_headingValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_heading(v_headingVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the heading value and set the expectation to the measured value
v_headingVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue+c_headingValOffset) mod 3601;
f_utTriggerEvent(m_changeHeading(c_headingValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_32
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_33
*/
function f_CAM_MSD_INA_BV_01_33() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) SpeedValue v_speedVal := ?;
var boolean v_initialReceived := false;
const SpeedValue c_speedValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
log("*** " & testcasename() & ": Checking INFO==Speed value ***");
// change the speed value to retrieve the current value
f_utTriggerEvent(m_changeSpeed(c_speedValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_speed(v_speedVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the speed value and set the expectation to the measured value
v_speedVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue+c_speedValOffset) mod 16384;
f_utTriggerEvent(m_changeSpeed(c_speedValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_33
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_34
*/
function f_CAM_MSD_INA_BV_01_34() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var DriveDirection v_driveVal := backward;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
log("*** " & testcasename() & ": Checking INFO==Drive direction value ***");
// change the drive direction
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_driveDirection(v_driveVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_driveVal==forward) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
//change again the drive direction and set the expectation to the measured value
v_driveVal := forward;
f_utTriggerEvent(m_setDriveDirection(v_driveVal));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_34
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_01_35
*/
function f_CAM_MSD_INA_BV_01_35() runs on ItsCam {
// Local variables
var CamInd v_camInd;
var template (present) YawRateValue v_yawRateVal := ?;
var boolean v_initialReceived := false;
const YawRateValue c_yawRateValOffset := 1;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
log("*** " & testcasename() & ": Checking INFO==Yaw rate value ***");
// change the yaw rate value to retrieve the current value
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
alt {
[] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_yawRate(v_yawRateVal)) )) -> value v_camInd {
tc_ac.stop;
if (v_initialReceived) {
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***");
v_initialReceived := true;
//change again the yaw rate value and set the expectation to the measured value
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue;
if (valueof(v_yawRateVal)>=32767) {
v_yawRateVal := -32766;
}
else {
v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue+c_yawRateValOffset;
}
f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset));
tc_ac.start;
repeat;
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_01_35
} // end group camInVehicleData
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_02
*/
function f_CAM_MSD_INA_BV_02() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_publicTransport));
// Test Body
log("*** " & testcasename() & ": Expected template: ", mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any )), " ***");
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_02
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_03
*/
function f_CAM_MSD_INA_BV_03() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_specialTransport));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_specialTransport_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_03
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_04
*/
function f_CAM_MSD_INA_BV_04() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_DANGEROUSGOODS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_DANGEROUSGOODS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_dangerousGoods));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_dangerousGoods_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_04
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_05
*/
function f_CAM_MSD_INA_BV_05() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_ROADWORKS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_ROADWORKS need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_roadWork));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_roadWorks_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_05
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_06
*/
function f_CAM_MSD_INA_BV_06() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_RESCUE) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_RESCUE need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_rescue));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_rescue_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_06
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_07
*/
function f_CAM_MSD_INA_BV_07() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_EMERGENCY) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_EMERGENCY need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_emergency));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_emergency_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_07
/**
* @desc TP Function for TC_CAM_MSD_INA_BV_08
*/
function f_CAM_MSD_INA_BV_08() runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SAFETY_CAR) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SAFETY_CAR need to be set to true");
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Set vehicle role
f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_safetyCar));
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_safetyCar_any ))){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_INA_BV_08
} // end group camInformationAdaptation
group camGenerationFrequency {
group CAM_MSD_GFQ_TI_01 {
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_01
*/
function f_CAM_MSD_GFQ_TI_01() runs on ItsCam {
// Local variables
timer t_minTransInterval := PICS_T_GENCAMMIN * 0.95;
var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_minTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntSpeed:=0; v_cntSpeed<lengthof(v_speedValues); v_cntSpeed:=v_cntSpeed + 1) {
for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) {
v_ret := f_CAM_MSD_GFQ_TI_01_helper(t_minTransInterval);
select (v_ret) {
case (e_error) {
log("*** " & testcasename() & ": FAIL: CAM message received BEFORE expiry of the minimum generation timer interval ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
case (e_timeout) {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
t_minTransInterval.start;
}
f_utTriggerEvent(m_changeSpeed(v_speedValues[v_cntSpeed]));
}
t_minTransInterval.stop;
log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_01
function f_CAM_MSD_GFQ_TI_01_helper(timer t_minTransInterval) runs on ItsCam return FncRetCode {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) {
tc_ac.stop;
if (t_minTransInterval.running) {
return e_error;
}
}
[] t_minTransInterval.timeout {
repeat;
}
[] tc_ac.timeout {
t_minTransInterval.stop;
return e_timeout;
}
}
return e_success;
} // end function f_CAM_MSD_GFQ_TI_01
} // end group CAM_MSD_GFQ_TI_01
group CAM_MSD_GFQ_TI_02 {
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_02
*/
function f_CAM_MSD_GFQ_TI_02() runs on ItsCam {
// Local variables
timer t_maxTransInterval := PICS_T_GENCAMMAX * 1.05;
var integer v_cntSpeed, v_cntTime;
var FncRetCode v_ret;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_maxTransInterval.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) {
v_ret := f_CAM_MSD_GFQ_TI_02_helper(t_maxTransInterval);
select (v_ret) {
case (e_error) {
log("*** " & testcasename() & ": FAIL: No CAM message received BEFORE expiry of the maximum generation timer interval ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
case (e_timeout) {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
}
t_maxTransInterval.stop;
log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_02
function f_CAM_MSD_GFQ_TI_02_helper(timer t_maxTransInterval) runs on ItsCam return FncRetCode {
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) {
tc_ac.stop;
t_maxTransInterval.stop;
t_maxTransInterval.start;
}
[] t_maxTransInterval.timeout {
return e_error;
}
[] tc_ac.timeout {
t_maxTransInterval.stop;
return e_timeout;
}
}
return e_success
} // end function f_CAM_MSD_GFQ_TI_02
} //end group CAM_MSD_GFQ_TI_02
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_03
*/
function f_CAM_MSD_GFQ_TI_03() runs on ItsCam {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05;
timer t_interval_1_measure := PX_TWAIT;
timer t_interval_1_min;
timer t_interval_1_max;
var float v_interval_1_min;
var float v_interval_1_max;
var integer v_N_GenCam := 3;
var integer v_i;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
t_interval_1_measure.start;
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_utTriggerEvent(m_changeSpeed(1000));
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_interval_1_measure.read;
log("Elapsed time since last CAM: ", v_measured);
tc_ac.stop;
v_interval_1_min := v_measured * 0.8;
v_interval_1_max := v_measured * 1.2;
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 1 CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 1 CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
for (v_i:=1; v_i <= v_N_GenCam; v_i:=v_i+1) {
t_interval_1_min.start(v_interval_1_min);
t_interval_1_max.start(v_interval_1_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_interval_1_min.running) {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message received BEFORE INTERVAL_1 expired ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
t_interval_1_max.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: Condition 2 CAM#", v_i, " message received ***");
}
[] t_interval_1_min.timeout {
repeat;
}
[] t_interval_1_max.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_maxTransInterval_min.start;
t_maxTransInterval_max.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_maxTransInterval_min.running) {
log("*** " & testcasename() & ": FAIL: Next CAM message received BEFORE T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
t_maxTransInterval_max.stop;
log("*** " & testcasename() & ": PASS: Next CAM message received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_maxTransInterval_min.timeout {
repeat;
}
[] t_maxTransInterval_max.timeout {
log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_03
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_04
*/
function f_CAM_MSD_GFQ_BV_04() runs on ItsCam {
// Local variables
timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95;
var CamInd v_camPdu;
var HeadingValue v_headingValue;
var HeadingValue v_changeHeadingValue := 50; // 4° == 40
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_headingValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue;
t_genCam_Dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_Dcc.timeout;
f_utTriggerEvent(m_changeHeading(v_changeHeadingValue));
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( (v_headingValue + v_changeHeadingValue) mod 3600) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_Dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_04
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_05
*/
function f_CAM_MSD_GFQ_BV_05() runs on ItsCam {
// Local variables
timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95;
var CamInd v_camPdu;
var ReferencePosition v_referencePosition;
var integer v_changePosValue := 4; // 4m
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camPdu {
tc_ac.stop;
v_referencePosition := v_camPdu.msgIn.cam.camParameters.basicContainer.referencePosition;
t_genCam_Dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_Dcc.timeout;
v_referencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue);
f_utChangePosition ( valueof ( UtChangePosition: {
latitude := v_referencePosition.latitude,
longitude := v_referencePosition.longitude,
elevation := 0 } ) );
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_referencePosition ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_Dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_05
/**
* @desc TP Function for TC_CAM_MSD_GFQ_BV_06
*/
function f_CAM_MSD_GFQ_BV_06() runs on ItsCam {
// Local variables
timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95;
var CamInd v_camPdu;
var SpeedValue v_speedValue;
var SpeedValue v_changeSpeedValue := 50; // 0,5 m/s == 50 cm/s
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( ? ) ) )) -> value v_camPdu {
tc_ac.stop;
v_speedValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue;
t_genCam_Dcc.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_Dcc.timeout;
f_utTriggerEvent(m_changeSpeed(v_changeSpeedValue));
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( (v_speedValue + v_changeSpeedValue) mod 16384 ) ) )){
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_Dcc.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_BV_06
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_07
*/
function f_CAM_MSD_GFQ_TI_07() runs on ItsCam {
// Local variables
timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05;
timer t_genCam_measure := PX_TWAIT;
timer t_genCam_min;
timer t_genCam_max;
var float v_genCam_min;
var float v_genCam_max;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_genCam_measure.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_utTriggerEvent(m_changeSpeed(1000));
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_genCam_measure.read;
tc_ac.stop;
v_genCam_min := v_measured * 0.9;
v_genCam_max := v_measured * 1.1;
log("*** " & testcasename() & ": INFO: Initial conditions: Anticipated CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_min.start(v_genCam_min);
t_genCam_max.start(v_genCam_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_genCam_min.running) {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message received BEFORE T_GenCam expired ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
t_genCam_max.stop;
log("*** " & testcasename() & ": PASS: Anticipated CAM message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
repeat;
}
[] t_genCam_max.timeout {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_07
/**
* @desc TP Function for TC_CAM_MSD_GFQ_TI_08
*/
function f_CAM_MSD_GFQ_TI_08() runs on ItsCam {
// Local constants
const float c_minTime := 0.95;
const float c_maxTime := 1.05;
 
// Local variables
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
 
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
}
}
// Test Body
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if ( ( tc_ac.read*1000.0 > c_minTime ) and ( tc_ac.read*1000.0 < c_maxTime )) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: CAM message received in time***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: CAM message not received in time***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_GFQ_TI_08
} // end group camGenerationFrequency
 
group camLowerLayerParameters {
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_01
*/
function f_CAM_MSD_PAR_BV_01() runs on ItsCam {
// Local variables
const UInt8 c_gnNhBtpB := 2;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, c_gnNhBtpB)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message encapsultated in BTP-B packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN NH information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] camPort.receive(mw_camInd(mw_camMsg_any)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in BTP-B packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_01
 
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_02
*/
function f_CAM_MSD_PAR_BV_02() runs on ItsCam {
// Local variables
const UInt8 c_gnHtTsb := 5;
const UInt8 c_GnHstSingleHop := 0;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, c_gnHtTsb, c_GnHstSingleHop)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected CAM message encapsulated in SHB packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, omit, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN HT/HST information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] camPort.receive(mw_camInd(mw_camMsg_any)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in SHB packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_02
/**
* @desc TP Function for TC_CAM_MSD_PAR_BV_03
*/
function f_CAM_MSD_PAR_BV_03() runs on ItsCam {
// Local variables
var CamInd v_camInd;
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_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
tc_ac.start;
alt {
[] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any)) -> value v_camInd {
tc_ac.stop;
if(not ispresent(v_camInd.gnLifetime)) {
log("*** " & testcasename() & ": INCONC: no GN lifetime information in CamInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
if(v_camInd.gnLifetime <= 1000) {
log("*** " & testcasename() & ": PASS: Expected CAM message received encapsulted in GN packet with correct lifetime value ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: Expected CAM message received encapsulted in GN packet with incorrect lifetime value ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSD_PAR_BV_03
} // end group camLowerLayerParameters
} // end group camMessageDissemination
group camMessageProcessing {
/**
* @desc TP Function for TC_CAM_MSP_BV_01
*/
function f_CAM_MSP_BV_01() runs on ItsCam {
// Local variables
var CamReq v_camReq;
var integer i;
// Test control
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION 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_camReq := valueof(
m_camReq(
m_camMsg_vehicle(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
)
);
camPort.send( v_camReq ) ;
f_sleep(PX_TNOAC);
for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq, vc_utEvents[i].camMsg); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: CAM was transmitted to upper layer ***");
f_clientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: CAM was not transmitted to upper layer ***");
f_clientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poDefault();
f_cfDown();
} // end f_CAM_MSP_BV_01
} // end group camMessageProcessing
} // end ItsCam_TpFunctions
Property changes:
Added: svn:keywords
## -0,0 +1 ##
+URL Id
\ No newline at end of property
Index: ttcn/AtsDENM/ItsDenm_TestCases.ttcn
===================================================================
--- ttcn/AtsDENM/ItsDenm_TestCases.ttcn (revision 1917)
+++ ttcn/AtsDENM/ItsDenm_TestCases.ttcn (revision 1918)
@@ -7,21 +7,11 @@
*/
module ItsDenm_TestCases {
- // LibCommon
- import from LibCommon_Sync all;
- import from LibCommon_Time all;
- import from LibCommon_VerdictControl all;
- import from LibCommon_BasicTypesAndValues all;
+ // ATS ITS
+ import from ItsDenm_TpFunctions all;
// LibIts
- import from LibItsCommon_Functions all;
- import from LibItsCommon_TypesAndValues all;
import from LibItsDenm_TestSystem all;
- import from LibItsDenm_Functions all;
- import from LibItsDenm_Templates all;
- import from LibItsDenm_TypesAndValues all;
- import from DENM_PDU_Descriptions language "ASN.1:1997" all;
- import from ITS_Container language "ASN.1:1997" all;
// 5.2.1
group denMessageTransmission {
@@ -53,60 +43,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSGF/BV-01, ETSI EN 302 637-3, Annex B.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSGF/BV-01, ETSI EN 302 637-3, Annex B.1
*/
testcase TC_DEN_MSGF_BV_01() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_MSGF_BV_01();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm,
- mw_anyStationId,
- c_protocolVersionDenm,
- c_messageId
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header 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_actionId);
- f_cfDown();
-
} // end TC_DEN_MSGF_BV_01
/**
@@ -130,61 +72,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSGF/BV-02, ETSI EN 302 637-3, clause 6.1.3.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSGF/BV-02, ETSI EN 302 637-3, clause 6.1.3.2
*/
testcase TC_DEN_MSGF_BV_02() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_MSGF_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_anyDenmMgmtCon,
- -,
- mw_denmLocationWithTrace({ ?, * })
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect location container 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_actionId);
- f_cfDown();
-
} // end TC_DEN_MSGF_BV_02
} // end denMessageFormat
@@ -211,58 +104,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-01, ETSI EN 302 637-3, clause 6.1.2.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-01, ETSI EN 302 637-3, clause 6.1.2.1
*/
testcase TC_DEN_EVGN_BV_01() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_EVGN_BV_01();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_anyDenmPdu(
- mw_itsPduHeader,
- mw_denm (mw_anyDenmMgmtCon)
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header and management 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_01
/**
@@ -288,65 +135,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-02, ETSI EN 302 637-3, clause 6.1.1.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-02, ETSI EN 302 637-3, clause 6.1.1.1
*/
testcase TC_DEN_EVGN_BV_02() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainerList v_situations := {
- m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
- m_situation(c_causeAccident, c_subCauseCode_Unavailable),
- m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
- m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
- };
- var boolean v_success := true;
- var ActionIDList v_actionIds;
- var DenmInd v_denmInd;
- var integer i;
+ f_DEN_EVGN_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) {
- f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionIds[lengthof(v_actionIds) - 1] := v_denmInd.msgIn.denm.management.actionID;
-
- //check the action id
- for (i := 0; i < lengthof(v_actionIds) - 1; i:=i + 1) {
- if (v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber == v_actionIds[i].sequenceNumber) {
- v_success := false;
- }
- }
- if (v_success==true) {
- log("*** " & testcasename() & ": PASS: actionID field indicating unused value. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: actionID field indicating used value. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
-
- // Postamble
- for (i := 0; i < lengthof(v_actionIds); i:=i + 1) {
- f_poCancelEvent(e_iut, v_actionIds[i]);
- }
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_02
/**
@@ -372,62 +166,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-03, ETSI EN 302 637-3, clause 6.1.1.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-03, ETSI EN 302 637-3, clause 6.1.1.1
*/
testcase TC_DEN_EVGN_BV_03() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVGN_BV_03();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtConWithActionID(
- mw_actionId(f_getIutStationId())
- )
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_03
/**
@@ -461,61 +205,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-04, ETSI EN 302 637-3, clause 7.1.3
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-04, ETSI EN 302 637-3, clause 7.1.3
*/
testcase TC_DEN_EVGN_BV_04() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVGN_BV_04();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_anyDenmMgmtCon,
- v_situation
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_04
/**
@@ -541,78 +236,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-05, ETSI EN 302 637-3, clause 8.2.1.3
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-05, ETSI EN 302 637-3, clause 8.2.1.3
*/
testcase TC_DEN_EVGN_BV_05() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainerList v_situations := {
- m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
- m_situation(c_causeAccident, c_subCauseCode_Unavailable),
- m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
- m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
- };
- var ActionIDList v_actionIds;
- var DenmInd v_denmInd;
- var integer i;
- var TimestampIts v_timestampIts;
+ f_DEN_EVGN_BV_05();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- v_timestampIts := f_getCurrentTime();
- for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) {
- f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtConWithReferenceTime(
- mw_timestampIts_withDelta(v_timestampIts)
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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
- for (i := 0; i < lengthof(v_actionIds); i:=i + 1) {
- f_poCancelEvent(e_iut, v_actionIds[i]);
- }
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_05
/**
@@ -645,77 +274,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-07, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-07, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2
*/
testcase TC_DEN_EVGN_BV_07() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainerList v_situations := {
- m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
- m_situation(c_causeAccident, c_subCauseCode_Unavailable),
- m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
- m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
- };
- var SequenceNumber v_sequenceNumber;
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var integer i;
+ f_DEN_EVGN_BV_07();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) {
- f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID);
- }
- //save the last sequence number
- v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtConWithActionID(
- mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber))
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_07
/**
@@ -749,72 +313,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-08, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-08, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2
*/
testcase TC_DEN_EVGN_BV_08() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var SequenceNumber v_firstSequenceNumber;
- var DenmInd v_denmInd;
- var integer i;
+ f_DEN_EVGN_BV_08();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_firstSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber;
- for (i := 1; i < 65535; i := i + 1) {
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID);
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtConWithActionID(
- mw_actionId(-, f_increaseSequenceNumber(v_firstSequenceNumber))
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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, m_actionId(v_firstSequenceNumber));
- f_poCancelEvent(e_iut, m_actionId(f_increaseSequenceNumber(v_firstSequenceNumber)));
- f_cfDown();
-
} // end TC_DEN_EVGN_BV_08
/**
@@ -846,59 +350,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-10, ETSI EN 302 637-3, clauses 6.1.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-10, ETSI EN 302 637-3, clauses 6.1.1.2
*/
testcase TC_DEN_EVGN_BV_10() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var StationID v_stationId;
- var DenmInd v_denmInd;
+ f_DEN_EVGN_BV_10();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_stationId := f_getIutStationId ( );
- f_utChangePseudonym ( m_utChangePseudonym );
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
-
- tc_ac.start;
- alt {
- [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd {
- tc_ac.stop;
- if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_stationId ) {
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_cfDown();
-
} // end TC_DEN_EVGN_BV_10
} // end denEventGeneration
@@ -926,63 +383,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-01, ETSI EN 302 637-3, clause 6.1.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BV-01, ETSI EN 302 637-3, clause 6.1.2.2
*/
testcase TC_DEN_EVUP_BV_01() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVUP_BV_01();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
- f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_anyDenmPdu(
- mw_itsPduHeader,
- mw_denm (mw_anyDenmMgmtCon)
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVUP_BV_01
/**
@@ -1012,67 +418,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-02, ETSI EN 302 637-3, clauses 6.1.2.2, 8.1.1.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BV-02, ETSI EN 302 637-3, clauses 6.1.2.2, 8.1.1.1
*/
testcase TC_DEN_EVUP_BV_02() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVUP_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
- f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_anyDenmPdu(
- mw_itsPduHeader,
- mw_denm (
- mw_denmMgmtConWithActionID(
- v_actionId
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVUP_BV_02
/**
@@ -1105,78 +456,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-03, ETSI EN 302 637-3, clause 6.1.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BV-03, ETSI EN 302 637-3, clause 6.1.2.2
*/
testcase TC_DEN_EVUP_BV_03() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp;
- var Int16 v_diff;
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVUP_BV_03();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
- f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_anyDenmPdu(
- mw_itsPduHeader,
- mw_denm (
- mw_denmMgmtCon(
- v_actionId
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- v_timestampIts := f_getCurrentTime();
- v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime;
- if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) {
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVUP_BV_03
/**
@@ -1204,72 +489,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-05, ETSI EN 302 637-3, clause 8.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BO-04, ETSI EN 302 637-3, clause 8.1.2
*/
- testcase TC_DEN_EVUP_BV_04() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_EVUP_BO_04() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVUP_BO_04();
- // Test control
+ } // end TC_DEN_EVUP_BO_04
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
- f_utUpdateEvent(m_utUpdateEvent(m_actionId(f_increaseSequenceNumber(v_actionId.sequenceNumber), f_getIutStationId()), v_situation));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_anyDenmPdu(
- mw_itsPduHeader,
- mw_denm (
- mw_denmMgmtCon(
- m_actionId(
- f_increaseSequenceNumber(v_actionId.sequenceNumber),
- f_getIutStationId()
- )
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received updated DENM for the actionId which is not in originator ITS-S message table. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": PASS: No DENM was sent. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
- } // end TC_DEN_EVUP_BV_05
-
} // end denEventUpdate
// 5.2.1.4
@@ -1306,67 +533,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-01, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-01, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3
*/
testcase TC_DEN_EVTR_BV_01() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVTR_BV_01();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec));
- f_awaitDenMessage(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_anyActionId, -, -, -,
- c_duration_2sec
- )
- )
- )
- ),
- v_denmInd
- );
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTerminateEvent(m_utEventCancellation(v_actionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive ( mw_denmInd ( mw_denmPdu (
- mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ))))) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_cfDown();
-
} // end TC_DEN_EVTR_BV_01
/**
@@ -1400,53 +572,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-02, ETSI EN 302 637-3, clause 6.1.2.4
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-02, ETSI EN 302 637-3, clause 6.1.2.4
*/
testcase TC_DEN_EVTR_BV_02() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVTR_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTerminateEvent(m_utEventCancellation(v_actionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive ( mw_denmInd ( mw_denmPdu (
- mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isNegation ))))) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_cfDown();
-
} // end TC_DEN_EVTR_BV_02
/**
@@ -1488,99 +619,12 @@
* }
* }
* </pre>
- *
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3
*/
testcase TC_DEN_EVTR_BV_03() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var TimestampIts v_referenceTime1 := f_getCurrentTime();
- var TimestampIts v_referenceTime2;
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVTR_BV_03();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- -,
- -,
- v_referenceTime1
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- v_referenceTime2 := f_getCurrentTime();
- v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- -,
- -,
- v_referenceTime2
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTerminateEvent(m_utEventCancellation(v_actionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm (
- m_denmMgmtConTermination(
- v_actionId,
- -,
- -,
- -,
- -,
- v_referenceTime2,
- isNegation
- )
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_cfDown();
-
} // end TC_DEN_EVTR_BV_03
/**
@@ -1614,68 +658,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-04, ETSI EN 302 637-3, clause 7.1.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-04, ETSI EN 302 637-3, clause 7.1.1
*/
testcase TC_DEN_EVTR_BV_04() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVTR_BV_04();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec));
- f_awaitDenMessage(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_anyActionId
- )
- )
- )
- ),
- v_denmInd
- );
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTerminateEvent(m_utEventCancellation(v_actionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ), omit, omit, omit ) ) ) ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_cfDown();
-
} // end TC_DEN_EVTR_BV_04
/**
@@ -1711,55 +699,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-05, ETSI EN 302 637-3, clause 7.1.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-05, ETSI EN 302 637-3, clause 7.1.1
*/
testcase TC_DEN_EVTR_BV_05() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVTR_BV_05();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTerminateEvent(m_utEventCancellation(v_actionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isNegation ), omit, omit, omit ) ) ) ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_cfDown();
-
} // end TC_DEN_EVTR_BV_05
/**
@@ -1791,86 +736,17 @@
* }
* }
* NOTE: Event associated to ACTION_ID1 cannot be present in receiving ITS-S message
- * table as its stationID is IUT’s stationID (see TP/DEN/EVTR/BV-07)
+ * table as its stationID is IUT’s stationID (see TP/DEN/EVTR/BO-07)
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-06, ETSI EN 302 637-3, clauses 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BO-06, ETSI EN 302 637-3, clauses 8.2.2
*/
- testcase TC_DEN_EVTR_BV_06() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_EVTR_BO_06() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainerList v_situations := {
- m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
- m_situation(c_causeAccident, c_subCauseCode_Unavailable),
- m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
- m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
- };
- var ActionID v_unknownActionId;
- var ActionIDList v_actionIds;
- var DenmInd v_denmInd;
- var integer i;
+ f_DEN_EVTR_BO_06();
- // Test control
+ } // end TC_DEN_EVTR_BO_06
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- for (i := 0; i < lengthof(v_situations); i:=i + 1) {
- f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_unknownActionId := valueof(m_actionId(
- f_increaseSequenceNumber(
- v_actionIds[lengthof(v_actionIds)].sequenceNumber
- ),
- f_getIutStationId()
- ));
- f_utTerminateEvent(m_utEventCancellation(v_unknownActionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_anyDenmPdu(
- mw_itsPduHeader,
- mw_denm (
- mw_denmMgmtCon(v_unknownActionId)
- )
- )
- )
- ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- }
-
- // Postamble
- for (i := 0; i < lengthof(v_situations); i:=i + 1) {
- f_poCancelEvent(e_iut, v_actionIds[i]);
- }
- f_cfDown();
-
- } // end TC_DEN_EVTR_BV_06
-
/**
* @desc Check that DEN Basic Service does not send any termination DENM if actionID is not in
* originating ITS-S message table or receiving ITS-S message table (other stationID)
@@ -1900,77 +776,15 @@
* }
* }
* NOTE: Event associated to ACTION_ID1 cannot be present in originating ITS-S message table as its
- * stationID is not IUT’s stationID (see TP/DEN/EVTR/BV-06)
+ * stationID is not IUT’s stationID (see TP/DEN/EVTR/BO-06)
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-07, ETSI EN 302 637-3, clauses 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BO-07, ETSI EN 302 637-3, clauses 8.2.2
*/
- testcase TC_DEN_EVTR_BV_07() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_EVTR_BO_07() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const SequenceNumber v_initialSequenceNumber := 0;
- // Local variables
- var template (value) SituationContainerList v_situations := {
- m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
- m_situation(c_causeAccident, c_subCauseCode_Unavailable),
- m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
- m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
- };
- var SequenceNumber v_sequenceNumber := v_initialSequenceNumber;
- var ActionID v_unknownActionId;
- var ActionIDList v_actionIds;
- var DenmInd v_denmInd;
- var integer i;
+ f_DEN_EVTR_BO_07();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- for (i := 0; i < lengthof(v_situations); i:=i + 1) {
- v_sequenceNumber := f_increaseSequenceNumber(v_sequenceNumber);
- v_actionIds[i] := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId(v_sequenceNumber) ), v_situations[i], m_denmLocation_zeroDelta ) );
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_unknownActionId := valueof(m_actionId(
- f_increaseSequenceNumber(
- v_actionIds[lengthof(v_actionIds)].sequenceNumber
- ),
- f_getTsStationId()
- ));
- f_utTerminateEvent(m_utEventCancellation(v_unknownActionId));
-
- tc_ac.start;
- alt {
- [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon(v_unknownActionId) ) ) ) ) -> value v_denmInd {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- }
-
- // Postamble
- for (i := 0; i < lengthof(v_situations); i:=i + 1) {
- f_poCancelEvent(e_ets, v_actionIds[i]);
- }
- f_cfDown();
-
} // end TC_DEN_EVTR_BV_07
/**
@@ -2007,69 +821,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-08, ETSI EN 302 637-3, clause 8.2.1.3
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-08, ETSI EN 302 637-3, clause 8.2.1.3
*/
testcase TC_DEN_EVTR_BV_08() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp;
- var Int16 v_diff;
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVTR_BV_08();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
- v_timestampIts := f_getCurrentTime();
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime;
- v_diff := v_referenceTime1 - v_timestampIts;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utTerminateEvent ( m_utEventCancellation ( v_actionId ) );
-
- tc_ac.start;
- alt {
- [] denmPort.receive (
- mw_denmInd ( mw_denmPdu ( mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ) ) ) ) ) -> value v_denmInd {
- tc_ac.stop;
- v_timestampIts := f_getCurrentTime();
- v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime;
- if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) {
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVTR_BV_08
} // end denEventTermination
@@ -2111,83 +868,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-01, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/TI-01, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2
*/
- testcase TC_DEN_EVRP_BV_01() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_EVRP_TI_01() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1
- const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2
- const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1
- const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95;
- const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_actionId,
- -,
- -,
- c_validityDuration
- )
- )
- )
- );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- // Local timers
- timer t_repetition;
+ f_DEN_EVRP_TI_01();
- // Test control
+ } // end TC_DEN_EVRP_TI_01
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval ) );
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- t_repetition.start(2.0 * int2float(c_repetitionInterval/1000));
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt {
- [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
- if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) {
- t_repetition.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] t_repetition.timeout {
- log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
- } // end TC_DEN_EVRP_BV_01
-
/**
* @desc Check that the repeated DENM is always the most up-to-date message
* <pre>
@@ -2219,96 +907,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-02, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-02, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2
*/
testcase TC_DEN_EVRP_BV_02() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_validityDuration := c_duration_10sec;
- const TransmissionInterval c_repetitionInterval := c_interval_5sec;
- const ValidityDuration c_repetitionDuration := c_validityDuration;
- const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95;
- const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_actionId,
- -,
- -,
- c_validityDuration
- )
- )
- )
- );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- // Local timers
- timer t_repetition;
+ f_DEN_EVRP_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(
- m_utTriggerEvent(
- v_situation,
- m_denmLocation_zeroDelta,
- c_validityDuration,
- c_repetitionDuration,
- c_repetitionInterval
- )
- );
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- //update event after 1 second
- tc_noac.start(1.0);
- tc_noac.timeout;
- v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
- f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
- v_expectedDenmInd.msgIn.denm.situation := v_situation;
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- t_repetition.start(2.0 * int2float(c_repetitionInterval/1000));
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt {
- [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
- if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) {
- t_repetition.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] t_repetition.timeout {
- log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_02
/**
@@ -2345,77 +949,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4 and 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4 and 8.2.2
*/
testcase TC_DEN_EVRP_BV_03() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_validityDuration := c_duration_10sec;
- const TransmissionInterval c_repetitionInterval := c_interval_4sec;
- const ValidityDuration c_repetitionDuration := c_validityDuration;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_actionId,
- -,
- -,
- c_validityDuration
- )
- )
- )
- );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var integer i;
- // Local timers
- timer t_validity;
+ f_DEN_EVRP_BV_03();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval ));
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- t_validity.start(1.5 * int2float(c_validityDuration));
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- //await retransmitted DENM message based on the repetition interval in between the validity duration
- for (i:=0; i<(c_validityDuration/(c_repetitionInterval/1000)); i:=i+1) {
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt {
- [] t_validity.timeout {
- log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(v_expectedDenmInd) {
- t_validity.stop;
- log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_validity.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_03
/**
@@ -2452,77 +991,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-04, ETSI EN 302 637-3, clause 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-04, ETSI EN 302 637-3, clause 8.2.2
*/
testcase TC_DEN_EVRP_BV_04() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_validityDuration := c_duration_10sec;
- const TransmissionInterval c_repetitionInterval := c_interval_2sec;
- const ValidityDuration c_repetitionDuration := c_duration_5sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_actionId,
- -,
- -,
- c_validityDuration
- )
- )
- )
- );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var integer i;
- // Local timers
- timer t_repetition;
+ f_DEN_EVRP_BV_04();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval ));
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- t_repetition.start(1.5 * int2float(c_repetitionDuration));
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- //await retransmitted DENM message based on the repetition interval in between the repetition duration
- for (i:=0; i<(c_repetitionDuration/(c_repetitionInterval/1000)); i:=i+1) {
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- }
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt {
- [] t_repetition.timeout {
- log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_04
/**
@@ -2551,81 +1025,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-05, ETSI EN 302 637-3, clause 8.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-05, ETSI EN 302 637-3, clause 8.1.2
*/
testcase TC_DEN_EVRP_BV_05() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_validityDuration := c_duration_10sec;
- const ValidityDuration c_repetitionDuration := c_validityDuration;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_actionId,
- -,
- -,
- -,
- c_validityDuration
- )
- )
- )
- );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var integer i;
- // Local timers
- timer t_validity;
+ f_DEN_EVRP_BV_05();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(
- m_utTriggerEvent(
- v_situation,
- m_denmLocation_zeroDelta,
- c_validityDuration,
- c_repetitionDuration,
- omit //no repetitionInterval
- )
- );
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- t_validity.start(1.5 * int2float(c_validityDuration));
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt {
- [] t_validity.timeout {
- log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
- t_validity.stop;
- log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_validity.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_05
/**
@@ -2654,80 +1059,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-06, ETSI EN 302 637-3, clause 8.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-06, ETSI EN 302 637-3, clause 8.1.2
*/
testcase TC_DEN_EVRP_BV_06() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_validityDuration := c_duration_10sec;
- const TransmissionInterval c_repetitionInterval := c_interval_2sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- mw_actionId,
- -,
- -,
- c_validityDuration
- )
- )
- )
- );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var integer i;
- // Local timers
- timer t_validity;
+ f_DEN_EVRP_BV_06();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_utTriggerEvent(
- m_utTriggerEvent(
- v_situation,
- m_denmLocation_zeroDelta,
- c_validityDuration,
- omit, //no repetitionDuration
- c_repetitionInterval
- )
- );
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- t_validity.start(1.5 * int2float(c_validityDuration));
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt {
- [] t_validity.timeout {
- log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
- t_validity.stop;
- log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_validity.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_06
/**
@@ -2769,61 +1106,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-08, ETSI EN 302 637-3, clause 6.1.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-08, ETSI EN 302 637-3, clause 6.1.1.2
*/
testcase TC_DEN_EVRP_BV_08() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_duration1 := 3 * c_duration_2sec;
- const ValidityDuration c_duration2 := c_duration_10sec;
- const TransmissionInterval c_interval1 := c_interval_1sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation ( c_causeVehicleBreakdown, c_subCauseCode_Unavailable );
- var template (present) DenmInd v_expectedDenmInd :=
- mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_duration2 ) ) ) );
- var ActionID v_actionId;
- var DenmInd v_denmInd;
+ f_DEN_EVRP_BV_08();
- // Preamble
- f_prInitialState();
- f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) );
- f_awaitDenMessage ( v_expectedDenmInd, v_denmInd );
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- f_utChangePseudonym ( m_utChangePseudonym );
-
- tc_ac.start;
- alt {
- [] denmPort.receive ( v_expectedDenmInd ) -> value v_denmInd {
- tc_ac.stop;
- if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_actionId.originatingStationID ) {
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- 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_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_08
/**
@@ -2863,66 +1151,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-09, ETSI EN 302 637-3, clause 8.2.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-09, ETSI EN 302 637-3, clause 8.2.1.2
*/
testcase TC_DEN_EVRP_BV_09() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_duration1 := 3 * c_duration_2sec;
- const ValidityDuration c_duration2 := c_duration_10sec;
- const TransmissionInterval c_interval1 := c_interval_1sec;
- const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95;
- const float c_upperTransmissionInterval := int2float(c_interval1)*1.05;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expectedDenmInd :=
- mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2))));
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- // Local timers
- timer t_repetition;
- // Test component configuration
- f_cfUp();
+ f_DEN_EVRP_BV_09();
- // Preamble
- f_prInitialState();
- f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) );
- f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
- t_repetition.start(2.0 * int2float(c_interval1/1000));
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt { //FIXME rewrite TC
- [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
- if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) {
- t_repetition.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] t_repetition.timeout {
- log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_09
/**
@@ -2965,68 +1199,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-10, ETSI EN 302 637-3, clause 8.2.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-10, ETSI EN 302 637-3, clause 8.2.1.2
*/
testcase TC_DEN_EVRP_BV_10() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_duration1 := 3 * c_duration_2sec;
- const ValidityDuration c_duration2 := c_duration_10sec;
- const TransmissionInterval c_interval1 := c_interval_1sec;
- const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95;
- const float c_upperTransmissionInterval := int2float(c_interval1)*1.05;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2 ))));
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var TimestampIts v_referenceTime;
- // Local timers
- timer t_repetition;
- // Test component configuration
- f_cfUp();
+ f_DEN_EVRP_BV_10();
- // Preamble
- f_prInitialState();
- f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) );
- f_awaitDenMessage ( v_expected, v_denmInd );
- t_repetition.start(2.0 * int2float(c_interval1/1000));
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_referenceTime := v_denmInd.msgIn.denm.management.referenceTime;
- v_expected.msgIn.denm.management.actionID := v_actionId;
- v_expected.msgIn.denm.management.referenceTime := v_referenceTime;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- alt { //FIXME rewrite TC
- [] denmPort.receive ( v_expected ) -> value v_denmInd {
- if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) {
- t_repetition.stop;
- log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] t_repetition.timeout {
- log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
-
} // end TC_DEN_EVRP_BV_10
/**
@@ -3059,84 +1237,77 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-11, ETSI EN 302 637-3, clause 8.2.1.5
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-11, ETSI EN 302 637-3, clause 8.2.1.5
*/
testcase TC_DEN_EVRP_BV_11() runs on ItsDenm system ItsDenmSystem {
- // Local constants
- const ValidityDuration c_duration1 := c_defaultValidity + 100;
- const ValidityDuration c_duration2 := c_defaultValidity;
- const TransmissionInterval c_interval1 := c_interval_10sec;
- const float c_diffValidity := int2float ( ( c_duration1 - c_duration2 ) );
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2))));
- var ActionID v_actionId;
- var DenmInd v_denmInd;
- var TimestampIts v_referenceTime;
- // Local timers
- timer t_repetition;
- timer t_default;
- // Test component configuration
- f_cfUp();
+ f_DEN_EVRP_BV_11();
- // Preamble
- f_prInitialState();
- f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, omit, c_duration1, c_interval1 ) );
- f_awaitDenMessage ( v_expected, v_denmInd );
- t_repetition.start(2.0 * int2float(c_interval1/1000));
- t_default.start ( int2float( c_duration1/1000 ) );
- v_actionId := v_denmInd.msgIn.denm.management.actionID;
- v_expected.msgIn.denm.management.actionID := v_actionId;
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
+ } // end TC_DEN_EVRP_BV_11
- // Test Body
- alt {
- [] denmPort.receive ( v_expected ) -> value v_denmInd {
- t_repetition.stop;
- if ( t_default.read*1000.0 < c_diffValidity ) {
- log("*** " & testcasename() & ": FAIL: DENM received after validity duration. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": INFO: DENM retransmission. ***");
- t_repetition.start(2.0 * int2float(c_interval1/1000));
- repeat;
- }
- }
- [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
- t_repetition.stop;
- log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
- }
- [] t_repetition.timeout {
- if ( t_default.read*1000.0 < c_diffValidity ) {
- t_default.stop;
- log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- t_default.stop;
- log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
- [] t_default.timeout {
- t_repetition.stop;
- log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
- f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
+ } // end denMessageRepetition
- // Postamble
- f_poCancelEvent(e_iut, v_actionId);
- f_cfDown();
+ // 5.2.1.6
+ group denMessageLowerLayerParameters {
- } // end TC_DEN_EVRP_BV_11
+ /**
+ * @desc Check that DENM is encapsulated in BTP type B packet
+ * <pre>
+ * PICS Selection: PICS_DENM_GENERATION
+ * Initial conditions:
+ * with {
+ * the IUT being in the "initial state"
+ * }
+ * Expected behaviour:
+ * ensure that {
+ * when {
+ * a DENM is generated
+ * }
+ * then {
+ * the IUT sends a DENM
+ * encapsulated in a BTP-B packet
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/PAR/BV-01, EN 302 637-3 clause 5.4.2.2
+ */
+ testcase TC_DEN_PAR_BV_01() runs on ItsDenm system ItsDenmSystem {
- } // end denMessageRepetition
+ f_DEN_PAR_BV_01();
+ } // end TC_DEN_PAR_BV_01
+
+ /**
+ * @desc Check that DENM is encapsulated in a GBC packet
+ * <pre>
+ * PICS Selection: PICS_DENM_GENERATION
+ * Initial conditions:
+ * with {
+ * the IUT being in the "initial state"
+ * }
+ * Expected behaviour:
+ * ensure that {
+ * when {
+ * a DENM is generated
+ * }
+ * then {
+ * the IUT sends a DENM
+ * encapsulated in a GBC packet
+ * }
+ * }
+ * </pre>
+ *
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/PAR/BV-02, EN 302 637-3 clause 5.4.2.2
+ */
+ testcase TC_DEN_PAR_BV_02() runs on ItsDenm system ItsDenmSystem {
+
+ f_DEN_PAR_BV_02();
+
+ } // end TC_DEN_PAR_BV_02
+
+ } // end denMessageLowerLayerParameters
+
} // end denMessageTransmission
// 5.2.2
@@ -3169,55 +1340,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-01, ETSI EN 302 637-3, clause 8.4.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-01, ETSI EN 302 637-3, clause 8.4.2
*/
testcase TC_DEN_MSRV_BV_01() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var integer i;
+ f_DEN_MSRV_BV_01();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TAC);
- for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_MSRV_BV_01
/**
@@ -3252,73 +1380,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-02, ETSI EN 302 637-3, clause 8.4.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-02, ETSI EN 302 637-3, clause 8.4.2
*/
testcase TC_DEN_MSRV_BV_02() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem);
- var TimestampIts v_referenceTime2;
- var ActionID v_actionId;
- var integer i;
+ f_DEN_MSRV_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId
- ),
- v_situation1,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(1.0);
- v_referenceTime2 := f_getCurrentTime();
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- v_actionId,
- -, -, -,
- v_referenceTime2
- ),
- v_situation2,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TAC);
- for(i:=0; i < lengthof(vc_utEvents)
- and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
- and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_MSRV_BV_02
/**
@@ -3347,58 +1414,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-03, ETSI EN 302 637-3, clause 8.3.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-03, ETSI EN 302 637-3, clause 8.3.2
*/
- testcase TC_DEN_MSRV_BV_03() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_MSRV_BO_03() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var integer i;
+ f_DEN_MSRV_BO_03();
- // Test control
+ } // end TC_DEN_MSRV_BO_03
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TNOAC);
- for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
- } // end TC_DEN_MSRV_BV_03
-
/**
* @desc Check that receiving ITS-S discards termination DENM if it concerns an unknown ActionID (other actionID)
* <pre>
@@ -3424,60 +1447,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-04, ETSI EN 302 637-3, clause 8.3.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-04, ETSI EN 302 637-3, clause 8.3.2
*/
- testcase TC_DEN_MSRV_BV_04() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_MSRV_BO_04() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId, v_actionIdIut;
- var integer i;
+ f_DEN_MSRV_BO_04();
- // Test control
+ } // end TC_DEN_MSRV_BO_04
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionIdIut := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_actionId(
- f_increaseSequenceNumber(v_actionId.sequenceNumber)
- )
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TNOAC);
- for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
-
- // Postamble
- f_poCancelEvent(e_iut, v_actionIdIut);
- f_cfDown();
-
- } // end TC_DEN_MSRV_BV_04
-
/**
* @desc Check that receiving ITS-S discards DENM if referenceTime is lower than highest value received for this ActionID
* <pre>
@@ -3509,76 +1486,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-05, ETSI EN 302 637-3, clause 8.3.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-05, ETSI EN 302 637-3, clause 8.3.2
*/
- testcase TC_DEN_MSRV_BV_05() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_MSRV_BO_05() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem);
- var TimestampIts v_referenceTime1 := f_getCurrentTime();
- var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000;
- var ActionID v_actionId;
- var integer i;
+ f_DEN_MSRV_BO_05();
- // Test control
+ } // end TC_DEN_MSRV_BO_05
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -, -, -, v_referenceTime1
- ),
- v_situation1,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(1.0);
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- v_actionId,
- -, -, -,
- v_referenceTime2
- ),
- v_situation2,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TNOAC);
- for(i:=0; i < lengthof(vc_utEvents)
- and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
- and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
- } // end TC_DEN_MSRV_BV_05
-
/**
* @desc Check that receiving ITS-S discards DENM if detectionTime is smaller than highest value received for this ActionID
*
@@ -3615,81 +1530,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-06, ETSI EN 302 637-3, clause 8.3.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-06, ETSI EN 302 637-3, clause 8.3.2
*/
- testcase TC_DEN_MSRV_BV_06() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_MSRV_BO_06() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem);
- var template (value) DecentralizedEnvironmentalNotificationMessage v_denm;
- var TimestampIts v_detectionTime1 := f_getCurrentTime();
- var TimestampIts v_detectionTime2 := v_detectionTime1 - 1000;
- var TimestampIts v_referenceTime1 := v_detectionTime1;
- var ActionID v_actionId;
- var integer i;
+ f_DEN_MSRV_BO_06();
- // Test control
+ } // end TC_DEN_MSRV_BO_06
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_denm := m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -, - , -,
- v_detectionTime1,
- v_referenceTime1
- ),
- v_situation1,
- m_denmLocation_zeroDelta
- );
- v_actionId := f_sendDenMessage(v_denm);
-
- f_sleep(1.0);
- v_detectionTime2 := valueof(v_denm.management.detectionTime) - 1000;
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- v_actionId,
- -, - ,-,
- v_detectionTime2,
- v_referenceTime1
- ),
- v_situation2,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TNOAC);
- for(i:=0; i < lengthof(vc_utEvents)
- and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
- and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
- } // end TC_DEN_MSRV_BV_06
-
/**
* @desc Check that receiving ITS-S transmits DENM to application if it concerns a known ActionID and referenceTime
* is equal to highest received value and detectionTime is more recent
@@ -3725,79 +1573,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-07, ETSI EN 302 637-3, clause 8.3.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-07, ETSI EN 302 637-3, clause 8.3.2
*/
testcase TC_DEN_MSRV_BV_07() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem);
- var template (value) DecentralizedEnvironmentalNotificationMessage v_denm;
- var TimestampIts v_detectionTime2 := f_getCurrentTime();
- var TimestampIts v_detectionTime1 :=v_detectionTime2 - 1000;
- var TimestampIts v_referenceTime1 := v_detectionTime2;
- var ActionID v_actionId;
- var integer i;
+ f_DEN_MSRV_BV_07();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_denm := m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -, - , -,
- v_detectionTime1,
- v_referenceTime1
- ),
- v_situation1,
- m_denmLocation_zeroDelta
- );
- v_actionId := f_sendDenMessage(v_denm);
-
- f_sleep(1.0);
- v_detectionTime2 := valueof(v_denm.management.detectionTime) + 1000;
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- v_actionId,
- -, - , -,
- v_detectionTime2,
- v_referenceTime1
- ),
- v_situation2,
- m_denmLocation_zeroDelta
- )
- );
-
- f_sleep(PX_TAC);
- for(i:=0; i < lengthof(vc_utEvents)
- and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
- and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) {
- // empty on purpose
- }
- if(i < lengthof(vc_utEvents)) {
- log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- else {
- log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_MSRV_BV_07
/**
@@ -3834,51 +1615,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-10, ETSI EN 302 637-3, clause B.40
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-10, ETSI EN 302 637-3, clause B.40
*/
testcase TC_DEN_MSRV_BV_10() runs on ItsDenm system ItsDenmSystem {
- //Local constants
+ f_DEN_MSRV_BV_10();
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
-
- // Test component configuration
- f_cfUp();
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage (
- m_denm ( m_denmMgmtCon ( m_tsActionId), v_situation, m_denmLocation_zeroDelta, m_alacarteConImpactReduction ) );
-
- tc_ac.start;
- alt {
- [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ), v_situation, mw_anyDenmLocation,
- mw_alacarteConImpactReduction ) ) ) ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM with correct alacarte container ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ) ) ) ) ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: DENM with incorrect containers ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": INCONC: DENM not rreceived ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_MSRV_BV_10
} // end denMessageReception
@@ -3916,81 +1658,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-01, ETSI EN 302 637-3, clause 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-01, ETSI EN 302 637-3, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_01() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- // Local timers
- timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0;
+ f_DEN_KAFW_BV_01();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- t_forwarding.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- if(t_forwarding.running) {
- t_forwarding.stop;
- log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- else {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM re-forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- }
- [] t_forwarding.timeout {
- tc_ac.start;
- log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
- repeat;
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_01
/**
@@ -4033,112 +1706,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-02, ETSI EN 302 637-3, clause 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-02, ETSI EN 302 637-3, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_02() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var TimestampIts v_referenceTime1 := f_getCurrentTime();
- var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000;
- var ActionID v_actionId;
- // Local timers
- timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0;
+ f_DEN_KAFW_BV_02();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval,
- v_referenceTime1
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- t_forwarding.start;
- f_sleep(5.0);
-
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval,
- v_referenceTime2
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId, v_referenceTime1)
- )
- )
- )
- ) {
- if(t_forwarding.running) {
- t_forwarding.stop;
- log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***");
- }
- else {
- tc_ac.stop;
- log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***");
- }
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- t_forwarding.stop;
- log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***");
- }
- [] t_forwarding.timeout {
- tc_ac.start;
- log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
- repeat;
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_02
/**
@@ -4168,84 +1741,14 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-03, ETSI EN 302 637-3, clause 8.2.1.4
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/TI-03, ETSI EN 302 637-3, clause 8.2.1.4
*/
- testcase TC_DEN_KAFW_BV_03() runs on ItsDenm system ItsDenmSystem {
+ testcase TC_DEN_KAFW_TI_03() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- // Local timers
- timer t_forwardingMin := 2.0 * int2float(c_transmissionInterval) / 1000.0;
- timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15;
+ f_DEN_KAFW_TI_03();
- // Test control
+ } // end TC_DEN_KAFW_TI_03
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- t_forwardingMin.start;
- t_forwardingMax.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- t_forwardingMax.stop;
- if(t_forwardingMin.running) {
- t_forwardingMin.stop;
- log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM re-forwarded correctly ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- }
- [] t_forwardingMin.timeout {
- log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
- repeat;
- }
- [] t_forwardingMax.timeout {
- log("*** " & testcasename() & ": FAIL: DENM was not forwarded on time ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
- } // end TC_DEN_KAFW_BV_03
-
/**
* @desc Check that Forwarding ITS-S replaces the ITS PDU header of forwarded DENMs
* <pre>
@@ -4279,82 +1782,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-04, ETSI EN 302 637-3, clause 8.2.1.6
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-04, ETSI EN 302 637-3, clause 8.2.1.6
*/
testcase TC_DEN_KAFW_BV_04() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_KAFW_BV_04();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- ),
- f_getIutStationId()
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct stationID ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- ),
- mw_anyStationId
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect stationID ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_04
/**
@@ -4389,80 +1822,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-05, ETSI EN 302 637-3, clause 8.2.1.1
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-05, ETSI EN 302 637-3, clause 8.2.1.1
*/
testcase TC_DEN_KAFW_BV_05() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_KAFW_BV_05();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct actionID ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(mw_anyActionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect actionID ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_05
/**
@@ -4500,82 +1865,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-06, ETSI EN 302 637-3, clause 8.2.1.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-06, ETSI EN 302 637-3, clause 8.2.1.2
*/
testcase TC_DEN_KAFW_BV_06() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var TimestampIts v_referenceTime1 := f_getCurrentTime();
- var ActionID v_actionId;
+ f_DEN_KAFW_BV_06();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval,
- v_referenceTime1
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId, v_referenceTime1)
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct referenceTime ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect referenceTime ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_06
/**
@@ -4613,84 +1908,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-07, ETSI EN 302 637-3, clause 8.2.1.3
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-07, ETSI EN 302 637-3, clause 8.2.1.3
*/
testcase TC_DEN_KAFW_BV_07() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_KAFW_BV_07();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- v_actionId
- )
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct isNegation ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(
- v_actionId
- )
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect isNegation ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_07
/**
@@ -4736,84 +1959,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-08, ETSI EN 302 637-3, clause 8.2.1.6
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-08, ETSI EN 302 637-3, clause 8.2.1.6
*/
testcase TC_DEN_KAFW_BV_08() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_KAFW_BV_08();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta,
- m_alacarteConLaneCount
- )
- );
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId),
- v_situation,
- m_denmLocation_zeroDelta,
- m_alacarteConLaneCount
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct containers ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_08
/**
@@ -4847,88 +1998,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-09, ETSI EN 302 637-3, clause 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-09, ETSI EN 302 637-3, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_09() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- // Local timers
- timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0;
+ f_DEN_KAFW_BV_09();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 3,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- t_validity.start;
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- if(t_validity.running) {
- log("*** " & testcasename() & ": INFO: DENM re-forwarded during validity period ***");
- tc_ac.start;
- repeat;
- }
- else {
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded after validity expiration ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] tc_ac.timeout {
- if(t_validity.running) {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM not reforwarded after validity expiration ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- }
-
- [] t_validity.timeout {
- log("*** " & testcasename() & ": INFO: End of validity period ***");
- repeat;
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_09
/**
@@ -4960,83 +2035,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_10() runs on ItsDenm system ItsDenmSystem {
- //Local constants
- const TransmissionInterval c_transmissionInterval := c_interval_10sec;
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
- var boolean v_positionChanged := false;
+ f_DEN_KAFW_BV_10();
- // Test control
-
- // Test component configuration
- f_cfUp();
-
- // Test adapter configuration
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage(
- m_denm(
- m_denmMgmtCon(
- m_tsActionId,
- -,
- c_transmissionInterval * 5,
- c_transmissionInterval
- ),
- v_situation,
- m_denmLocation_zeroDelta
- )
- );
-
- tc_ac.start;
- alt {
- [] denmPort.receive(
- mw_denmInd(
- mw_denmPdu(
- mw_denm(
- mw_denmMgmtCon(v_actionId)
- )
- )
- )
- ) {
- tc_ac.stop;
- if(v_positionChanged == false) {
- log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***");
- f_utChangePosition(m_utChangePosition(1000, 0));
- v_positionChanged := true;
- tc_ac.start;
- repeat;
- }
- else {
- log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- }
- [] tc_ac.timeout {
- if(v_positionChanged == false) {
- log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
- f_clientSyncAndVerdict(c_tbDone, e_timeout);
- }
- else {
- log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_10
/**
@@ -5061,42 +2065,12 @@
* }
* </pre>
*
- * @version 1.2.1
- * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2
+ * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_11() runs on ItsDenm system ItsDenmSystem {
- // Local variables
- var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
- var ActionID v_actionId;
+ f_DEN_KAFW_BV_11();
- // Test component configuration
- f_cfUp();
-
- // Preamble
- f_prInitialState();
- f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
-
- // Test Body
- v_actionId := f_sendDenMessage( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
-
- tc_ac.start;
- alt {
- [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( v_actionId ) ) ) ) ) {
- tc_ac.stop;
- log("*** " & testcasename() & ": FAIL: IUT reconstructs and sends the DENM associated with ACTION_ID ***");
- f_clientSyncAndVerdict(c_tbDone, e_error);
- }
- [] tc_ac.timeout {
- log("*** " & testcasename() & ": PASS: IUT does not reconstruct and send the DENM associated with ACTION_ID1 ***");
- f_clientSyncAndVerdict(c_tbDone, e_success);
- }
- }
-
- // Postamble
- f_poCancelEvent(e_ets, v_actionId);
- f_cfDown();
-
} // end TC_DEN_KAFW_BV_11
} // end denKeepAliveForwarding
/trunk/ttcn/AtsDENM/ItsDenm_TestControl.ttcn
10,58 → 10,94
// ATS DENM
import from ItsDenm_TestCases {testcase all};
// LibIts
import from LibItsDenm_Pics all;
// Test Execution
control {
execute(TC_DEN_MSGF_BV_01());
execute(TC_DEN_MSGF_BV_02());
if(PICS_DENM_GENERATION) {
execute(TC_DEN_MSGF_BV_01());
execute(TC_DEN_MSGF_BV_02());
execute(TC_DEN_EVGN_BV_01());
execute(TC_DEN_EVGN_BV_02());
execute(TC_DEN_EVGN_BV_03());
execute(TC_DEN_EVGN_BV_04());
execute(TC_DEN_EVGN_BV_05());
execute(TC_DEN_EVGN_BV_07());
execute(TC_DEN_EVGN_BV_08());
execute(TC_DEN_EVGN_BV_10());
}
execute(TC_DEN_EVGN_BV_01());
execute(TC_DEN_EVGN_BV_02());
execute(TC_DEN_EVGN_BV_03());
execute(TC_DEN_EVGN_BV_04());
execute(TC_DEN_EVGN_BV_05());
execute(TC_DEN_EVGN_BV_07());
execute(TC_DEN_EVGN_BV_08());
if(PICS_DENM_UPDATE) {
execute(TC_DEN_EVUP_BV_01());
execute(TC_DEN_EVUP_BV_02());
execute(TC_DEN_EVUP_BV_03());
execute(TC_DEN_EVUP_BO_04());
}
execute(TC_DEN_EVUP_BV_01());
execute(TC_DEN_EVUP_BV_02());
execute(TC_DEN_EVUP_BV_03());
execute(TC_DEN_EVUP_BV_04());
if(PICS_DENM_CANCELLATION) {
execute(TC_DEN_EVTR_BV_01());
execute(TC_DEN_EVTR_BV_04());
execute(TC_DEN_EVTR_BV_08());
}
execute(TC_DEN_EVTR_BV_01());
execute(TC_DEN_EVTR_BV_02());
execute(TC_DEN_EVTR_BV_03());
execute(TC_DEN_EVTR_BV_04());
execute(TC_DEN_EVTR_BV_05());
execute(TC_DEN_EVTR_BV_06());
execute(TC_DEN_EVTR_BV_07());
if(PICS_DENM_NEGATION) {
execute(TC_DEN_EVTR_BV_02());
execute(TC_DEN_EVTR_BV_03());
execute(TC_DEN_EVTR_BV_05());
}
execute(TC_DEN_EVRP_BV_01());
execute(TC_DEN_EVRP_BV_02());
execute(TC_DEN_EVRP_BV_03());
execute(TC_DEN_EVRP_BV_04());
execute(TC_DEN_EVRP_BV_05());
execute(TC_DEN_EVRP_BV_06());
if(PICS_DENM_NEGATION or PICS_DENM_CANCELLATION) {
execute(TC_DEN_EVTR_BO_06());
execute(TC_DEN_EVTR_BO_07());
}
execute(TC_DEN_MSRV_BV_01());
execute(TC_DEN_MSRV_BV_02());
execute(TC_DEN_MSRV_BV_03());
execute(TC_DEN_MSRV_BV_04());
execute(TC_DEN_MSRV_BV_05());
execute(TC_DEN_MSRV_BV_06());
execute(TC_DEN_MSRV_BV_07());
if(PICS_DENM_REPETITION) {
execute(TC_DEN_EVRP_TI_01());
execute(TC_DEN_EVRP_BV_02());
execute(TC_DEN_EVRP_BV_03());
execute(TC_DEN_EVRP_BV_04());
execute(TC_DEN_EVRP_BV_05());
execute(TC_DEN_EVRP_BV_06());
execute(TC_DEN_EVRP_BV_08());
execute(TC_DEN_EVRP_BV_09());
execute(TC_DEN_EVRP_BV_10());
execute(TC_DEN_EVRP_BV_11());
}
 
if(PICS_DENM_GENERATION) {
execute(TC_DEN_PAR_BV_01());
execute(TC_DEN_PAR_BV_02());
}
execute(TC_DEN_KAFW_BV_01());
execute(TC_DEN_KAFW_BV_02());
execute(TC_DEN_KAFW_BV_03());
execute(TC_DEN_KAFW_BV_04());
execute(TC_DEN_KAFW_BV_05());
execute(TC_DEN_KAFW_BV_06());
execute(TC_DEN_KAFW_BV_07());
execute(TC_DEN_KAFW_BV_08());
execute(TC_DEN_KAFW_BV_09());
execute(TC_DEN_KAFW_BV_10());
if(PICS_DENM_RECEPTION) {
execute(TC_DEN_MSRV_BV_01());
execute(TC_DEN_MSRV_BV_02());
execute(TC_DEN_MSRV_BO_03());
execute(TC_DEN_MSRV_BO_04());
execute(TC_DEN_MSRV_BO_05());
execute(TC_DEN_MSRV_BO_06());
execute(TC_DEN_MSRV_BV_07());
if(PICS_IMPACT_REDUCTION) {
execute(TC_DEN_MSRV_BV_10());
}
}
if(PICS_DENM_KAF) {
execute(TC_DEN_KAFW_BV_01());
execute(TC_DEN_KAFW_BV_02());
execute(TC_DEN_KAFW_TI_03());
execute(TC_DEN_KAFW_BV_04());
execute(TC_DEN_KAFW_BV_05());
execute(TC_DEN_KAFW_BV_06());
execute(TC_DEN_KAFW_BV_07());
execute(TC_DEN_KAFW_BV_08());
execute(TC_DEN_KAFW_BV_09());
execute(TC_DEN_KAFW_BV_10());
}
}
} // end ItsDenm_TestControl
/trunk/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn
0,0 → 1,3787
/**
* @author ETSI / STF484
* @version $URL$
* $Id$
* @desc DENM TP functions
*
*/
module ItsDenm_TpFunctions {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_BasicTypesAndValues all;
// LibIts
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
import from LibItsDenm_TestSystem all;
import from LibItsDenm_Functions all;
import from LibItsDenm_Templates all;
import from LibItsDenm_TypesAndValues all;
import from LibItsDenm_Pics all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
// 5.2.1
group denMessageTransmission {
// 5.2.1.1
group denMessageFormat {
/**
* @desc TP Function for TC_DEN_MSGF_BV_01
*/
function f_DEN_MSGF_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm,
mw_anyStationId,
c_protocolVersionDenm,
c_messageId
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header 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_actionId);
f_cfDown();
} // end TC_DEN_MSGF_BV_01
/**
* @desc TP Function for TC_DEN_MSGF_BV_02
*/
function f_DEN_MSGF_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_anyDenmMgmtCon,
-,
mw_denmLocationWithTrace({ ?, * })
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect location container 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_actionId);
f_cfDown();
} // end TC_DEN_MSGF_BV_02
} // end denMessageFormat
// 5.2.1.2
group denEventGeneration {
/**
* @desc TP Function for TC_DEN_EVGN_BV_01
*/
function f_DEN_EVGN_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (mw_anyDenmMgmtCon)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header and management 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_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_01
/**
* @desc TP Function for TC_DEN_EVGN_BV_02
*/
function f_DEN_EVGN_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
m_situation(c_causeAccident, c_subCauseCode_Unavailable),
m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
};
var boolean v_success := true;
var ActionIDList v_actionIds;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) {
f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[lengthof(v_actionIds) - 1] := v_denmInd.msgIn.denm.management.actionID;
//check the action id
for (i := 0; i < lengthof(v_actionIds) - 1; i:=i + 1) {
if (v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber == v_actionIds[i].sequenceNumber) {
v_success := false;
}
}
if (v_success==true) {
log("*** " & testcasename() & ": PASS: actionID field indicating unused value. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: actionID field indicating used value. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
for (i := 0; i < lengthof(v_actionIds); i:=i + 1) {
f_poCancelEvent(e_iut, v_actionIds[i]);
}
f_cfDown();
} // end TC_DEN_EVGN_BV_02
/**
* @desc TP Function for TC_DEN_EVGN_BV_03
*/
function f_DEN_EVGN_BV_03() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithActionID(
mw_actionId(f_getIutStationId())
)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_03
/**
* @desc TP Function for TC_DEN_EVGN_BV_04
*/
function f_DEN_EVGN_BV_04() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_anyDenmMgmtCon,
v_situation
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_04
/**
* @desc TP Function for TC_DEN_EVGN_BV_05
*/
function f_DEN_EVGN_BV_05() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
m_situation(c_causeAccident, c_subCauseCode_Unavailable),
m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
};
var ActionIDList v_actionIds;
var DenmInd v_denmInd;
var integer i;
var TimestampIts v_timestampIts;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_timestampIts := f_getCurrentTime();
for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) {
f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithReferenceTime(
mw_timestampIts_withDelta(v_timestampIts)
)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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
for (i := 0; i < lengthof(v_actionIds); i:=i + 1) {
f_poCancelEvent(e_iut, v_actionIds[i]);
}
f_cfDown();
} // end TC_DEN_EVGN_BV_05
/**
* @desc TP Function for TC_DEN_EVGN_BV_07
*/
function f_DEN_EVGN_BV_07() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable),
m_situation(c_causeAccident, c_subCauseCode_Unavailable),
m_situation(c_causeRoadworks, c_subCauseCode_Unavailable),
m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable)
};
var SequenceNumber v_sequenceNumber;
var ActionID v_actionId;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) {
f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID);
}
//save the last sequence number
v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithActionID(
mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber))
)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
v_actionId := v_denmInd.msgIn.denm.management.actionID;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_07
/**
* @desc TP Function for TC_DEN_EVGN_BV_08
*/
function f_DEN_EVGN_BV_08() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var SequenceNumber v_firstSequenceNumber;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_firstSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber;
for (i := 1; i < 65535; i := i + 1) {
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID);
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithActionID(
mw_actionId(-, f_increaseSequenceNumber(v_firstSequenceNumber))
)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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, m_actionId(v_firstSequenceNumber));
f_poCancelEvent(e_iut, m_actionId(f_increaseSequenceNumber(v_firstSequenceNumber)));
f_cfDown();
} // end TC_DEN_EVGN_BV_08
/**
* @desc TP Function for TC_DEN_EVGN_BV_10
*/
function f_DEN_EVGN_BV_10() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation ( c_causeVehicleBreakdown, c_subCauseCode_Unavailable );
var StationID v_stationId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_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_stationId := f_getIutStationId ( );
f_utChangePseudonym ( m_utChangePseudonym );
f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta ) );
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd {
tc_ac.stop;
if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_stationId ) {
log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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_cfDown();
} // end TC_DEN_EVGN_BV_10
} // end denEventGeneration
// 5.2.1.3
group denEventUpdate {
/**
* @desc TP Function for TC_DEN_EVUP_BV_02
*/
function f_DEN_EVUP_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_UPDATE) {
log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (mw_anyDenmMgmtCon)
)
)
) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
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_actionId);
f_cfDown();
} // end TC_DEN_EVUP_BV_01
/**
* @desc TP Function for TC_DEN_EVUP_BV_02
*/
function f_DEN_EVUP_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_UPDATE) {
log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem;
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(