LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lpsla.GetLoriotProIDList - Retrieve a list of LoriotPro ID

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.


number = lpsla.GetLoriotProIDList(‘array’);

number = lpsla.GetLoriotProIDList(‘array’,index);


The lpsla.GetLoriotProIDList LUA function retrieves a list of directories of the Windows file system. The directory name is the LoriotPro ID of the LoriotPro host that peforms the SLA data collection.

Each LoriotPro has a unique ID defined in the license key.

See the LoriotPro documentation below for more explanation about the directroy structure of SLA files.

Description technique de la solution de contrôle de QOS Loriotpro


‘array’   An array of directory name

index     Equal to 1 if the table start at 1, required to support the LUA ipairs(array) function.

Return Values

Number         The number of entries in the table 'array’

Warning ! . LoriotPro LUA function returns indexed table starting at index 0. Usually LUA function returns table starting at index 1. This cas cause errors when using some management function of LUA.

array[0]…array[number-1]             An array of the IP adresses of the devices found. (or array[1]…array[number] if index)

nil                            nil if an error occurs


The following example display the lis of the directories. Only one LoriotPro is on the network.

-- sample

if (lp.IsDebugMode()==1) then





if (lib) then 



for l=0,(k-1) do

 lp.Print(a[l]," LoriotPro ID \n");


for l=0,table.getn(a) do

 lp.Print(a[l]," LoriotPro ID \n");



for key,value in ipairs(a) do lp.Print("[",key,"] [",value,"]\n") end


SLA directories ID