Retrieves this Client's current connection mode: 3 is read/write, 2 is read-only, and 1 is disconnected.


system.util.getConnectionMode()

  • Parameters

Nothing

  • Returns

Integer - The current connection mode for the Client.

  • Scope

Vision Client

# This code sets a Client to read-only after a timeout of 30 seconds.
# Add this code to a Client timer script.
 
mode = system.util.getConnectionMode()
if mode == 3 and system.util.getInactivitySeconds() > 30:
	system.util.setConnectionMode(2)

system util getConnectionMode, util.getConnectionMode