Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

The following feature is new in Ignition version 8.0.8
Click here to check out the other new features
This function is used in Python Scripting.

Description

Returns a dictionary of rosters, where the key is the name of the roster, and the value is an array list of string user names.

This function was designed to run in the Gateway and in Perspective sessions. If creating rosters from Vision clients, use system.alarm.getRosters instead.

Syntax

system.roster.getRosters()

  • Parameters

none

  • Returns

Dictionary A dictionary that maps roster names to a List of usernames in the roster. The List of usernames may be empty if no users have been added to the roster.

  • Scope

Gateway, Perspective Session

Code Examples
Code Snippet
# This example will print out all existing rosters to the console of a Perspective session:
  
rosters = system.roster.getRosters()	
	
# Iterate over the rosters, extracting the name and user lists
for name, users in rosters.items():
		
	# Format the results in a somewhat presentable manner.
	msg = "{0} : {1}".format(name, users) 
		
	# output the result
	system.perspective.print(msg)
Get Each User in a Roster
# This example prints out each user in a certain roster. 
rosters = system.roster.getRosters()	
		
# Specify the roster with the key (the name of the roster), and iterate over the users.
for user in rosters['myRoster']:

	# output the users
	system.perspective.print(user)
Keywords

system roster getRosters, roster.getRosters

  • No labels