This function is used in Python Scripting.

Description

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

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.getConnectionMode()

  • Parameters

Nothing

  • Returns

Integer - The current connection mode for the Client.

  • Scope

Vision Client

Code Examples
# 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)
Keywords

system util getConnectionMode, util.getConnectionMode