Newer
Older
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, 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.0));
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] 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
/**
* @desc TP Function for TC_DEN_EVRP_BV_10
*/
function f_DEN_EVRP_BV_10() runs on ItsDenm {
// 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(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_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 control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, c_duration2, c_duration1, c_interval1 ) );
f_awaitDenMessage ( v_expected, v_denmInd );
t_repetition.start(2.0 * (int2float(c_interval1)/1000.0));
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
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 {
[] denmPort.receive ( v_expected ) -> value v_denmInd {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] 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
/**
* @desc TP Function for TC_DEN_EVRP_BV_11
*/
function f_DEN_EVRP_BV_11() runs on ItsDenm {
// Local constants
const ValidityDuration c_duration1 := defaultValidity + 100;
const ValidityDuration c_duration2 := 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(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2 ifpresent))));
var ActionID v_actionId;
var DenmInd v_denmInd;
var TimestampIts v_referenceTime;
// Local timers
timer t_repetition;
timer t_default;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, omit, c_duration1, c_interval1 ) );
f_awaitDenMessage ( v_expected, v_denmInd );
t_repetition.start(2.0 * int2float(c_interval1)/1000.0);
t_default.start ( int2float(c_duration1) );
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expected.msgIn.denm.management.actionID := v_actionId;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// 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.0));
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);
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
}
}
[] t_default.timeout {
t_repetition.stop;
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_11
} // end denMessageRepetition
group denMessageLowerLayerParameters {
/**
* @desc TP Function for TC_DEN_PAR_BV_01
*/
function f_DEN_PAR_BV_01() runs on ItsDenm {
// Local variables
const UInt8 c_gnNhBtpB := 2;
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_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));
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
tc_ac.start;
alt {
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, c_gnNhBtpB)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected DENM message encapsultated in BTP-B packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN NH information in DenmInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected DENM message received, but not encapsulated in BTP-B packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_PAR_BV_01
/**
* @desc TP Function for TC_DEN_PAR_BV_02
*/
function f_DEN_PAR_BV_02() runs on ItsDenm {
// Local variables
const UInt8 c_gnHtGbc := 4;
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_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));
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
tc_ac.start;
alt {
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, -, c_gnHtGbc)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected DENM message encapsulated in GBC packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, -, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN HT information in DenmInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected DENM message received, but not encapsulated in GBC packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_PAR_BV_02
} // end denMessageLowerLayerParameters
group denMessageSSP {
function f_DEN_SSP_BV_XX(
in charstring p_certName,
in template (value) SituationContainer p_situation,
in template (present) Bit256 pmw_ssp)
runs on ItsDenm {
var ActionID v_actionId;
var DenmInd v_denmInd;
filatov
committed
var Oct8 v_certHashedId8;
// Test control
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
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
filatov
committed
fx_readCertificateDigest( p_certName, v_certHashedId8);
if( '0000000000000000'O == v_certHashedId8) {
// Certificate not found
log("*** " & testcasename() & ": Required IUT certificate is not found on the test system ***");
setverdict(inconc);
stop;
}
filatov
committed
{ hashedId8 := v_certHashedId8 }
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(p_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmIndWithSecurityParameters(
mw_denmPdu(
mw_denm(
mw_anyDenmMgmtCon,
p_situation
)
),
pmw_ssp
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
log("*** " & testcasename() & ": INFO: Received a DENM with other cause code. ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": PASS: No unexpected DENM received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_SSP_BV_XX
f_DEN_SSP_BV_XX (
PX_CERT_IUT_DENM_01,
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_trafficCondition_, LibItsCommon_ASN1_NamedNumbers.TrafficConditionSubCauseCode_unavailable_),
);
}
f_DEN_SSP_BV_XX (
PX_CERT_IUT_DENM_02,
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
);
}
} // end group denMessageSSP
} // end denMessageTransmission
// 5.2.2
group denMessageReception {
/**
* @desc TP Function for TC_DEN_MSRV_BV_01
*/
function f_DEN_MSRV_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
// 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() & ": PASS: DENM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_01
/**
* @desc TP Function for TC_DEN_MSRV_BV_02
*/
function f_DEN_MSRV_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_);
var TimestampIts v_referenceTime2;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
// 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_selfOrClientSyncAndVerdict(c_tbDone, e_success);
log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_02
/**
* @desc TP Function for TC_DEN_MSRV_BO_03
*/
function f_DEN_MSRV_BO_03() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtConTermination(
-,
-,
-,
-,
-,
isNegation
),
v_situation,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TNOAC);
if (0 != lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BO_03
/**
* @desc TP Function for TC_DEN_MSRV_BO_04
*/
function f_DEN_MSRV_BO_04() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId, v_actionIdIut;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionIdIut := f_sendDenMessage(
m_denm(
m_denmMgmtConTermination(
m_actionId(
f_increaseSequenceNumber(v_actionId.sequenceNumber)
),
-,
-,
-,
-,
-,
isCancellation
),
v_situation,
m_denmLocation_zeroDelta
);
f_sleep(PX_TNOAC);
if (0 != lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_iut, v_actionIdIut);
f_cfDown();
} // end TC_DEN_MSRV_BO_04
/**
* @desc TP Function for TC_DEN_MSRV_BO_05
*/
function f_DEN_MSRV_BO_05() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_);
var TimestampIts v_detectionTime := f_getCurrentTime();
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_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_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-, -, -, v_detectionTime, v_referenceTime1
),
v_situation1,
m_denmLocation_zeroDelta
)
);
f_sleep(1.0);
vc_utEvents := {};
v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( v_actionId, -, -, -, v_detectionTime, 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_selfOrClientSyncAndVerdict(c_tbDone, e_error);
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BO_05
/**
* @desc TP Function for TC_DEN_MSRV_BO_06
*/
function f_DEN_MSRV_BO_06() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.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;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
// 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);
vc_utEvents := {};
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_selfOrClientSyncAndVerdict(c_tbDone, e_error);
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BO_06
/**
* @desc TP Function for TC_DEN_MSRV_BV_07
*/
function f_DEN_MSRV_BV_07() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.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;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_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_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_selfOrClientSyncAndVerdict(c_tbDone, e_success);
log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_07
group denMessageSSP {
function f_DEN_MSRV_BO_08_XX(
in charstring p_certName,
in template (value) SituationContainer p_situation
) runs on ItsDenm {
// Local variables
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
// instruct adapter to use p_certName to sign message
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId
),
p_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 treated as valid and transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM was treated as invalid and was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_01
function f_DEN_MSRV_BO_08_01 () runs on ItsDenm {
f_DEN_MSRV_BO_08_XX(
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_trafficCondition_, LibItsCommon_ASN1_NamedNumbers.TrafficConditionSubCauseCode_unavailable_)
);
}
function f_DEN_MSRV_BO_08_02 () runs on ItsDenm {
f_DEN_MSRV_BO_08_XX(
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_)
);
function f_DEN_MSRV_BO_09_XX(
in charstring p_certName,
in template (value) SituationContainer p_situation1,
in template (value) SituationContainer p_situation2
) runs on ItsDenm {
// Local variables
var TimestampIts v_referenceTime2;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
// instruct adapter to use normal certificate to sign message
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId
),
p_situation1,
m_denmLocation_zeroDelta
)