I am trying to read Loadprofile from profile generic.
but every time when i try to read data,it will occupy some memory (some bytes) which will not free.for example when i try to print "Get Free heap Size" after reading data then for 1'st time it is 172868(bytes),2'nd time 172352(bytes),3'rd time 171830 etc.. so every time it will occupy around 400 to 500 bytes.
Please help me to solve this issue. My code is as below.I am using ESP32 controller.
In this code,i am comparing obiscode,if obiscode match with loadprofile obiscode then i will read data from loadprofile and then free the memory.
but still it occupy some memory every time.
(i am rotating 'for' loop till loadprofile then break the loop)
oa_init(&objects);
ret = oa_getObjects(&_meterSettings.objects, DLMS_OBJECT_TYPE_PROFILE_GENERIC, &objects);
dlmsbb_init(&ba);
I believe that the object that is in capture objects is not in read association view.
Add after obj_clearProfileGenericCaptureObjects method:
oa_clear(&_meterSettings.releasedObjects);
Also calling cl_clear(&_meterSettings) will clear the released objects.
when i use oa_clear(&_meterSettings.releasedObjects) and cl_clear(&_meterSettings) method,it will clear all objects from read association view.so i need to read association view every time after using this method.But in my code i read Association view only one time.
Hi,
Hi,
I believe that the object that is in capture objects is not in read association view.
Add after obj_clearProfileGenericCaptureObjects method:
oa_clear(&_meterSettings.releasedObjects);
Also calling cl_clear(&_meterSettings) will clear the released objects.
BR,
Mikko
BR,
Mikko
Thanks for the answer.
Thanks for the answer.
when i use oa_clear(&_meterSettings.releasedObjects) and cl_clear(&_meterSettings) method,it will clear all objects from read association view.so i need to read association view every time after using this method.But in my code i read Association view only one time.
Hi,
Hi,
I believe that you are reading the association view only once? Can you read the capture objects also only once? Is that helping?
BR,
Mikko