I can read date and time but i can't write Date and Time to meter actually i get DLMS_ERROR_CODE_OK but when i read again date and time are not change.
Clint Adress 0x01
// already connected and read Association View.
int index=2;
time_t tm1 = time(NULL);
struct tm dt;
localtime_s(&dt, &tm1);
CGXDateTime aa(dt);
aa.SetSkip(DATETIME_SKIPS_NONE);
CGXDLMSVariant ValueSet(aa);
std::string str="0.0.1.0.0.255:"
CGXDLMSObject* obj = cl.GetObjects().FindByLN(DLMS_OBJECT_TYPE_ALL, str);
if ((ret = com.Write(obj, index, ValueSet)) != DLMS_ERROR_CODE_OK)
{
return_value = "--ERROR--";
}
else
{
return_value = "--OK--";
}
why i get "--OK--" but date and time it has not changed?
Write Date and Time to Meter with Gurux.DLMS.CPP
Hi,
Can you post bytes what you send to me by email?
BR,
Mikko