Re: transformation script example

From: Edgar Chupit <chupit_at_DOMAIN_REMOVED>
Date: Thu, 28 Dec 2006 07:45:40 +0200

Hello,

Than, I must be doing something wrong.

For a simple test I have added Disk.Free('C:') DCI. It shows free space in
bytes. I want to convert this value to kilobytes. I double click parameter
item, select transformation tab, in "Step 1 - Delta processing" I leave
"None - Keep original value", but in "Step 2 - Transformation Script" I
write, as You have suggested:

$1 / 1024

Press OK and wait a little. Check last DCI and still see free space in
bytes. I've tried:

* $1 / 1024
* $1 / 1024;
* return $1 / 1024;
* sub main()
{
  return $1 / 1024;
}

None of this seem to work.

On 12/28/06, Victor Kirhenshtein <victor_at_opticom.lv> wrote:
>
> Hello!
>
> Yes, "Test" button doesn't work. Transformation scripts are fully
> functional, they should be written in simple embedded language called NXSL -
> NetXMS Scripting Language. Script could be either a single expression or a
> complete function - for transformations most likely you will use first form.
> In documentation you can find formal grammar of NXSL, and below are some
> examples of transformation scripts:
>
> 1. Divide input value by 1024:
>
> $1 / 1024
>
>

-- 
Best regards,
Edgar Chupit
callto://edgar.chupit
Received on Thu Dec 28 2006 - 07:45:40 EET

This archive was generated by hypermail 2.2.0 : Thu Dec 28 2006 - 07:53:59 EET