Hi,
I’ve been working with the GURUX library for ANSI C and ran into an issue.
When I try to set the value of an object class_id = 1 and an attribute of type OCTET_STRING, I’ve noticed the following:
If I read the object first and then set it, inside svr_postWrite(dlmsSettings* settings, gxValueEventCollection* args) I get args->size == 1.
If I don’t read first and I write directly, then in the same function args->size == 0, which means no post-processing happens after the write.
After stepping through the library, I found that in svr_handleSetRequest2 the list.size is never set to 1. As a test, I have asigned list.size = 1 at the beginning of this function:
#ifdef DLMS_IGNORE_MALLOC
list = settings->transaction.targets;
e = &list.data[0];
ve_clear(e);
list.size = 1;
With this change, svr_postWrite now receives one event and I’m able to perform post-processing after a write.
Is this the expected behavior, or is there a better/proper fix for this scenario?
Thanks,
Pablo
Hi Pablo, I believe that you…
Hi Pablo,
I believe that you are right. This problem occurs if you establish the connection and write without reading anything from the meter. The read resets this error.
This needs testing, and this will be released in the next week after the tests are over.
BR,
Mikko
Hello Kurumi, Thank you for…
Hello Kurumi,
Thank you for your response.
I’ll be looking forward to the next releases.
Thanks!
Pablo
Hi Pablo, This is fixed to…
Hi Pablo,
This is fixed to version 9.0.2510.2901.
Thank you for pointing this out.
BR,
Mikko