Skip to content
LibItsGeoNetworking_TestSystem.ttcn 5.3 KiB
Newer Older
reinaortega's avatar
reinaortega committed
/**
tepelmann's avatar
tepelmann committed
 *  @author     ETSI / STF405 / STF449
filatov's avatar
filatov committed
 *  @version    $URL$
 *              $Id$
tepelmann's avatar
tepelmann committed
 *  @desc       Test System module for ITS GeoNetworking
reinaortega's avatar
reinaortega committed
 *
 */
module LibItsGeoNetworking_TestSystem {
    
    // LibCommon
    import from LibCommon_Time {modulepar all};
    import from LibCommon_Sync all;
    import from LibCommon_BasicTypesAndValues {
        type UInt16;
        const c_uInt16Max
reinaortega's avatar
reinaortega committed
    };
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;
tepelmann's avatar
tepelmann committed
            in
                AcGnResponse, AcGn6Response, AcGnssResponse, AcGnssDistanceCovered;
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
berge's avatar
berge committed
                UtInitializeResult, UtChangePositionResult, 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
         */
        type component ItsMtc extends ItsBaseMtc, ServerSyncComp, ItsSecurityBaseComponent { // TODO Extend ItsBaseMtc with ItsSecurityBaseComponent? {
tepelmann's avatar
tepelmann committed
            
reinaortega's avatar
reinaortega committed
            port UpperTesterPort utPort;
tepelmann's avatar
tepelmann committed
            port AdapterControlPort acPort;
            
            var ComponentTable vc_componentTable := {};
            
            // UT indications
            var UtGnEventIndList vc_utInds := {};
            
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
    
    type component ItsBaseGeoNetworking extends ItsBaseComponent, ItsSecurityBaseComponent { // TODO Extend ItsBaseComponent with ItsSecurityBaseComponent?
tepelmann's avatar
tepelmann committed
        
        port UpperTesterPort utPort;
reinaortega's avatar
reinaortega committed
        port AdapterControlPort acPort;
        
        // UT indications
        var UtGnEventIndList vc_utInds := {};
        
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,
                MacAddress          macDestinationAddress,
                octetstring         ssp optional,
                octetstring         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
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