LibItsGeoNetworking_TestSystem.ttcn 4.2 KB
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
    };

    // LibIts
    import from LibItsCommon_TestSystem all;
    import from LibItsGeoNetworking_TypesAndValues all;
    import from LibItsIpv6OverGeoNetworking_TypesAndValues all;    
    import from LibItsExternal_TypesAndValues all;
    
    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, UtTrigger, UtCheck;
            in 
                UtResult;
        } // 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 := 0;
        var PositionTable vc_positionTable := {};
        var GeoAreaTable vc_areaTable := {};
        var charstring vc_componentName := "";
        var default vc_neighbourDefault;
                    
    } // End of component ItsGeoNetworking
    
    group networkAndTransportPrimitives { 
            
        group nt2Primitives {
            
            /**
             * @desc NT2 GeoNetworking Indication Primitive 
             */
            type record GeoNetworkingInd {
                GeoNetworkingPacket msgIn,
                MacAddress macDestinationAddress
            }
            
            /**
             * @desc NT2 GeoNetworking Request Primitive 
             */
            type record GeoNetworkingReq {
                GeoNetworkingPacket msgOut,
                MacAddress macDestinationAddress
            }
            
        } // end nt2Primitives
        
    } // End of group networkAndTransportPrimitives    
    with {
        encode "LibIts_Interface"
    } // end interfacePrimitives    
            
} // End of module LibItsGeoNetworking_TestSystem