You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
When a part of the hexString with BacNet Octets can not be parsed into something this library understand we need to flag this to the client.
Also we want to trace this behavior to be able to implement updates solving these issues.
When a part of the hexString with BacNet Octets can not be parsed into something this library understand we need to flag this to the client.
Also we want to trace this behavior to be able to implement updates solving these issues.
Test Code:
https://github.com/entraeiendom/bacnet-2-json/blob/8d302caad3c4c0fc86bd12666bc26f1b4fca016a/src/test/java/no/entra/bacnet/json/observation/ObservationParserTest.java#L26
Affected code:
https://github.com/entraeiendom/bacnet-2-json/blob/8d302caad3c4c0fc86bd12666bc26f1b4fca016a/src/main/java/no/entra/bacnet/json/values/ValueParser.java#L104
static Object findValue(ApplicationTag applicationTag, String valueHex) { Object value = null; int type = applicationTag.findType(); switch (type) { case INT_VALUE: int intValue = toInt(valueHex); value = Integer.valueOf(intValue); break; case REAL_VALUE: float floatValue = toFloat(valueHex); value = Float.valueOf(floatValue); break; default: value = null; //Alternative: //value = "#" + valueHex; } return value; }
References:
https://github.com/entraeiendom/bacnet-2-json/blob/8d302caad3c4c0fc86bd12666bc26f1b4fca016a/src/test/java/no/entra/bacnet/json/observation/ObservationParserTest.java#L49-L51
Observation observation = observations.getObservations().get(1); assertEquals("StatusFlags", observation.getName()); assertEquals("0400", observation.getValue());
The text was updated successfully, but these errors were encountered: