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. Memory Clear and Free Clarification In ANSIC C Client

Memory clear and free clarification in ANSIC C client

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 Mohanraj , 30 July, 2021
Forums
General discussion

Hi Mikko,

could you please kindly provide clarification on below functions in ANSCI C? what exactly will do?

obj_clearProfileGenericCaptureObjects(&profile_d.captureObjects); //what it does?

obj_clearProfileGenericBuffer(&profile_d.buffer); //what it does?

oa_clear(&connection.settings.releasedObjects, 1); //what it does?

cl_clear(&connection.settings); //what it does?

All of the above function will only clear the buffer i.e like memset() ? please confirm
All of the above function will release the heap memory i.e like free()? please confirm

After calling this cl_clear() function what are the steps needed to read the profile data again?

if connection.settings.releasedObjects of capacity and size 0 means?

Thanks
Mohanraj

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

obj_clearProfileGenericCaptureObjects will clear profile generic capture object list and it will release object list and information from the captured attribute and data index.

obj_clearProfileGenericBuffer will clear profile generic buffer data. It will release all the values from the buffer.

oa_clear will clear object array. It will clear all the COSEM obhects from the array.
cl_clear will clear client settings.

They do much more than just clear the buffer. If malloc is used they will release the heap.

If you call cl_clear it will clear object list (association view) and you need to read it again or add association objects manually.

releasedObjects is a list of COSEM objects that are created in the run time and what are not in the association view. Some meters might use COSEM objects in profile generic capture object list, but objects are not in association view. When capture object list is read objects are created and added to the releasedObjects if they are not in association view.

BR,
Mikko

  • 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