Newer
Older
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));
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
2035
2036
2037
2038
2039
2040
2041
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(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));
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
2093
2094
2095
2096
2097
2098
2099
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;
}
}
[] 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);
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
}
}
[] 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));
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
2240
2241
2242
2243
2244
2245
2246
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));
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
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 {
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
function f_DEN_SSP_BV_XX( in Oct8 p_certHashedId8,
in template (value) SituationContainer p_situation,
in template (present) bitstring pmw_ssp)
runs on ItsDenm {
var ActionID v_actionId;
var DenmInd v_denmInd;
// 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
f_prInitialState(
e_staticPosition,
{ hashedId8 := p_certHashedId8 }
);
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
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;
}
2360
2361
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
[] 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
function f_DEN_SSP_BV_01( ) runs on ItsDenm {
f_DEN_SSP_BV_XX (
PX_CERT_IUT_DENM_01,
m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_),
mw_sspTrafficCondition
);
}
function f_DEN_SSP_BV_02( ) runs on ItsDenm {
f_DEN_SSP_BV_XX (
PX_CERT_IUT_DENM_02,
m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_),
mw_sspAccident
);
}
} // 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(CauseCodeType_vehicleBreakdown_, 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;
}
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
// 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_);
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;
}
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
// 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_);
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();
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_);
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;
}
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
// 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_);
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
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;
}
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
// Test component configuration
f_cfUp();
// Test adapter configuration
// TODO: instruct adapter to use p_certName to sign message
// 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(
"CERT_TS_DENM_01",
m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_)
);
}
function f_DEN_MSRV_BO_08_02 () runs on ItsDenm {
f_DEN_MSRV_BO_08_XX(
"CERT_TS_DENM_02",
m_situation(CauseCodeType_accident_, 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;
}
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
// Test component configuration
f_cfUp();
// Test adapter configuration
// TODO: instruct adapter to use c_certName_FullSSP to sign message
// 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
)
);
f_sleep(1.0);
// TODO: instruct adapter to use p_certName to sign message
v_referenceTime2 := f_getCurrentTime();
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
v_actionId,
-, -, -, v_referenceTime2
),
p_situation2,
m_denmLocation_zeroDelta
)
);