Opc.Ua.Com.Client.AeTypeCache.LoadEventTypes C# (CSharp) Method

LoadEventTypes() public method

Fetches the event type information from the AE server.
public LoadEventTypes ( ComAeClient client ) : void
client ComAeClient
return void
        public void LoadEventTypes(ComAeClient client)
        {
            EventTypes = new List<EventType>();
            LoadEventType(client, OpcRcw.Ae.Constants.SIMPLE_EVENT);
            LoadEventType(client, OpcRcw.Ae.Constants.TRACKING_EVENT);
            LoadEventType(client, OpcRcw.Ae.Constants.CONDITION_EVENT);
        }

Usage Example

        /// <summary>
        /// Updates the type cache.
        /// </summary>
        private void DoMetadataUpdate(object state)
        {
            try
            {
                if (!Server.IsRunning)
                {
                    return;
                }

                ComAeClientManager system = (ComAeClientManager)SystemContext.SystemHandle;
                ComAeClient        client = (ComAeClient)system.SelectClient(SystemContext, true);

                AeTypeCache cache = new AeTypeCache();
                cache.LoadEventTypes(client);

                lock (Lock)
                {
                    if (m_typeCache == null)
                    {
                        m_typeCache = cache;
                    }

                    m_typeCache.EventTypes = cache.EventTypes;
                    m_typeCache.UpdateCache(SystemContext, NamespaceIndex);
                }
            }
            catch (Exception e)
            {
                Utils.Trace(e, "Unexpected error updating event type cache.");
            }
        }
All Usage Examples Of Opc.Ua.Com.Client.AeTypeCache::LoadEventTypes