PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Limitation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SNMPOIDType (Function)
In French: SNMPOIDType
Returns the type of data found in an OID.
Note: This function cannot be used as long as the MIB file that describes the correspondence between the OIDs in text and numeric format has not been loaded (SNMPLoadMIB).
Example
MIBLoaded is boolean
PathMIBs is string = CompleteDir(fExeDir()) + "mibs\"
Mib is string
Mib = "RFC1382-MIB.mib" // MIB of X25 protocol
TypeMib is int
MIBLoaded = SNMPLoadMIB(PathMIBs + Mib)
IF MIBLoaded = False THEN
Error("MIB error:" + ErrorInfo())
ELSE
TypeMib = SNMPOIDType("dod.internet.mgmt.mib-2.transmission.x25.x25AdmnInterruptTimer")
SWITCH TypeMib
CASE snmpTypeIPAddress: Info("The OID contains an IP address")
CASE snmpTypeString: Info("The OID contains a string")
CASE snmpTypeCounter32: Info("The OID is a counter")
CASE snmpTypeProgressBar: Info("The OID contains a progress bar")
...
OTHER CASE: Error(ErrorInfo())
END
END
Syntax
<Result> = SNMPOIDType(<OID to Process>)
<Result>: Integer constant
Constant corresponding to the type of data found in the OID and described in the MIB file:
snmpTypeIPAddressThe OID contains an IP address.
snmpTypeBitsThe OID contains bits.
snmpTypeStringThe OID contains a string.
snmpTypeCounter32The OID is a counter (signed integer on 32 bits).
snmpTypeCounter64The OID is a counter (signed integer on 64 bits).
snmpTypeUnsignedIntegerThe OID contains an unsigned integer.
snmpTypeIntegerThe OID contains an integer.
snmpTypeUnknownError: ErrorInfo returns more details about the problem.
snmpTypeProgressBarThe OID contains a progress bar.
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.
snmpTypeTicksThe OID contains a number of ticks.
<OID to Process>: Character string (with quotes)
String containing the OID in text or numeric format.
Remarks

Limitation

The SNMPxxx functions can only be used from Windows 2000 (they cannot be used with the following systems: Windows 98, Me or NT4).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment