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

lp.GetRouterInformation - Get the router properties

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.

Syntax

result=lp.GetRouterInformation(router_id,arrayname) ;

Description

Collecte the configuration parameters stored in the directory and attached to this Router ID

Parameters

router_id - The router ID, one of its IP address in a charater string
arrayname - A variable namefor an array of values.

Return Values

Result =1 or nil if an error occurs

If result =1 returns arrayname

Array variable description

array['UID'] The UID as a charater string
array['name'] The router name as a charater string
array[‘x’] The X position of the router in the InterNetwork MAP
array[‘y’] The Y position of the router in the InterNetwork MAP
array[‘status’] The current Router status (value: 0,1,2,3,4)(The color of host icon)
array[‘type’] The type of router
array[‘flagused’] Indicate that the router is attached to a networh

Exemple

lp_value = 0;
lp_buffer ="error";

router_id=lp.GetFirstRouter();

if router_id~=nil then
lp.Trace(router_id);
if lp.GetRouterInformation(router_id,"a")~=nil then
lp.Trace(a.UID);
lp.Trace(a.name);
lp.Trace(a.x);
lp.Trace(a.y);
lp.Trace(a.status);
lp.Trace(a.type);
lp.Trace(a.flagused);
end
lp_buffer="ok";
end





www.loriotpro.com