Newer
Older
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_01_nodeB
/**
* @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_01)
*/
function f_GEONW_PON_FPB_BV_01_nodeC() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
// Preamble
f_prNeighbour();
// Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(
m_geoNwLsReplyPacket(
v_longPosVectorNodeA,
f_longPosVector2ShortPosVector(v_longPosVectorIut),
vc_localSeqNumber
)
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
// /!\ This pre-condition has impact on test body
if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
tc_noac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GeoUnicast packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_01_nodeC
} // end GEONW_PON_FPB_BV_01
group GEONW_PON_FPB_BV_02 {
/**
* @desc Test of Forwarder packet buffering into UC forwarding buffer for unreachable Unicast destinations
* (absence of a suitable next hop candidate)
* <pre>
* Pics Selection: none
* Config Id: CF03
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having received any Beacon information from ItsNodeB and
* the IUT having received GeoUnicast packets addressed to ItsNodeA from ItsNodeC
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT1
* containing RHL field
* indicating value greater than 1
* containing GUC Extended Header
* containing SN field
* indicating value SN1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a Beacon packet from ItsNodeB
* }
* then {
* the IUT selects the ItsNodeB as the next hop and
* the IUT forwards the buffered GeoUnicast packet
* containing Basic Header
* containing RHL field
* indicating value decreased by 1
* containing GUC Extended Header
* containing SN field
* indicating value SN1
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/02
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
* @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 7.5.3, 9.3.6.3
*/
testcase TC_GEONW_PON_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeC;
const UInt16 c_sequenceNumberC := f_getInitialSequenceNumber();
// Test control
// Test component configuration
f_cf03Up();
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeC := f_getComponent(c_compNodeC);
v_nodeB.start(f_GEONW_PON_FPB_BV_02_nodeB(c_sequenceNumberC));
v_nodeC.start(f_GEONW_PON_FPB_BV_02_nodeC(c_sequenceNumberC));
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf03Down();
} // end TC_GEONW_PON_FPB_BV_02
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_02)
*/
function f_GEONW_PON_FPB_BV_02_nodeB(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
// Preamble
f_prDefault(); // NodeB is not yet a neighbour
vc_localSeqNumber := p_sequenceNumberC;
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
// Test Body
f_sleep(1.0);
f_startBeingNeighbour();
tc_ac.start;
alt {
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwUnicastPacket(
mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
vc_localSeqNumber
),
-,
c_defaultHopLimit - 1
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Packet correctly forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_02_nodeB
/**
* @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_02)
*/
function f_GEONW_PON_FPB_BV_02_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
// Preamble
f_prNeighbour();
vc_localSeqNumber := p_sequenceNumberC;
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwUnicastPacket(
v_longPosVectorNodeC,
f_longPosVector2ShortPosVector(v_longPosVectorNodeA),
vc_localSeqNumber
),
-,
c_defaultHopLimit
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_02_nodeC
} // end GEONW_PON_FPB_BV_02
group GEONW_PON_FPB_BV_03 {
/**
* @desc Test of UC forwarding buffer characteristics: FIFO type
* <pre>
* Pics Selection: none
* Config Id: CF03
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having received any Beacon information from ItsNodeB and
* the IUT having received a GeoUnicast (GEOUNI1) packet addressed to ItsNodeA from ItsNodeC
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating value LT1 and
* containing RHL field
* indicating value greater than 1
* containing GUC Extended Header
* containing SN field
* indicating value SN1
* the IUT having received a second GeoUnicast (GEOUNI2) packet addressed to ItsNodeA from ItsNodeC
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT2
* containing RHL field
* indicating value greater than 1
* containing GUC Extended Header
* containing SN field
* indicating value SN2
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a Beacon packet from ItsNodeB
* before expiry of LT1 and LT2
* }
* then {
* the IUT selects ItsNodeB as the next hop and
* the IUT forwards the GEOUNI1 buffered packet
* containing GUC Extended Header
* containing SN field
* indicating value SN1
* the IUT forwards the GEOUNI2 buffered packet
* containing GUC Extended Header
* containing SN field
* indicating value SN2
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/03
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
* @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3
*/
testcase TC_GEONW_PON_FPB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeC;
const UInt16 c_sequenceNumberC := f_getInitialSequenceNumber();
const integer c_messageCount := 2;
// Test control
// Test component configuration
f_cf03Up();
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeC := f_getComponent(c_compNodeC);
v_nodeB.start(f_GEONW_PON_FPB_BV_03_nodeB(c_sequenceNumberC, c_messageCount));
v_nodeC.start(f_GEONW_PON_FPB_BV_03_nodeC(c_sequenceNumberC, c_messageCount));
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf03Down();
} // end TC_GEONW_PON_FPB_BV_03
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_03)
*/
function f_GEONW_PON_FPB_BV_03_nodeB(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
var UInt16 v_expectedSequenceNumber := p_sequenceNumberC;
var integer v_nbReceivedPackets := 0;
// Preamble
f_prDefault(); // NodeB is not yet a neighbour
vc_multipleMessagesCount := p_messageCount;
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sleep(1.0);
f_startBeingNeighbour();
tc_ac.start;
alt {
[] a_receiveGeoUnicast(
mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
v_expectedSequenceNumber) {
tc_ac.stop;
v_nbReceivedPackets := v_nbReceivedPackets + 1;
if(v_nbReceivedPackets >= vc_multipleMessagesCount) {
log("*** " & testcasename() & ": PASS: GeoUnicast packets received in correct order ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
v_expectedSequenceNumber := v_expectedSequenceNumber + 1;
tc_ac.start;
repeat;
}
}
[] a_receiveGeoUnicast(
mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
?) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: GeoUnicast packet received in incorrect order ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_03_nodeB
/**
* @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_03)
*/
function f_GEONW_PON_FPB_BV_03_nodeC(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
var integer i := 0;
// Preamble
f_prNeighbour();
vc_localSeqNumber := p_sequenceNumberC;
vc_multipleMessagesCount := p_messageCount;
for(i:=0; i < vc_multipleMessagesCount; i:=i+1) {
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwUnicastPacket(
v_longPosVectorNodeC,
f_longPosVector2ShortPosVector(v_longPosVectorNodeA),
vc_localSeqNumber
)
)
)
);
}
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_03_nodeC
} // end GEONW_PON_FPB_BV_03
group GEONW_PON_FPB_BV_04 {
/**
* @desc Test of UC forwarding buffer characteristics: discarding upon LT expiration
* <pre>
* Pics Selection: none
* Config Id: CF03
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having received any Beacon information from ItsNodeB and
* the IUT having received a GeoUnicast packet addressed to ItsNodeA from ItsNodeC
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT1
* containing RHL field
* indicating value greater than 1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a Beacon packet from ItsNodeB
* after expiry of LT1
* }
* then {
* the IUT does not forward the buffered GeoUnicast packet addressed to ItsNodeA
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/03
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
* @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3
*/
testcase TC_GEONW_PON_FPB_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeC;
const UInt6 c_packetLifetime := 10; // 10s
// Test control
// Test component configuration
f_cf03Up();
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeC := f_getComponent(c_compNodeC);
v_nodeB.start(f_GEONW_PON_FPB_BV_04_nodeB(c_packetLifetime));
v_nodeC.start(f_GEONW_PON_FPB_BV_04_nodeC(c_packetLifetime));
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf03Down();
} // end TC_GEONW_PON_FPB_BV_04
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_04)
*/
function f_GEONW_PON_FPB_BV_04_nodeB(in UInt6 p_packetLifetime) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
var integer v_nbReceivedPackets := 0;
// Preamble
f_prDefault(); // NodeB is not yet a neighbour
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sleep(int2float(p_packetLifetime + 1));
f_startBeingNeighbour();
tc_noac.start;
alt {
[] a_receiveGeoUnicast(
mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)),
?) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GeoUnicast packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_04_nodeB
/**
* @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_04)
*/
function f_GEONW_PON_FPB_BV_04_nodeC(in UInt6 p_packetLifetime) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA);
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
// Preamble
f_prNeighbour();
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwUnicastPacket(
v_longPosVectorNodeC,
f_longPosVector2ShortPosVector(v_longPosVectorNodeA),
vc_localSeqNumber
),
m_lifetimeBase1s(p_packetLifetime),
c_defaultHopLimit
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_04_nodeC
} // end GEONW_PON_FPB_BV_04
group GEONW_PON_FPB_BV_06 {
/**
* @desc Test of Source packet buffering into BC forwarding buffer for no recipients
* <pre>
* Pics Selection: none
* Config Id: CF02
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having received Beacon information from ItsNodeD and
* the IUT not having received Beacon information from ItsNodeB and
* the IUT having been requested to send a TSB packet
* containing TrafficClass.SCF set to 1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
* }
* then {
* the IUT broadcasts the buffered TSB packet
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/06
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
* @reference EN 302 636-4-1 [1], clauses 9.3.5, 7.5.3, 9.3.6.3 and 9.3.11.2
*/
testcase TC_GEONW_PON_FPB_BV_06() 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_PON_FPB_BV_06_nodeB());
v_nodeD.start(f_GEONW_PON_FPB_BV_06_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end TC_GEONW_PON_FPB_BV_06
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_06)
*/
function f_GEONW_PON_FPB_BV_06_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
// Preamble
f_prDefault();
if (not f_utTriggerEvent(m_generateTsbMessage)) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sleep(1.0);
f_startBeingNeighbour();
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GeoBroadcast packet received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_06_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_06)
*/
function f_GEONW_PON_FPB_BV_06_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
// Preamble
f_prDefault();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GeoBroadcast packet received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
}
}
// Postamble
f_poDefault();
} // end f_GEONW_PON_FPB_BV_06_nodeD
} // end GEONW_PON_FPB_BV_06
group GEONW_PON_FPB_BV_07 {
/**
* @desc Test of BC forwarding buffer characteristics: FIFO type
* <pre>
* Pics Selection: none
* Config Id: CF02
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having received Beacon information from ItsNodeD and
* the IUT not having received Beacon information from ItsNodeB and
* the IUT having been requested to send a TSB (TSB1) packet
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT1
* containing TSB Extended Header
* containing SN field
* indicating value SN1
* the IUT having been requested to send a TSB (TSB2) packet
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT2
* containing TSB Extended Header
* containing SN field
* indicating value SN2
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a Beacon packet from either ItsNodeD or ItsNodeB
* before expiry of LT1 and LT2
* }
* then {
* the IUT broadcasts TSB1 packet
* containing TSB Extended Header
* containing SN field
* indicating value SN1
* the IUT broadcasts TSB2 packet
* containing TSB Extended Header
* containing SN field
* indicating value SN2
* }
* }
* </pre>
*
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/07
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
* @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2
*/
testcase TC_GEONW_PON_FPB_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
const integer v_messageCount := 2;
// 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_PON_FPB_BV_07_nodeB(v_messageCount));
v_nodeD.start(f_GEONW_PON_FPB_BV_07_nodeD(v_messageCount));
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end TC_GEONW_PON_FPB_BV_07
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_07)
*/
function f_GEONW_PON_FPB_BV_07_nodeB(in integer p_messageCount) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
var template (present) UInt16 v_expectedSequenceNumber := ?;
var integer v_nbReceivedPackets := 0;
var integer i := 0;
// Preamble
f_prDefault();
vc_multipleMessagesCount := p_messageCount;
for(i:=0; i < vc_multipleMessagesCount; i:=i+1) {
if(not f_utTriggerEvent(m_generateTsbMessage)) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
}
tc_ac.start(1.0);
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: GeoBroadcast packet not buffered ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": PASS: GeoBroadcast packet buffered ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
}
// Test Body
f_startBeingNeighbour();
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(
v_expectedSequenceNumber,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd {
tc_ac.stop;
v_nbReceivedPackets := v_nbReceivedPackets + 1;
if(v_nbReceivedPackets >= vc_multipleMessagesCount) {
log("*** " & testcasename() & ": PASS: TSB packets received in correct order ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.tsbHeader.seqNumber + 1;
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {
log("*** " & testcasename() & ": FAIL: TSB packet received in incorrect order ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_07_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_07)
*/
function f_GEONW_PON_FPB_BV_07_nodeD(in integer p_messageCount) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
var template (present) UInt16 v_expectedSequenceNumber := ?;
var integer v_nbReceivedPackets := 0;
var integer i := 0;
// Preamble
f_prDefault();
vc_multipleMessagesCount := p_messageCount;
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(v_expectedSequenceNumber,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd {
tc_ac.stop;
v_nbReceivedPackets := v_nbReceivedPackets + 1;
if(v_nbReceivedPackets >= vc_multipleMessagesCount) {
log("*** " & testcasename() & ": PASS: TSB packets received in correct order ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.tsbHeader.seqNumber + 1;
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {
log("*** " & testcasename() & ": FAIL: TSB packet received in incorrect order ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
}
}
// Postamble
f_poDefault();
} // end f_GEONW_PON_FPB_BV_07_nodeD
} // end GEONW_PON_FPB_BV_07
group GEONW_PON_FPB_BV_08 {
/**
* @desc Test of BC forwarding buffer characteristics: discarding upon LT expiration
* <pre>
* Pics Selection: none
* Config Id: CF02
* Initial conditions:
* with {
* the IUT being in the "initial state" and
* the IUT not having received Beacon information from ItsNodeD and
* the IUT not having received Beacon information from ItsNodeB and
* the IUT having been requested to send a TSB (TSB1) packet
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT1
* the IUT having been requested to send a TSB (TSB2) packet
* containing TrafficClass.SCF set to 1
* containing Basic Header
* containing LT field
* indicating LT2
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
* after expiry of LT1 and LT2
* }
* then {
* the IUT does not broadcast any of the buffered TSB1 and TSB2
* @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/08
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
* @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2
*/
testcase TC_GEONW_PON_FPB_BV_08() 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_PON_FPB_BV_08_nodeB());
v_nodeD.start(f_GEONW_PON_FPB_BV_08_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end TC_GEONW_PON_FPB_BV_08
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_08)
*/
function f_GEONW_PON_FPB_BV_08_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
// Preamble
f_prDefault();
if(not f_utTriggerEvent(m_generateTsbMessageWithLifetime(c_lifetime))) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
if(not f_utTriggerEvent(m_generateTsbMessageWithLifetime(c_lifetime))) {
log("*** " & testcasename() & ": INCONC: Trigger failed ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sleep(int2float(c_defaultLifetime + 1));
f_startBeingNeighbour();
tc_noac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GeoBroadcast packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No message received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_FPB_BV_08_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_08)
*/
function f_GEONW_PON_FPB_BV_08_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
var GeoNetworkingInd v_geoNetInd;
// Preamble
f_prDefault();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sleep(int2float(c_defaultLifetime + 1));
f_startBeingNeighbour();
tc_noac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?,
mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) {