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. Not Getting CGXProfileGenericObject Class Definition Inside DLMSServer C++ Code

Not getting CGXProfileGenericObject class definition inside DLMSServer C++ code

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 Swapnil , 22 April, 2016
Forums
Gurux.DLMS

Hi,
I am using C++ Server code for communicating to GxDLMSDirector using Logicalname server (i.e 4061).
I am able to complete basic commincation from server to client .
Now I need to add load profile object ("1.0.99.1.0.255") for sending multiple OBIS code .
But code for profile load object (CGXProfileGenericObject ) is commented inside GDLMSBase.cpp .
Please guide me to add the same.

Thank you.
Swapnil

Swapnil

10 years 1 month ago

Hi,

Hi,
We checked the profile generic class in C++.
and implemneted the following line of code in init() of GXDLMSBase.cpp file.

CGXDLMSProfileGeneric* pPG = new CGXDLMSProfileGeneric("1.0.99.1.0.255");
pPG->SetCapturePeriod(60);
pPG->SetProfileEntries(100);
pPG->SetSortMethod(GX_SORT_METHOD_FIFO);
pPG->SetSortObject(pClock);
pPG->AddCaptureObject(pClock,2,0);
GetItems().push_back(pPG);

But we could not read the profile generic class in GXDLMSDirector.

Kindly let us know if any step is missing to get the Profile Generic data.

Thank you.
Awaiting your reply.

Profile picture for user Administrator

Administrator

10 years ago

Not getting CGXProfileGenericObject class definition inside

Hi,

We are just finishing our server side tests with new API. New version is available on this week.

Swapnil

10 years ago

Awaiting for latest code

Awaiting for latest code release .

Profile picture for user Kurumi

Kurumi

10 years ago

New version

Hi,

New version is released. We found one issue yesterday and it took longer than expected to fix it.
Get sources here:

https://github.com/Gurux/Gurux.DLMS.cpp

BR,

Mikko

Swapnil

10 years ago

Thank you for update .

Thank you for update .
Even in the updated code profilegeneric object implementation in still commented.
We need to know how to use profile generic object functionality .

Swapnil

10 years ago

Hi ,

Hi ,
I was trying to compile the source code for DLMS server but getting the error .Library and client code is build successfully.

Profile picture for user Kurumi

Kurumi

10 years ago

Server example

Hi,

Get new version from GitHub. I was too fast when I updated new version to GitHub and server code for Linux was not commited to our repository.

BR,

Mikko

Profile picture for user Kurumi

Kurumi

10 years ago

In reply to Thank you for update . by Swapnil

Profile Generic

Hi,

I updated new example just now where we add profile generic for server example.
Get latest version from GitHub.

BR,

Mikko

Swapnil

10 years ago

Compilation error

Hi, We got an error while compiling the updated server C++ code as below:

GXDLMSBase.cpp:491:37: error: no matching function for call to ‘std::vector<CGXDLMSVariant>::push_back(CGXDateTime)’
row.push_back(CGXDateTime::Now());

Kindly let us know how to resolve this.
Thank you.

Profile picture for user Kurumi

Kurumi

10 years ago

Compilation error

Hi,

I updated example. Get new version.

BR,

Mikko

Swapnil

10 years ago

Get Object failed error on client side

hi , this change fixed the compilation error .
After running Server we are trying to read data from client, but it is giving error that getObject failed (ON GXDLMSDirrector).

ON client code:
GURUX_DLMS_CLIENT.out: /home/swapnilc/PROJECT_DCU/GuruWorkspace/GURUX_DLMS_CLIENT/development/src/GXHelpers.cpp:1235: static int GXHelpers::GetData(CGXByteBuffer&, CGXDataInfo&, CGXDLMSVariant&): Assertion `0' failed.
Aborted (core dumped)

Swapnil

10 years ago

cpp Server issue

Hi,
Do you got simiilar isssue with updated code ?? Kindly let me know as I am not able to send any object data with this modified code.

Thank you.

Profile picture for user Administrator

Administrator

10 years ago

cpp Server issue

Dear Swapnil,

we are resolving this.

Profile picture for user Administrator

Administrator

10 years ago

cpp Server issue

Dear Swapnil,
We have fixed this. Get latest version.

Swapnil

10 years ago

library building failed inside development folder

Hi,
I am getting errors while building library it self ...one of the error message is mentioned below:

In member function ‘int CGXDLMSClient::Read(CGXDLMSObject*, int, std::vector<CGXByteBuffer>&)’:
src/GXDLMSClient.cpp:866:92: error: no matching function for call to ‘CGXDLMSClient::Read(CGXDLMSVariant, DLMS_OBJECT_TYPE, int&, NULL, std::vector<CGXByteBuffer>&)’
return Read(pObject->GetName(), pObject->GetObjectType(), attributeOrdinal, NULL, reply);

Thank you .

Swapnil

10 years ago

Segmentation falt

Hi ,
Tried to run updated code ,but getting segmentation fault .

Profile picture for user Kurumi

Kurumi

10 years ago

In reply to Segmentation falt by Swapnil

Segmentation falt

Hi,

Can you tell what compiler and Linux distro you are using?

BR,

Mikko

Swapnil

10 years ago

Compiler and Linux Distro

Hi,
The compiler we are using is Windriver GNU C++ and the Linux Distro is Ubuntu 14.04 LTS.

Thnaks,
Swapnil.

Profile picture for user Kurumi

Kurumi

10 years ago

Compiler and Linux Distro

Hi,

and you are using TCP/IP or serial port connection?

BR,

Mikko

Swapnil

10 years ago

TCP/IP

We are using TCP/IP communication .

Profile picture for user Kurumi

Kurumi

10 years ago

Linux issue

Hi,

We was finally able to duplicate this error today. We fixed it and new client example is available on GitHub.

BR,

Mikko

Swapnil

10 years ago

Director error for profileGeneric object

Hi,
Thanks you for the update.
We ran the server side code and tried getting the data on Director.
for Profile GenericClass it is throwing a message box saying "Acess Error: Device reports a hardware fault".
Kindly let us know what does this mean.

We would like to know if we have to update the version of director installed on our machine aswell, if needed.

Thank you.
Swapnil.

Profile picture for user Kurumi

Kurumi

9 years 11 months ago

Director error for profileGeneric object

Hi,

What meter you are using (Manufacturer and model)?

BR,

Mikko

Swapnil

9 years 11 months ago

Profile Generic capture object settings

Hi ,
I have given manufacturer as Gurux inside GXDLMSdirector and I am only checking with dirrector itself and not with any hardware meter(we will be using our own hardware meters in future) .
Also I have downloaded updated code and working on it .but not able to set values inside capture object buffer .
Can you help me out with setting the object value inside capture buffer ??And how to add multiple objects to capture buffer??

Thank you .

Rahul Kumbhar

9 years 11 months ago

Profile Generic capture object settings

Hi,

We downloaded latest copy of Gurux.DLMS.cpp and trying to communicate with Gurux DLMS Director. we get all object except profilegeneric.
when we trying to read profilegeneric object from Gurux DLMS Director we are getting error as "Acess Error: Device reports a hardware fault". and socket get disconnected.
Please can you tell us how to resolve this issue.

Regards,
Rahul K.

Profile picture for user Kurumi

Kurumi

9 years 10 months ago

Profile Generic capture object settings

Hi,

I test this and it worked. What kind of data you have added to profile generic?
BR,

Mikko

Swapnil

9 years 10 months ago

In reply to Profile Generic capture object settings by Kurumi

Profile Generic data

Hi,
I am using same code of your's as below and I haven't added any data from my side yet .

//Add profile generic (historical data) object.
CGXDLMSProfileGeneric* profileGeneric = new CGXDLMSProfileGeneric("1.0.99.1.0.255");
profileGeneric->SetCapturePeriod(60);
profileGeneric->SetProfileEntries(100);
profileGeneric->SetSortMethod(DLMS_SORT_METHOD_FIFO);
profileGeneric->SetSortObject(pClock);
CGXDLMSCaptureObject * capture = new CGXDLMSCaptureObject(2, 0);
profileGeneric->GetCaptureObjects().push_back(std::pair<CGXDLMSObject*, CGXDLMSCaptureObject*>(pClock, capture));
capture = new CGXDLMSCaptureObject(2, 0);
profileGeneric->GetCaptureObjects().push_back(std::pair<CGXDLMSObject*, CGXDLMSCaptureObject*>(pRegister, capture));
GetItems().push_back(profileGeneric);

std::vector<CGXDLMSVariant> row;
CGXDateTime tmp = CGXDateTime::Now();
row.push_back(tmp);
row.push_back(10);
profileGeneric->GetBuffer().push_back(row);

Where should I look for my error mentione before!!!?

Thanks ,
Swapnil

Profile picture for user Kurumi

Kurumi

9 years 10 months ago

Profile Generic data

Hi Swapnil,

You was right. We fixed this. Get new version from GitHub.
We was using different settings what you are.

BR,

Mikko

Swapnil

9 years 10 months ago

Thanks for update .It

Thanks for update .It resolved the hardware fault issue .

Can i know how to capture() functionality should be implemented for updating profile generic data ?I have gone through the java as well as c# implementation for same but not compeletly clear about function yet .

Thanks ,
Swapnil

  • 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