Whenever I read nameplate profile object. Before read function I set SetUIDataType DLMS_DATA_TYPE_STRING then read object. But I get data buffer in octal instead of string format.
How should I read namelate profile object in readable format without apply conversion?
Kindly find the blow mentioned sample code-
CGXDLMSProfileGeneric *objNP = new CGXDLMSProfileGeneric("0.0.94.91.10.255");
std::string sNPCapObj;
if ((ret = comm.Read(objNP, 3, sNPCapObj)) != 0)
{
TRACE("err! failed to readCaptureObjects: %s \n", CGXDLMSConverter::GetErrorMessage(ret));
}
Hi Pradson,
Hi Pradson,
Data type is not set for profile generic. It's set for captured objects like this:
std::string str;
CGXDLMSProfileGeneric pg("0.0.94.91.10.255");
//Read capture objects.
Read(&pg, 3, str);
pg.GetCaptureObjects().at(0).first->SetUIDataType(2, DLMS_DATA_TYPE_STRING);
pg.GetCaptureObjects().at(1).first->SetUIDataType(2, DLMS_DATA_TYPE_STRING);
//Read buffer.
Read(&pg, 2, str);
BR,
Mikko
Hi Mikko,
Hi Mikko,
I got it. Thanks a lot.
Thanks & Regards,
Pradson