Skip to content
LibItsGeoNetworking_TestSystem.ttcn 4.51 KiB
Newer Older
reinaortega's avatar
reinaortega committed
/**
 *    @author     ETSI / STF405
 *  @version     $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/LibIts_TestSystem.ttcn $
 *                $Id: LibIts_TestSystem.ttcn 408 2012-02-28 13:49:56Z garciay $
 *    @desc        Test System module for ITS GeoNetworking
 *
 */
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
    };

    // LibIts
    import from LibItsCommon_TestSystem all;    
    import from LibItsCommon_TypesAndValues all;
reinaortega's avatar
reinaortega committed
    import from LibItsGeoNetworking_TypesAndValues all;
    import from LibItsIpv6OverGeoNetworking_TypesAndValues all;    
    import from LibItsExternal_TypesAndValues all;
    import from LibItsGeoNetworking_Functions all;
reinaortega's avatar
reinaortega committed
    
    group portDefinitions {
    
        /**
         * @desc Adapter control port
         */
        type port AdapterControlPort message {
            out 
                AcGnPrimitive, AcGn6Primitive;
            in 
                AcGnResponse, AcGn6Response;
        } // end AdapterControlPort

        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
                UtInitialize, UtChangePosition, UtGnTrigger, UtCheck;
reinaortega's avatar
reinaortega committed
            in 
                UtInitializeResult, UtChangePositionResult, UtResult;
reinaortega's avatar
reinaortega committed
        } // end UpperTesterPort
        
    } // end portDefinitions

    group interfacePorts {

        group networkAndTransportPorts {
            
            group nt2Ports {

                /**
                 * @desc NT2 GeoNetworking Port (GeoNetworking/G5) 
                 */
                type port GeoNetworkingPort message {
                    in GeoNetworkingInd;
                    out GeoNetworkingReq;
                } // end GeoNetworkingPort
                
            } // End of group nt2Ports
            
        } // End of group networkAndTransportPorts
    
    } // End of group interfacePorts
    
    group componentDefinitions {

        /**
         * @desc ITS Main Test Component 
         */
        type component ItsMtc extends ItsBaseMtc, ServerSyncComp {

            port UpperTesterPort utPort;
            port AdapterControlPort acPort;  

        } // end ItsMtc
    
        /**
         * @desc ITS System Adapter
         */
        type component ItsGeoNetworkingSystem {
            
            port UpperTesterPort utPort;
            port AdapterControlPort acPort;
            
            // NT2 ports
            port GeoNetworkingPort geoNetworkingPort;
            
        } // end ItsGeoNetworkingSystem
        
    } // End of group componentDefinitions

    type component ItsBaseGeoNetworking extends ItsBaseComponent {
    	
    	port UpperTesterPort utPort;
        port AdapterControlPort acPort;
        
    }

	/**
     * @desc Test component for ITS Network and Transport layer 
     */
    type component ItsGeoNetworking extends ItsBaseGeoNetworking {
        
        // NT2 ports
        port GeoNetworkingPort geoNetworkingPort;
        
        //variables for Gn
        var UInt16 vc_localSeqNumber := f_getInitialSequenceNumber();
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 := f_getMessageCount();
                            
reinaortega's avatar
reinaortega committed
    } // End of component ItsGeoNetworking
    
    group networkAndTransportPrimitives { 
            
        group nt2Primitives {
            
            /**
             * @desc NT2 GeoNetworking Indication Primitive 
             */
            type record GeoNetworkingInd {
tepelmann's avatar
tepelmann committed
                GeoNetworkingPdu    msgIn,
                MacAddress          macDestinationAddress
reinaortega's avatar
reinaortega committed
            }
            
            /**
             * @desc NT2 GeoNetworking Request Primitive 
             */
            type record GeoNetworkingReq {
tepelmann's avatar
tepelmann committed
                GeoNetworkingPdu    msgOut,
                MacAddress          macDestinationAddress
reinaortega's avatar
reinaortega committed
            }
            
        } // end nt2Primitives
        
    } // End of group networkAndTransportPrimitives    
    with {
        encode "LibIts_Interface"
    } // end interfacePrimitives    
            
} // End of module LibItsGeoNetworking_TestSystem