DLMS Cleint Association View read problem

6 posts / 0 new
Last post
horcsa
DLMS Cleint Association View read problem

Hi,

I'd like to read Association View using DLMS client, but implementing Simple Reading Meter example not working:

Connection is made by the server but this read not ok.

/// Read Association View from the meter.
GXReplyData reply = new GXReplyData();
readDataBlock(client.getObjects(), reply);
GXDLMSObjectCollection objects = client.parseObjects(reply.getData(), true);

client.getObjects() method is not implemented in the GXDLMSClient.

Can anybody help how to implement this read?

HorCsa

kurumi
kurumi's picture
DLMS Client Association View read problem

Hi,

This sounds strange. Are you using Eclipse?

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

horcsa
I use C# and Visual Studio.

I use C# and Visual Studio.

I find only GetObjectsRequest, GetObjectTypes, GetObjectTypes2 in the source of GXDLMSClient.

May I have downloaded wrong version? I've downloaded Gurux.DLMS.Net 2 weeks ago.

HorCsa

kurumi
kurumi's picture
DLMS Client Association View read problem

Hi,

Your example is Java example. With C# you need to use client.Objects , not getObjects.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

horcsa
DLMS Client Association View read problem

Ok, thanx. I'll try using it. This client.Objects will read all the objects meter offers? Or I have to use GetObjectsRequest()? This is not rally clear for me.

But on the webpage Simple meter reading example if I click on the C# tab the example code also contains GetObjects() method:

/// Read Association View from the meter.
GXReplyData reply = new GXReplyData();
ReadDataBlock(client.GetObjects(), reply);
GXDLMSObjectCollection objects = client.ParseObjects(reply.Data, true);

(In my code I tried to use the C# example, but when I copied it to my forum question I missed the tab I've selected.

HorCsa

kurumi
kurumi's picture
DLMS Client Association View read problem

Hio,

There is an example available, Gurux.DLMS.Client.Example.Net.
You can use that to read your meter.

GXReplyData reply = new GXReplyData();
ReadDataBlock(Client.GetObjectsRequest(), reply);
Client.ParseObjects(reply.Data, true);

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org