Skip to content
LibItsGeoNetworking_TestSystem.ttcn 6.65 KiB
Newer Older
reinaortega's avatar
reinaortega committed
/**
garciay's avatar
garciay committed
 *  @author     ETSI / STF405 / STF449 / STF484 / STF517
filatov's avatar
filatov committed
 *  @version    $URL$
 *              $Id$
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_Time {modulepar all};
    import from LibCommon_Sync all;
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings 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

//FIXME RGY As discussed, boolean results are replaced by a top-level union of results
//                AcGnResponse, AcGn6Response, AcGnssResponse, AcGnssDistanceCovered, AcSecResponse;
                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
                UtInitialize, UtChangePosition, UtGnTrigger;
tepelmann's avatar
tepelmann committed
            in
filatov's avatar
filatov committed
//FIXME RGY As discussed, boolean results are replaced by a top-level union of results
//                UtInitializeResult, UtChangePositionResult, UtGnTriggerResult, UtGnEventInd;
                UtCommonResults, UtGnTriggerResult, 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
//FIXME RGY ItsMtc can extend ItsBaseGeoNetworking instead of ItsSecurityBaseComponent, as it contains
//          everything defined here but vc_componentTable and already extends ItsSecurityBaseComponent
//          also, ItsBaseMtc already extends ServerSyncComp
//        type component ItsMtc extends ItsBaseMtc, ServerSyncComp, ItsSecurityBaseComponent { // TODO Extend ItsBaseMtc with ItsSecurityBaseComponent? {
        type component ItsMtc extends ItsBaseMtc, ItsBaseGeoNetworking {
/*FIXME RGY all these objects are inherited from ItsBaseGeoNetworking, they shall not be defined again: see $6.2.10.2
reinaortega's avatar
reinaortega committed
            port UpperTesterPort utPort;
tepelmann's avatar
tepelmann committed
            port AdapterControlPort acPort;
filatov's avatar
filatov committed
*/            
            var ComponentTable vc_componentTable := {};
filatov's avatar
filatov committed
/*
            // 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;
filatov's avatar
filatov committed
*/        
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
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
reinaortega's avatar
reinaortega committed
            }
            
        } // end nt2Primitives
        
tepelmann's avatar
tepelmann committed
    } // End of group networkAndTransportPrimitives
reinaortega's avatar
reinaortega committed
    with {
        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