Hi!
I write test program server side DLMS.cpp.
I created CGXDLMSClock object and add it to CGXDLMSObjectCollection.
Then i try read clock from DLMSDIrector. Read first time - ok, second time - my program crashed.
I think error in int CGXDLMSLNCommandHandler::HandleAccessRequest() method.
pointer *e allocates memory out of loop single time, push_back() to args several times (8 for clock) in loop and when function body ends destructor of CGXDLMSValueEventCollection several times delete memory of *e which allocated single time.
When i row
CGXDLMSValueEventArg* e = new CGXDLMSValueEventArg(server, NULL, 0);
moved to begin of loop - no crashes.
Am I right?
Thanks! It works after fixing.
By the way:
I found possible forgotten break key word in switch-case in methods:
int CGXDLMSCharge::SetValue(CGXDLMSSettings& settings, CGXDLMSValueEventArg& e);
No one is not using that and it's not implemented because of that. Meter manufacturers are generally speaking moving from Short Name Referencing to Logical Name Referencing.
Services that can't be verified with the meter(s) are not usually implemented. There are features in DLMS that no one is using at the moment and those are not implemented if they are not used in any meter.
Hi Dmitry,
Hi Dmitry,
Thank you for this info. I created a ticket from this and it's fixed today.
http://www.gurux.fi/node/19026
BR,
Mikko
Thanks! It works after fixing
Thanks! It works after fixing.
By the way:
I found possible forgotten break key word in switch-case in methods:
int CGXDLMSCharge::SetValue(CGXDLMSSettings& settings, CGXDLMSValueEventArg& e);
int CGXDLMSSNCommandHandler::HandleWriteRequest(
CGXDLMSSettings& settings,
CGXDLMSServer* server,
CGXByteBuffer& data,
CGXByteBuffer* replyData,
CGXDLMSTranslatorStructure* xml,
unsigned char cipheredCommand)
Is it bugs?
Hi,
Hi,
No one is not using that and it's not implemented because of that. Meter manufacturers are generally speaking moving from Short Name Referencing to Logical Name Referencing.
Services that can't be verified with the meter(s) are not usually implemented. There are features in DLMS that no one is using at the moment and those are not implemented if they are not used in any meter.
BR,
Mikko