snmpDisconnect (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All NX devices

Firmware version:

1.50.00


This function will close a connection opened by snmpConnect.

 

Output:

Handle : SYSHANDLE

The handle to the connection to be closed. The handle will be cleared.

 

Returns: INT

1

- Success.

0

- This function is not supported.

-1

- Invalid handle.

-12

- General error.

 

Declaration

FUNCTION snmpDisconnect : INT;
VAR_INPUT
  Handle   : ACCESS SYSHANDLE;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc          : INT;
  snmplabs    : SYSHANDLE;
END_VAR;
  ...
  rc := snmpDisconnect(handle := snmplabs);
  DebugFmt(message := "snmpDisconnect (rc=\1)", v1 := rc);
  ...
BEGIN
  ...
END;
END_PROGRAM;