Page 1 of 1

What is a TLV type in Visual Basic?

Posted: Mon Oct 05, 2015 7:12 pm
by rdonnay
I'm writing a SMPP system that uses an ActiveX control for SMPP sending and receiving.

I'm converting sample code that was written in Visual Basic.
I have the sending code converted but I don't understand something about the receiving code.

Dim objTlvStatus As Tlv
Dim objTlvMessageRef As Tlv

I don't know what a Tlv type is.
Can anyone point me in the right direction?

Re: What is a TLV type in Visual Basic?

Posted: Mon Oct 05, 2015 8:10 pm
by rdonnay
Nevermind. I realized I don't need to know this based on the way the code is implemented.
The automation object is simply stored to a variable which is later passed to another method.

Re: What is a TLV type in Visual Basic?

Posted: Wed Oct 07, 2015 2:06 am
by messaoudlazhar
TLV is Tag-length-value encoding. Often it is better referred to by it's original name, type-length-value.

The first field is the "type" of data being processed, the second field specifies the "length" of the value, the third field contains a "value".

See : https://en.wikipedia.org/wiki/Type-length-value

This is a good method for storing binary data in a sequential read file.

Best Regards

Messaoud Mohamed Lazhar

Re: What is a TLV type in Visual Basic?

Posted: Wed Oct 07, 2015 9:28 am
by rdonnay
TLV is Tag-length-value encoding
Thanks for that explanation.