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 9 months ago

Hi,

Hi,

Check the client example. It does that.

BR,
Mikko

Techapirant

6 years 9 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 9 months ago

Hi,

Hi,

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

BR,
Mikko

Techapirant

6 years 9 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 9 months ago

Hi,

Hi,

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

BR,
Mikko

Techapirant

6 years 9 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 9 months ago

Hi,

Hi,

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

BR,
Mikko

Techapirant

6 years 9 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 9 months ago

Hi,

Hi,
Call obj_CaptureObjectsToString

BR,'
Mikko

Techapirant

6 years 9 months ago

In C obj

In C obj_CaptureObjectsToString is undefined

Profile picture for user Kurumi

Kurumi

6 years 9 months ago

Hi,

Hi,

Call obj_toString. It calls obj_CaptureObjectsToString.

BR,
Mikko

Techapirant

6 years 9 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

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
More

Who's new

  • hirenec11mic
  • Yeyen
  • Virtual
  • joesa4
  • SgwTHoQsOQXBixXP
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin