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. Read Profile Generic Buffer In C

Read Profile Generic Buffer in C

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 Techapirant , 25 October, 2019
Forums
Gurux.DLMS

Hello,

How to read specific profile genric register buffer in C ?
Say For example I want to read buffer of profile generic variable 1.0.99.1.0.255 and print all the values which com_read(x,2) will result.

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Check the client example. It does that.

BR,
Mikko

Techapirant

6 years 7 months ago

I am able to read but I am

I am able to read but I am unable to print column headers ?
How can I print column headers after reading profile generic columns.
gxArray obj = pg->captureObjects;

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Check obj_CaptureObjectsToString. You need to read attribute #3 first.

BR,
Mikko

Techapirant

6 years 7 months ago

Hello,

Hello,

I have read attribute index 3 it returns result in Hex I want the result in readable format.
Say I have four columns so I want to get OBIS code or column headers for 4 columns

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

cl_updateValue parse hex string and update value to the profile generic object.

BR,
Mikko

Techapirant

6 years 7 months ago

Like this

Like this
ret = com_read(connection, object, 3);
gxReplyData reply;
reply_init(&reply);
ret = cl_updateValue(&connection->settings, object, 3, &reply.dataValue);

But it returns access violation error

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

com_read calls this internally. You don't need to call it again.

BR,
Mikko

Techapirant

6 years 7 months ago

Ok If I hit breakpoint I cant

Ok If I hit breakpoint I cant see my column headers.
Can You please let me know how can I print column headers after capturing / reading index 3

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,
Call obj_CaptureObjectsToString

BR,'
Mikko

Techapirant

6 years 7 months ago

In C obj

In C obj_CaptureObjectsToString is undefined

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

Hi,

Hi,

Call obj_toString. It calls obj_CaptureObjectsToString.

BR,
Mikko

Techapirant

6 years 7 months ago

Thanks It works

Thanks It works
char* data = NULL;
ret = obj_toString(object, &data);
if (data != NULL)
{
printf("%s", data);
free(data);
data = NULL;
}

  • 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