Is there a way to get the corresponding tag path to return with the value in a callback function called from readAsync?
I need to modify each tag value...for many values.
( I know there are other ways ... I was trying to get the Async method to work.)
def callback(items):
for item in items:
#print item.tagPath
# -- need to modify each tag value --
print item.value
tagPaths =
tagPaths.append('[default]Tag1')
tagPaths.append('[default]Tag2')
tagPaths.append(' ... ')
system.tag.readAsync(tagPaths, callback)
NOTE: dir(item)
['BAD', 'CONFIG_ERROR', 'DISABLED', 'EXPRESSION_EVAL_ERROR', 'INITIAL_VALUE', 'NOT_CONNECTED', 'NOT_FOUND', 'REFERENCE_NOT_FOUND', 'STALE', 'TRANSFORM_ERROR', 'TYPE_CONVERSION', 'UNKNOWN', 'UNSUPPORTED', 'class', 'copy', 'deepcopy', 'delattr', 'doc', 'ensure_finalizer', 'eq', 'format', 'getattribute', 'hash', 'init', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'str', 'subclasshook', 'unicode', 'class', 'clone', 'derive', 'equals', 'fromObject', 'getClass', 'getQuality', 'getTimestamp', 'getValue', 'hashCode', 'notify', 'notifyAll', 'quality', 'setQuality', 'setTimestamp', 'setValue', 'timestamp', 'toString', 'unwrap', 'updateTimestamp', 'value', 'valueOf', 'wait']