I try to capture CGXDLMSProfileGeneric and read it with DLMSDIrector.
Here my code:
std::string name("0.0.94.7.138.255");
CGXDLMSProfileGeneric* lst = new CGXDLMSProfileGeneric(name);
lst->SetAccess(2, DLMS_ACCESS_MODE::DLMS_ACCESS_MODE_READ);
lst->SetAccess(3, DLMS_ACCESS_MODE::DLMS_ACCESS_MODE_READ);
lst->SetCapturePeriod(0);
For debug i commented row with code:
settings.SetIndex(settings.GetIndex() + 1);
(see attached image)
in method int CGXDLMSProfileGeneric::GetData(
CGXDLMSSettings& settings,
CGXDLMSValueEventArg& e,
std::vector< std::vector<CGXDLMSVariant> >& table,
std::vector<std::pair<CGXDLMSObject*, CGXDLMSCaptureObject*> >& columns,
CGXByteBuffer& data)
And all rows show in DLMSDirector OK.
But i don't shure is it correct fix.
Thank you for this info. I can repeat this and I know the reason. Your fix will solve this with your data, but it might cause problems when you have a lot of rows. Access service works with simple COSEM objects, but Profile Generic is causing problems. I need to think about this a little bit.
You can fix this temporarily if you remove Access conformance bit from server like this:
SetConformance((DLMS_CONFORMANCE) (GetConformance() & ~DLMS_CONFORMANCE_ACCESS));
Or then you un-check the Access From Supported Services -tab in GXDLMSDirector.
Can you please provide an answer for the initial question?
I've copied the code from the first message and can't get the correct values output via DLMSDirector.
I see the values in m_CaptureObjects field - how to get these values?
I'm not sure why this happens, but there are a couple of reasons for this.
Select the Supported Services tab from device settings and unselect Access service. It will read each argument differently and it makes easier to solve this.
You have only two values in the buffer, not 5000. Remove this line.
lst->SetProfileEntries(5000);
For debug i commented row
For debug i commented row with code:
settings.SetIndex(settings.GetIndex() + 1);
(see attached image)
in method int CGXDLMSProfileGeneric::GetData(
CGXDLMSSettings& settings,
CGXDLMSValueEventArg& e,
std::vector< std::vector<CGXDLMSVariant> >& table,
std::vector<std::pair<CGXDLMSObject*, CGXDLMSCaptureObject*> >& columns,
CGXByteBuffer& data)
And all rows show in DLMSDirector OK.
But i don't shure is it correct fix.
Hi,
Hi,
Thank you for this info. I can repeat this and I know the reason. Your fix will solve this with your data, but it might cause problems when you have a lot of rows. Access service works with simple COSEM objects, but Profile Generic is causing problems. I need to think about this a little bit.
You can fix this temporarily if you remove Access conformance bit from server like this:
SetConformance((DLMS_CONFORMANCE) (GetConformance() & ~DLMS_CONFORMANCE_ACCESS));
Or then you un-check the Access From Supported Services -tab in GXDLMSDirector.
BR,
Mikko
Can you please provide an…
Can you please provide an answer for the initial question?
I've copied the code from the first message and can't get the correct values output via DLMSDirector.
I see the values in m_CaptureObjects field - how to get these values?
Best regards!
Hi, I'm not sure why this…
Hi,
I'm not sure why this happens, but there are a couple of reasons for this.
Select the Supported Services tab from device settings and unselect Access service. It will read each argument differently and it makes easier to solve this.
You have only two values in the buffer, not 5000. Remove this line.
lst->SetProfileEntries(5000);
BR,
Mikko