Currently I am using old version of Gurux.DLMS.cpp-master based on Visual Studio 2012. This method ( GXDLMSCLient.UseUtc2NormalTime) is not available here. I have downloaded the latest version of Gurux.DLMS.cpp-master but it based on visual studio 2019. I am unable to use visual-studio-2019. I can use use visual studio 2017 max.
Could this matter resolve in visual studio 2017?
If yes, then how will I get Gurux.DLMS.cpp-master based on visual studio 2017?
I have migrated to latest version (Gurux.DLMS.cpp-master-Version 20201127.1 ). I have tried this (GXDLMSCLient.UseUtc2NormalTime) as suggested by you but filtered data data records are same.
As I was facing the issue between the input time range and out put time range for block profile object is differ. But if I check the same scenario with DLMSDirector tool, then the result set is ok.
I have checked the above scenario with latest code as you had suggested me to add "cl.SetUseUtc2NormalTime(true)" but still I am getting the differences in result set.
Kindly find the below mentioned sample code and attached screenshot of DLMSDirector tool.
which line have I missed in the sample code? Kindly check.
Can you add a trace from the request bytes in hex string to here so I can check the bytes?
Your code seems correct for the first sign, but I need the bytes to verify this.
Hi,
Hi,
You need to set GXDLMSCLient.UseUtc2NormalTime to true.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Currently I am using old version of Gurux.DLMS.cpp-master based on Visual Studio 2012. This method ( GXDLMSCLient.UseUtc2NormalTime) is not available here. I have downloaded the latest version of Gurux.DLMS.cpp-master but it based on visual studio 2019. I am unable to use visual-studio-2019. I can use use visual studio 2017 max.
Could this matter resolve in visual studio 2017?
If yes, then how will I get Gurux.DLMS.cpp-master based on visual studio 2017?
Thanks,
Pradson
Hi Pradson,
Hi Pradson,
You can use the old project and solution file. Just update *.h and *.cpp files to the latest one.
BR,
Mikko
Hi Mikko,
Hi Mikko,
I did as suggested by you but facing a lots of complier errors.
I am using visual-studio-2012 to build the same.
Kindly suggest any other solution?
Thanks & Regards,
Pradson
Hi,
Hi,
You need to add all header and cpp files to the project. There are no reasons why it shouldn't compile with VS 2012.
BR,
Mikko
HI Mikko,
HI Mikko,
How will I get older version Gurux.DLMS.cpp-master which could build in visual studio 2017?
Thanks
Hi,
Hi,
Try to get this and then add all new header and cpp files.
https://github.com/Gurux/Gurux.DLMS.cpp/commit/b45e49be4bb9f4c1a50d0ccc…
BR,
Mikko
Hi Mikko,
Hi Mikko,
I have migrated to latest version (Gurux.DLMS.cpp-master-Version 20201127.1 ). I have tried this (GXDLMSCLient.UseUtc2NormalTime) as suggested by you but filtered data data records are same.
Kindly check.
Thanks,
Pradson
HI Mikko,
HI Mikko,
As I was facing the issue between the input time range and out put time range for block profile object is differ. But if I check the same scenario with DLMSDirector tool, then the result set is ok.
I have checked the above scenario with latest code as you had suggested me to add "cl.SetUseUtc2NormalTime(true)" but still I am getting the differences in result set.
Kindly find the below mentioned sample code and attached screenshot of DLMSDirector tool.
which line have I missed in the sample code? Kindly check.
//---------------------------------------------------------------------
// ------------------- sample Code ---------------------
//---------------------------------------------------------------------
cl.SetUseUtc2NormalTime(true); // As suggest
/*********** read clock ***********/
CGXDLMSClock *objClock = new CGXDLMSClock("0.0.1.0.0.255");
std::string sValues;
if ((ret = comm.Read(objClock, 2, sValues)) != 0) {
printf("err! failed to read clock object register: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}
else {
printf("sValues: %s\n", (char*)sValues.c_str());
}
CGXDLMSProfileGeneric *objLP1 = new CGXDLMSProfileGeneric("1.0.99.1.0.255");//Block profile
ret = 0;
std::string sCapObj;
if ((ret = comm.Read(objLP1, 3, sCapObj)) != 0)
{
printf("err! failed to readCaptureObjects: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}
CGXDateTime startLP1 = CGXDateTime(2020, 11, 26, 22, 0, 0, 0);
CGXDateTime endLP1 = CGXDateTime(2020, 11, 26, 23, 0, 0, 0);
CGXDLMSVariant rows;
if ((ret = comm.ReadRowsByRange(objLP1, startLP1, endLP1, rows)) != 0) {
printf("err! failed to read register: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}
else {
printf("sValues:\n%s", (char*)rows.ToString().c_str());
}
//---------------------------------------------------------------------
// ------------------- Out put of sample Code ---------------------
//---------------------------------------------------------------------
sValues: 07-12-2020 16:43:52
sValues:
27-11-2020 09:00 | 4998 | 57845 | 57820 | 57833 | 0 | -86158 | 86158 | 0 | 0 | 75434 | 0 | 57832 | 4294967295 | -75434 | 264 | 264 | 264 | 0 | -75434 | 0 | 752 |
27-11-2020 09:15 | 4998 | 57897 | 57876 | 57887 | 0 | -37670 | 37670 | 0 | 0 | 32234 | 0 | 57886 | 4294967295 | -32234 | 114 | 114 | 114 | 0 | -32234 | 0 | 759 |
27-11-2020 09:30 | 4998 | 57932 | 57907 | 57918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57919 | 4294967295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27-11-2020 09:45 | 4998 | 57917 | 57898 | 57912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57909 | 4294967295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
27-11-2020 10:00 | 4998 | 57913 | 57892 | 57906 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57903 | 4294967295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Thanks,
Pradson
Hi,
Hi,
Can you add a trace from the request bytes in hex string to here so I can check the bytes?
Your code seems correct for the first sign, but I need the bytes to verify this.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Kindly find the text of trace file-
//------------------------------------------------
TX: 15:36:44 00 01 00 20 00 11 00 35 60 33 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 07 80 05 73 73 73 30 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 15:36:44 00 01 00 11 00 20 00 2A 61 28 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0D 08 00 06 5F 04 00 00 10 1D 20 00 00 07
TX: 15:36:46 00 01 00 20 00 11 00 0D C0 01 81 00 08 00 00 01 00 00 FF 02 00
RX: 15:36:46 00 01 00 11 00 20 00 12 C4 01 81 00 09 0C 07 E4 0C 08 02 0F 25 0E 16 01 4A 00
TX: 15:36:47 00 01 00 20 00 11 00 0D C0 01 81 00 07 01 00 63 01 00 FF 03 00
RX: 15:36:47 00 01 00 11 00 20 01 92 C4 01 81 00 01 16 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0E 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 20 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 34 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 48 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 01 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 10 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 02 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 05 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 06 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 07 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 08 1D 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 80 07 0E FF 0F 02 12 00 00 02 04 12 00 01 09 06 01 00 80 07 59 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 80 07 6E FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 1F 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 33 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 47 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 5E 5B 01 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 5E 5B 02 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 0D 1B 00 FF 0F 02 12 00 00 02 04 12 00 03 09 06 01 00 54 1B 00 FF 0F 02 12 00 00
TX: 15:36:47 00 01 00 20 00 11 00 40 C0 01 81 00 07 01 00 63 01 00 FF 02 01 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E4 0B 1A 07 16 00 00 FF FE B6 00 09 0C 07 E4 0B 1A 07 17 00 00 FF FE B6 00 01 00
RX: 15:36:47 00 01 00 11 00 20 02 63 C4 01 81 00 01 05 02 16 09 0C 07 E4 0B 1B FF 09 00 FF FF 01 4A 00 06 00 00 13 86 06 00 00 E1 F5 06 00 00 E1 DC 06 00 00 E1 E9 06 00 00 00 00 05 FF FE AF 72 06 00 01 50 8E 06 00 00 00 00 06 00 00 00 00 06 00 01 26 AA 06 00 00 00 00 06 00 00 E1 E8 06 FF FF FF FF 05 FF FE D9 56 06 00 00 01 08 06 00 00 01 08 06 00 00 01 08 05 00 00 00 00 05 FF FE D9 56 06 00 00 00 00 06 00 00 02 F0 02 16 09 0C 07 E4 0B 1B FF 09 0F FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 29 06 00 00 E2 14 06 00 00 E2 1F 06 00 00 00 00 05 FF FF 6C DA 06 00 00 93 26 06 00 00 00 00 06 00 00 00 00 06 00 00 7D EA 06 00 00 00 00 06 00 00 E2 1E 06 FF FF FF FF 05 FF FF 82 16 06 00 00 00 72 06 00 00 00 72 06 00 00 00 72 05 00 00 00 00 05 FF FF 82 16 06 00 00 00 00 06 00 00 02 F7 02 16 09 0C 07 E4 0B 1B FF 09 1E FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 4C 06 00 00 E2 33 06 00 00 E2 3E 06 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 E2 3F 06 FF FF FF FF 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 05 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 02 16 09 0C 07 E4 0B 1B FF 09 2D FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 3D 06 00 00 E2 2A 06 00 00 E2 38 06 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 E2 35 06 FF FF FF FF 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 05 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 02 16 09 0C 07 E4 0B 1B FF 0A 00 FF FF 01 4A 00 06 00 00 13 86 06 00 00 E2 39 06 00 00 E2 24 06 00 00 E2 32 06 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 E2 2F 06 FF FF FF FF 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 05 00 00 00 00 05 00 00 00 00 06 00 00 00 00 06 00 00 00 00
TX: 15:36:50 00 01 00 20 00 11 00 05 62 03 80 01 00
RX: 15:36:50 00 01 00 11 00 20 00 02 63 00
//------------------------------------------------
Thanks,
Pradson
Hi Pradson,
Hi Pradson,
There was an error with UseUtc2NormalTime. This is now fixed. Get the latest version.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Yes, it working now.
Thanks a lot for your kind help.
Thanks & Regards,
Pradson