SubscriptionGetAttribute
Reads the specified attribute value of a subscribed tag. Similar to TagRead.
Note: This function has been superseded and may be deprecated in a future release. Please use the following functions: SubscriptionGetInfo, SubscriptionGetTimestamp, SubscriptionGetQuality, SubscriptionGetValue or SubscriptionGetTag as substitutions in new projects.
Syntax
SubscriptionGetAttribute(iHandle, sAttribute [, iOffset] )
iHandle
Integer handle of the subscription to read from.
sAttribute
Attribute of the tag to read. Supported Attributes are:
ClusterName - Returns the resultant cluster context of the subscription. For example, for the tag subscribed as "cluster1.tagname", the return value is "cluster1".
There are several possible outcomes where no cluster is specified in the subscription:
Note: The return value is not compatible with the QUALITY data type or the quality Cicode functions. Use SubscriptionGetQuality.
Note: The return value is not compatible with the TIMESTAMP data type. Use SubscriptionGetTimestamp.
iOffset
Optional integer expressing the zero based index of an array attribute. This is only valid for the Value attribute. Default value is 0.
Return Value
String representation of the cached value for a subscribed tag. On error, an empty string and an error is set.
Related Functions
SubscriptionGetInfo, SubscriptionGetTimestamp, SubscriptionGetQuality, SubscriptionGetValue, SubscriptionGetTag
See Also