I have integrated "Gurux.DLMS.cpp-master/GuruxDLMSClientExample" in my project. This application reads information periodically (interval basis like every 1 second or 2 seconds) from the meter. I want to test this client application with 1000+ actual devices but I have only 2 devices. Can I use "Gurux.DLMS.cpp-master/GuruxDLMSServerExample" application instead of actual device without any challenges?
I am using C# DLMS simulator version and I am not familiar with C#. Still I am unable to write dynamic values into the profile generic buffer. That's the reason I am getting static values from the simulator.
Where and how shall I write code so that I could get dynamic values from the profile generic buffer?
The new row is added for the profile generic buffer when you call "Capture".
The simulator will automatically loop all current values and save them to the new row.
Check this from GXDLMSDirector Profile Generic UI. Just add Capture objects and press "Capture".
Thanks for reply. Actually, I am able to read buffer of profile generics using "Capture". But my query was how would I get different values for every "Capture" ?
As per my understanding, I will have to write current values whenever "Capture" called. I do not know how and where shall I change the code. Could you share a piece of code for the same?
Add this to PreAction.
It will increase the register value.
if ((it.Target is GXDLMSProfileGeneric pg) && it.Index == 2)
{
//Update clock or register for profile-generic object when capture is invoked.
foreach (GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject> co in pg.CaptureObjects)
{
if ((co.Key is GXDLMSClock clock) && co.Value.AttributeIndex == 2)
{
clock.Time = clock.Now();
}
else if (co.Key is GXDLMSRegister r && co.Value.AttributeIndex == 2)
{
r.Value = Convert.ToInt32(r.Value) + 1;
}
}
}
BR,
Mikko
Thanks a lot. Now I am able to get dynamic values from simulator but unable to read instantaneous-profile object and getting this "Access Error : Device reports Read-Write denied." error.
Actually, I have noticed that with this solution the instantaneous profile object does not work. I have emailed files to you regarding this issue. Kindly check and suggest the a solution.
Hi Mikko,
Hi Mikko,
Hope you are doing well.
Mikko, is any update regarding release of DLMS simulator C++ version ?
Regards,
Pradson
Hi,
Hi,
Not yet. Clients are keeping us busy with ECDSA. It's coming, but I can't say the exact day when it's released.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Hope you are doing well.
I am using C# DLMS simulator version and I am not familiar with C#. Still I am unable to write dynamic values into the profile generic buffer. That's the reason I am getting static values from the simulator.
Where and how shall I write code so that I could get dynamic values from the profile generic buffer?
Kindly suggest.
Thanks & Regards,
Pradson
Hi Pradson,
Hi Pradson,
The new row is added for the profile generic buffer when you call "Capture".
The simulator will automatically loop all current values and save them to the new row.
Check this from GXDLMSDirector Profile Generic UI. Just add Capture objects and press "Capture".
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks for reply. Actually, I am able to read buffer of profile generics using "Capture". But my query was how would I get different values for every "Capture" ?
As per my understanding, I will have to write current values whenever "Capture" called. I do not know how and where shall I change the code. Could you share a piece of code for the same?
Thanks & Regards,
Pradson
Hi,
Hi,
Add this to PreAction.
It will increase the register value.
if ((it.Target is GXDLMSProfileGeneric pg) && it.Index == 2)
{
//Update clock or register for profile-generic object when capture is invoked.
foreach (GXKeyValuePair<GXDLMSObject, GXDLMSCaptureObject> co in pg.CaptureObjects)
{
if ((co.Key is GXDLMSClock clock) && co.Value.AttributeIndex == 2)
{
clock.Time = clock.Now();
}
else if (co.Key is GXDLMSRegister r && co.Value.AttributeIndex == 2)
{
r.Value = Convert.ToInt32(r.Value) + 1;
}
}
}
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks a lot. Now I am able to get dynamic values from simulator but unable to read instantaneous-profile object and getting this "Access Error : Device reports Read-Write denied." error.
Actually, I have noticed that with this solution the instantaneous profile object does not work. I have emailed files to you regarding this issue. Kindly check and suggest the a solution.
Thanks & Regards,
Pradson