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]

Reply via email to