Many OPC Alarm/Event servers are associated with OPC Data Access servers.
Since these servers may provide a Data Access interface to some or all of the attributes associated with events,
applications need the ability to determine the specific ItemID for one or more specific attribute ID codes given an
associated source ID in order to be able to access the attribute via the Data Access interface.
TranslateToItemIDs performs the required translation. This function will be useful for the case where the client
wishes to use the OPC Data Access interface to subscribe to real-time data associated with a given event or alarm.
Given an event source, and an array of associated attribute ID codes, return an array of the item ID strings
corresponding to each attribute ID. The event source, along with the associated attribute IDs are returned as part
of the OnEvent callback mechanism. Attribute ID codes and descriptions for a given event category can
also be queried via the QueryEventAttributes method. The server must return null (Nothing) for those
attribute IDs that do not have a corresponding item ID.
Syntax
Parameters
- source
- An event source for which to return the item IDs corresponding to each of an array of attribute IDs
if they exist. (From OnEvent or from IOPCEventAreaBrowser)
- eventCategory
- A event category enumeration value indicating the category of events for which item IDs
are to be returned. (From OnEvent or from QueryEventCategories)
- conditionName
- The name of a condition within the event category for which item IDs are to be returned.
(From OnEvent or from QueryConditionNames)
- subconditionName
- The name of a sub-condition within a multi-state condition. (From OnEvent or from
QuerySubconditionNames) This should be null (Nothing) for a single state condition.
- assocAttrIDs
- Array of IDs of vendor-specific event attributes associated with the generator ID and available
from the server for which to return ItemIDs. Note: these attribute IDs are returned by the OnEvent callback, and are
selected via the EventSubscription.SelectReturnedAttributes method.
- attrItemIDs
- Array of item ID strings corresponding to each event attribute ID associated with the generator ID.
This array is the same length as the AssocAttrIDs array passed into the function. A Null string is returned if no item ID
is available for this attribute.
- nodeNames
- Array of network node names of the associated OPC Data Access Servers.
Ab array of null (Nothing) is returned if the OPC Data Access Server is running on the local node.
- CLSIDs
- Array of class IDs for the associated OPC Data Access Servers.
Requirements
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family
See Also