Re: How convert string to integer

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2008/7/31 Murilo Fujita <[email protected]>:
>     I extended my agent to compare voltage value (greater or less than 12
> volts) gotten through data acquisiton.


>     But 30778.9.4.1.2.7.47.98.105.110.47.115.104.2 is string as shown below.

The DisMan Event MIB (i.e. monitor) can really *only* work with integer tests.
There isn't much that can be done with non-integer values.

If you really need to handle this, then you should consider amending your
MIB definitions to use numeric-typed objects.  Either integers, or fixed
point values.

Alternatively, use an external app or script to poll the string value,
and issue a trap when appropriate.   External code can have much
more power - the built-in stuff is much more limited.

Dave

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.