コード例 #1
0
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                AENodeElementCollection nodeElements = easyAEClient.BrowseAreas("", "AutoJet.ACPFileServerAE.1", "");

                foreach (AENodeElement nodeElement in nodeElements)
                {
                    Debug.Assert(nodeElement != null);

                    Console.WriteLine("nodeElements[\"{0}\"]:", nodeElement.Name);
                    Console.WriteLine("    .QualifiedName: {0}", nodeElement.QualifiedName);
                }
            }
コード例 #2
0
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();

                // Browse for some areas and sources

                AENodeElementCollection areaElements = easyAEClient.BrowseAreas("", "SWToolbox.TOPServer_AE.V5", "");

                foreach (AENodeElement areaElement in areaElements)
                {
                    Debug.Assert(areaElement != null);
                    Debug.Assert(areaElement.QualifiedName != null);

                    Console.WriteLine("areaElements[\"{0}\"]:", areaElement.Name);
                    Console.WriteLine("    .QualifiedName: {0}", areaElement.QualifiedName);

                    AENodeElementCollection sourceElements =
                        easyAEClient.BrowseSources("", "SWToolbox.TOPServer_AE.V5", areaElement.QualifiedName);
                    foreach (AENodeElement sourceElement in sourceElements)
                    {
                        Debug.Assert(sourceElement != null);

                        Console.WriteLine("    sourceElements[\"{0}\"]:", sourceElement.Name);
                        Console.WriteLine("        .QualifiedName: {0}", sourceElement.QualifiedName);
                    }
                }

                // Query for event categories

                AECategoryElementCollection categoryElements = easyAEClient.QueryEventCategories("", "SWToolbox.TOPServer_AE.V5");

                foreach (AECategoryElement categoryElement in categoryElements)
                {
                    Debug.Assert(categoryElement != null);
                    Console.WriteLine("CategoryElements[\"{0}\"].Description: {1}", categoryElement.CategoryId,
                                      categoryElement.Description);
                }

                // Subscribe to events, wait, and unsubscribe

                var eventHandler = new EasyAENotificationEventHandler(easyAEClient_Notification);

                easyAEClient.Notification += eventHandler;

                int handle = easyAEClient.SubscribeEvents("", "SWToolbox.TOPServer_AE.V5", 1000);

                Console.WriteLine("Processing event notifications for 1 minute...");
                Thread.Sleep(60 * 1000);

                easyAEClient.UnsubscribeEvents(handle);
            }
コード例 #3
0
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                //AENodeElementCollection nodeElements = easyAEClient.BrowseSources("", "OPCLabs.KitEventServer.2", "Simulation");
                AENodeElementCollection nodeElements = easyAEClient.BrowseSources("", "AutoJet.ACPFileServerAE.1", "AI1 sensor fault");

                foreach (AENodeElement nodeElement in nodeElements)
                {
                    Debug.Assert(nodeElement != null);

                    Console.WriteLine("nodeElements[\"{0}\"]:", nodeElement.Name);
                    Console.WriteLine("    .QualifiedName: {0}", nodeElement.QualifiedName);
                }
            }