Skip to content
LibItsGeoNetworking_Templates.ttcn 104 KiB
Newer Older
berge's avatar
berge committed
/**
garciay's avatar
garciay committed
 *  @author     ETSI / STF405 / STF449 / STF484 / STF517
berge's avatar
berge committed
 *  @version    $URL$
 *              $Id$
 *  @desc       GeoNetworking Templates
garciay's avatar
garciay committed
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
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;
filatov's avatar
filatov committed
//    import from LibItsBtp_EncdecDeclarations all;
garciay's avatar
garciay committed
    
    // LibItsSecurity
    import from LibItsSecurity_TypesAndValues all;
filatov's avatar
filatov committed
//    import from LibItsSecurity_Pixits all;
garciay's avatar
garciay committed
    
    // LibItsIpv6OverGeoNetworking
    //import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
    //import from LibItsIpv6OverGeoNetworking_Templates all;
garciay's avatar
garciay committed
    
    // 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;
filatov's avatar
filatov committed
//    import from LibItsGeoNetworking_EncdecDeclarations 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
         * @param   p_its_aid  ITS-AID used in secured mode. Default: 0, means unused
tepelmann's avatar
tepelmann committed
         */
filatov's avatar
filatov committed
        template (omit) GeoNetworkingReq m_geoNwReq_linkLayerBroadcast(
            in template (value) GeoNetworkingPdu p_geoNwMsg,
            in template (value) UInt32 p_its_aid := 0
            macDestinationAddress   := c_llBroadcast,
            its_aid                 := p_its_aid
tepelmann's avatar
tepelmann committed
        
        /**
         * @desc    Send template for GeoNetworking packet (GeonetworkingPort Primitive)
         * @param   p_geoNwMsg              GeoNetworking packet to be sent
         * @param   p_its_aid               ITS-AID used in secured mode. Default: 0, means unused
         * @param   p_llDestinationAdress   Link-layer destination address
tepelmann's avatar
tepelmann committed
         */
filatov's avatar
filatov committed
        template (omit) GeoNetworkingReq m_geoNwReq_withLinkLayerDestination(
            in template (value) GeoNetworkingPdu p_geoNwMsg,
            in template (value) UInt32 p_its_aid := 0,
            in 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.
garciay's avatar
garciay committed
            template (value) UtGnInitialize 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 := valueof(m_trafficClass),
                    payload := ''O
            /**
             * @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 := p_payload
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 := {
                    payload := p_payload
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 := valueof(m_trafficClass),
                    reserved := c_uInt24Zero,
                    payload := ''O

            /**
             * @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
             */
Loading full blame...