You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.

This function is used in Python Scripting.

Description

Returns a string that indicates the status of the Gateway. A status of RUNNING means that the Gateway is fully functional. Thrown exceptions return "ERROR" with the error message appended to the string. This function can be used to test all 7.7 and later Gateways. The function can also be used to test 7.6 (7.6.4 and later) and 7.5 (7.5.11 and later) Gateways. Attempting to test Gateways older than these versions will return errors.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.getGatewayStatus(gatewayAddress, connectTimeoutMillis, socketTimeoutMillis)

  • Parameters

String gatewayAddress - The gateway address to ping, in the form of ADDR:PORT/main.

Integer connectTimeoutMillis - Optional. The maximum time in milliseconds to attempt to initially contact a Gateway.

Integer socketTimeoutMillis - Optional. The maximum time in milliseconds to wait for a response from a Gateway after initial connection has been established.


The following feature is new in Ignition version 8.0.11
Click here to check out the other new features

Boolean bypassCertValidation - If the target address is an HTTPS address, and this parameter is True, the system will bypass all SSL certificate validation. This is not recommended, though is sometimes necessary for self-signed certificates. 

  • Returns

String - A string that indicates the status of the Gateway. A status of RUNNING means that the Gateway is fully functional.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet
def checkRemoteGateway():
 
 status = system.util.getGatewayStatus("10.20.6.253:8088/main")
 
 if status == "RUNNING":
         print "Central Gateway is available!"
 else:
         print "Error: " + status
 
# It's important to do this as an asynchronous operation, as the method 
# may block for some time.
system.util.invokeAsynchronous(checkRemoteGateway)
Keywords

system util getGatewayStatus, util.getGatewayStatus

  • No labels