Hi,
Yes, there is a limit to the lentgh of a Calculation!
Here is an example from my Symbol WS5000 probe:
ccMUcount1, ($ccRadioMUs1 + $ccRadioMUs2 + $ccRadioMUs3 +
$ccRadioMUs4 + $ccRadioMUs5 + $ccRadioMUs6 + $ccRadioMUs7 +
$ccRadioMUs8 + $ccRadioMUs9 + $ccRadioMUs10), CALCULATION
ccMUcount2, ($ccRadioMUs11 + $ccRadioMUs12 + $ccRadioMUs13 +
$ccRadioMUs14 + $ccRadioMUs15 + $ccRadioMUs16 + $ccRadioMUs17 +
$ccRadioMUs18 + $ccRadioMUs19 + $ccRadioMUs20), CALCULATION
ccMUcount3, ($ccRadioMUs21 + $ccRadioMUs22 + $ccRadioMUs23 +
$ccRadioMUs24 + $ccRadioMUs25 + $ccRadioMUs26 + $ccRadioMUs27 +
$ccRadioMUs28 + $ccRadioMUs29 + $ccRadioMUs30), CALCULATION
ccMUcountTotal, ($ccMUcount1+$ccMUcount2+$ccMUcount3),
CALCULATION, "MU Total for $ccModuleName"
If you move some of the vars from line 2 to line 1, the probe will
fail with funny text in the Display area...
Also, 99% sure, that's why you get 'can't match' errors...!
One way to work around this, is to use SHORT variable names:
$TRAY1_MEDIA_TYPE -> $T1MT = saves 12 char pr. calculation!
It would be nice if this 'bug' is fixed in an upcoming version (notch
notch...)
Best,
Jakob Peterhänsel
"Tell me why, don't we try, not to break our hearts
and make it so hard for our selfs"
P.S.B. 1987
Email: [EMAIL PROTECTED]
AIM: Marook
Phone: +45 22684961
On 22/08/2005, at 21:13, Levinson, Don A. wrote:
Is there a limit to the line length in a custom SNMP probe? I am still
having trouble after unrolling this calculation into one long line.
But
the whole line does not print in the event log error message.
08/22 11:10:21 dbug biz.awwu.snmp.designjet: Can't match "
PAPER_TYPE,
($TRAY1_MEDIA_TYPE == 3) ? "Plain Paper" : ($TRAY1_MEDIA_TYPE ==
32735)
? "White Inkjet Paper" : ($TRAY1_MEDIA_TYPE == 32736) ? "Thin Natural
Tracing" : ($TRAY1_MEDIA_TYPE == 32752) ? "Natural Tracing Paper" :
($TRAY1_MEDIA_TYPE == 32753) ? "
PAPER_TYPE, ($TRAY1_MEDIA_TYPE == 3) ? "Plain Paper"
: ($TRAY1_MEDIA_TYPE == 32735) ? "White Inkjet Paper" :
($TRAY1_MEDIA_TYPE == 32736) ? "Thin Natural Tracing" :
($TRAY1_MEDIA_TYPE == 32752) ? "Natural Tracing Paper" :
($TRAY1_MEDIA_TYPE == 32753) ? "Coated Paper" : ($TRAY1_MEDIA_TYPE ==
32754) ? "Clear Film" : ($TRAY1_MEDIA_TYPE == 32755) ? "High Gloss
Photo" : ($TRAY1_MEDIA_TYPE == 32756) ? "Semi-Gloss Photo" :
($TRAY1_MEDIA_TYPE == 32758) ? "Heavy Coated Paper" :
($TRAY1_MEDIA_TYPE
== 32764) ? "Vellum" : ($TRAY1_MEDIA_TYPE == 32767) ? "Translucent
Bond"
: ($TRAY1_MEDIA_TYPE == 32768) ? "Matte Film" : ($TRAY1_MEDIA_TYPE ==
32750) ? "Imaging Film Backlit" : ($TRAY1_MEDIA_TYPE == 32757) ? "High
Gloss Film" : ($TRAY1_MEDIA_TYPE == 32749) ? "Opaque Vinyl" : "Unknown
(${TRAY1_MEDIA_TYPE})", CALCULATION, "Paper Type"
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of William W.
Fisher
Sent: Monday, August 22, 2005 10:56 AM
To: InterMapper Discussion
Subject: Re: [IM-Talk] SNMP string comparison
Sorry, the backslash escape of the newline doesn't work. The entire
expression has to be on one line. This makes it a bit unwieldy.
Bill Fisher
Dartware, LLC
On Aug 22, 2005, at 1:07 PM, Levinson, Don A. wrote:
Will this work in 4.3.1? My event log is giving me errors:
08/22 09:05:34 dbug biz.awwu.snmp.designjet: Can't match "
PAPER_TYPE,
($TRAY1_MEDIA_TYPE == 3) ? "Plain Paper" : \
"
08/22 09:05:34 dbug biz.awwu.snmp.designjet: Can't match "
($TRAY1_MEDIA_TYPE == 32735) ? "White Inkjet Paper" : \
...
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of William W.
Fisher
Sent: Friday, August 19, 2005 5:34 AM
To: InterMapper Discussion
Subject: Re: [IM-Talk] SNMP string comparison
Don:
You can use the ?: syntax in a calculation:
paperType, ($media1 == 3) ? "Plain Paper" : \
($media1 == 32735) ? "White Inkjet Paper" : \
($media1 == 32736) ? "Thin Natural Tracing" : \
"Unknown ($media1)",
CALCULATION, "Paper Type"
Regards,
Bill Fisher
Dartware, LLC
On Aug 18, 2005, at 10:01 PM, Levinson, Don A. wrote:
Is there a way to take a SNMP numeric variable and compare it to a
table of static values to return the string associated with that
value? Some kind of if/then or case/next syntax?
The variable is
TRAY1_MEDIA_TYPE, ${HP-PML}.1.4.1.3.3.1.6,
DEFAULT, "Media Type"
And the table is
3 Plain Paper
32735 White Inkjet
Paper
32736 Thin Natural
Tracing
32752 Natural Tracing
Paper
32753 Coated Paper
32754 Clear Film
32755 High Gloss Photo
32756 Semi-Gloss Photo
32758 Heavy Coated
Paper
32764 Vellum
32767 Translucent Bond
32768 Matte Film
32750 Imaging Film
Backlit
32757 High Gloss Film
32749 Opaque Vinyl
\0mp\
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]
____________________________________________________________________
List archives: http://www.mail-archive.com/intermapper-talk%
40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]
____________________________________________________________________
List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]