News:

We really need your input in this questionnaire

Main Menu

DCI transformation.

Started by orddie, August 13, 2013, 09:52:07 PM

Previous topic - Next topic

orddie

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.

Victor Kirhenshtein

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

orddie

right on.  That solved it!

Thanks!