Have followed ANSI C Client Example to read single object. But getting segmentation fault.
Please help.
gxData myobject;
cosem_init(&myobject.base,DLMS_OBJECT_TYPE_DATA,"0.0.96.1.0.255");
com_read(&con, &myobject.base, 2);
obj_toString(&myobject, &data); //Segmentation fault at this line
Hi Any update please?
Hi Any update please?
Hi,
Hi,
This is now tested with several different PCs without problems.
Have you set data to NULL?
char* data = NULL;
gxData myobject;
cosem_init(BASE(myobject), DLMS_OBJECT_TYPE_DATA, "0.0.96.1.0.255");
com_read(connection, BASE(myobject), 2);
obj_toString(BASE(myobject), &data);
printf("%s\r\n", data);
If you have still problems let me know the compiler and environment that you are using.
Make sure that you have the latest version.
BR,
Mikko
data is not set to null.Thank
data is not set to null.Thank you.