Browse Source

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@52 d9f2db14-54d0-4bde-b00c-16405c910529

sebastiankb 14 năm trước cách đây
mục cha
commit
c9210283c7
3 tập tin đã thay đổi với 11 bổ sung43 xóa
  1. 2 0
      .cproject
  2. 0 34
      src/service/v2g_serviceDataSerialization.c
  3. 9 9
      src/service/v2g_serviceDispatcher.c

+ 2 - 0
.cproject

@@ -40,6 +40,8 @@
 <option id="gnu.c.compiler.option.debugging.level.890071608" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
 <option id="gnu.c.compiler.option.warnings.pedantic.1983095151" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
 <option id="gnu.c.compiler.option.misc.ansi.1916749690" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
+<option id="gnu.c.compiler.option.warnings.toerrors.990186240" superClass="gnu.c.compiler.option.warnings.toerrors" value="false" valueType="boolean"/>
+<option id="gnu.c.compiler.option.warnings.pedantic.error.145905553" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="true" valueType="boolean"/>
 <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1904654876" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
 </tool>
 <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.1907160138" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base">

+ 0 - 34
src/service/v2g_serviceDataSerialization.c

@@ -316,40 +316,6 @@ static int serialize_SignedInfoType(struct SignedInfoType* type, struct EXIServi
 
 				
 
-	return 0;			
-}
-
-
-static int serialize_SignatureValueType(struct SignatureValueType* type, struct EXIService* service)
-{
-
-	/* element ID assignment of attr_Id*/
-	service->eqn.namespaceURI=0;
-	service->eqn.localPart=2;
-	/* encode start element attr_Id */
-	if (exiEncodeStartElement(&(service->outStream), &(service->stateEncode), &(service->eqn)))
-	{
-			return -1;
-	}
-
-	service->val.type = STRING;
-/* service->val.string.len = type->attr_Id.arraylen.data;
-	service->val.string.codepoints = type->attr_Id.data;
-*/
-	/* encode character  attr_Id */
-	if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
-	{
-
-			return -1;
-	}
-
-
-	/* encode end element of attr_Id */
-	exiEncodeEndElement(&(service->outStream), &(service->stateEncode));
-
-
-
-
 	return 0;			
 }
 

+ 9 - 9
src/service/v2g_serviceDispatcher.c

@@ -45,19 +45,19 @@
 static int deserializeMessage(struct EXIService* service);
 
 
-static int _setInt32Value(integer_t* iv, int32_t* int32) {
+static int _setUInt32Value(integer_t* iv, uint32_t* uint32) {
 	int errn = 0;
 	switch(iv->type) {
 	/* Unsigned Integer */
 	case UNSIGNED_INTEGER_8:
-		*int32 = iv->val.uint8;
+		*uint32 = iv->val.uint8;
 		break;
 	case UNSIGNED_INTEGER_16:
-		*int32 = iv->val.uint16;
+		*uint32 = iv->val.uint16;
 		break;
 	case UNSIGNED_INTEGER_32:
 		if (iv->val.uint32 <= 2147483647) {
-			*int32 = iv->val.uint32;
+			*uint32 = iv->val.uint32;
 		} else {
 			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
 		}
@@ -67,13 +67,13 @@ static int _setInt32Value(integer_t* iv, int32_t* int32) {
 		break;
 	/* (Signed) Integer */
 	case INTEGER_8:
-		*int32 = iv->val.int8;
+		*uint32 = iv->val.int8;
 		break;
 	case INTEGER_16:
-		*int32 = iv->val.int16;
+		*uint32 = iv->val.int16;
 		break;
 	case INTEGER_32:
-		*int32 = iv->val.int32;
+		*uint32 = iv->val.int32;
 		break;
 	case INTEGER_64:
 		errn = EXI_UNSUPPORTED_INTEGER_VALUE;
@@ -993,7 +993,7 @@ static int deserializeElementAttributeCharacter(struct EXIService* service)
 				case 30: /*DepartureTime*/
 		if(service->val.type == UNSIGNED_INTEGER) 
 					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_EVChargeParameter->DepartureTime));
+						_setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.ChargeParameterDiscoveryReq->AC_EVChargeParameter->DepartureTime));
 
 
 					} 
@@ -1226,7 +1226,7 @@ static int deserializeElementAttributeCharacter(struct EXIService* service)
 				case 12: /*ChargingProfileEntryStart*/
 		if(service->val.type == UNSIGNED_INTEGER) 
 					{
-						_setInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.ProfileEntry[service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.arraylen.ProfileEntry].ChargingProfileEntryStart));
+						_setUInt32Value( &(service->val.integer),&(service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.ProfileEntry[service->exiMsg.V2G_Message.Body.PowerDeliveryReq->ChargingProfile.arraylen.ProfileEntry].ChargingProfileEntryStart));
 
 
 					}