ItsGeoNetworking_TpFunctions.ttcn 718 KB
Newer Older
/**
 *  @author     ETSI / STF405 / STF449
 *  @version    $URL$
 *              $Id$
 *  @desc       GeoNetworking TP Functions
 *
 */
module ItsGeoNetworking_TpFunctions {
    
    // Libcommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings 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;
	import from LibItsGeoNetworking_Pixits all;

    // 6.2.1
    group geoFormatingAndDataValidity {
        
        // 6.2.1.1
        group geoFdvBasicHeader {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_BAH_BV_01
             */
            function f_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeB;
                
                // Test control
                if (not PICS_GN_BASIC_HEADER) {
                    log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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_generateGeoBroadcastMessage(f_getArea(c_area1)))) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket(?, ?), -, 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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_BAH_BV_01
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_BAH_BI_02
             */
            function f_GEONW_FDV_BAH_BI_02() runs on ItsGeoNetworking {
                // Local variables
                var LongPosVector v_longPosVectorNodeB;
                var template (value) GeoNetworkingPdu v_gnPacket;
                var integer i;
                var GnRawPayload v_sentRawPayload;
                
                // Test control
                if (not PICS_GN_BASIC_HEADER) {
                    log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER 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();
                v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB));
                
                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket));
                
                f_sleep(PX_TAC);
                
                if(0 < lengthof(vc_utInds)) {
                    log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***");
                    //flush received upper indications 
                    vc_utInds := {};
                    f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                }
                else {
                    log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***");
                    f_selfOrClientSyncAndVerdict(c_prDone, e_error);
                }
                
                // Test Body
                v_gnPacket.basicHeader.version := valueof(v_gnPacket.basicHeader.version) + 1;
                
                f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket));
                
                f_sleep(PX_TAC);
                
                if(0 != 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);
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_BAH_BI_02
            
        } // end geoFdvBasicHeader
        
        // 6.2.1.2
        group geoFdvCommonHeader {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_COH_BV_01
             */
            function f_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_COMMON_HEADER) {
                    log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                                
                // 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);
                    }
                }
                
                f_acTriggerEvent(m_stopPassBeaconing);
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_COH_BV_01
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_COH_BV_02
             */
            function f_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking {
                
                // Local variables
                var GeoNetworkingInd v_geoNwInd;
                var octetstring v_payload := char2oct("PAYLOAD");
                
                // Test control
                if (not PICS_GN_COMMON_HEADER) {
                    log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_COH_BV_02
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_COH_BV_03
             */
            function f_GEONW_FDV_COH_BV_03(
                                           in template (present) UInt8 p_hopLimit := f_getDefaultHopLimit(),
                                           in template (present) Bit8 p_flags := f_isMobile()
            ) runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_COMMON_HEADER) {
                    log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cf01Up();
                v_longPosVectorIut := f_getPosition(c_compIut);
                
                // Test adapter configuration
                
                // Preamble
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                
                // Test Body
                if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                }
                 
                tc_ac.start;
                alt {
                    
                    [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithHlAndFlags(mw_longPosVectorPosition_withDelta(v_longPosVectorIut), ?, p_hopLimit, p_flags)))) {
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 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 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 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 447 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 488 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 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 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 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 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 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 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 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 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 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 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 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 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 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Correct GeoNetworking Common Header received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] a_receiveGeoBroadcast(mw_longPosVectorPosition_withDelta(v_longPosVectorIut), ?) {
                        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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_COH_BV_03
            
            group GEONW_FDV_COH_BO_04 {
                
                /**
                 * @desc    TP Function for TC_GEONW_FDV_COH_BO_04
                 */
                function f_GEONW_FDV_COH_BO_04() runs on ItsMtc {
                    
                    // Local variables
                    var ItsGeoNetworking v_nodeB;
                    var ItsGeoNetworking v_nodeD;
                    
                    // Test control
                    if (not PICS_GN_COMMON_HEADER) {
                        log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER 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_FDV_COH_BO_04_nodeB());
                    v_nodeD.start(f_GEONW_FDV_COH_BO_04_nodeD());
                    
                    // Synchronization
                    f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
                    
                    // Cleanup
                    f_cf02Down();
                    
                } // end f_GEONW_FDV_COH_BV_04
                
                /**
                 * @desc    Behavior function for NodeB (TC_GEONW_FDV_COH_BV_04)
                 */
                function f_GEONW_FDV_COH_BO_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);
                    
                    // 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_BO_04_nodeB
                
                /**
                 * @desc    Behavior function for NodeD (TC_GEONW_FDV_COH_BV_04)
                 */
                function f_GEONW_FDV_COH_BO_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);
                        }
                    }
                    
                    // Postamble
                    f_poNeighbour();
                    
                } // end f_GEONW_FDV_COH_BO_04_nodeD
                
            } // end GEONW_FDV_COH_BO_04
            
        } // end geoFdvCommonHeader
        
        // 6.2.1.3
        group geoFdvBeacon {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_BEA_BV_01
             */
            function f_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_BEACON_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_BEA_BV_01
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_BEA_BV_02
             */
            function f_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_BEACON_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_BEA_BV_02
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_BEA_BV_03
             */
            function f_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_BEACON_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_BEA_BV_03
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_BEA_BV_04
             */
            function f_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_BEACON_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_BEA_BV_04
            
        } // end geoFdvBeacon
        
        // 6.2.1.4
        group geoFdvGeoUnicast {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_GUC_BV_01
             */
            function f_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeB;
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_GUC_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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 GUC message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: GUC message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_GUC_BV_01
            
        } // end geoFdvGeoUnicast
        
        // 6.2.1.5
        group geoFdvGeoBroadcast {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_GBC_BV_01
             */
            function f_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeB;
                var LongPosVector v_longPosVectorIut;
                var octetstring v_payload := char2oct("PAYLOAD");
                
                // Test control
                if (not PICS_GN_GBC_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // 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);
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                        f_receiveGeoNetMessageWithPayload(
                            mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwBroadcastPacket(
                                        mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV
                                        ? // sequence number
                                    )
                                )
                            ),
                            ?
                        )
                    ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Fields of the received GBC message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": FAIL: GBC message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_GBC_BV_01
            
        } // end geoFdvGeoBroadcast
        
        // 6.2.1.6
        group geoFdvGeoAnycast {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_GAC_BV_01
             */
            function f_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                var octetstring v_payload := char2oct("PAYLOAD");
                
                // Test control
                if (not PICS_GN_GAC_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cf01Up();
                
                // Test adapter configuration
                
                // Preamble
                v_longPosVectorIut := f_getPosition(c_compIut);
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateGeoAnycastMessageWithPayload(f_getArea(c_area1), v_payload)) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                        f_receiveGeoNetMessageWithPayload(
                            mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwAnycastPacket(
                                        mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV
                                        ? // sequence number
                                    )
                                )
                            ),
                            ?
                        )
                    ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Fields of the received GAC message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: GAC message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_GAC_BV_01
            
        } // end geoFdvGeoAnycast
        
        // 6.2.1.7
        group geoFdvSingleHopBroadcast {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_SHB_BV_01
             */
            function f_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_SHB_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cf01Up();
                
                // Test adapter configuration
                
                // Preamble
                v_longPosVectorIut := f_getPosition(c_compIut);
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateShbMessage) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                            mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwShbPacket(
                                      mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV
                                      1 //MHL
                                    )
                                )
                            )
                        ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: SHB message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_SHB_BV_01
            
        } // end geoFdvSingleHopBroadcast
        
        // 6.2.1.8
        group geoFdvTopologicallyScopedBroadcast {
            
            /**
             * @desc    TP Function for TC_GEONW_FDV_TSB_BV_01
             */
            function f_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorIut;
                
                // Test control
                if (not PICS_GN_TSB_SRC) {
                    log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }
                
                // Test component configuration
                f_cf01Up();
                
                // Test adapter configuration
                
                // Preamble
                v_longPosVectorIut := f_getPosition(c_compIut);
                f_prNeighbour();
                f_selfOrClientSyncAndVerdict(c_prDone, e_success);
                
                // Test Body
                if ( not f_utTriggerEvent(m_generateTsbMessage) ) {
                    log("*** " & testcasename() & ": INCONC: Trigger failed ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                }
                tc_ac.start;
                alt {
                    [] geoNetworkingPort.receive(
                           mw_geoNwInd(
                                mw_geoNwPdu(
                                    mw_geoNwTsbPacket(
                                        ?, // sequence number
                                        mw_longPosVectorPosition_withDelta(v_longPosVectorIut) // SOPV
                                    )
                                )
                            )
                        ) {
                        tc_ac.stop;
                        log("*** " & testcasename() & ": PASS: message received with correct common and extended headers ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: TSB message not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }
                
                // Postamble
                f_poNeighbour();
                f_cf01Down();
                
            } // end f_GEONW_FDV_TSB_BV_01
            
        } // end geoFdvTopologicallyScopedBroadcast
        
    } // end geoFormatingAndDataValidity
    
    // 6.2.2
    group geoProtocolOperation {
        
        // 6.2.2.1
        group geoLocationTable {
            
            /**
             * @desc    TP Function for TC_GEONW_PON_LOT_BV_01
             */
            function f_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking {
                
                // Local variables
                var LongPosVector v_longPosVectorNodeB;