11.3 Trap method

Generates an SNMP alert.

11.3.1 Syntax

object.Trap( 
   sObjectID As String, 
   iTrapID As Integer, 
   sTrapString As String)

11.3.2 Parameters

sObjectID

The identifier of the SNMP object to which the alert message is being sent. Should not contain more than 32 sub-IDs.

iTrapID

The identifier of the trap message.

sTrapString

The description of the trap.

11.3.3 Return Values

Integer.

11.3.4 Example

This example generates the SNMP alert message "Critical error on server!" with an ID of 1 to the object whose ID is 1.3.6.1.2.1.1.3

set SNMP = CreateObject("ucx:SNMP") 
X = SNMP.Trap("1.3.6.1.4.1.2106.1"," 1, "Critical error on server!") 

11.3.5 See Also