Octet String Translate

5 posts / 0 new
Last post
hurani
Octet String Translate

Dear all,
I want to translate PDU to XML like in browser translater by gurux to show time start and end of generic data, and I need that in android I am using GXDLMSTranslator.pdutoxml but it doesnt work like browser app.
It shows OctetString="07E40205030B391200000002", do you know to to convert it to time and date? or making it possible to use pdutoxml?

Thanks in advance

Kurumi
Kurumi's picture

Hi,

If you want to sow date and time on comments you need to set comments like this.
GXDLMSTranslator t = new GXDLMSTranslator();
t.setcomments(true);

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

hurani

Thank you, How can I get the octet value and convert it to readable string?

Kurumi
Kurumi's picture

Hi,

If you have octet string you can use GXDLMSClient.ChangeType to convert it to date-time.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

hurani

Thanks its working