I'm wondering if the C++ library in github.com can support struct and array data type.
It seems reading is ok, but did it handle these 2 types while writing?
I'm trying to use the following function to change the value of some attributes, but without success.
Write(CGXDLMSObject* pObject, int attributeIndex, CGXDLMSVariant& value)
1. If the value parameter is an array of string , could you help to check if the sending out package includes the byte of length of that string?
2. Could you provide me a sample code showing how to fill an array of struct data structure before calling this function?
Thank you for your reply. I'm trying to verify how to fill array before generating message. E.g, object of Auto Connect interface has an attribute named destination_list, which is an array of string. Could you show me how to fill the value (CGXDLMSVariant) before calling Write function?
Thanks for your information. I downloaded the new library and noticed there are some improvements regarding this issue, especially for the length of the string type and handling of array.
What I want to mention here is the issue of handling the structure type of data while writing. It seems missing the amount of the element in the message. Please confirm.
Another problem I want to report is the DLMS_COMMAND_WRITE_REQUEST package probably has some bytes issue when the application use SN.
I just checked this with Logican name referencing and it seens to work as should be. Get latest version from Github. We have made some changes last weeks.
I will check this with Short Name referecing after next week.
I just informs you that we have released new API for Gurux DLMS library for ANSI C++.
You can get more information from here: http://www.gurux.fi/newAPI
BR,
Mikko
Does the Gurux C++ library support struct and array?
Hi,
Yes it does. You have to make sure that you write right data types or meter returns error or do not accept data.
BR,
Mikko
Thank you for your reply.
Thank you for your reply.
I'm trying to use the following function to change the value of some attributes, but without success.
Write(CGXDLMSObject* pObject, int attributeIndex, CGXDLMSVariant& value)
1. If the value parameter is an array of string , could you help to check if the sending out package includes the byte of length of that string?
2. Could you provide me a sample code showing how to fill an array of struct data structure before calling this function?
Thanks
Baoye
Writing array
Hi
What COSEM Interface you want to use? Can you post an example from the data you want to save?
BR,
Mikko
Write/update cosem objects
Hi Mikko,
Thank you for your reply. I'm trying to verify how to fill array before generating message. E.g, object of Auto Connect interface has an attribute named destination_list, which is an array of string. Could you show me how to fill the value (CGXDLMSVariant) before calling Write function?
Thanks,
Baoye
Write/update cosem objects
Hi,
Below is small example. We updated new version to GitHub, so get new version first.
BR,
Mikko
CGXDLMSVariant ln2 = "OBIS CODE";
CGXDLMSVariant item1 = "AAAA";
CGXDLMSVariant item2 = "BBBB";
CGXDLMSVariant item3 = "CCCC";
CGXDLMSVariant arr;
arr.Arr.push_back(item1);
arr.Arr.push_back(item2);
arr.Arr.push_back(item3);
arr.vt = DLMS_DATA_TYPE_ARRAY;
ret = cl.Write(ln2, OBJECT_TYPE_DATA, 2, arr, packets);
Write/update cosem objects
Hi,
I added another example here: In this example you can set COSEM objects directly and write data to the meter.
BR,
Mikko
CGXDLMSAutoConnect ac;
ac.GetDestinations().push_back("AAAA");
ac.GetDestinations().push_back("BBBB");
ac.GetDestinations().push_back("CCCC");
ret = cl.Write(&ac, 6, packets);
improvement and bugs
Hi Mikko,
Thanks for your information. I downloaded the new library and noticed there are some improvements regarding this issue, especially for the length of the string type and handling of array.
What I want to mention here is the issue of handling the structure type of data while writing. It seems missing the amount of the element in the message. Please confirm.
Another problem I want to report is the DLMS_COMMAND_WRITE_REQUEST package probably has some bytes issue when the application use SN.
Thanks,
Baoye
improvement and bugs
Hi,
I just checked this with Logican name referencing and it seens to work as should be. Get latest version from Github. We have made some changes last weeks.
I will check this with Short Name referecing after next week.
BR,
Mikko
Hi,
Hi,
I just informs you that we have released new API for Gurux DLMS library for ANSI C++.
You can get more information from here:
http://www.gurux.fi/newAPI
BR,
Mikko