Skip to content
LibItsGeoNetworking_Templates.ttcn 93.1 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
    
    import from LibItsCommon_TypesAndValues all;
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
    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
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
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 := {
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 := {
            }
            
            /**
             * @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,
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
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(
tepelmann's avatar
tepelmann committed
                    lifetime := c_lifetime,
wattelet's avatar
wattelet committed
                    payload := { decodedPayload := omit, rawPayload := ''O} // do not use f_adaptPayload_m here
berge's avatar
berge 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
             * @param   p_lifetime  Packet's lifetime
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoBroadcastMessageWithLifetime(
tepelmann's avatar
tepelmann committed
                UInt16 p_lifetime
berge's avatar
berge committed
            ) modifies m_generateGeoBroadcastMessage := {
            /**
             * @desc    Request IUT to send a GeoBroadcast message to a specific area with a payload
             * @param   p_geoArea   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
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoBroadcastMessageWithPayload(
berge's avatar
berge committed
                octetstring p_payload
            ) modifies m_generateGeoBroadcastMessage := {
                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_geoArea  Destination area of the message
berge's avatar
berge committed
             */
tepelmann's avatar
tepelmann committed
            template (value) UtGnTrigger m_generateGeoAnycastMessage(
tepelmann's avatar
tepelmann committed
                    lifetime := c_lifetime,
wattelet's avatar
wattelet committed
                    payload := { decodedPayload := omit, rawPayload := ''O} // do not use f_adaptPayload_m here
            /**
             * @desc    Request IUT to send a GeoAnycast message to a specific area with a payload
             * @param   p_geoArea   Destination area of the message
Loading full blame...