system.vision.getSystemFlags
This function replaces system.util.getSystemFlags. Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. Only the system.vision variations will appear in the Script Editor's autocomplete popup.
This function is used in Python Scripting.
Description​
Returns an integer that represents a bit field containing information about the currently running system. Each bit corresponds to a specific flag as defined in the bitmask below. The integer return will be a total of all of the bits that are currently active. See the example for tips on how to extract the information in this bit field. Note that the tag [System]Client/System/SystemFlags
contains the same value.
Flag | Flag Description | Bit Value |
---|---|---|
Designer Flag | Set if running in the Designer. | 1 |
Preview Flag | Set if running in the Designer, and the Designer is in preview mode. | 2 |
Client Flag | Set if running as a Client. | 4 |
Webstart Flag | Set if running as a Client in Web Start mode. | 8 |
Applet Flag | Set if running as a Client in Applet mode. | 16 |
Fullscreen Flag | Set if running as a Client in full screen mode. | 32 |
SSL Flag | Set if communication to the Gateway is encrypted with SSL. | 64 |
Mobile Flag | Set if currently running a mobile-launched client. | 128 |
Client Permission Restrictions​
This scripting function has no Client Permission restrictions.
Syntax​
system.vision.getSystemFlags()
Parameters​
Nothing
Returns​
Integer - A total of all the bits that are currently active. A full-screen Client launched from the Gateway webpage with no SSL will have a value of 44 (Fullscreen flag + Webstart Flag + Client Flag).
Scope​
Vision Client
Code Examples​
# The first part of the script will take the integer representing the system flags, convert it to bits, and place it in a list and then print it out.
# The second part of the script will take the list of bits, and place it in a table showing what each of the bits represent.
myList = []
flags = system.vision.getSystemFlags()
for i in range(8,-1,-1):
myList.insert(0, flags >> i & 1)
print myList
headers = ["Designer Flag", "Preview Flag", "Client Flag", "Webstart Flag", "Applet Flag", "Fullscreen Flag", "SSL Flag", "Mobile Flag", "Staging Flag"]
data = system.dataset.toDataSet(headers, [myList])
table = event.source.parent.getComponent("Table")
table.data = data