Newer
Older
*/
function f_TP_GEONW_PON_LOT_BV_03_main(in template (value) LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking {
// Test Body
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeA.gnAddr))) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_ac.start;
alt {
[] a_receiveAnyLsRequest() {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received Location Service Request ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
[] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeA)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
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
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end f_TP_GEONW_PON_LOT_BV_03_main
} //end GEONW_PON_LOT_BV_03
/**
* @desc Test of handling entries expiring from location table
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacons information from ItsNodeB and
* the IUT not having received beacons from ItsNodeB for the duration of itsGnLifetimeLocTE parameter (20 sec)
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/04
* @reference EN 302 636-4-1 [1], clauses 7.1.3, 9.3.8.2, 9.3.7.1.2 and Annex G
*/
testcase TC_GEONW_PON_LOT_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Preamble
f_prDefault(); // NodeB will send Beacon only once
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(f_getPosition(c_compNodeB)), -, c_hopLimit1)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sleep(f_getLifetimeLocTableEntry());
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_ac.start;
alt {
[] a_receiveLsRequest(?, v_longPosVectorNodeB.gnAddr.mid, v_longPosVectorIut ) {
log("*** " & testcasename() & ": PASS: LS Request received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: LS Request not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
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
}
}
// Postamble
f_poDefault();
f_cf01Down();
} // end TC_GEONW_PON_LOT_BV_04
group GEONW_PON_LOT_BV_05 {
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: GUC packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
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
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
*/
testcase TC_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwUnicastPacket(
v_obsoleteLongPosVectorNodeB,
f_getIutShortPosVector(),
vc_localSeqNumber
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_01
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: GAC packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
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
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
*/
testcase TC_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwAnycastPacket(
v_obsoleteLongPosVectorNodeB,
vc_localSeqNumber,
f_getGeoAnycastArea(c_area1)
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_02
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: GBC packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
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
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
*/
testcase TC_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwBroadcastPacket(
v_obsoleteLongPosVectorNodeB,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area1)
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_03
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: TSB packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
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
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
*/
testcase TC_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwTsbPacket(
vc_localSeqNumber,
v_obsoleteLongPosVectorNodeB
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_04
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: SHB packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
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
*/
testcase TC_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwShbPacket(
v_obsoleteLongPosVectorNodeB
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_05
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: LS Request packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
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
2489
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
*/
testcase TC_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
activate(a_receiveAnyLsReply());
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwLsRequestPacket(
v_obsoleteLongPosVectorNodeB,
vc_localSeqNumber,
f_getIutGnLocalAddress()
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_06
/**
* @desc Test of updating entries in location table with most up-to-date position data extracted
* from common header processing (including timestamp comparison before updating)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having received a MESSAGE from ItsNodeB,
* containing Extended Header
* containing SOPV field
* indicating an older timestamp than the last Beacon packet and
* indicating a different position than the position of the last Beacon packet
* }
* MESSAGE: LS Reply packet
*
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT does not send a GeoNetworking packet
* containing a LS_REQUEST
* containing Request field
* indicating GN_ADDR of ItsNodeB
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GUC Extended Header
* containing DEPV field
* indicating same position as the SOPV value of the Beacon information received
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/05
* @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
*/
testcase TC_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_obsoleteLongPosVectorNodeB;
f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
f_TP_GEONW_PON_LOT_BV_05_pre_2(
m_geoNwLsReplyPacket(
v_obsoleteLongPosVectorNodeB,
f_getIutShortPosVector(),
vc_localSeqNumber
)
);
f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB);
} // end TC_GEONW_PON_LOT_BV_05_07
/**
* @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_05)
*/
function f_TP_GEONW_PON_LOT_BV_05_pre_1(out LongPosVector p_longPosVectorNodeB, out LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking {
// Local variables
// Test control
// Test component configuration
f_cf01Up();
p_longPosVectorNodeB := f_getPosition(c_compNodeB);
p_obsoleteLongPosVectorNodeB := p_longPosVectorNodeB;
p_obsoleteLongPosVectorNodeB.timestamp := p_obsoleteLongPosVectorNodeB.timestamp - 1000;
p_obsoleteLongPosVectorNodeB.latitude := p_obsoleteLongPosVectorNodeB.latitude - 1;
// Test adapter configuration
// Preamble
f_prDefault();
// Act as a neighbor and send one beacon
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(f_getPosition(c_compNodeB)), -, c_hopLimit1)));
} // end f_TP_GEONW_PON_LOT_BV_05_pre_1
/**
* @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_05)
*/
function f_TP_GEONW_PON_LOT_BV_05_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking {
//preamble part II
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet))
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
} // end f_TP_GEONW_PON_LOT_BV_05_pre_2
/**
* @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_05)
*/
function f_TP_GEONW_PON_LOT_BV_05_main(in template (value) LongPosVector p_longPosVectorNodeB, in template (value) LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking {
// Test Body
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeB.gnAddr)))) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_ac.start;
alt {
[] a_receiveAnyLsRequest() {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received Location Service Request ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
[] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_obsoleteLongPosVectorNodeB)))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: GeoUnicast received with obsolete Destination Position Vector ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
[] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeB)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
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
}
}
// Postamble
f_poDefault();
f_cf01Down();
} // end f_TP_GEONW_PON_LOT_BV_05_main
} // end group GEONW_PON_LOT_BV_05
} // end geoLocationTable
// 6.2.2.2
group geoLocalPositionVector {
/**
* @desc Test of the updating of the Local position vector
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having changed its position
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates eventually a Beacon packet
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '1' (BEACON)
* containing HST field
* set to '0' (UNSPECIFIED)
* containing Extended Header
* containing SOPV field
* indicating the new position
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LPV/BV/01
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
* @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.2.2.2, 9.3.6.1 and Annex G
*/
testcase TC_GEONW_PON_LPV_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
var template LongPosVector v_previouslongPosVectorIut;
var GeoNetworkingInd v_geoNwInd;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
v_previouslongPosVectorIut := v_longPosVectorIut;
v_previouslongPosVectorIut.timestamp := ?;
// Test adapter configuration
// Preamble
f_prNeighbour();
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(
mw_geoNwBeaconPacket(
mw_longPosVectorAny(v_longPosVectorIut.gnAddr)
)
))) -> value v_geoNwInd {
tc_ac.stop;
log("*** " & testcasename() & ": Pre-conditions: Beacon received ***");
v_longPosVectorIut := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
geoNetworkingPort.clear;
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(
mw_geoNwBeaconPacket(
mw_longPosVectorAny(v_longPosVectorIut.gnAddr)
)
))) -> value v_geoNwInd {
tc_ac.stop;
//check if the position vector has changed
if (match(v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector, v_previouslongPosVectorIut)) {
log("*** " & testcasename() & ": FAIL: Sender Postion Vector not correctly updated ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: Sender Postion Vector correctly updated ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
}
}
f_acTriggerEvent(m_stopPassBeaconing);
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_PON_LPV_BV_01
} // end geoLocalPositionVector
// 6.2.2.3
group geoSequenceNumber {
/**
* @desc Test of the initial sequence number assignment
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having sent any GUC and
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
* the IUT having received Beacon information from ItsNodeB
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing HST field
* set to '0' (UNSPECIFIED)
* containing GeoUnicast Extended Header
* containing SN field
* indicating value '0'
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SQN/BV/01
* @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2
*/
testcase TC_GEONW_PON_SQN_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var UInt16 v_expectedSequenceNumber := 0;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_ac.start;
alt {
[] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), v_expectedSequenceNumber) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), ?) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: GeoUnicast packet received with incorrect sequence number ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_PON_SQN_BV_01
/**
* @desc Test of the local sequence number incrementing
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeB and
* the IUT having sent a GeoUnicast packet to the ItsNodeB
* containing the Sequence Number field
* indicating value SN1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeB
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '2' (GEOUNICAST)
* containing GeoUnicast Extended Header
* containing SN field
* indicating value SN1 + 1
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SQN/BV/02
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
* @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2
*/
testcase TC_GEONW_PON_SQN_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var UInt16 v_expectedSequenceNumber := 0;
var integer v_nbReceivedPackets := 0;
var GeoNetworkingInd v_geoNwInd;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_sleep(10.0);
// receive first packet
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket(
mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)),
?)))) -> value v_geoNwInd {
tc_ac.stop;
log("*** " & testcasename() & ": Pre-conditions: First GeoUnicast packet received ***");
v_expectedSequenceNumber := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.geoUnicastHeader.seqNumber + 1;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_ac.start;
alt {
[] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), v_expectedSequenceNumber) {
tc_ac.stop;
v_nbReceivedPackets := v_nbReceivedPackets + 1;
if(v_nbReceivedPackets >= vc_multipleMessagesCount) {
log("*** " & testcasename() & ": PASS: GeoUnicast packets received with correct sequence numbers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
v_expectedSequenceNumber := v_expectedSequenceNumber + 1;
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_ac.start;
repeat;
}
}
[] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), ?) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: GeoUnicast packet received with incorrect sequence number ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
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
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_PON_SQN_BV_02
} // end geoSequenceNumber
// 6.2.2.4
group geoLocationService {
/**
* @desc Test of first LS invocation for unknown Destination nodes
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having no Location Table Entry for ItsNodeA
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet to ItsNodeA
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '6' (LS)
* containing HST field
* set to '0' (LS_REQUEST)
* containing NH field
* set to '0' (UNSPECIFIED)
* containing LS_REQUEST Extended Header
* containing Request field
* indicating GN_ADDR of ItsNodeA
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/01
* @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4, 6.3 and 9.3.7.1.2
*/
testcase TC_GEONW_PON_LOS_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
var GN_Address v_gnAddressNodeA;
// Test control
// Test component configuration
f_cf01Up();
v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr;
// Test adapter configuration
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);