Views:
The SnmpGet class gets values from a remote SNMP agent.
Constructor
var request = new SnmpGet( context );
context is an object of type SnmpContext.
Properties
Name Type Description
retries int The number of retries before failure.
timeout int The timeout in seconds before a particular 'get' attempt is assumed to have failed.
Methods
Return Value Name Description
void addOid( String oid ) Adds an OID to this GET Request.
void destroy() Frees up any resources used by this GET request.
String getValue( String oid ) Returns the oid:named value from this result (if sendRequest was successful).
boolean isDestroyed() Returns true if this request has been destroyed.
boolean sendRequest() Performs the GET operation, returning true if successful.
Sample usage
var request = new SnmpGet( context );
var oid = “1.2.3.6.1.2.1.1.1.0”;
request.addOid( oid );
if ( request.sendRequest() ) {
    var value = request.getValue( oid );
}