|
|
|
|
- Tip: browsing the values of an OID
SNMPGetNext (Function) In french: SNMPLitSuivant Reads the value found after the last value retrieved for an SNMP agent. Remark: This function can be called only if SNMPGet was used at least once. In this case, SNMPGetNext reads the next value of the SNMP agent. Otherwise, the OID preceding the OID to be read must be specified in SNMPGetNext. // Read the description of the local system SessionID is int = SNMPStartSession("127.0.0.1") nType is int sDesc is string = SNMPGet(SessionID, ".1.3.6.1.2.1.1.1", nType) Â sOID is string sInfo is string // Read the next value sInfo = SNMPGetNext(SessionID, sOID, nType)
Syntax
<Result> = SNMPGetNext(<Session identifier> [, <Previous OID> [, <Returned type>]])
<Result>: ANSI character string - Value of the OID returned by the agent. The type of the value is retrieved in an integer variable (<Returned Type>).
- Empty string ("") if an error occurred. In this case, the ErrorOccurred variable is set to True and ErrorInfo returns more details about the problem.
<Session identifier>: Integer Identifier of SNMP session, returned by SNMPStartSession. <Previous OID>: Optional character string Identifier of the SNMP object found before the SNMP object to read. This string can correspond to the identifier in text format or in numeric format (the MIB file that describes the OID must have been loaded by SNMPLoadMIB). Once the function has been run, this parameter contains the OID of the element read (in numeric format). <Returned type>: Optional Integer variable If this parameter is specified, the variable will be assigned with the type of the retrieved value. The following constants are available: | | snmpTypeBits | The OID contains bits. | snmpTypeCounter32 | The OID is a counter (signed integer on 32 bits). | snmpTypeCounter64 | The OID is a counter (signed integer on 64 bits). | snmpTypeInteger | The OID contains an integer. | snmpTypeIPAddress | The OID contains an IP address. | snmpTypeNull | The OID is not associated with a value (a branch with child elements but without value by itself for example). | snmpTypeOID | The OID contains an OID. | snmpTypeOpaque | The OID contains a value that cannot be interpreted directly. | snmpTypeProgressBar | The OID contains a progress bar. | snmpTypeString | The OID contains a string. | snmpTypeTicks | The OID contains a number of ticks. | snmpTypeUnsignedInteger | The OID contains an unsigned integer. |
Remarks Tip: browsing the values of an OID If the first identifier of the OID of an agent to browse is unknown, use the following syntax: SNMPGetNext(<Identifier>, "0")
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|