|
|
|
|
SNMPOIDType (Function) In french: SNMPOIDType Returns the type of data in an OID. Remark: 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). 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: | | 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. | snmpTypeUnknown | Error: ErrorInfo returns more information on the error. | snmpTypeUnsignedInteger | The OID contains an unsigned integer. |
<OID to process>: Character string String containing the OID in text or numeric format.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|