Exemple #1
0
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                AECategoryElementCollection categoryElements = easyAEClient.QueryEventCategories("", "AutoJet.ACPFileServerAE.1");

                foreach (AECategoryElement categoryElement in categoryElements)
                {
                    Debug.Assert(categoryElement != null);
                    Debug.Assert(categoryElement.AttributeElements.Keys != null);
                    Debug.Assert(categoryElement.ConditionElements.Keys != null);

                    Console.WriteLine("Information about category {0}:", categoryElement);
                    Console.WriteLine("    .CategoryId: {0}", categoryElement.CategoryId);
                    Console.WriteLine("    .Description: {0}", categoryElement.Description);
                    Console.WriteLine("    .ConditionElements:");
                    foreach (string conditionKey in categoryElement.ConditionElements.Keys)
                    {
                        Console.WriteLine("        {0}", conditionKey);
                    }
                    Console.WriteLine("    .AttributeElements:");
                    foreach (long attributeKey in categoryElement.AttributeElements.Keys)
                    {
                        Console.WriteLine("        {0}", attributeKey);
                    }
                }
            }
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                AECategoryElementCollection categoryElements = easyAEClient.QueryEventCategories("", "OPCLabs.KitEventServer.2");

                foreach (AECategoryElement categoryElement in categoryElements)
                {
                    Debug.Assert(categoryElement != null);
                    Console.WriteLine("CategoryElements[\"{0}\"].Description: {1}", categoryElement.CategoryId, categoryElement.Description);
                }
            }
Exemple #3
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);
            }
Exemple #4
0
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                AECategoryElementCollection categoryElements = easyAEClient.QueryEventCategories("", "AutoJet.ACPFileServerAE.1");

                foreach (AECategoryElement categoryElement in categoryElements)
                {
                    Debug.Assert(categoryElement != null);

                    Console.WriteLine("Category {0}:", categoryElement);
                    foreach (AEConditionElement conditionElement in categoryElement.ConditionElements)
                    {
                        Debug.Assert(conditionElement != null);

                        Console.WriteLine("    Information about condition \"{0}\":", conditionElement);
                        Console.WriteLine("        .Name: {0}", conditionElement.Name);
                        Console.WriteLine("        .SubconditionNames:");
                        DumpSubconditionNames(conditionElement.SubconditionNames);
                    }
                }
            }
Exemple #5
0
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                AECategoryElementCollection categoryElements = easyAEClient.QueryEventCategories("", "AutoJet.ACPFileServerAE.1");

                foreach (AECategoryElement categoryElement in categoryElements)
                {
                    Debug.Assert(categoryElement != null);

                    Console.WriteLine("Category {0}:", categoryElement);
                    foreach (AEAttributeElement attributeElement in categoryElement.AttributeElements)
                    {
                        Debug.Assert(attributeElement != null);

                        Console.WriteLine("    Information about attribute {0}:", attributeElement);
                        Console.WriteLine("        .AttributeId: {0}", attributeElement.AttributeId);
                        Console.WriteLine("        .Description: {0}", attributeElement.Description);
                        Console.WriteLine("        .DataType: {0}", attributeElement.DataType);
                    }
                }
            }