- Java SCL parser: allow parse float "Val" elements using "," as decimal separator

pull/143/head
Michael Zillgith 8 years ago
parent b195acd128
commit 60b7b673f4

@ -43,6 +43,10 @@ struct sIedServer
LinkedList clientConnections; LinkedList clientConnections;
uint8_t writeAccessPolicies; uint8_t writeAccessPolicies;
#if (CONFIG_IEC61850_REPORT_SERVICE == 1)
int reportBufferSize;
#endif
#if (CONFIG_MMS_THREADLESS_STACK != 1) #if (CONFIG_MMS_THREADLESS_STACK != 1)
Semaphore dataModelLock; Semaphore dataModelLock;
#endif #endif

@ -109,6 +109,8 @@ public class DataModelValue {
System.out.println("WARNING: value initializer contains leading or trailing whitespace"); System.out.println("WARNING: value initializer contains leading or trailing whitespace");
} }
trimmedValue.replace(',', '.');
if (trimmedValue.isEmpty()) if (trimmedValue.isEmpty())
this.value = new Float(0); this.value = new Float(0);
else else
@ -122,6 +124,8 @@ public class DataModelValue {
System.out.println("WARNING: value initializer contains leading or trailing whitespace"); System.out.println("WARNING: value initializer contains leading or trailing whitespace");
} }
trimmedValue.replace(',', '.');
if (trimmedValue.isEmpty()) if (trimmedValue.isEmpty())
this.value = new Double(0); this.value = new Double(0);
else else

Loading…
Cancel
Save