SNMPResponse - Global

Wraps an SNMP payload response instance with methods to safely and easily retrieve SNMP singleton fields or tables.

Use to retrieve SNMP singleton fields or tables.

SNMPResponse - buildIndex(Object cur, String name, String extName)

Builds an index to all SNMP entities in the current object.

Table 1. Parameters
Name Type Description
cur Object The current object
name String The index name
extName String The index extension
Table 2. Returns
Type Description
void


    

SNMPResponse - buildReferences()

Builds references to actual instances for all identified indexes (in the discovery_snmp_ref table) that can be resolved.

Table 3. Parameters
Name Type Description
None
Table 4. Returns
Type Description
void


    

SNMPResponse - getAmbiguousOIDs(String refBase, String refLeaf)

Returns an array of OIDs that match the given ref_base and which have a defined, non-null ref_leaf.

The last character of ref_base may be a question mark; in that case, if the parent node is a table then all table entries are returned.

Table 5. Parameters
Name Type Description
refBase String The reference base
refLeaf String The reference leaf
Table 6. Returns
Type Description
Array An array of OIDs that match the given ref_base and which have a defined, non-null ref_leaf.


    

SNMPResponse - getOIDInt(String name)

Gets the integer contained in the OID object with the given MIB name.

Table 7. Parameters
Name Type Description
name String The MIB name
Table 8. Returns
Type Description
Number The integer contained in the OID object, or zero if the object could not be found or is empty.


    

SNMPResponse - getOIDObj(String name)

Retrieves the OID object with the given MIB name from the response.

This method does not work with numeric OID strings, only MIB names.

Table 9. Parameters
Name Type Description
name String The MIB name
Table 10. Returns
Type Description
OID object The OID object with the given MIB name, or null if the object could not be found or if any table entries are encountered while walking down the named elements.


    

SNMPResponse - getOIDTable(String parentName, String entryName)

Gets a hashmap of table entries under the given parent MIB name, with the given entry MIB names.

Table 11. Parameters
Name Type Description
parentName String The parent MIB name
entryName String The entry MIB name
Table 12. Returns
Type Description
Hashmap A hashmap of table entries under the given parent MIB name, with the given entry MIB names, or null if the parent does not exist.


    

SNMPResponse - getOIDText(String name)

Gets the text contained in the OID object with the given MIB name.

Table 13. Parameters
Name Type Description
name String The MIB name
Table 14. Returns
Type Description
String The text contained in the OID object. Returns null if the object could not be found, or if it has no text.


    

SNMPResponse - normalize(Object cur)

Resolves SNMP tables into hashmaps and OID values into primitives.

All SNMP numeric types convert to a JavaScript number. An SNMP null type converts to a JavaScript null. An SNMP IP Address value converts to a Java IPAddressV4 instance. All other values convert to a JavaScript string.

Table 15. Parameters
Name Type Description
cur Object The SNMP table or OID value.
Table 16. Returns
Type Description
void