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.GraphVuMeterToJpeg

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

value = lp.GraphVuMeterToJpeg('filename.jpeg', 'title', value, min, max, type, height, width, bkcolor, inkcolor);

Description

The lp.GraphVuMeterToJpeg LUA funtion generate a image file of a gauge or counter (a vumeter) for one value

Parameters

'filename.jpg'  The path and name of the graph file

Warning  ! If you use the '\' in the path you must replace it with '\\'. The '\'character is use as an escape character in LUA.

'title'                 The title insert in the image

value                 The value dispalyed in the vumeter (type of double LUA)

min                    The value of the zero reference

max                    The value of the max reference

type                   The graphique type one of the number below

0

1

2

3

vumeter lua function

vumeter lua function

vumeter lua function

vumeter lua function

height                  The height of the image

width                   The width of the image

bkcolor               The background color (value of 32bit RGB)

You can use the wizard of the editor to select the color value.

inkcolor              The color of the line (value of 32bit RGB)

You can use the wizard of the editor to select the color value.

 

Return Values

value : equal 1 if a file has been generated

Return nil if an error occurs

Example

lua logoLoriotPro WEB site Documentation scripting LoriotPro
Extensions du language LUA

Table des matières    Liste de fonctions

Imprimer la page en cours Mail this  link UTUBE Channel

lua vumeter generation

lua vumeter generatio

The code

i=lp.GraphVuMeterToJpeg("c:\\image1.jpg","%",80,0,100,2,200,200,16776960,8421504);

if (i) then lp.Print("File generated\n");

else lp.Print("File no generated\n");

end

lua vumeter generatio

View the result

lua vumeter generatio

 

 


www.loriotpro.com