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. Node
  3. 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

3 years 2 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

  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101

New forum topics

  • Zetaverse Billiard Proshop in Mall Taman Anggrek | WA 083148835648
  • BILLIARD EQUIPMENT PUSAT | WA 083148835648
  • cuehouse.billiard | WA 083148835648
  • Billiard Consignment - Toko Peralatan Billiard & Stick Billiard Second Baru | WA 083148835648
  • AvengingXen Pool at Second Floor Billiard | WA 083148835648
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin