|
ResolveOID
array ResolveTrap(string
trapoid)
Return
Value
Returns array variable containing
the set of attributes describing resolved Trap. Attributes of the resolved
Trap 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 trap OID can not be
resolved.
array["Name"] -
string variable containing trap name resolved from given
OID.
array["Description"]
- string
variable containing trap description resolved from given
OID.
Parameters
trapoid
–
string that
specifies the object identifier (OID) of an SNMP trap.
Remarks
Call this function to
resolve SNMP trap name and description using previously loaded
MIB(s).
Package
Plug in module:
nd_mibplg.npl
Example
The following
example demonstrates the use of ResolveTrap
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
|