void OnDataChange(Subscription subscription, DataChangeNotification notification, IList<string> stringTable)
{
try
{
lock (m_lock)
{
for (int jj = 0; jj < notification.MonitoredItems.Count; jj++)
{
uint clientHandle = notification.MonitoredItems[jj].ClientHandle;
// find item.
ComDaGroupItem item = null;
if (!m_itemsByMonitoredItem.TryGetValue(clientHandle, out item))
{
continue;
}
// convert data change.
DaValue result = m_manager.Mapper.GetLocalDataValue(notification.MonitoredItems[jj].Value);
// update cache.
UpdateCache(item, result, false);
}
}
}
catch (Exception exception)
{
Utils.Trace("Unexpected error during CacheUpdate. {0}", exception.Message);
}
}