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. Read Single Row From ProfileGeneric

Read single row from ProfileGeneric

Profile picture for user Dmitry
By Dmitry , 25 July, 2023
Forums
Gurux.DLMS

Hi, Mikko!

I try read single row from ProfileGeneriv Table.
I do this:
int from_row_index = 0;
int count_rows_to_read = 1;
if(int ret = gcl->ReadRowsByEntry(p, from_row_index, count_rows_to_read, data) != 0)
{
qDebug().nospace() << "Failed generate message for read profile generic object " << obj->GetName().ToString().c_str() << " Error: " << CGXDLMSConverter::GetErrorMessage(ret);
}
else
{
qDebug() << "Request" << USPD_Helper::request_to_str(info);
send_data(data);
}

In this request i try read first row from table but read all rows instead.
Generated message:
7ea02d020161da580de6e600c001c100070000636200ff02010202040600000000060000000012000112000004237e

I think problem in CGXDLMSClient::ReadRowsByEntry():

// Add Count
if (count == 0)
{
tmp = count;
}
else
{
tmp = index + count - 1; // is it OK?
}

if i change to "tmp = index + count;" i recieve single row.

Thanks!

Profile picture for user Kurumi

Kurumi

2 years 9 months ago

Hi Dmitry, I'm sorry for…

Hi Dmitry,

I'm sorry for the slow reply. Summer time was causing delays.

DLMS standard says that from_row_index is one-based, not zero-based. I believe that is causing the issue.

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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin