ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / SNMP Protocol functions
  • Tip: browsing the values of an OID
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// 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:
snmpTypeBitsThe OID contains bits.
snmpTypeCounter32The OID is a counter (signed integer on 32 bits).
snmpTypeCounter64The OID is a counter (signed integer on 64 bits).
snmpTypeIntegerThe OID contains an integer.
snmpTypeIPAddressThe OID contains an IP address.
snmpTypeNullThe OID is not associated with a value (a branch with child elements but without value by itself for example).
snmpTypeOIDThe OID contains an OID.
snmpTypeOpaqueThe OID contains a value that cannot be interpreted directly.
snmpTypeProgressBarThe OID contains a progress bar.
snmpTypeStringThe OID contains a string.
snmpTypeTicksThe OID contains a number of ticks.
snmpTypeUnsignedIntegerThe 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")
Component: wd290com.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help