Commit ae07bf23 authored by plazaortega's avatar plazaortega
Browse files

SDP message and values definitions

SDP message template examples
V2Gport redefinition considering SDP messages
parent f79e5d9f
Loading
Loading
Loading
Loading
+38 −7
Original line number Diff line number Diff line
@@ -50,10 +50,20 @@ module LibItsV2G_Templates {
		* @desc    Receive template for V2G Message (V2Gport Primitive)
		* @param   p_v2gMsg V2G Message to be received
		*/
	   template V2Gind mw_v2gInd (
	   template V2Gind mw_v2gMessageInd (
		   in template (present) V2G_Message p_v2gMsg
	   ) := { 
		   msgIn := p_v2gMsg 
		   v2gIn := p_v2gMsg 
	   };

	   		/**
		* @desc    Receive template for SDP Message (V2Gport Primitive)
		* @param   p_sdpMsg SDP Message to be received
		*/
	   template V2Gind mw_sdpMessageInd (
		   in template (present) Sdp_Message p_sdpMsg
	   ) := { 
		   sdpIn := p_sdpMsg 
	   };

	   /**
@@ -63,7 +73,7 @@ module LibItsV2G_Templates {
	   template (value) V2Greq m_v2gReq (
		   in template (value) V2G_Message p_v2gMsg
	   ) := { 
		   msgOut := p_v2gMsg 
		   v2gOut := p_v2gMsg 
	   };
	   
	   //      E X A M P L E 
@@ -71,15 +81,36 @@ module LibItsV2G_Templates {
		* @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
	   ):= {
	     in template (present) evccIDType_TYPE p_evccId ):= {
		   Header := {
			   SessionID := p_sId
			   SessionID := p_sId,
			   Notification := omit,
			   Signature := omit
		   },
		   Body := {//p_evccId
		   Body := {
			   BodyElement := omit//p_evccId
			   }
		   }
	   
		template Sdp_Header m_sdpHeaderRequest := {
			protocolVersion := c_protocolVersion1,
			inverseProtocolVersion := c_inverseProtocolVersion1,
			payloadType := c_sdpRequestMessagePayloadType,
			payloadLength := 2
		}

		template Sdp_Payload m_sdpPayloadRequest := {
			seccIPAddress := omit,
			seccPort := omit,
			security := ?,
			transportProtocol := ?
		}

		template Sdp_Message mw_sdpMessage (in template Sdp_Header p_sdpH,
		in template Sdp_Payload p_sdpP) := {
			sdpHeader := p_sdpH,
			sdpPayload := p_sdpP
		}

    } // end v2gPduTemplates
    
+6 −4
Original line number Diff line number Diff line
@@ -94,15 +94,17 @@ module LibItsV2G_TestSystem {
            /**
             * @desc XXX V2G Indication Primitive 
             */
            type record V2Gind {
				V2G_Message msgIn
            type union V2Gind {
				V2G_Message v2gIn,
				Sdp_Message	sdpIn
            }
        
            /**
             * @desc XXX V2G Request Primitive 
             */
            type record V2Greq {
				V2G_Message msgOut
            type union V2Greq {
				V2G_Message v2gOut,
				Sdp_Message	sdpOut
            }
                        
        } // end xxxPrimitives
+65 −7
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ module LibItsV2G_TypesAndValues {

    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    // LibIts
	//import from iso_15118_2_2010_MsgBody all; //language "XSD" all with {extension "File:V2G_CI_MsgBody.xsd" };
@@ -20,19 +21,59 @@ module LibItsV2G_TypesAndValues {
    
    group v2gPdus {
     
        group SDPMessages {

			/**
	         * @desc SDP (Session Discovery Protocol) message description
	         */
	        type record Sdp_Message {
	            Sdp_Header sdpHeader,
				Sdp_Payload	sdpPayload
	        }
		}
    } // end v2gPdus
    
    group v2gHeaders {
        
		 group SDPMessages {

			 /**
	         * @desc SDP (Session Discovery Protocol) Header description 
	         */
	        type record Sdp_Header {
				Oct1 protocolVersion,
				Oct1 inverseProtocolVersion,
				Oct2 payloadType,
				UInt16 payloadLength
	        }
		 }
             
    } // end v2gHeaders

    group v2gPayload {

		group SDPMessages {
			 /**
	         * @desc SDP (Session Discovery Protocol) Payload description 
	         */
	        type record Sdp_Payload {
				Ipv6Address seccIPAddress optional, // IPv6
				UInt16 seccPort optional,
				Oct1 security,
				Oct1 transportProtocol
	        }
		 }
       
    } //end v2gPayload

	group IPAddress
	{
		/**
         * @desc IPv6 Address
         */
        type Oct16 Ipv6Address;
	} // end IPAddress

    group utPrimitives {
    	
    	group utCommonPrimitives {
@@ -90,6 +131,23 @@ module LibItsV2G_TypesAndValues {
        
    } // end utPrimitives
    
	group sdpValues {

		const Oct1 c_protocolVersion1 := '01'O;
		const Oct1 c_inverseProtocolVersion1 := 'FE'O;

		const Oct2 c_sdpRequestMessagePayloadType := '9000'O;
		const Oct2 c_sdpResponseMessagePayloadType := '9001'O;

		const Oct1 c_securedwithTLS := '00'O;
		const Oct1 c_noTransportLayerSecurity := '10'O;

		const Oct1 c_transportProtocolTCP := '00'O;
		const Oct1 c_transportProtocolUDP := '10'O;

		const UInt16 c_V2G_UDP_SDP_SERVER := 15118;

	} // end sdpValues
}
with {
    encode "LibItsV2G_TypesAndValues"