Newer
Older
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_02)
*/
function f_GEONW_PON_GBC_BV_02_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_noac.start;
alt {
[] a_receiveGeoBroadcastWithArea(
mw_longPosVectorPosition_withDelta(v_longPosVectorIut),
?,
f_getGeoBroadcastArea(c_area2)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: received GBC message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_02_nodeD
} // end GEONW_PON_GBC_BV_02
group GEONW_PON_GBC_BV_03 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BV_03
*/
function f_GEONW_PON_GBC_BV_03() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_SRC) {
log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***");
setverdict(inconc);
stop;
}
if ((f_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) {
log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***");
setverdict(inconc);
stop;
}
// 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_GBC_BV_03_nodeB());
v_nodeD.start(f_GEONW_PON_GBC_BV_03_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end f_GEONW_PON_GBC_BV_03
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_03)
*/
function f_GEONW_PON_GBC_BV_03_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeB,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area1)
)
)
)
);
tc_ac.start;
alt {
[] a_receiveGeoBroadcastWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?,
f_getGeoBroadcastArea(c_area1)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GBC message received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_03_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_03)
*/
function f_GEONW_PON_GBC_BV_03_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_ac.start;
alt {
[] a_receiveGeoBroadcastWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?,
f_getGeoBroadcastArea(c_area1)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GBC message received correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_03_nodeD
} // end GEONW_PON_GBC_BV_03
group GEONW_PON_GBC_BO_04 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BO_04
*/
function f_GEONW_PON_GBC_BO_04() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_FWD) {
log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
setverdict(inconc);
stop;
}
if ((f_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) {
log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***");
setverdict(inconc);
stop;
}
// 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_GBC_BO_04_nodeB());
v_nodeD.start(f_GEONW_PON_GBC_BO_04_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end f_GEONW_PON_GBC_BO_04
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_04)
*/
function f_GEONW_PON_GBC_BO_04_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
var template (present) GeoNetworkingPdu v_gnPacket;
// Preamble
f_prNeighbour();
v_gnPacket := m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeB,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area1)
),
-,
c_defaultHopLimit
);
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket)));
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?,
f_getGeoBroadcastArea(c_area1)
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message received correctly ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
}
// Test Body
tc_noac.start;
alt {
[] a_receiveGeoBroadcast(
?,
?) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BO_04_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BO_04)
*/
function f_GEONW_PON_GBC_BO_04_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
var template (present) GeoNetworkingInd v_msgInd;
// Preamble
f_prNeighbour();
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?,
f_getGeoBroadcastArea(c_area1)
)))) -> value v_msgInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message received correctly ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Pre-conditions: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_error);
}
}
// Test Body
// send geoBroadcast for second time (same source + same seq Nr + lower RHL)
v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) - 1;
f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_msgInd.msgIn)));
v_msgInd.msgIn.basicHeader.routerHopLimit := ?;
tc_noac.start;
alt {
[] a_receiveGeoBroadcast(
?,
?) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BO_04_nodeD
} // end GEONW_PON_GBC_BO_04
group GEONW_PON_GBC_BV_05 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BV_05
*/
function f_GEONW_PON_GBC_BV_05() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeC;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_FWD) {
log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf04Up();
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeC := f_getComponent(c_compNodeC);
v_nodeD := f_getComponent(c_compNodeD);
v_nodeB.start(f_GEONW_PON_GBC_BV_05_nodeB());
v_nodeC.start(f_GEONW_PON_GBC_BV_05_nodeC());
v_nodeD.start(f_GEONW_PON_GBC_BV_05_nodeD());
// Synchronization
f_serverSync3ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf04Down();
} // end f_GEONW_PON_GBC_BV_05
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_05)
*/
function f_GEONW_PON_GBC_BV_05_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] a_receiveGeoBroadcastWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeC),
?,
f_getGeoBroadcastArea(c_area2)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GBC message correctly forwarded to area center ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_05_nodeB
/**
* @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BV_05)
*/
function f_GEONW_PON_GBC_BV_05_nodeC() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
var GeoNetworkingInd v_msgInd;
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeC,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area2)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_05_nodeC
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_05)
*/
function f_GEONW_PON_GBC_BV_05_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_noac.start;
alt {
[] a_receiveGeoBroadcastWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeC),
?,
f_getGeoBroadcastArea(c_area2)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC message not forwarded to area center ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_05_nodeD
} // end GEONW_PON_GBC_BV_05
group GEONW_PON_GBC_BO_06 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BO_06
*/
function f_GEONW_PON_GBC_BO_06() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeC;
var ItsGeoNetworking v_nodeD;
var UInt16 v_sequenceNumber := f_getInitialSequenceNumber();
// Test control
if (not PICS_GN_GBC_FWD) {
log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
setverdict(inconc);
stop;
}
if ((f_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) {
log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf04Up();
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeC := f_getComponent(c_compNodeC);
v_nodeD := f_getComponent(c_compNodeD);
v_nodeB.start(f_GEONW_PON_GBC_BO_06_nodeB());
v_nodeC.start(f_GEONW_PON_GBC_BO_06_nodeC(v_sequenceNumber));
v_nodeD.start(f_GEONW_PON_GBC_BO_06_nodeD(v_sequenceNumber));
// Synchronization
f_serverSync3ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf04Down();
} // end f_GEONW_PON_GBC_BO_06
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_06)
*/
function f_GEONW_PON_GBC_BO_06_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
var template (present) GeoNetworkingInd v_msgInd;
// Preamble
f_prNeighbour();
tc_ac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeC),
?,
f_getGeoBroadcastArea(c_area2)
)))) -> value v_msgInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message correctly forwarded to area center ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
}
// Test Body
v_msgInd.msgIn.basicHeader.routerHopLimit := ?;
tc_noac.start;
alt {
[] geoNetworkingPort.receive(v_msgInd) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC message re-forwarded to area center ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not re-forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BO_06_nodeB
/**
* @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BO_06)
*/
function f_GEONW_PON_GBC_BO_06_nodeC(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
// Preamble
f_prNeighbour();
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeC,
p_sequenceNumber,
f_getGeoBroadcastArea(c_area2)
),
-,
c_defaultHopLimit
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BO_06_nodeC
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BO_06)
*/
function f_GEONW_PON_GBC_BO_06_nodeD(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC);
// Preamble
f_prNeighbour();
tc_noac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeC),
?,
f_getGeoBroadcastArea(c_area2)
)))) {
tc_noac.stop;
log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not forwarded to area center ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
}
// Test Body
// send geoBroadcast for second time (same source + same seq Nr + lower RHL)
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeC,
p_sequenceNumber,
f_getGeoBroadcastArea(c_area2)
),
-,
c_defaultHopLimit - 1
)
)
);
tc_noac.start;
alt {
[] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea(
mw_longPosVectorPosition(v_longPosVectorNodeC),
?,
f_getGeoBroadcastArea(c_area2)
)))) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC re-forwarded! (not to area center!) ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BO_06_nodeD
} // end GEONW_PON_GBC_BO_06
group GEONW_PON_GBC_BV_07 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BV_07
*/
function f_GEONW_PON_GBC_BV_07() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_FWD) {
log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
setverdict(inconc);
stop;
}
// 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_GBC_BV_07_nodeB());
v_nodeD.start(f_GEONW_PON_GBC_BV_07_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end f_GEONW_PON_GBC_BV_07
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_07)
*/
function f_GEONW_PON_GBC_BV_07_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeB,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area1),
c_defaultHopLimit
),
-,
c_defaultHopLimit
)
)
);
tc_ac.start;
alt {
[] a_receiveGeoBroadcastWithAreaWithHopLimit(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?,
f_getGeoBroadcastArea(c_area1),
c_defaultHopLimit - 1,
c_defaultHopLimit) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GBC message correctly re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: GBC message not re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_07_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_07)
*/
function f_GEONW_PON_GBC_BV_07_nodeD() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
var GeoNetworkingInd v_msgInd;
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] a_receiveGeoBroadcastWithAreaWithHopLimit(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?,
f_getGeoBroadcastArea(c_area1),
c_defaultHopLimit - 1,
c_defaultHopLimit) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: GBC message correctly re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: GBC message not re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_07_nodeD
} // end GEONW_PON_GBC_BV_07
group GEONW_PON_GBC_BV_08 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BV_08
*/
function f_GEONW_PON_GBC_BV_08() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_FWD) {
log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***");
setverdict(inconc);
stop;
}
// 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_GBC_BV_08_nodeB());
v_nodeD.start(f_GEONW_PON_GBC_BV_08_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end f_GEONW_PON_GBC_BV_08
/**
* @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_08)
*/
function f_GEONW_PON_GBC_BV_08_nodeB() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB);
// Preamble
f_prNeighbour();
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
f_sendGeoNetMessage(
m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
v_longPosVectorNodeB,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area1)
),
-,
c_hopLimit1
)
)
);
tc_noac.start;
alt {
[] a_receiveGeoBroadcast(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_08_nodeB
/**
* @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_08)
*/
function f_GEONW_PON_GBC_BV_08_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 {
[] a_receiveGeoBroadcast(
mw_longPosVectorPosition(v_longPosVectorNodeB),
?) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poNeighbour();
} // end f_GEONW_PON_GBC_BV_08_nodeD
} // end GEONW_PON_GBC_BV_08
/**
* @desc TP Function for TC_GEONW_PON_GBC_BV_09
*/
function f_GEONW_PON_GBC_BV_09() runs on ItsGeoNetworking {
// Local variables
var LongPosVector v_longPosVectorNodeB;
var template (value) GeoNetworkingPdu v_gnPacket;
var integer i;
// Test control
if (not PICS_GN_GBC_DST) {
log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***");
setverdict(inconc);
stop;
}
// 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_geoNwBroadcastPacket(
v_longPosVectorNodeB,
vc_localSeqNumber,
f_getGeoBroadcastArea(c_area1)
)
);
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() & ": PASS: GN was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poNeighbour();
f_cf01Down();
} // end f_GEONW_PON_GBC_BV_09
group GEONW_PON_GBC_BO_10 {
/**
* @desc TP Function for TC_GEONW_PON_GBC_BO_10
*/
function f_GEONW_PON_GBC_BO_10() runs on ItsMtc {
// Local variables
var ItsGeoNetworking v_nodeB;
var ItsGeoNetworking v_nodeD;
// Test control
if (not PICS_GN_GBC_DST) {
log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***");
setverdict(inconc);
stop;
}
if ((f_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) {
log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf02Up(c_compNodeB);
// Preamble
// Start components
v_nodeB := f_getComponent(c_compNodeB);
v_nodeD := f_getComponent(c_compNodeD);
v_nodeB.start(f_GEONW_PON_GBC_BO_10_nodeB());
v_nodeD.start(f_GEONW_PON_GBC_BO_10_nodeD());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // end f_GEONW_PON_GBC_BO_10
/**