Newer
Older
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
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(CauseCodeType_vehicleBreakdown_, 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));
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
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(CauseCodeType_vehicleBreakdown_, 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;
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
}
}
[] 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);
}
}
// 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(CauseCodeType_vehicleBreakdown_, 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));
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
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(CauseCodeType_vehicleBreakdown_, 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));
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
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
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
} // 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(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
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_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);
}
else {
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(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_engineProblem_);
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
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;
}
// 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);
}
else {
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(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
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);
}
else {
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(CauseCodeType_vehicleBreakdown_, 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);
}
else {
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(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_engineProblem_);
var TimestampIts v_detectionTime := f_getCurrentTime();
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
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);
}
else {
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(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_engineProblem_);
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
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;
}
// 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);
}
else {
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(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_engineProblem_);
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
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);
}
else {
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
/**
* @desc TP Function for TC_DEN_MSRV_BV_10
*/
function f_DEN_MSRV_BV_10() runs on ItsDenm {
//Local constants
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
var ActionID v_actionId;
// 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();
// 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_selfOrClientSyncAndVerdict(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_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM not rreceived ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_10
} // end denMessageReception
// 5.2.3
group denKeepAliveForwarding {
/**
* @desc TP Function for TC_DEN_KAFW_BV_01
*/
function f_DEN_KAFW_BV_01() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
var ActionID v_actionId;
// Local timers
timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF 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,
-,
c_transmissionInterval * 4 / 1000,
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
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_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded ***");
f_selfOrClientSyncAndVerdict(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_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_01
/**
* @desc TP Function for TC_DEN_KAFW_BV_02
*/
function f_DEN_KAFW_BV_02() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
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;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF 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,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
v_referenceTime1
),
v_situation,
m_denmLocation_zeroDelta
)
);
// start KAF timer here, as 2nd DENM shall be ignored
t_forwarding.start;
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
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 ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
tc_ac.stop;
log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);