|
ResolveOID
array ResolveOID(string
oid, string syntax, string
value)
Return
Value
Returns array variable containing
the set of attributes describing resolved OID. Attributes of the resolved
OID can be accessed as array elements at the following predefined
indexes:
array["Status"] -
int variable containing status (TRUE or FALSE) of
performed resolving. Status is FALSE if given OID can not be
resolved.
array["Name"] -
string variable containing SNMP variable name resolved from given
OID.
array["Description"]
- string
variable containing SNMP variable description resolved from given
OID.
array["Value"] -
string variable containing SNMP variable value resolved based on given
OID,
Syntax and
Value.
Parameters
oid
–
string that
specifies the object identifier (OID) of an SNMP
variable.
syntax–
string that
specifies the syntax of an SNMP variable. The
following syntax types are supported: OCTET STRING, INTEGER,
GAUGE, COUNTER, OPAQUE, OBJECT IDENTIFIER, IpAddress,
TimeTicks.
value–
string that
specifies not resolved value of an SNMP variable.
Remarks
Call this function to
resolve SNMP MIB variable using previously loaded MIB(s). This
function returns the name and description of variable as defined in
the MIB and the value in the readable format.
Package
Plug in module:
nd_mibplg.npl
Example
The following
example demonstrates the use of ResolveOID
function.
#
Example for MIB functions
int nStatus
nStatus = LoadMIB("C:\NetDecision\Compiled
Mibs\lrcsmib.cmf")
if
(nStatus == FALSE)
Println("Failed to load MIB file")
else
array OID = ResolveOID("1.3.6.1.4.1.2014.9.1.1.1.2.1.1.3", "INTEGER", "1")
Println(OID)
array Trap = ResolveTrap("1.3.6.1.4.1.2014.9.1.1.1.3.2.14")
Println(Trap)
endif
Output of the example script:
OID[Status] = 1
OID[Value] = ok
OID[Name] = systemAlarmStatusSummary
OID[Description] = System Alarm Status Summary.
Trap[Status] = 1
Trap[Name] = remoteAlarmStatus
Trap[Description] = Summary fault state for Remote Unit.Trap
Severity values can be: Major, Minor, OK
|