LibItsGeoNetworking_TestSystem.ttcn 5.84 KB
Newer Older
reinaortega's avatar
reinaortega committed
/**
garciay's avatar
garciay committed
 *  @author     ETSI / STF405 / STF449 / STF484 / STF517
garciay's avatar
garciay committed
 *  @version    $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_TestSystem.ttcn $
 *              $Id: LibItsGeoNetworking_TestSystem.ttcn 1318 2017-01-26 10:20:53Z filatov $
tepelmann's avatar
tepelmann committed
 *  @desc       Test System module for ITS GeoNetworking
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.
reinaortega's avatar
reinaortega committed
 *
 */
module LibItsGeoNetworking_TestSystem {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
Yann Garcia's avatar
Yann Garcia committed
    import from LibCommon_Sync all;
tepelmann's avatar
tepelmann committed
    
tepelmann's avatar
tepelmann committed
    import from LibItsCommon_TestSystem all;
    import from LibItsCommon_TypesAndValues all;
reinaortega's avatar
reinaortega committed
    import from LibItsExternal_TypesAndValues all;
    
    // LibItsGeoNetworking
    import from LibItsGeoNetworking_TypesAndValues all;
reinaortega's avatar
reinaortega committed
    
    // LibItsSecurity
    import from LibItsSecurity_TestSystem all;
    
    import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
    
reinaortega's avatar
reinaortega committed
    group portDefinitions {
tepelmann's avatar
tepelmann committed
        
reinaortega's avatar
reinaortega committed
        /**
         * @desc Adapter control port
         */
        type port AdapterControlPort message {
tepelmann's avatar
tepelmann committed
            out
                AcGnPrimitive, AcGn6Primitive, AcGnssPrimitive, AcSecPrimitive;
tepelmann's avatar
tepelmann committed
            in
filatov's avatar
filatov committed
                AcGnResponse, AcGn6Response, AdapterControlResults;
reinaortega's avatar
reinaortega committed
        } // end AdapterControlPort
tepelmann's avatar
tepelmann committed
        
reinaortega's avatar
reinaortega committed
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
tepelmann's avatar
tepelmann committed
            out
garciay's avatar
garciay committed
                UtGnInitialize, UtGnChangePosition, UtAutoInteropTrigger, UtGnTrigger; // FIXME Remove UtAutoInteropTrigger from GN component, create an AutoInterop component
tepelmann's avatar
tepelmann committed
            in
garciay's avatar
garciay committed
                UtGnResults, UtGnEventInd;
reinaortega's avatar
reinaortega committed
        } // end UpperTesterPort
        
    } // end portDefinitions
tepelmann's avatar
tepelmann committed
    
reinaortega's avatar
reinaortega committed
    group interfacePorts {
tepelmann's avatar
tepelmann committed
        
reinaortega's avatar
reinaortega committed
        group networkAndTransportPorts {
            
            group nt2Ports {
tepelmann's avatar
tepelmann committed
                
reinaortega's avatar
reinaortega committed
                /**
tepelmann's avatar
tepelmann committed
                 * @desc NT2 GeoNetworking Port (GeoNetworking/G5)
reinaortega's avatar
reinaortega committed
                 */
                type port GeoNetworkingPort message {
                    in GeoNetworkingInd;
                    out GeoNetworkingReq;
                } // end GeoNetworkingPort
                
            } // End of group nt2Ports
            
        } // End of group networkAndTransportPorts
    
    } // End of group interfacePorts
    
    group componentDefinitions {
tepelmann's avatar
tepelmann committed
        
reinaortega's avatar
reinaortega committed
        /**
tepelmann's avatar
tepelmann committed
         * @desc ITS Main Test Component
reinaortega's avatar
reinaortega committed
         */
filatov's avatar
filatov committed
        type component ItsMtc extends ItsBaseMtc, ItsBaseGeoNetworking {
            var ComponentTable vc_componentTable := {};
reinaortega's avatar
reinaortega committed
        } // end ItsMtc
tepelmann's avatar
tepelmann committed
        
reinaortega's avatar
reinaortega committed
        /**
         * @desc ITS System Adapter
         */
        type component ItsGeoNetworkingSystem {
            
            port UpperTesterPort utPort;
            port AdapterControlPort acPort;
            
            // NT2 ports
            port GeoNetworkingPort geoNetworkingPort;
            
        } // end ItsGeoNetworkingSystem
        
    } // End of group componentDefinitions
tepelmann's avatar
tepelmann committed
    
filatov's avatar
filatov committed
    type component ItsBaseGeoNetworking extends ItsBaseComponent, ItsSecurityBaseComponent {
tepelmann's avatar
tepelmann committed
        
        port UpperTesterPort utPort;
reinaortega's avatar
reinaortega committed
        port AdapterControlPort acPort;
        
        // UT indications
        var UtGnEventIndList vc_utInds := {};
        
garciay's avatar
garciay committed
        var boolean vc_utDefaultActive := true;
        var boolean vc_acDefaultActive := true;
        var boolean vc_gnDefaultActive := true;
        
reinaortega's avatar
reinaortega committed
    }
tepelmann's avatar
tepelmann committed
    
    /**
     * @desc Test component for ITS Network and Transport layer
reinaortega's avatar
reinaortega committed
     */
    type component ItsGeoNetworking extends ItsBaseGeoNetworking {
        
        // NT2 ports
        port GeoNetworkingPort geoNetworkingPort;
        
        //variables for Gn
        var UInt16 vc_localSeqNumber := 0; 
reinaortega's avatar
reinaortega committed
        var PositionTable vc_positionTable := {};
        var GeoAreaTable vc_areaTable := {};
        var charstring vc_componentName := "";
        var default vc_neighbourDefault;
        var integer vc_multipleMessagesCount := 0; 
tepelmann's avatar
tepelmann committed
        
reinaortega's avatar
reinaortega committed
    } // End of component ItsGeoNetworking
    
tepelmann's avatar
tepelmann committed
    group networkAndTransportPrimitives {
        
reinaortega's avatar
reinaortega committed
        group nt2Primitives {
            
            /**
tepelmann's avatar
tepelmann committed
             * @desc NT2 GeoNetworking Indication Primitive
reinaortega's avatar
reinaortega committed
             */
            type record GeoNetworkingInd {
tepelmann's avatar
tepelmann committed
                GeoNetworkingPdu    msgIn,
                Bit256              ssp optional,
garciay's avatar
garciay committed
                UInt32              its_aid optional
            } with {
                //encode "RAW"; 
                variant "FIELDORDER(msb)" 
tepelmann's avatar
tepelmann committed
             * @desc NT2 GeoNetworking Request Primitive
reinaortega's avatar
reinaortega committed
             */
            type record GeoNetworkingReq {
tepelmann's avatar
tepelmann committed
                GeoNetworkingPdu    msgOut,
                MacAddress          macDestinationAddress,
                UInt32              its_aid
            } with {
                //encode "RAW"; 
                 variant "FIELDORDER(msb)" 
reinaortega's avatar
reinaortega committed
            }
            
        } // end nt2Primitives
        
tepelmann's avatar
tepelmann committed
    } // End of group networkAndTransportPrimitives
reinaortega's avatar
reinaortega committed
    with {
        variant ""
reinaortega's avatar
reinaortega committed
        encode "LibIts_Interface"
tepelmann's avatar
tepelmann committed
    } // end interfacePrimitives
    
    group misc {
        
        type record ComponentEntry {
           charstring          componentName,
           ItsGeoNetworking    gnComponent optional
        }
        
        type record of ComponentEntry ComponentTable;
        
    } // end misc
    
reinaortega's avatar
reinaortega committed
} // End of module LibItsGeoNetworking_TestSystem