NetXMS Support Forum

English Support => General Support => Topic started by: orddie on August 13, 2013, 09:52:07 PM

Title: DCI transformation.
Post by: orddie on August 13, 2013, 09:52:07 PM
Im trying to convert a DCI that's in tenths of C under the transformation section.

Its not converting the value when i view object details --> Last Values section.  thus far i have tried...

return (($1 * .1) *  1.8 ) + 32;

((int($1) * .1) *  1.8 ) + 32

return $1 * .1 *  1.8 + 32

$1 * .1 * 1. 8 + 32


Can anyone help?  the $1 is pulled from SNMP INT value.
Title: Re: DCI transformation.
Post by: Victor Kirhenshtein on August 14, 2013, 01:18:20 PM
Hi!

Problem is that NXSL does not understand ".1" notation - you have to give it as "0.1".
Btw, you can check your scripts with nxscript command line tool:


C:\Source\NetXMS\x64\debug>nxscript -r test.nxsl
NetXMS Scripting Host  Version 1.2.8
Copyright (c) 2005-2013 Victor Kirhenshtein

syntax error, unexpected '.'

C:\Source\NetXMS\x64\debug>


Best regards,
Victor
Title: Re: DCI transformation.
Post by: orddie on August 14, 2013, 03:42:35 PM
right on.  That solved it!

Thanks!