snmpCreateTrap (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All NX devices

Firmware version:

1.60.00


Establish the basic trap to which SNMP variables can be added with snmpAddTrapVariable. Send the trap with snmpSendTrap.

 

Note: SNMPv1 traps are only for SNMPv1 connections.

 

Input:

OID : STRING

The trap OID.

 

Uptime : DINT [0..65535]

The sysUpTime that comes with the trap.

 

Generic : DINT

SNMPv1 generic type trap specifier.

 

Specific : DINT

SNMPv1 specific type trap specifier.

 

 

Output:

Trap : SYSHANDLE

The handle to the created trap.

 

 

Returns: INT

1

- Success.

0

- This function is not supported.

-12

- General error.

-16

- Maximum amount of traps created. See limitations on overview page.

 

Declaration

FUNCTION snmpCreateTrap : INT;
VAR_INPUT
  trap     : ACCESS SYSHANDLE;
  oid      : MANDATORY STRING;
  uptime   : MANDATORY DINT;
  generic  : DINT := 0;
  specific : DINT := 0;
END_VAR;

 

Example:

// Please see the example at Examples - SNMP Client.