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
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
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
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
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
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
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.90;
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
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
2247
2248
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_changeSpeed(v_speedValues[v_cntSpeed]);
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
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
}
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.10;
2294
2295
2296
2297
2298
2299
2300
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
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
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.90;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.10;
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
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
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);
}
}
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
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.90;
timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
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
f_changeHeading(v_changeHeadingValue);
t_genCam_dcc.timeout;
t_genCam_min.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_min.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.90;
var CamInd v_camPdu;
var ReferencePosition v_referencePosition, v_expectedReferencePosition;
var float v_changePosValue := 8.0; // 8 >> 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
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
v_expectedReferencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue);
if (PICS_GNSS_SCENARIO_SUPPORT == false) {
latitude := v_expectedReferencePosition.latitude - v_referencePosition.latitude,
longitude := v_expectedReferencePosition.longitude - v_referencePosition.longitude,
t_genCam_dcc.timeout;
t_genCam_dcc.start;
[] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_expectedReferencePosition ) )){
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.90;
timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
var CamInd v_camPdu;
var SpeedValue v_speedValue;
var SpeedValue v_changeSpeedValue := 60; // 0,5 m/s << 0,6 m/s == 60 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
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
f_changeSpeed(v_changeSpeedValue);
t_genCam_dcc.timeout;
t_genCam_min.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_min.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.90;
timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.10;
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
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);
}
}
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
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.90;
const float c_maxTime := 1.10;
// Local variables
if (not PICS_CAM_GENERATION or not PICS_RSU) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION amd PICS_RSU required for executing the TC ***");
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
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 > c_minTime )) {
log("*** " & testcasename() & ": PASS: CAM message received in time***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: CAM message not received in time***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: CAM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
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
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
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
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
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
}
}
// 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
group camGenerationSSP{
function f_CAM_MSD_SSP_BO_XX(