Hi
We updated Gurux.DLMS.NET from a 8.5 version to version 9.0.1911.0901 due to the Time bug in parsing EventNotification, that you fixed for us.
Problem now is that you in version Version 9.0.1909.0901 introduced GXArray and GXStructure to replace where you earlier used object[]. This totally breaks our code, not build errors but runtime errors. The big problem is that GXArray and GXStructure inherits List<object>.
I think if it instead would have inherited object[] there would have not been any problems.
Codes like:
var meterFile = item as object[];
if (meterFile == null) ... error code
now creates error since item can no longer be cast to object[] since it is GXArray (List) and to find these errors is really hard.
I'm so sorry about this. We have added version property so we can offer data in object[] format.
We'll test this during the weekend and release the new version latest on Monday.
If you need to write profile generics to the meter in the future you need to start to use version 9.
There are some new meters /substandard from DLMS where this is required.
Hi again
Not the same case as above but similar. We now handle push data from other manufacturer where we are supposed to handle data notifications.
Example data:
0 01 00 01 02 01 00 23 0F 40 00 00 00 0C 07 D0 01 01 06 02 25 38 FF 80 00 00 02 02 09 06 00 00 61 62 00 FF 06 00 00 00 04 22 25
code snippet:
var frameComplete = client.GetData(new GXByteBuffer(kaifaPushEvent), replyData, notify);
if (notify.IsComplete && !notify.IsMoreData)
{
if (notify.Command == Command.DataNotification)
{
if (notify.Value is GXStructure dataNotifications)
{
var parsedDataNotifications = client.ParsePushObjects(dataNotifications);
//TODO: Implement data notification handling
}
}
}
We get an exception in ParsePushObjects, see image. The problem seem to be that it expects all objects in list to be List<object> (GXArray?) however the GetData method has created them as byte[]
You can't use ParsePushObjects for this data. You need to get data by yourself.
The problem with push messages is that the content of push data can be anything.
Meter can be configured to send almost any data.
In your push message, there is a structure where are two values (Logical Name and UInt32).
I don't know what push message this is. I believe that it's alarm register object. Data is occurred alarm, but it's not possible to know if you don't know how meter is configured.
There is also one important thing in this notification message. There is no Logical Device Name inside of the data. There is no way to solve what meter has sent this notification message if you are not using static IP address..
Hi Björn,
Hi Björn,
I'm so sorry about this. We have added version property so we can offer data in object[] format.
We'll test this during the weekend and release the new version latest on Monday.
BR,
Mikko
Hi,
Hi,
There is a new version available. You need to set the version property to 8 to use object[] instead of GXStructure and GXArray.
GXDLMSClient cl = new GXDLMSClient();
cl.Version = 8;
BR,
Mikko
Hi
Hi
Ok thanks! Will try it out during the day
/Björn
Hi,
Hi,
If you need to write profile generics to the meter in the future you need to start to use version 9.
There are some new meters /substandard from DLMS where this is required.
BR,
Mikko
Hi again
Hi again
Not the same case as above but similar. We now handle push data from other manufacturer where we are supposed to handle data notifications.
Example data:
0 01 00 01 02 01 00 23 0F 40 00 00 00 0C 07 D0 01 01 06 02 25 38 FF 80 00 00 02 02 09 06 00 00 61 62 00 FF 06 00 00 00 04 22 25
code snippet:
var frameComplete = client.GetData(new GXByteBuffer(kaifaPushEvent), replyData, notify);
if (notify.IsComplete && !notify.IsMoreData)
{
if (notify.Command == Command.DataNotification)
{
if (notify.Value is GXStructure dataNotifications)
{
var parsedDataNotifications = client.ParsePushObjects(dataNotifications);
//TODO: Implement data notification handling
}
}
}
We get an exception in ParsePushObjects, see image. The problem seem to be that it expects all objects in list to be List<object> (GXArray?) however the GetData method has created them as byte[]
/Björn
Forgot yo mentioned that we
Forgot yo mentioned that we have ported our code to version 9
Hi,
Hi,
You can use Version 8. We'll fix this today.
BR,
Mikko
Hi,
Hi,
This is fixed. There is a new version released.
BR,
Mikko
Still issues with new version
Still issues with new version. I thing this is just the symtom, the error should be fixed in GetData
Hi,
Hi,
You can't use ParsePushObjects for this data. You need to get data by yourself.
The problem with push messages is that the content of push data can be anything.
Meter can be configured to send almost any data.
http://www.gurux.fi/GuruxDLMSTranslator?translate=00010001020100230F400…
In your push message, there is a structure where are two values (Logical Name and UInt32).
I don't know what push message this is. I believe that it's alarm register object. Data is occurred alarm, but it's not possible to know if you don't know how meter is configured.
BR,
Mikko
Hi,
Hi,
There is also one important thing in this notification message. There is no Logical Device Name inside of the data. There is no way to solve what meter has sent this notification message if you are not using static IP address..
BR,
Mikko
Yes your right this is alarm
Yes your right this is alarm objects. So we will parse this by our selfs.
Thanks anyway
/Björn
Hi Björn,
Hi Björn,
Data is there in object array. You need just know what is the meaning of the content.
BR,
Mikko