I have some doubts regarding the example for reading a meter and the handling of notifications, in the GXDLMSReader class.
As I can see in the code, it tries to handle notifications:
while (!dlms.getData(rd, reply, notify)) {
p.setReply(null);
if (notify.getData().getData() != null) {
// Handle notify.
if (!notify.isMoreData()) {
// Show received push message as XML.
GXDLMSTranslator t = new GXDLMSTranslator(
TranslatorOutputType.SIMPLE_XML);
String xml = t.dataToXml(notify.getData());
System.out.println(xml);
notify.clear();
msgPos = rd.position();
}
continue;
}
My questions are:
1. Why does it handle notifications? Just in case they are received in the middle of a normal communication?
2. If so, based on the code, while the DLMS Packet is being processed, it is checking with the function checkWrapperAddress if the addresses are as expected, otherwise it detects a notification and it would be returned as notify. Why if the addresses are not as expected is considered a notification? Shouldn't it be based on the command of the packet?
1. There might be notifications in the middle of normal communication. This does not usually happen when we are using serial port or TCP/IP communication, but it happens when we communicate ower the air and communication speed is slower.
2. This is usually happening when HDLC is used. We don't have meters that are using WRAPPER in OTA, so I don't know is this happening when WRAPPER is used. I'll add worklist that this is improved for the WRAPPER.
Hi,
Hi,
1. There might be notifications in the middle of normal communication. This does not usually happen when we are using serial port or TCP/IP communication, but it happens when we communicate ower the air and communication speed is slower.
2. This is usually happening when HDLC is used. We don't have meters that are using WRAPPER in OTA, so I don't know is this happening when WRAPPER is used. I'll add worklist that this is improved for the WRAPPER.
BR,
Mikko