AxSms.Tlv
Introduction
Skip to properties and methods
This is a Tlv (Tag, Length, Value). TLV’s are only applicable in the SMPP protocol. TLV’s are optional values that may be attached to an SMS message.
There are a number of possible TLV’s specified in the SMPP protocol. Their TAG values have constants defined here. Other TLV values may be defined by operators.
Properties and Methods
Property | Type | Read/Write | Description |
Tag | Number | Read/Write | The ‘Tag’ value identifies the TLV |
Length | Number | Read | The length in bytes of the TLV ‘Value’ field. |
ValueAsString | String | Read/Write | The value represented as a string |
ValueAsHexString | String | Read/Write | The value represented as a hexadecimal string |
ValueAsInt32 | Number | Read/Write | The value represented as a 32 bit integer |
ValueAsInt16 | Number | Read/Write | The value represented as a 16 bit integer |
ValueAsInt8 | String | Read/Write | The value represented as an 8 bit integer |
Method | Description |
Clear | Reset all properties to their default values |
Tag property
The ‘Tag’ value identifies the TLV. TLV’s are additional, often optional information that can be attached to any of the packets that are specified in the SMPP 3.4 or 5.0 protocol. Here’s a list of TLV’s that have been proposed in SMPP 3.4. You provider may use other, specific TLV’s, find these in the providers documentation.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsString = "Hello, World !"
WScript.Echo objTlv.Length
...
Length property
This is the length in bytes of the TLV ‘Value’ field. This property is read-only since it’s always inferred from the value field.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsString = "Hello, World !"
WScript.Echo objTlv.Length
...
ValueAsString property
Use this property to set or read a TLV Value that is specified as a ‘C-Octet’ string.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsString = "Hello, World !"
WScript.Echo objTlv.Length
...
ValueAsHexString property
Use this property to set or read a TLV Value that is specified as ‘Octet Data’ or ‘Octet String’.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsString = "Hello, World !"
WScript.Echo objTlv.Length
WScript.Echo objTlv.ValueAsHexString
...
ValueAsInt32 property
Use this property to set or read a TLV Value that is specified as a ‘4 Octet’ value.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsInt32 = 1
WScript.Echo objTlv.Length
WScript.Echo objTlv.ValueAsHexString
...
ValueAsInt16 property
Use this property to set or read a TLV Value that is specified as a ‘2 Octet’ value.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsInt16 = 1
WScript.Echo objTlv.Length
WScript.Echo objTlv.ValueAsHexString
...
ValueAsInt8 property
Use this property to set or read a TLV Value that is specified as an ‘Octet’ value.
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Tag = 100
objTlv.ValueAsInt8 = 1
WScript.Echo objTlv.Length
WScript.Echo objTlv.ValueAsHexString
...
Clear method
This method resets all properties to their default values.
Parameters:
- None
Return value:
None
Example:
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Clear
objTlv.Tag = 100
objTlv.ValueAsInt8 = 1
WScript.Echo objTlv.Length
WScript.Echo objTlv.ValueAsHexString
...