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!
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