LibItsGeoNetworking_Templates.ttcn 83.4 KB
Newer Older
berge's avatar
berge committed
/**
tepelmann's avatar
tepelmann committed
 *  @author     ETSI / STF405 / STF449
berge's avatar
berge committed
 *  @version    $URL$
 *              $Id$
 *  @desc       GeoNetworking Templates
berge's avatar
berge committed
 *
 */
module LibItsGeoNetworking_Templates {
berge's avatar
berge committed
    
    // Libcommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
berge's avatar
berge committed
    
reinaortega's avatar
reinaortega committed
    import from LibItsGeoNetworking_TestSystem all;
    import from LibItsGeoNetworking_TypesAndValues all;    
    import from LibItsGeoNetworking_Pixits all;
berge's avatar
berge committed
    import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
    import from LibItsIpv6OverGeoNetworking_Templates all;
    import from LibItsBtp_Templates all;
    import from LibItsExternal_TypesAndValues all;
berge's avatar
berge committed
    
    group geoNwPrimitivesTemplates {
tepelmann's avatar
tepelmann committed
        
berge's avatar
berge committed
        /**
         * @desc    Send template for GeoNetworking packet (GeonetworkingPort Primitive)
         * @param   p_geoNwMsg GeoNetworking packet to be sent
         */    
berge's avatar
berge committed
        template (value) GeoNetworkingReq m_geoNwReq_linkLayerBroadcast(
tepelmann's avatar
tepelmann committed
            template (value) GeoNetworkingPdu p_geoNwMsg
            macDestinationAddress := c_llBroadcast
        }
tepelmann's avatar
tepelmann committed
        
        /**
         * @desc    Send template for GeoNetworking packet (GeonetworkingPort Primitive)
         * @param   p_geoNwMsg              GeoNetworking packet to be sent
         * @param   p_llDestinationAdress   Link-layer destination address
         */    
        template (value) GeoNetworkingReq m_geoNwReq_withLinkLayerDestination(
tepelmann's avatar
tepelmann committed
            template (value) GeoNetworkingPdu p_geoNwMsg,
            template (value) MacAddress p_llDestinationAdress
berge's avatar
berge committed
        ) modifies m_geoNwReq_linkLayerBroadcast := {
            macDestinationAddress := p_llDestinationAdress
tepelmann's avatar
tepelmann committed
        
berge's avatar
berge committed
        /**
         * @desc    Receive template for GeoNetworking packet (GeonetworkingPort Primitive)
         * @param   p_geoNwMsg GeoNetworking packet to be received
         */            
        template GeoNetworkingInd mw_geoNwInd(
tepelmann's avatar
tepelmann committed
            template (present) GeoNetworkingPdu p_geoNwMsg
tepelmann's avatar
tepelmann committed
            macDestinationAddress := ?
tepelmann's avatar
tepelmann committed
        
        /**
         * @desc    Receive template for GeoNetworking packet (GeonetworkingPort Primitive)
         * @param   p_geoNwMsg              GeoNetworking packet to be received
         * @param   p_llDestinationAdress   Link-layer destination address
tepelmann's avatar
tepelmann committed
         */
        template GeoNetworkingInd mw_geoNwInd_withLinkLayerDestination(
tepelmann's avatar
tepelmann committed
            template (present) GeoNetworkingPdu p_geoNwMsg,
            template (present) MacAddress p_llDestinationAdress
        ) modifies mw_geoNwInd := {
            macDestinationAddress := p_llDestinationAdress 
        }
tepelmann's avatar
tepelmann committed
        
        group utPrimitives {
            
            /**
             * @desc Initializes the GN IUT. 
             */
            template (value) UtInitialize m_gnInitialize := {
                utGNInitialize := {
                }
            }
            
            /**
             * @desc    Request IUT to send a GeoUnicast message to a specific destination
             * @param   p_destinationGnAddr Destination of the GeoUnicast message  
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoUnicastMessage(GN_Address p_destinationGnAddr) := {
                utGnEvent := {
                    geoUnicast := {
                        gnAddress := p_destinationGnAddr,
                        lifetime := omit,
                        payload := omit
                    }
            /**
             * @desc    Request IUT to send a GeoUnicast message to a specific destination with specific lifetime
             * @param   p_destinationGnAddr Destination of the GeoUnicast message
berge's avatar
berge committed
             * @param   p_lifetime          Lifetime of the GeoUnicast message
             * @see     m_generateGeoUnicastMessage
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoUnicastMessageWithLifetime(
                GN_Address p_destinationGnAddr,
                integer p_lifetime
            ) modifies m_generateGeoUnicastMessage := {
                utGnEvent := {
                    geoUnicast := {
                        lifetime := p_lifetime
                    }
            /**
             * @desc    Request IUT to send a GeoUnicast message to a specific destination with a payload
             * @param   p_destinationGnAddr Destination of the GeoUnicast message
berge's avatar
berge committed
             * @param   p_payload           Payload of the GeoUnicast message
             * @see     m_generateGeoUnicastMessage
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoUnicastMessageWithPayload(
                GN_Address p_destinationGnAddr,
berge's avatar
berge committed
                octetstring p_payload
            ) modifies m_generateGeoUnicastMessage := {
                utGnEvent := {
                    geoUnicast := {
                        payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
tepelmann's avatar
tepelmann committed
            /**
             * @desc    Request IUT to send a GeoUnicast message to a specific destination with specific lifetime with specific payload
             * @param   p_destinationGnAddr Destination of the GeoUnicast message
             * @param   p_lifetime          Lifetime of the GeoUnicast message
             * @param   p_payload           Payload of the GeoUnicast message
             * @see     m_generateGeoUnicastMessage
             */
            template UtEvent m_generateGeoUnicastMessageWithLifetimeWithPayload(
                GN_Address p_destinationGnAddr,
                integer p_lifetime,
                octetstring p_payload
            ) modifies m_generateGeoUnicastMessageWithLifetime := {
                utGnEvent := {
                    geoUnicast := {
                         payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
                    }
                }
            }
            /**
             * @desc    Request IUT to send a GeoBroadcast message to a specific area
             * @param   p_area  Destination area of the message
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoBroadcastMessage(
berge's avatar
berge committed
                GeoArea p_area
                utGnEvent := {
                    geoBroadcast := {
                        area := p_area,
                        lifetime := omit,
                        payload := omit
berge's avatar
berge committed
                    }
                }
            }
            
            /**
             * @desc    Request IUT to send a GeoBroadcast message to a specific area
             * @param   p_area      Destination area of the message
             * @param   p_lifetime  Packet's lifetime
             */
            template UtEvent m_generateGeoBroadcastMessageWithLifetime(
                GeoArea p_area,
                integer p_lifetime
            ) modifies m_generateGeoBroadcastMessage := {
                utGnEvent := {
                    geoBroadcast := {
                        lifetime := p_lifetime
            /**
             * @desc    Request IUT to send a GeoBroadcast message to a specific area with a payload
             * @param   p_area      Destination area of the message
berge's avatar
berge committed
             * @param   p_payload   Payload of the GeoBroadcast message
             * @see     m_generateGeoBroadcastMessage
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoBroadcastMessageWithPayload(
berge's avatar
berge committed
                GeoArea p_area,
berge's avatar
berge committed
                octetstring p_payload
            ) modifies m_generateGeoBroadcastMessage := {
                utGnEvent := {
                    geoBroadcast := {
                        payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
            /**
             * @desc    Request IUT to send a GeoAnycast message to a specific area
             * @param   p_area  Destination area of the message 
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoAnycastMessage(
berge's avatar
berge committed
                GeoArea p_area
                utGnEvent := {
                    geoAnycast := {
                        area := p_area,
                        lifetime := omit,
                        payload := omit
            /**
             * @desc    Request IUT to send a GeoAnycast message to a specific area with a payload
             * @param   p_area      Destination area of the message
berge's avatar
berge committed
             * @param   p_payload   Payload of the GeoAnycast message
             * @see     m_generateGeoAnycastMessage
berge's avatar
berge committed
             */
            template UtEvent m_generateGeoAnycastMessageWithPayload(
berge's avatar
berge committed
                GeoArea p_area,
berge's avatar
berge committed
                octetstring p_payload
            ) modifies m_generateGeoAnycastMessage := {
                utGnEvent := {
                    geoAnycast := {
                        payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
            /**
             * @desc    Request IUT to send a SHB message
berge's avatar
berge committed
             */
            template UtEvent m_generateShbMessage := {
                utGnEvent := {
                    shb := {
                        payload := omit
                    }
            /**
             * @desc    Request IUT to send a SHB message with a payload
berge's avatar
berge committed
             * @param   p_payload   Payload of the SHB message
             * @see     m_generateShbMessage
berge's avatar
berge committed
             */
            template UtEvent m_generateShbMessageWithPayload(
berge's avatar
berge committed
                octetstring p_payload
            ) modifies m_generateShbMessage := {
                utGnEvent := {
                    shb := {
                        payload := { decodedPayload := omit, rawPayload := p_payload} // do not use f_adaptPayload_m here
berge's avatar
berge committed
            
            /**
             * @desc    Request IUT to send a TSB message
            template UtEvent m_generateTsbMessage := {
                utGnEvent := {
                    tsb := {
                        payload := omit
                    }
                }
            }
            
tepelmann's avatar
tepelmann committed
            /**
             * @desc    Request IUT to change its position
             */
            template (value) UtEvent m_changePosition := {
                utGnEvent := {
                    changePosition := {}
                }
            }
            
            /**
             * @desc Checks the receive of a packet
tepelmann's avatar
tepelmann committed
             * @param p_pdu The GN message to check
tepelmann's avatar
tepelmann committed
            template (value) UtEvent m_checkPacket(template (value) GeoNetworkingPdu p_pdu) := {
                utGnEvent := {
tepelmann's avatar
tepelmann committed
                    checkPdu := p_pdu
        group taPrimitives {
            
berge's avatar
berge committed
            /**
             * @desc Testsystem will start beaconing for the given neighbor
             * @param p_beaconHeader The neighbor information
berge's avatar
berge committed
            template (value) AcGnPrimitive m_startBeaconing(
berge's avatar
berge committed
                template (value) BeaconHeader p_beaconHeader
            ) := {
                startBeaconing := {
                    beaconHeader := p_beaconHeader
                }
            }
            
berge's avatar
berge committed
            /**
             * @desc Testsystem will stop beaconing for the given neighbor
             * @param p_compName The neighbor
berge's avatar
berge committed
            template AcGnPrimitive m_stopBeaconing := {
                stopBeaconing:= {
                }
            }
            
            /**
             * @desc Testsystem will pass received to the TTCN-3
             * @param p_beaconHeader The neighbor information
             */
berge's avatar
berge committed
            template AcGnPrimitive m_startPassBeaconing(
berge's avatar
berge committed
                template (value) BeaconHeader p_beaconHeader
            ) := {
                startPassBeaconing := {
                    beaconHeader := p_beaconHeader
                }
            }
            
            /**
             * @desc Testsystem will stop passing beacon information to the TTCN-3
             */
berge's avatar
berge committed
            template AcGnPrimitive m_stopPassBeaconing := {
                stopPassBeaconing := {
                }
            }
             * @desc Testsystem will start beaconing for multiple neighbors
             * @param p_beaconHeader The neighbor information
             * @param p_numberOfNeighbour The number of ITS stations for which TS will send beacons
berge's avatar
berge committed
            template (value) AcGnPrimitive m_startBeaconingMultipleNeighbour(
                template (value) BeaconHeader p_beaconHeader,
                integer p_numberOfNeighbour
            ) := {
                startBeaconingMultipleNeighbour := {
                    beaconHeader := p_beaconHeader,
                    numberOfNeighbour := p_numberOfNeighbour
                }
            }
            
            /**
             * @desc Testsystem will stop beaconing for multiple neighbors
             * @param p_compName The neighbor
             */
berge's avatar
berge committed
            template AcGnPrimitive m_stopBeaconingMultipleNeighbour := {
                stopBeaconingMultipleNeighbour:= {
                }
            /**
             * @desc Testsystem will reply the LongPosVector including the requested GN address 
             *       found in received beacon information to the TTCN-3
             * @param p_gnAddress The GN address included in the LongPosVector
berge's avatar
berge committed
            template AcGnPrimitive m_getLongPosVector(GN_Address p_gnAddress) := {
                getLongPosVector := {
                    gnAddress := p_gnAddress
                }
            }
            
            /**
             * @desc    Receive template adapter control result for long position vector with specific GN_Address
             * @param   p_gnAddress GN_Address to be contained in the long position vector
             */
berge's avatar
berge committed
            template AcGnResponse mw_getLongPosVectorAny(template (present) GN_Address p_gnAddress) := {
                getLongPosVector := mw_longPosVectorAny(p_gnAddress)
            }
        
        } // end taPrimitives
            
    } // geoNwPrimitivesTemplates
    
    group geoNwPduTemplates {
        
tepelmann's avatar
tepelmann committed
         * @desc    Send template for GeoNetworking PDU
         * @param   p_packet    GnNonSecuredPacket of GeoNetworking message
         * @param   p_lifeTime  Lifetime of GeoNetworking message (Default: m_defaultLifetime)
         * @param   p_hopLimit  Router Hop limit of GeoNetworking message (Default: c_defaultHopLimit)
         */
        template (value) GeoNetworkingPdu m_geoNwPdu(
            in template (value) GnNonSecuredPacket p_packet,
            in template (value) Lifetime p_lifeTime := m_defaultLifetime,
            in template (value) UInt8 p_hopLimit := c_defaultHopLimit
        ) := {
            basicHeader := m_basicHeader(p_lifeTime, p_hopLimit),
            gnPacket := {
                packet := p_packet
            }
        }
        
        /**
         * @desc    Receive template for GeoNetworking PDU
         * @param   p_packet    GnNonSecuredPacket of GeoNetworking message
         * @param   p_lifeTime  Lifetime of GeoNetworking message (Default: ?)
         * @param   p_hopLimit  Router Hop limit of GeoNetworking message (Default: ?)
         */
        template (present) GeoNetworkingPdu mw_geoNwPdu(
            in template (present) GnNonSecuredPacket p_packet,
            in template (present) Lifetime p_lifeTime := ?,
            in template (present) UInt8 p_hopLimit := ?
        ) := {
            basicHeader := mw_basicHeader(p_lifeTime, p_hopLimit),
            gnPacket := {
                packet := p_packet
            }
        }
        
    } // end geoNwPduTemplates
    
    group geoNwPacketTemplates {
        
        /**
         * @desc    Send template for GeoNetworking Packet
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
berge's avatar
berge committed
         */
tepelmann's avatar
tepelmann committed
        template (value) GeoNetworkingPacket m_geoNwPacket(
            in template (value) CommonHeader p_commonHeader,
            in template (value) ExtendedHeader p_extHeader
berge's avatar
berge committed
        ) := {
tepelmann's avatar
tepelmann committed
            packet := {
                commonHeader := p_commonHeader,
                extendedHeader := p_extHeader,
                payload := f_adaptPayload_m(char2oct("DEFAULT_PAYLOAD"))
            }
tepelmann's avatar
tepelmann committed
         * @desc    Send template for GeoNetworking Packet with no payload
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
         * 
         * @see m_geoNwPacket
tepelmann's avatar
tepelmann committed
        template (value) GeoNetworkingPacket m_geoNwPacketNoPayload(
            in template (value) CommonHeader p_commonHeader,
            in template (value) ExtendedHeader p_extHeader
        ) modifies m_geoNwPacket := {
            packet := {
                payload := omit
            }
tepelmann's avatar
tepelmann committed
         * @desc    Send template for GeoNetworking Packet with octetstring payload
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
         * @param   p_payload       Octetstring payload
         * 
         * @see m_geoNwPacket
tepelmann's avatar
tepelmann committed
        template (value) GeoNetworkingPacket m_geoNwPacketWithOctetstringPayload(
            in template (value) CommonHeader p_commonHeader,
            in template (value) ExtendedHeader p_extHeader,
            in template (value) octetstring p_payload
tepelmann's avatar
tepelmann committed
        ) modifies m_geoNwPacket := {
            packet := {
                payload := f_adaptPayload_m(p_payload)
            }
tepelmann's avatar
tepelmann committed
         * @desc    Send template for GeoNetworking Packet with payload
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
         * @param   p_payload       Payload
         * 
         * @see m_geoNwPacket
berge's avatar
berge committed
         */
tepelmann's avatar
tepelmann committed
        template (value) GeoNetworkingPacket m_geoNwPacketWithPayload(
            in template (value) CommonHeader p_commonHeader,
            in template (value) ExtendedHeader p_extHeader,
            in template (value) Payload p_payload
tepelmann's avatar
tepelmann committed
        ) modifies m_geoNwPacket := {
            packet := {
                payload := p_payload
            }
tepelmann's avatar
tepelmann committed
         * @desc    Receive template for GeoNetworking Packet
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
berge's avatar
berge committed
         */
tepelmann's avatar
tepelmann committed
        template (present) GeoNetworkingPacket mw_geoNwPacket(
            in template (present) CommonHeader p_commonHeader,
            in template ExtendedHeader p_extHeader
berge's avatar
berge committed
        ) := {
tepelmann's avatar
tepelmann committed
            packet := {
                commonHeader := p_commonHeader,
                extendedHeader := p_extHeader,
                payload := *
            }
        }
        
tepelmann's avatar
tepelmann committed
         * @desc    Receive template for GeoNetworking Packet with any payload
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
         * 
         * @see     mw_geoNwPacket
berge's avatar
berge committed
         */
        template GeoNetworkingPacket mw_geoNwPduAnyPayload(
tepelmann's avatar
tepelmann committed
            in template (present) CommonHeader p_commonHeader,
            in template ExtendedHeader p_extHeader
        ) modifies mw_geoNwPacket := {
            packet := {
                payload := ?
            }
        }
        
         * @desc    Receive template for GeoNetworking PDU with octetstring payload
tepelmann's avatar
tepelmann committed
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
         * @param   p_payload       Octetstring payload
         * 
         * @see     mw_geoNwPacket
berge's avatar
berge committed
         */
        template GeoNetworkingPacket mw_geoNwPduWithOctetstringPayload(
tepelmann's avatar
tepelmann committed
            in template (present) CommonHeader p_commonHeader,
            in template ExtendedHeader p_extHeader,
berge's avatar
berge committed
            in template (present) octetstring p_payload
tepelmann's avatar
tepelmann committed
        ) modifies mw_geoNwPacket := {
            packet := {
                payload := f_adaptPayload_mw(p_payload)
            }
        }
        
        /**
         * @desc    Receive template for GeoNetworking PDU with payload
tepelmann's avatar
tepelmann committed
         * @param   p_basicHeader   Common header of GeoNetworking packet
         * @param   p_extHeader     Extended header of GeoNetworking packet
         * @param   p_payload       Payload
         * 
         * @see     mw_geoNwPacket
         */
        template GeoNetworkingPacket mw_geoNwPduWithPayload(
tepelmann's avatar
tepelmann committed
            in template (present) CommonHeader p_commonHeader,
            in template ExtendedHeader p_extHeader,
            in template (present) Payload p_payload
tepelmann's avatar
tepelmann committed
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
        ) modifies mw_geoNwPacket := {
            packet := {
                payload := p_payload
            }
        }
        
        group geoNwPacketUnicastTemplates {
            
            /**
             * @desc    Send template for GeoNetworking Unicast Packet
             * @param   p_sourceLongPosVec          Long position vector of source 
             * @param   p_destinationShortPosVec    Short position vector of destination 
             * @param   p_seqNumber                 Sequence number of GeoUnicast packet
             */
            template (value) GnNonSecuredPacket m_geoNwUnicastPacket(
                in template (value) LongPosVector p_sourceLongPosVec,
                in template (value) ShortPosVector p_destinationShortPosVec,
                in template (value) UInt16 p_seqNumber
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_geoUnicastHeaderType,
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_geoUnicastHeader(
                    p_sourceLongPosVec,
                    p_destinationShortPosVec,
                    p_seqNumber
                ),
                payload := f_adaptPayload_m(char2oct("DEFAULT_PAYLOAD"))
            }
            
            /**
             * @desc    Receive template for GeoNetworking Unicast Packet
             * @param   p_destinationShortPosVec    Short position vector of destination 
             * @param   p_seqNumber                 Sequence number of GeoUnicast packet
             */
            template (present) GnNonSecuredPacket mw_geoNwUnicastPacket(
                in template (present) ShortPosVector p_destinationShortPosVec,
                in template (present) UInt16 p_seqNumber
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    mw_geoUnicastHeaderType
                ),
                extendedHeader := mw_geoUnicastHeader(
                    p_destinationShortPosVec,
                    p_seqNumber
                ),
                payload := ?
            }
            
            /**
             * @desc    Receive template for GeoNetworking Unicast Packet
             * @param   p_destinationShortPosVec    Short position vector of destination 
             * @param   p_seqNumber                 Sequence number of GeoUnicast packet
             * @param   p_srcLongPosVec             Long position vector of source
             */
            template (present) GnNonSecuredPacket mw_geoNwUnicastPacketWithSourcePv(
                in template (present) ShortPosVector p_destinationShortPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) LongPosVector p_srcLongPosVec
            ) modifies mw_geoNwUnicastPacket := {
                extendedHeader := mw_geoUnicastHeaderWithSourcePv(
                    p_destinationShortPosVec,
                    p_seqNumber,
                    p_srcLongPosVec
                )
            }
            
            /**
             * @desc    Receive template for GeoNetworking Unicast Packet
             * @param   p_destinationShortPosVec    Short position vector of destination 
             * @param   p_seqNumber                 Sequence number of GeoUnicast packet
             * @param   p_nextHeader                Id of next header
             */
            template (present) GnNonSecuredPacket mw_geoNwUnicastPacketWithNextHeader(
                in template (present) ShortPosVector p_destinationShortPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) NextHeader p_nextHeader
            ) modifies mw_geoNwUnicastPacket := {
                commonHeader := {
                    nextHeader := p_nextHeader
                }
            }
            
        } // end group geoNwPacketUnicastTemplates
        
        group geoNwPacketAnycastTemplates {
            
            /**
             * @desc    Send template for GeoNetworking Anycast Packet
             * @param   p_sourceLongPosVec      Long position vector of source
             * @param   p_seqNumber             Sequence number of GeoAnycast packet
             * @param   p_anycastArea           Destination GeoArea
             */
            template (value) GnNonSecuredPacket m_geoNwAnycastPacket(
                in template (value) LongPosVector p_sourceLongPosVec,
                in template (value) UInt16 p_seqNumber,
                in template (value) GeoAnycastArea p_anycastArea
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_geoAnycastHeaderType(p_anycastArea.geoAnycastSubType),
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_geoAnycastHeader(
                    p_sourceLongPosVec,
                    p_seqNumber,
                    p_anycastArea
                ),
                payload := f_adaptPayload_m(char2oct("DEFAULT_PAYLOAD"))
            }
            
            /**
             * @desc    Receive template for GeoNetworking Anycast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoAnycast packet
             */
            template (present) GnNonSecuredPacket mw_geoNwAnycastPacket(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    mw_geoAnycastHeaderType
                ),
                extendedHeader := mw_geoAnycastHeader(
                    p_sourceLongPosVec,
                    p_seqNumber
                ),
                payload := ?
            }
            
            /**
             * @desc    Receive template for GeoNetworking Anycast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoAnycast packet
             * @param   p_anycastArea           Destination GeoArea
             */
            template (present) GnNonSecuredPacket mw_geoNwAnycastPacketWithArea(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) GeoAnycastArea p_anycastArea
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    mw_geoAnycastHeaderTypeWithSubType(p_anycastArea.geoAnycastSubType)
                ),
                extendedHeader := mw_geoAnycastHeaderWithArea(
                    p_sourceLongPosVec,
                    p_seqNumber,
                    p_anycastArea
                ),
                payload := ?
            }
            
            /**
             * @desc    Receive template for GeoNetworking Anycast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoAnycast packet
             * @param   p_anycastArea           Destination GeoArea
             * @param   p_nextHeader            Id of next header
             */
            template (present) GnNonSecuredPacket mw_geoNwAnycastPacketWithAreaWithNextHeader(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) GeoAnycastArea p_anycastArea,
                in template (present) NextHeader p_nextHeader
            ) modifies mw_geoNwAnycastPacketWithArea := {
                commonHeader := {
                    nextHeader := p_nextHeader
                }
            }
            
        } // end group geoNwPacketAnycastTemplates
        
        group geoNwPacketBroadcastTemplates {
            
            /**
             * @desc    Send template for GeoNetworking Broadcast Packet
             * @param   p_sourceLongPosVec      Long position vector of source
             * @param   p_seqNumber             Sequence number of GeoBroadcast packet
             * @param   p_broadcastArea         Destination GeoArea
             */
            template (value) GnNonSecuredPacket m_geoNwBroadcastPacket(
                in template (value) LongPosVector p_sourceLongPosVec,
                in template (value) UInt16 p_seqNumber,
                in template (value) GeoBroadcastArea p_broadcastArea
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_geoBroadcastHeaderType(p_broadcastArea.geoBroadcastSubType),
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_geoBroadcastHeader(
                    p_sourceLongPosVec,
                    p_seqNumber,
                    p_broadcastArea
                ),
                payload := f_adaptPayload_m(char2oct("DEFAULT_PAYLOAD"))
            }
            
            /**
             * @desc    Receive template for GeoNetworking Broadcast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoBroadcast packet
             */
            template (present) GnNonSecuredPacket mw_geoNwBroadcastPacket(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    mw_geoBroadcastHeaderType
                ),
                extendedHeader := mw_geoBroadcastHeader(
                    p_sourceLongPosVec,
                    p_seqNumber
                ),
                payload := ?
            }
            
            /**
             * @desc    Receive template for GeoNetworking Broadcast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoBroadcast packet
             * @param   p_nextHeader            Id of next header
             */
            template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) NextHeader p_nextHeader
            ) modifies mw_geoNwBroadcastPacket := {
                commonHeader := mw_commonHeader(
                    p_nextHeader,
                    mw_geoBroadcastHeaderType
                )
            }
            
            /**
             * @desc    Receive template for GeoNetworking Broadcast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoBroadcast packet
             * @param   p_broadcastArea         Destination GeoArea
             */
            template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithArea(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) GeoBroadcastArea p_broadcastArea
            ) modifies mw_geoNwBroadcastPacket := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    mw_geoBroadcastHeaderTypeWithSubType(p_broadcastArea.geoBroadcastSubType)
                ),
                extendedHeader := mw_geoBroadcastHeaderWithArea(
                    p_sourceLongPosVec,
                    p_seqNumber,
                    p_broadcastArea
                )
            }
            
            /**
             * @desc    Receive template for GeoNetworking Broadcast Packet
             * @param   p_sourceLongPosVec      Long position vector of source 
             * @param   p_seqNumber             Sequence number of GeoBroadcast packet
             * @param   p_broadcastArea         Destination GeoArea
             */
            template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithAreaWithNextHeader(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) GeoBroadcastArea p_broadcastArea,
                in template (present) NextHeader p_nextHeader
            ) modifies mw_geoNwBroadcastPacketWithArea := {
                commonHeader := {
                    nextHeader := p_nextHeader
                }
            }
            
        } // end group geoNwPacketBroadcastTemplates
        
        group geoNwPacketLsTemplates {
            
            /**
             * @desc    Send template for GeoNetworking LS Request Packet
             * @param   p_sourceLongPosVec  Long position vector of source
             * @param   p_seqNumber         Sequence number of LS Request packet
             * @param   p_gnAddress         Searched GN_Address
             */
            template (value) GnNonSecuredPacket m_geoNwLsRequestPacket(
                in template (value) LongPosVector p_sourceLongPosVec,
                in template (value) UInt16 p_seqNumber,
                in template (value) GN_Address p_gnAddress
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_lsRequestHeaderType,
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_lsRequestHeader(
                    p_sourceLongPosVec, p_seqNumber, p_gnAddress
                ),
                payload := omit
            }
            
            /**
             * @desc    Receive template for GeoNetworking LS Request Packet
             * @param   p_seqNumber     Sequence number of LS Request packet
             * @param   p_mid           Searched GN_Address MID
             */
            template (present) GnNonSecuredPacket mw_geoNwLsRequestPacket(
                in template (present) UInt16 p_seqNumber,
                in template (present) GN_Address.mid p_mid
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_lsRequestHeaderType
                ),
                extendedHeader := mw_lsRequestHeader(
                    p_seqNumber,
                    p_mid
                ),
                payload := omit
            }
            
            /**
             * @desc    Send template for GeoNetworking LS Reply Packet
             * @param   p_sourceLongPosVec      Long position vector of source
             * @param   p_destinationLongPosVec Long position vector of destination
             * @param   p_seqNumber             Sequence number of LS Reply packet
             */
            template (value) GnNonSecuredPacket m_geoNwLsReplyPacket(
                in template (value) LongPosVector p_sourceLongPosVec,
                in template (value) ShortPosVector p_destinationLongPosVec,
                in template (value) UInt16 p_seqNumber
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_lsReplyHeaderType,
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_lsReplyHeader(
                    p_sourceLongPosVec, p_destinationLongPosVec, p_seqNumber
                ),
                payload := omit
            }
            
            /**
             * @desc    Receive template for GeoNetworking LS Reply Packet
             * @param   p_sourceLongPosVec      Long position vector of source
             * @param   p_destinationLongPosVec Short position vector of destination
             */
            template (present) GnNonSecuredPacket mw_geoNwLsReplyPacket(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) ShortPosVector p_destinationLongPosVec
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_lsReplyHeaderType
                ),
                extendedHeader := mw_lsReplyHeader(
                    p_sourceLongPosVec, p_destinationLongPosVec
                ),
                payload := omit
            }
            
        } // end group geoNwPacketLsTemplates
        
        group geoNwPacketBeaconTemplates {
            
            /**
             * @desc    Send template for GeoNetworking Beacon Packet
             * @param   p_sourceLongPosVec  Long position vector of source
             */
            template (value) GnNonSecuredPacket m_geoNwBeaconPacket(
                in template (value) LongPosVector p_sourceLongPosVec
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_beaconHeaderType,
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_beaconHeader(
                    p_sourceLongPosVec
                ),
                payload := omit
            }
            
            /**
             * @desc    Receive template for GeoNetworking Beacon Packet
             * 
             * @param   p_sourceLongPosVec  Long position vector of source (Default: ?)
             */
            template (present) GnNonSecuredPacket mw_geoNwBeaconPacket(
                in template (present) LongPosVector p_sourceLongPosVec := ?
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_beaconHeaderType
                ),
                extendedHeader := mw_beaconHeader(p_sourceLongPosVec),
                payload := omit
            }
            
        } // end group geoNwPacketBeaconTemplates
        
        group geoNwPacketShbTemplates {
            
            /**
             * @desc    Send template for GeoNetworking SHB Packet
             * @param   p_sourceLongPosVec  Long position vector of source
             */
            template (value) GnNonSecuredPacket m_geoNwShbPacket(
                in template (value) LongPosVector p_sourceLongPosVec
            ) := {
                commonHeader := m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_shbHeaderType,
                    m_trafficClass,
                    c_defaultHopLimit
                ),
                extendedHeader := m_shbHeader(
                    p_sourceLongPosVec
                ),
                payload :=  f_adaptPayload_m(char2oct("DEFAULT_PAYLOAD"))
            }
            
            /**
             * @desc    Receive template for GeoNetworking SHB Packet
             * @param   p_sourceLongPosVec  Long position vector of source (Default: ?)
             */
            template (present) GnNonSecuredPacket mw_geoNwShbPacket(
                in template (present) LongPosVector p_sourceLongPosVec := ?
            ) := {
                commonHeader := mw_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_shbHeaderType
                ),
                extendedHeader := mw_shbHeader(p_sourceLongPosVec),
                payload := ?
            }
            
        } // end group geoNwPacketShbTemplates
        
        group geoNwPacketTsbTemplates {
            
            /**