Skip to content
LibItsGeoNetworking_Templates.ttcn 102 KiB
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
    
garciay's avatar
garciay committed
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
garciay's avatar
garciay committed
    import from LibItsExternal_TypesAndValues all;
    
    // LibItsBtp
    import from LibItsBtp_Templates all;
    
    // LibItsSecurity
    import from LibItsSecurity_TypesAndValues all;
    import from LibItsSecurity_Pixits all;
    
    // LibItsIpv6OverGeoNetworking
    import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
    import from LibItsIpv6OverGeoNetworking_Templates all;
    
    // AtsGeoNetworking
reinaortega's avatar
reinaortega committed
    import from LibItsGeoNetworking_TestSystem all;
tepelmann's avatar
tepelmann committed
    import from LibItsGeoNetworking_TypesAndValues all;
reinaortega's avatar
reinaortega committed
    import from LibItsGeoNetworking_Pixits 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
tepelmann's avatar
tepelmann committed
         */
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
tepelmann's avatar
tepelmann committed
         */
        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
tepelmann's avatar
tepelmann committed
         */
        template GeoNetworkingInd mw_geoNwInd(
tepelmann's avatar
tepelmann committed
            template (present) GeoNetworkingPdu p_geoNwMsg
            msgIn                   := p_geoNwMsg,
            macDestinationAddress   := ?,
            ssp                     := *,
            its_aid                 := *
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 := {
tepelmann's avatar
tepelmann committed
            macDestinationAddress := p_llDestinationAdress
tepelmann's avatar
tepelmann committed
        
        group utPrimitives {
            
tepelmann's avatar
tepelmann committed
             * @desc Initializes the GN IUT.
             */
            template (value) UtInitialize m_gnInitialize := {
garciay's avatar
garciay committed
                hashedId8 := '0000000000000000'O
            /**
             * @desc    Request IUT to send a GeoUnicast message to a specific destination
tepelmann's avatar
tepelmann committed
             * @param   p_destinationGnAddr Destination of the GeoUnicast message
berge's avatar
berge committed
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoUnicastMessage(GN_Address p_destinationGnAddr) := {
                geoUnicast := {
tepelmann's avatar
tepelmann committed
                    lifetime := c_lifetime,
                    trafficClass := m_trafficClass,
wattelet's avatar
wattelet committed
                    payload := { decodedPayload := omit, rawPayload := ''O} // do not use f_adaptPayload_m here
            /**
             * @desc    Request IUT to send a GeoUnicast message to a specific destination with specific lifetime
             * @param   p_destinationGnAddr Destination of the GeoUnicast message
             * @param   p_trafficClass      TrafficClass of the GeoUnicast message
             * @see     m_generateGeoUnicastMessage
             */
            template (value) UtGnTrigger m_generateGeoUnicastMessageWithTrafficClass(
                GN_Address p_destinationGnAddr,
                TrafficClass p_trafficClass
            ) modifies m_generateGeoUnicastMessage := {
                geoUnicast := {
                    trafficClass := p_trafficClass
                }
            }
                        
            /**
             * @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
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoUnicastMessageWithLifetime(
                GN_Address p_destinationGnAddr,
tepelmann's avatar
tepelmann committed
                UInt16 p_lifetime
            ) modifies m_generateGeoUnicastMessage := {
            /**
             * @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
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoUnicastMessageWithPayload(
                GN_Address p_destinationGnAddr,
berge's avatar
berge committed
                octetstring p_payload
            ) modifies m_generateGeoUnicastMessage := {
                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
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoUnicastMessageWithLifetimeWithPayload(
tepelmann's avatar
tepelmann committed
                GN_Address p_destinationGnAddr,
tepelmann's avatar
tepelmann committed
                UInt16 p_lifetime,
tepelmann's avatar
tepelmann committed
                octetstring p_payload
            ) modifies m_generateGeoUnicastMessageWithLifetime := {
                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 GeoBroadcast message to a specific area
             * @param   p_geoArea  Destination area of the message
berge's avatar
berge committed
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoBroadcastMessage(
garciay's avatar
garciay committed
                    shape := p_geoArea.shape,
tepelmann's avatar
tepelmann committed
                    lifetime := c_lifetime,
                    trafficClass := m_trafficClass,
                    reserved := c_uInt24Zero,
wattelet's avatar
wattelet committed
                    payload := { decodedPayload := omit, rawPayload := ''O} // do not use f_adaptPayload_m here

            /**
             * @desc    Request IUT to send a GeoBroadcast message to a specific area
             * @param   p_geoArea           Destination area of the message
             * @param   p_trafficClass      TrafficClass of the GeoUnicast message
             */
            template (value) UtGnTrigger m_generateGeoBroadcastMessageWithTrafficClass(
                GeoArea p_geoArea,
                TrafficClass p_trafficClass
            ) modifies m_generateGeoBroadcastMessage := {
                geoBroadcast := {
                    trafficClass := p_trafficClass
                }
            }
                        
berge's avatar
berge committed
            /**
             * @desc    Request IUT to send a GeoBroadcast message to a specific area
Loading full blame...