Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* @author ETSI / STF405 / STF449
* @version $URL$
* $Id$
* @desc GeoNetworking Testcases (TP version: 0.0.11)
*
*/
module ItsGeoNetworking_TestCases {
// Libcommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
// LibIts
import from LibItsCommon_Functions all;
import from LibItsGeoNetworking_TestSystem all;
import from LibItsGeoNetworking_Functions all;
import from LibItsGeoNetworking_Templates all;
import from LibItsGeoNetworking_TypesAndValues all;
import from LibItsGeoNetworking_Pics all;
// 6.2.1
group geoFormatingAndDataValidity {
// 6.2.1.1
group geoFdvBasicHeader {
/**
* @desc Testing defined values of default Gn parameters in the basic header
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet
* }
* then {
* the IUT sends a GeoUnicast packet
* containing a correctly formatted Basic Header
* containing version field
* set to itsGnProtocolVersion MIB parameter
* containing RHL field
* set to itsGnDefaultHopLimit MIB parameter
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BAH/BV/01
* @reference EN 302 636-4-1 [1], clauses 9.3.2 , 8.6.2 and Annex G
*/
testcase TC_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorNodeB := f_getPosition(vc_componentName);
// 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 {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket(?, ?), -, f_getDefaultHopLimit()))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Basic Header correctly formatted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_BAH_BV_01
/**
* @desc Testing discard of packet having incorrect version
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives the SHB packet from ItsNodeB
* containing a correctly formatted Basic Header
* containing version field
* set to value not equal to itsGnProtocolVersion MIB parameter
* }
* then {
* the IUT discards the received SHB packet
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BAH/BV/02
* @reference EN 302 636-4-1 [1], clauses 9.3.3
*/
testcase TC_GEONW_FDV_BAH_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var template (value) GeoNetworkingPdu v_gnPacket;
var integer i;
// 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
v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB));
v_gnPacket.basicHeader.version := valueof(v_gnPacket.basicHeader.version) + 1;
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket));
f_sleep(PX_TAC);
for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) {
// empty on purpose
}
if(i < lengthof(vc_utInds)) {
log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: GN was discarded and not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_BAH_BV_02
} // end geoFdvBasicHeader
// 6.2.1.2
group geoFdvCommonHeader {
/**
* @desc Common GeoNetworking header validity test (PL field)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a Beacon message
* }
* then {
* the IUT sends a GeoNetworking message
* containing a correctly formatted Common Header
* containing HT field
* set to '1' (BEACON)
* containing HST field
* set to '0' (UNSPECIFIED)
* containing PL field
* set to '0'
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/01
* @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.6 and 9.3.6
*/
testcase TC_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
}
}
f_acTriggerEvent(m_stopPassBeaconing);
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_COH_BV_01
/**
* @desc Common GeoNetworking header validity test (PL field)
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a SHB packet
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '5' (TSB)
* containing HST field
* set to '0' (SINGLE_HOP)
* containing MHL field
* set to '1'
* containing PL field
* set to the length of the included payload
* containing a payload
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/02
* @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.4, 9.3.4 and 9.3.10
*/
testcase TC_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var GeoNetworkingInd v_geoNwInd;
var octetstring v_payload := char2oct("PAYLOAD");
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
f_prNeighbour();
if ( not f_utTriggerEvent(m_generateShbMessageWithPayload(v_payload)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) -> value v_geoNwInd {
tc_ac.stop;
if(ispresent(v_geoNwInd.msgIn.gnPacket.packet.payload)) {
if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload.rawPayload)) {
log("*** " & testcasename() & ": PASS: PL field correctly indicates payload size ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: PL does correctly not indicate payload size ("
& int2str(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength)
& " != "
& int2str(lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload.rawPayload))
& ")***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
else {
if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == 0) {
log("*** " & testcasename() & ": PASS: PL field correctly indicates empty payload ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: PL does not indicate empty payload ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_COH_BV_02
/**
* @desc Testing defined values of default Gn parameters in the common header
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoUnicast packet
* }
* then {
* the IUT sends a GeoUnicast packet
* containing a correctly formatted Common Header
* containing Flags field
* indicating value equalling the itsGnIsMobile MIB parameter
* containing MHL field
* set to itsGnDefaultHopLimit MIB parameter
* }
* }
* </pre>
*
* @version 0.0.11
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/03
* @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2, 9.3.4 and Annex G
*/
testcase TC_GEONW_FDV_COH_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorNodeB := f_getPosition(vc_componentName);
// 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 {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(
mw_geoNwUnicastPacketWithHlAndFlags(?, ?, f_getDefaultHopLimit(), f_isMobile())))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Correct GeoNetworking Common Header received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] a_receiveAnyGeoUnicast() {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Incorrect GeoNetworking Common Header received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_COH_BV_03
group GEONW_FDV_COH_BV_04 {
/**
* @desc Test that a received TSB packet is discarded if received with RHL > MHL
* <pre>
* Pics Selection: none
* Config Id: CF02
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT having received Beacon information from ItsNodeD and
* the IUT having received Beacon information from ItsNodeB
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a TSB packet
* containing Basic Header
* containing RHL field
* indicating HL1 higher than MHL1
* containing Common Header
* containing MHL field
* indicating MHL1
* }
* then {
* the IUT discards the TSB packet
* }
* }
* </pre>
*
* @version 0.0.11
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/04
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
* @reference EN 302 636-4-1 [1], clauses 9.3.5
*/
testcase TC_GEONW_FDV_COH_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
// Test component configuration
f_cf02Up();
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeD := f_getComponent(c_compNodeD);
v_nodeB.start(f_GEONW_FDV_COH_BV_04_nodeB());
v_nodeD.start(f_GEONW_FDV_COH_BV_04_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end TC_GEONW_FDV_COH_BV_04
/**
* @desc Behavior function for NodeB (TC_GEONW_FDV_COH_BV_04)
*/
function f_GEONW_FDV_COH_BV_04_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
var UInt8 v_hopLimit := f_getDefaultHopLimit();
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
// Test Body
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwTsbPacket(
vc_localSeqNumber,
v_longPosVectorNodeB,
v_hopLimit-1
),
-,
v_hopLimit
)
)
);
tc_noac.start;
alt {
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwTsbPacket(
?,
mw_longPosVectorPosition(v_longPosVectorNodeB)
)
)
)
) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_FDV_COH_BV_04_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_FDV_COH_BV_04)
*/
function f_GEONW_FDV_COH_BV_04_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_noac.start;
alt {
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwTsbPacket(
?,
mw_longPosVectorPosition(v_longPosVectorNodeB)
)
)
)
) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_FDV_COH_BV_04_nodeD
} // end GEONW_FDV_COH_BV_04
} // end geoFdvCommonHeader
// 6.2.1.3
group geoFdvBeacon {
/**
* @desc Beacon header validity test
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates 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 NH field
* set to '0' (UNSPECIFIED)
* containing Extended Header
* containing SOPV
* indicating LPV of the IUT
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/01
* @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.6 and 9.3.6
*/
testcase TC_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut), e_any)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_BEA_BV_01
/**
* @desc GeoNetworking address validity test
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a Beacon packet
* }
* then {
* the IUT sends a GeoNetworking packet
* containing SOPV field
* containing GN_ADDR field
* containing ST field
* indicating the ITS Station type
* containing SCC field
* indicating the ITS Station country code
* }
* }
* NOTE: Correct Source GeoNetworking address value: itsGnLocalGnAddr MIB parameter value.
*
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/02
* @reference EN 302 636-4-1 [1], clauses 6.3 and 8.8.6.2
*/
testcase TC_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(
mw_longPosVectorAny(f_getIutGnLocalAddress()))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GN address correctly received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_BEA_BV_02
/**
* @desc Local Position Vector validity test, involving comparison against sensor input data
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a Beacon packet
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correct SOPV field
* indicating the latest position of the IUT
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/03
* @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2
*/
testcase TC_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Position equaling GN-MNGT primitive value received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_BEA_BV_03
/**
* @desc Local Position Vector validity test, involving timestamp comparison against sensor input data
* <pre>
* Pics Selection: none
* Config Id: CF01
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT generates a Beacon packet
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correct SOPV field
* indicating the timestamp value corresponding to the sensor acquisition time of position data
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/04
* @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2
*/
testcase TC_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
// Test adapter configuration
// Preamble
f_prNeighbour();
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Timestamp equaling GN-MNGT primitive value received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_BEA_BV_04
} // end geoFdvBeacon
// 6.2.1.4
group geoFdvGeoUnicast {
/**
* @desc GeoUnicast header validity
* <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
* }
* 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 DEPV field
* indicating position of the ItsNodeB
* containing SOPV field
* indicating position of the IUT
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GUC/BV/01
* @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2.2 and 9.3.8
*/
testcase TC_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_longPosVectorIut;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_longPosVectorNodeB := f_getPosition(c_compNodeB);
v_longPosVectorIut := f_getPosition(c_compIut);
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 {
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwUnicastPacketWithSourcePv(
mw_shortPosVectorPosition_withDelta(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), // DEPV
?, // sequence number
mw_longPosVectorPosition_withDelta(v_longPosVectorIut) //SOPV
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Fields of the received GeoUnicast message correctly set ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: GeoUnicast message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
}
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end TC_GEONW_FDV_GUC_BV_01
} // end geoFdvGeoUnicast
// 6.2.1.5
group geoFdvGeoBroadcast {
/**
* @desc GeoBroadcast header validity
* <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 the ItsNodeB
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to send a GeoBroadcast packet
* }
* then {
* the IUT sends a GeoNetworking packet
* containing a correctly formatted Common Header
* containing HT field
* set to '4' (GEOBROADCAST)
* containing GeoBroadcast Extended Header
* containing SOPV field
* indicating position of the IUT
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GBC/BV/01
* @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.11
*/
testcase TC_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var LongPosVector v_longPosVectorIut;
var octetstring v_payload := char2oct("PAYLOAD");
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_longPosVectorNodeB := f_getPosition(c_compNodeB);
v_longPosVectorIut := f_getPosition(c_compIut);
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
if ( not f_utTriggerEvent(m_generateGeoBroadcastMessageWithPayload(f_getArea(c_area1), v_payload)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);