Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Defining Captured Objects List Manually

Defining Captured Objects List Manually

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Moataz Gamal , 11 September, 2022
Forums
Gurux.Net

Hi,
I'm trying to read a Profile Generic obis using the .net client example:
============
//reading the first record
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("8.0.99.98.12.255");
object val = reader.ReadRowsByEntry(profileGeneric, 2, 1);
============
I get the following error: Captured Objects not read.

when trying to read the captured objects before reading the first record:
============
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("8.0.99.98.12.255");
object res = reader.Read(profileGeneric, 3);
object val = reader.ReadRowsByEntry(profileGeneric, 2, 1);
============
I get the following error: Access error: other reason.
It seems I don't have access to read the objects list.
Using the GXDLMSDirector I can read the profile generic obis fine, but when I click on the capture button I get the same error: Access error: other reason.

I tried defining the list manually before reading like this:
============
GXDLMSProfileGeneric profileGeneric = new GXDLMSProfileGeneric("8.0.99.98.12.255");
//define list of captured objects
var capturedObjectsList = new List<GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>>();
//define capture objects one by one...
var c = new GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject>();
GXDLMSData gxobject = new GXDLMSData();
gxobject.LogicalName = "8.0.17.0.0.255";
GXDLMSCaptureObject captureObject = new GXDLMSCaptureObject();
captureObject.AttributeIndex = 2;
captureObject.DataIndex = 0;
c.Key = gxobject;
c.Value = captureObject;

//define the other objects ... then add them to the list
capturedObjectsList.Add(c);

//add the rest of the objects to the list and equate the list to the captured objects list inside the //profileGeneric
profileGeneric.CaptureObjects = capturedObjectsList;

//start reading
reader.ReadRowsByEntry(profileGeneric, 2, 1);
============
However after adding all the objects, I get a the following exception when reading: service exception operation not allowed.

Is this the right way to define the captured objects list?
Is there another way to read a profile generic obis without capturing the objects first?

sorry for the long question, thank you.

Profile picture for user Kurumi

Kurumi

3 years 9 months ago

Hi,

Hi,

The capture button creates a new row and saves current values. Some meters don't implement this feature.

All the meters don't support ReadRowsByEntry. You can try to test if your meter supports this with GXDLMSDirector by giving the start index and count.

In general, your code looks correct.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin