When I load an association viw from disk (XML I dumped) I have noticed that in some cases date fields are empty, resulting in an ibject like:
<GXDLMSData>
<LN>0.0.96.2.13.255</LN>
<Description>Ch. 0 Date of last firmware activation</Description>
<Access>10</Access>
<MethodAccess></MethodAccess>
<Value Type="0" UIType="25"></Value>
</GXDLMSData>
Failing to parse with an error because the Value tag is empty. Is there a way for GuruX to parse these in a less strict way ike defaulting to a certain date possibly?
I understand the problem but I don't have an answer on how to handle this yet. Value is empty if it's not read from the meter. I have two options at the moment.
a. Value tag is not written at all if date-time is not read.
b. Epoch time (Jan 01 01:00:00 GMT 1970) is written.
At the moment I believe that option a is better, but I need to think that this is not break anything.
Hi, I understand the problem…
Hi,
I understand the problem but I don't have an answer on how to handle this yet. Value is empty if it's not read from the meter. I have two options at the moment.
a. Value tag is not written at all if date-time is not read.
b. Epoch time (Jan 01 01:00:00 GMT 1970) is written.
At the moment I believe that option a is better, but I need to think that this is not break anything.
BR,
Mikko
Thank you, I look forward to…
Thank you, I look forward to your solution
Hi, Are you using…
Hi,
Are you using GXDLMSObjectCollection.load method to load this? Something like this or are you parsing it by yourself?
GXDLMSObjectCollection items = GXDLMSObjectCollection.load("file.xml");
BR,
Mikko
Currently using this code:…
Currently using this code: https://paste.debian.net/1272385/
See the attached pastebin link
---
Sorry for my late reply by the way :)
Any idea Hikko?
Any idea Hikko?