ℹ️ The Auron SMS Server is now Auron Omni. Learn more here.

How can we help?

AxSms.Tlv


Introduction

Skip to properties and methods

This is a Tlv (Tag, Length, Value) object. TLVs are only applicable in the SMPP protocol. They are optional values that may be attached to an SMS message.

A number of TLVs are specified in the SMPP protocol. Their TAG values have constants defined here. Operators may also define their own TLV values.

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 Number 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. TLVs are additional, often optional information that can be attached to any of the packets specified in the SMPP 3.4 or 5.0 protocol. Here is a list of TLVs proposed in SMPP 3.4. Your provider may use other specific TLVs. Check the provider documentation for those.

Example:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsString = "Hello, World !"
Write-Host $objTlv.Length
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsString = "Hello, World !";
Console.WriteLine(objTlv.Length);
...
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 because it is always calculated from the value field.

Example:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsString = "Hello, World !"
Write-Host $objTlv.Length
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsString = "Hello, World !";
Console.WriteLine(objTlv.Length);
...
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:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsString = "Hello, World !"
Write-Host $objTlv.Length
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsString = "Hello, World !";
Console.WriteLine(objTlv.Length);
...
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:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsString = "Hello, World !"
Write-Host $objTlv.Length
Write-Host $objTlv.ValueAsHexString
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsString = "Hello, World !";
Console.WriteLine(objTlv.Length);
Console.WriteLine(objTlv.ValueAsHexString);
...
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:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsInt32 = 1
Write-Host $objTlv.Length
Write-Host $objTlv.ValueAsHexString
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsInt32 = 1;
Console.WriteLine(objTlv.Length);
Console.WriteLine(objTlv.ValueAsHexString);
...
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:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsInt16 = 1
Write-Host $objTlv.Length
Write-Host $objTlv.ValueAsHexString
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsInt16 = 1;
Console.WriteLine(objTlv.Length);
Console.WriteLine(objTlv.ValueAsHexString);
...
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:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Tag = 100
$objTlv.ValueAsInt8 = 1
Write-Host $objTlv.Length
Write-Host $objTlv.ValueAsHexString
...
var objTlv = new AxSms.Tlv();
objTlv.Tag = 100;
objTlv.ValueAsInt8 = 1;
Console.WriteLine(objTlv.Length);
Console.WriteLine(objTlv.ValueAsHexString);
...
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:

Always 0.

Example:

$objTlv = New-Object -ComObject AxSms.Tlv
$objTlv.Clear()
$objTlv.Tag = 100
$objTlv.ValueAsInt8 = 1
Write-Host $objTlv.Length
Write-Host $objTlv.ValueAsHexString
...
var objTlv = new AxSms.Tlv();
objTlv.Clear();
objTlv.Tag = 100;
objTlv.ValueAsInt8 = 1;
Console.WriteLine(objTlv.Length);
Console.WriteLine(objTlv.ValueAsHexString);
...
Set objTlv = CreateObject("AxSms.Tlv")
objTlv.Clear
objTlv.Tag = 100
objTlv.ValueAsInt8 = 1
WScript.Echo objTlv.Length
WScript.Echo objTlv.ValueAsHexString
...