Hello,
I’m trying to list all alarm pipelines and enabled status, but using system.tag.getAlarmStates() only pulls the “changed” values, and it’s looking like system.tag.browseConfiguration and then drilling down to .getAlarms does the same thing
I’m down to pulling BasicAlarmDefinitions, and I see the class BasicAlarmDefinition has methods for isPropertyBound and isInherited, and even getOrDefault, which doesn’t work as I would expect… is there a way to pull the parent UDT’s value if it’s not overridden at the tag level?
Here’s where I’m at:
from com.inductiveautomation.ignition.common.config import Property, BasicProperty
from java.lang import String
tagConfig = system.tag.browseConfiguration( '[default]path\to\tag', False )
for tag in tagConfig:
alarmDefs = tag.getAlarms()
for alarmDef in alarmDefs:
# print( type( alarmDef ) )
# returns
# <type 'com.inductiveautomation.ignition.common.alarming.config.BasicAlarmDefinition'>
# i would think this would intersect with it's parent
# and the default would be the parent's value
# but it just returns null
prop = BasicProperty('ackPipeline', String)
print( alarmDef.getOrDefault(prop) )
Thanks