Commit f79e5d9f authored by reinaortega's avatar reinaortega
Browse files

Adapting modules for the first example TC

parent b32b1221
Loading
Loading
Loading
Loading
+22 −1
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@
 module LibItsV2G_Functions {
 module LibItsV2G_Functions {
     
     
    // LibCommon
    // LibCommon
    import from LibCommon_Sync all;
    
    
    // LibIts
    // LibIts
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Functions all;
@@ -122,7 +123,7 @@
        function f_cfUp() runs on ItsV2G {
        function f_cfUp() runs on ItsV2G {
            
            
            map(self:utPort, system:utPort);
            map(self:utPort, system:utPort);
            map(self:btpPort, system:btpPort);
            map(self:v2gPort, system:v2gPort);
            f_connect4SelfOrClientSync();
            f_connect4SelfOrClientSync();
            
            
        } // end f_cfUp
        } // end f_cfUp
@@ -186,6 +187,26 @@
			f_prDefault();
			f_prDefault();


        }
        }
        //      E X A M P L E 
		/**
		 * @desc Brings the IUT into Session Discovery state completed.
		 */
		function f_prSessionDiscoveryCompleted() runs on ItsV2G {
    
			f_utInitializeIut(m_v2gInitialize);
			f_prDefault();
			//f_sessionDiscoveryCompleted();

		}
        //		E X A M P L E
		/**
		 * @desc Performs Supported Application Protocol.
		 */
		function f_supportedApplicationCompleted() runs on ItsV2G {

			//TODO

		}
        
        
    } // end of group preambles    
    } // end of group preambles    
    
    
+27 −0
Original line number Original line Diff line number Diff line
/**
 *	@author 	ETSI / STFS46
 *  @version 	$URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/V2G/LibItsV2G_Pics.ttcn $
 *				$Id: LibItsV2G_Pics.ttcn 288 2010-12-13 15:35:53Z reinaortega $
 *	@desc		V2G PICS
 *
 */
module LibItsV2G_Pics {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    
    group v2gPics {
        
        
        // E X A M P L E
        /**
         * @desc EVCC sequence performance time 
         * @see  PICS doc v1.1.1 A.2/1 
         */
		modulepar float PICS_EVCC_SEQUENCE_PERFORMANCE_TIME := 10.0;


    	        
    } // end v2gPics
    
} // end LibItsV2G_Pics
+41 −2
Original line number Original line Diff line number Diff line
@@ -12,6 +12,10 @@ module LibItsV2G_Templates {
    import from LibItsV2G_TypesAndValues all;
    import from LibItsV2G_TypesAndValues all;
    import from LibItsV2G_Pixits all;
    import from LibItsV2G_Pixits all;
    
    
    //XSD
    import from iso_15118_2_2010_MsgDef all;
    import from iso_15118_2_2010_MsgDataTypes all;
        
    group v2gPrimitivesTemplates {
    group v2gPrimitivesTemplates {


        
        
@@ -30,9 +34,9 @@ module LibItsV2G_Templates {
             * @desc Upper Tester template for checking that V2G payload has been transmitted to upper layer
             * @desc Upper Tester template for checking that V2G payload has been transmitted to upper layer
             * @param p_payload Payload to be checked
             * @param p_payload Payload to be checked
             */
             */
            template (value) UtEvent m_checkPayload(in V2Gpayload p_payload) := {
            template (value) UtEvent m_checkPayload(in V2G_Message.Body p_body) := {
                utV2Gevent := {
                utV2Gevent := {
                    payload := p_payload
                    v2gBody := p_body
                }
                }
            }
            }
            
            
@@ -42,6 +46,41 @@ module LibItsV2G_Templates {
    
    
    group v2gPduTemplates {
    group v2gPduTemplates {
    	
    	
		/**
		* @desc    Receive template for V2G Message (V2Gport Primitive)
		* @param   p_v2gMsg V2G Message to be received
		*/
	   template V2Gind mw_v2gInd (
		   in template (present) V2G_Message p_v2gMsg
	   ) := { 
		   msgIn := p_v2gMsg 
	   };

	   /**
		* @desc    Send template for V2G Message (V2Gport Primitive)
		* @param   p_v2gMsg V2G Message to be sent
		*/    
	   template (value) V2Greq m_v2gReq (
		   in template (value) V2G_Message p_v2gMsg
	   ) := { 
		   msgOut := p_v2gMsg 
	   };
	   
	   //      E X A M P L E 
	   /**
		* @desc    Receive template for V2G Message for Session Request
		*/
	   template V2G_Message mw_v2gMsg_sessionRequest (in template (present) sessionIDType_TYPE p_sId,
	     in template (present) evccIDType_TYPE p_evccId
	   ):= {
		   Header := {
			   SessionID := p_sId
		   },
		   Body := {//p_evccId
			   }
		   }
	   

    } // end v2gPduTemplates
    } // end v2gPduTemplates
    
    
    
    
+10 −2
Original line number Original line Diff line number Diff line
@@ -15,6 +15,10 @@ module LibItsV2G_TestSystem {
    import from LibItsCommon_TestSystem all;
    import from LibItsCommon_TestSystem all;
    import from LibItsV2G_TypesAndValues all;
    import from LibItsV2G_TypesAndValues all;
    
    
    //XSD
    import from iso_15118_2_2010_MsgDef all;
	import from iso_15118_2_2010_MsgDataTypes all;
    
    group portDefinitions {
    group portDefinitions {
    
    
        /**
        /**
@@ -77,6 +81,10 @@ module LibItsV2G_TestSystem {
                
                
        // timers
        // timers
        
        
        // Global variables    E X A M P L E 
        var sessionIDType_TYPE vc_sId;
		var evccIDType_TYPE vc_evccId;
                
    } // End of component ItsV2G
    } // End of component ItsV2G
        
        
    group v2gApplicationLayerPrimitives { 
    group v2gApplicationLayerPrimitives { 
@@ -87,14 +95,14 @@ module LibItsV2G_TestSystem {
             * @desc XXX V2G Indication Primitive 
             * @desc XXX V2G Indication Primitive 
             */
             */
            type record V2Gind {
            type record V2Gind {
                V2Gpacket msgIn
				V2G_Message msgIn
            }
            }
        
        
            /**
            /**
             * @desc XXX V2G Request Primitive 
             * @desc XXX V2G Request Primitive 
             */
             */
            type record V2Greq {
            type record V2Greq {
                V2Gpacket msgOut
				V2G_Message msgOut
            }
            }
                        
                        
        } // end xxxPrimitives
        } // end xxxPrimitives
+7 −7
Original line number Original line Diff line number Diff line
@@ -11,12 +11,12 @@ module LibItsV2G_TypesAndValues {
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_BasicTypesAndValues all;
    
    
    // LibIts
    // LibIts
	import from iso_15118_2_2010_MsgBody all; //language "XSD" all with {extension "File:V2G_CI_MsgBody.xsd" };
	//import from iso_15118_2_2010_MsgBody all; //language "XSD" all with {extension "File:V2G_CI_MsgBody.xsd" };
	import from iso_15118_2_2010_AppProtocol all;//language "XSD" all with {extension "File:XSD/V2G_CI_AppProtocol.xsd" };
	//import from iso_15118_2_2010_AppProtocol all;//language "XSD" all with {extension "File:XSD/V2G_CI_AppProtocol.xsd" };
	import from iso_15118_2_2010_MsgDataTypes all;//language "XSD" all with {extension "File:XSD/V2G_CI_MsgDataTypes.xsd" };
	//import from iso_15118_2_2010_MsgDataTypes all;//language "XSD" all with {extension "File:XSD/V2G_CI_MsgDataTypes.xsd" };
	import from iso_15118_2_2010_MsgDef all;//language "XSD" all with {extension "File:XSD/V2G_CI_MsgDef.xsd" };
	import from iso_15118_2_2010_MsgDef all;//language "XSD" all with {extension "File:XSD/V2G_CI_MsgDef.xsd" };
	import from iso_15118_2_2010_MsgHeader all;//language "XSD" all with {extension "File:XSD/V2G_CI_MsgHeader.xsd" };
	//import from iso_15118_2_2010_MsgHeader all;//language "XSD" all with {extension "File:XSD/V2G_CI_MsgHeader.xsd" };
	import from org_w3_www__2000_09_xmldsig all;//language "XSD" all with {extension "File:XSD/xmldsig-core-schema.xsd" };
	//import from org_w3_www__2000_09_xmldsig all;//language "XSD" all with {extension "File:XSD/xmldsig-core-schema.xsd" };
    
    
    group v2gPdus {
    group v2gPdus {
     
     
@@ -84,8 +84,8 @@ module LibItsV2G_TypesAndValues {
         * @desc Upper Tester message generating V2G message
         * @desc Upper Tester message generating V2G message
         */
         */
        type union UtV2Gevent {
        type union UtV2Gevent {
			iso_15118_2_2010_MsgDef.V2G_Message.Header   v2gHeader,
			V2G_Message.Header   v2gHeader,
			iso_15118_2_2010_MsgDef.V2G_Message.Body     v2gBody
			V2G_Message.Body     v2gBody
        }
        }
        
        
    } // end utPrimitives
    } // end utPrimitives