public static void ManyItems()
            {
                using (var easyDAClient = new EasyDAClient())
                {
                    easyDAClient.ItemChanged += easyDAClient_ItemChanged_ManyItems;

                    const int numberOfItems = 1000;

                    Console.WriteLine("Preparing arguments...");
                    var argumentArray = new DAItemGroupArguments[numberOfItems];
                    for (int i = 0; i < numberOfItems; i++)
                    {
                        int    copy   = (i / 100) + 1;
                        int    phase  = (i % 100) + 1;
                        string itemId = String.Format("Simulation.Incrementing.Copy_{0}.Phase_{1}", copy, phase);
                        argumentArray[i] = new DAItemGroupArguments("", "AutoJet.ACPFileServerDA.1", itemId, 50, null);
                    }

                    Console.WriteLine("Subscribing to {0} items...", numberOfItems);
                    easyDAClient.SubscribeMultipleItems(argumentArray);

                    Console.WriteLine("Processing item changed events for 1 minute...");
                    Thread.Sleep(60 * 1000);
                }
            }
            public static void Main1()
            {
                var easyDAClient = new EasyDAClient();

                DAVtq vtq = easyDAClient.ReadItem("", "AutoJet.ACPFileServerDA.1", "Simulation.Random");

                Console.WriteLine("Vtq: {0}", vtq);
            }
Exemplo n.º 3
0
            public static void Main1()
            {
                var easyDAClient = new EasyDAClient();

                easyDAClient.InstanceParameters.HoldPeriods.TopicWrite = 100; // in milliseconds

                easyDAClient.WriteItemValue("", "AutoJet.ACPFileServerDA.1", "Simulation.Register_I4", 12345);
            }
            public static void Main1()
            {
                var easyDAClient = new EasyDAClient();

                object value = easyDAClient.GetPropertyValue("", "AutoJet.ACPFileServerDA.1", "Simulation.Random",
                                                             DAPropertyIds.Timestamp);

                Console.WriteLine(value);
            }
Exemplo n.º 5
0
            public static void BrowsePath()
            {
                var easyDAClient = new EasyDAClient();

                DAVtq vtq = easyDAClient.ReadItem(
                    new ServerDescriptor("", "AutoJet.ACPFileServerDA.1"),
                    new DAItemDescriptor(null, "/Simulation/Random"));

                Console.WriteLine("Vtq: {0}", vtq);
            }
Exemplo n.º 6
0
            public static void Main1()
            {
                var easyDAClient = new EasyDAClient();

                // Get the DataType property value, already converted to VarType
                VarType varType = easyDAClient.GetDataTypePropertyValue("", "AutoJet.ACPFileServerDA.1", "Simulation.Random");

                // Display the obtained data type
                Console.WriteLine("VarType: {0}", varType); // Display data type symbolically
            }
Exemplo n.º 7
0
 static void DaRxxWriter(XElement tag, object value)
 {
     using (var client = new EasyDAClient())
     {
         client.WriteItemValue(
             GetElementAttribute(tag, "da", "endpoint"),
             GetElementAttribute(tag, "da", "server"),
             $"{tag.Parent.Attribute("name").Value}.{tag.Attribute("node").Value}",
             value
             );
     }
 }
Exemplo n.º 8
0
    private void ReadPLCvalue()
    {
        EasyDAClient objClient = new EasyDAClient();
        object       sValue    = null;

        try {
            sValue = objClient.ReadItemValue(PLCServerMachineName, PLCServerID, PLCTagName);
        } catch (OpcException ex) {
        }

        StoreToDB(sValue);
    }
        /// <summary>
        /// Creates the opc client.
        /// </summary>
        /// <returns>An instance of the EasyDAClient class.</returns>
        public static EasyDAClient CreateOpcClient()
        {
            // Changed isolated flag to false to prevent problems while restarting OPC monitor after save configuration.
            var opcClient = new EasyDAClient {
                Isolated = false
            };

            // Bigger timeouts to allow the user browsing again in case of dynamic OPC items coming later.
            opcClient.InstanceParameters.HoldPeriods.ItemDetach   = 60000;
            opcClient.InstanceParameters.HoldPeriods.ServerDetach = 60000;
            return(opcClient);
        }
            public static void DataTypes()
            {
                IEnumerable <DAItemGroupArguments> arguments = new[]
                {
                    "Simulation.Register_EMPTY",
                    "Simulation.Register_NULL",
                    "Simulation.Register_DISPATCH",

                    "Simulation.ReadValue_I2",
                    "Simulation.ReadValue_I4",
                    "Simulation.ReadValue_R4",
                    "Simulation.ReadValue_R8",
                    "Simulation.ReadValue_CY",
                    "Simulation.ReadValue_DATE",
                    "Simulation.ReadValue_BSTR",
                    "Simulation.ReadValue_BOOL",
                    "Simulation.ReadValue_DECIMAL",
                    "Simulation.ReadValue_I1",
                    "Simulation.ReadValue_UI1",
                    "Simulation.ReadValue_UI2",
                    "Simulation.ReadValue_UI4",
                    "Simulation.ReadValue_INT",
                    "Simulation.ReadValue_UINT",

                    "Simulation.ReadValue_ArrayOfI2",
                    "Simulation.ReadValue_ArrayOfI4",
                    "Simulation.ReadValue_ArrayOfR4",
                    "Simulation.ReadValue_ArrayOfR8",
                    "Simulation.ReadValue_ArrayOfCY",
                    "Simulation.ReadValue_ArrayOfDATE",
                    "Simulation.ReadValue_ArrayOfBSTR",
                    "Simulation.ReadValue_ArrayOfBOOL",
                    //"Simulation.ReadValue_ArrayOfDECIMAL",
                    "Simulation.ReadValue_ArrayOfI1",
                    "Simulation.ReadValue_ArrayOfUI1",
                    "Simulation.ReadValue_ArrayOfUI2",
                    "Simulation.ReadValue_ArrayOfUI4",
                    "Simulation.ReadValue_ArrayOfINT",
                    "Simulation.ReadValue_ArrayOfUINT",
                }.Select(itemId => new DAItemGroupArguments("", "AutoJet.ACPFileServerDA.1", itemId, 3 * 1000, null));

                var eventHandler = new EasyDAItemChangedEventHandler(client_ItemChanged);
                var client       = new EasyDAClient();

                client.ItemChanged += eventHandler;

                Console.WriteLine("Subscribing items...");
                client.SubscribeMultipleItems(arguments.ToArray());
                Thread.Sleep(30 * 1000);
                client.UnsubscribeAllItems();
                client.ItemChanged -= eventHandler;
            }
            private static void BrowseFromNode(
                EasyDAClient client,
                ServerDescriptor serverDescriptor,
                DANodeDescriptor parentNodeDescriptor)
            {
                Debug.Assert(client != null);
                Debug.Assert(serverDescriptor != null);
                Debug.Assert(parentNodeDescriptor != null);

                Boolean append = false;

                if (parentNodeDescriptor.ToString() == "")
                {
                    append = false;
                }
                else
                {
                    append = true;
                }


                // Obtain all node elements under parentNodeDescriptor
                var browseParameters = new DABrowseParameters();    // no filtering whatsoever
                DANodeElementCollection nodeElementCollection =
                    client.BrowseNodes(serverDescriptor, parentNodeDescriptor, browseParameters);

                // Remark: that BrowseNodes(...) may also throw OpcException; a production code should contain handling for
                // it, here omitted for brevity.

                foreach (DANodeElement nodeElement in nodeElementCollection)
                {
                    Debug.Assert(nodeElement != null);

                    Console.WriteLine(nodeElement);
                    using (StreamWriter opcfile = new System.IO.StreamWriter(@"C:\Users\kiekensk\source\repos\ConsoleAppOPCClient\ConsoleAppOPCClient\dump\Cttmt2008 OPC dump.txt", append))
                    {
                        opcfile.WriteLine(nodeElement);
                    }


                    // If the node is a branch, browse recursively into it.
                    if (nodeElement.IsBranch)
                    {
                        _branchCount++;
                        BrowseFromNode(client, serverDescriptor, nodeElement);
                    }
                    else
                    {
                        _leafCount++;
                    }
                }
            }
            public static void Main1()
            {
                var easyDAClient = new EasyDAClient();

                // Get a structure containing values of all well-known properties
                DAItemPropertyRecord itemPropertyRecord =
                    easyDAClient.GetItemPropertyRecord("", "AutoJet.ACPFileServerDA.1", "Simulation.Random");

                // Display some of the obtained property values
                Console.WriteLine("itemPropertyRecord.AccessRights: {0}", itemPropertyRecord.AccessRights);
                Console.WriteLine("itemPropertyRecord.DataType: {0}", itemPropertyRecord.DataType);
                Console.WriteLine("itemPropertyRecord.Timestamp: {0}", itemPropertyRecord.Timestamp);
            }
            public static void GetTypeCode()
            {
                var easyDAClient = new EasyDAClient();

                DAVtq vtq = easyDAClient.ReadItem("", "AutoJet.ACPFileServerDA.1", "Simulation.Random");

                if (vtq.Value != null)
                {
                    TypeCode typeCode = Type.GetTypeCode(vtq.Value.GetType());

                    Console.WriteLine("TypeCode: {0}", typeCode);
                }
            }
Exemplo n.º 14
0
        public static void StartOpcMasteR()
        {
            opcClient = new EasyDAClient();
            opcClient.BrowseBranches("", "CyProOPC.DA2");
            SubscribeTags();

            //Remove all previous commands
            (new DataOtrilaTableAdapters.OpcStackOtrilaTableAdapter()).ClearStack();

            OpcTag.OpcItemHasChanged += OpcTag_OpcItemHasChanged;
            opcStackTimer             = new System.Timers.Timer(1000);
            opcStackTimer.Elapsed    += OpcStackTimer_Elapsed;
            opcStackTimer.Start();
        }
Exemplo n.º 15
0
            public static void Main1()
            {
                using (var client = new EasyDAClient())
                {
                    var eventHandler = new EasyDAItemChangedEventHandler(client_ItemChanged);
                    client.ItemChanged += eventHandler;

                    Console.WriteLine("Subscribing item...");
                    client.SubscribeItem("", "AutoJet.ACPFileServerDA.1", "Demo.Ramp", 200);
                    Thread.Sleep(30 * 1000);
                    client.UnsubscribeAllItems();
                    client.ItemChanged -= eventHandler;
                }
            }
Exemplo n.º 16
0
        static void Main(string[] args)
        {
            Console.WriteLine("Simulated device\n");
            deviceClient = DeviceClient.Create(iotHubUri, new DeviceAuthenticationWithRegistrySymmetricKey("Hein", deviceKey));

            while (Console.ReadLine() == "")
            {
                EasyDAClient client = new EasyDAClient();
                string       data   = client.ReadItem("", "Kepware.KEPServerEX.V5", "Hein_Kanaal.Hein_Device.Hein_Groep.Mijn_Ramp").ToString();

                SendDeviceToCloudMessagesAsync(data);
            }

            //client.OpenAsync();
        }
            public static void Recursive()
            {
                var stopwatch = new Stopwatch();

                stopwatch.Start();

                var easyDAClient = new EasyDAClient();

                _branchCount = 0;
                _leafCount   = 0;
                BrowseFromNode(easyDAClient, "AutoJet.ACPFileServerDA.1", "");

                stopwatch.Stop();
                Console.WriteLine("Browsing has taken (milliseconds): {0}", stopwatch.ElapsedMilliseconds);
                Console.WriteLine("Branch count: {0}", _branchCount);
                Console.WriteLine("Leaf count: {0}", _leafCount);
            }
Exemplo n.º 18
0
        static void client_MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e)
        {
            string bericht = Encoding.UTF8.GetString(e.Message);

            Console.WriteLine(bericht);

            EasyDAClient daClient = new EasyDAClient();

            if (bericht.ToLower() == "aan")
            {
                daClient.WriteItemValue("", "Kepware.KEPServerEX.V5", "Ethernet.PCL3.Lamp", true);
            }
            else
            {
                daClient.WriteItemValue("", "Kepware.KEPServerEX.V5", "Ethernet.PCL3.Lamp", false);
            }
        }
            public static void Main1()
            {
                var easyDAClient = new EasyDAClient();

                // Get dictionary of property values, for all well-known properties
                DAPropertyValueDictionary propertyValueDictionary =
                    easyDAClient.GetPropertyValueDictionary("", "AutoJet.ACPFileServerDA.1", "Simulation.Random");

                // Display some of the obtained property values
                // The production code should also check for the .Exception first, before getting .Value
                Console.WriteLine("propertyValueDictionary[DAPropertyId.AccessRights].Value: {0}",
                                  propertyValueDictionary[DAPropertyIds.AccessRights].Value);
                Console.WriteLine("propertyValueDictionary[DAPropertyId.DataType].Value: {0}",
                                  propertyValueDictionary[DAPropertyIds.DataType].Value);
                Console.WriteLine("propertyValueDictionary[DAPropertyId.Timestamp].Value: {0}",
                                  propertyValueDictionary[DAPropertyIds.Timestamp].Value);
            }
            public static void Array()
            {
                var client = new EasyDAClient();

                Console.WriteLine("Writing array value...");
                client.WriteItemValue("", "AutoJet.ACPFileServerDA.1", "Simulation.Register_ArrayOfI2", new Int16[] { 1234, 2345, 3456 });

                Console.WriteLine("Reading array value...");
                var value = (Int16[])client.ReadItemValue("", "AutoJet.ACPFileServerDA.1", "Simulation.Register_ArrayOfI2");

                if (value != null)
                {
                    Console.WriteLine(value[0]);
                    Console.WriteLine(value[1]);
                    Console.WriteLine(value[2]);
                }
            }
            public static void Main1()
            {
                using (var easyDAClient = new EasyDAClient())
                {
                    easyDAClient.ItemChanged += easyDAClient_ItemChanged;

                    easyDAClient.SubscribeMultipleItems(
                        new[] {
                        new DAItemGroupArguments("", "AutoJet.ACPFileServerDA.1", "Simulation.Random", 1000, null),
                        new DAItemGroupArguments("", "AutoJet.ACPFileServerDA.1", "Trends.Ramp (1 min)", 1000, null),
                        new DAItemGroupArguments("", "AutoJet.ACPFileServerDA.1", "Trends.Sine (1 min)", 1000, null),
                        new DAItemGroupArguments("", "AutoJet.ACPFileServerDA.1", "Simulation.Register_I4", 1000, null)
                    });

                    Console.WriteLine("Processing item changed events for 1 minute...");
                    Thread.Sleep(60 * 1000);
                }
            }
            public static void Main1()
            {
                var easyAEClient = new EasyAEClient();
                var easyDAClient = new EasyDAClient();

                var eventHandler = new EasyAENotificationEventHandler(easyAEClient_Notification);

                easyAEClient.Notification += eventHandler;

                // Inactivate the event condition (we will later activate it and receive the notification)
                easyDAClient.WriteItemValue("", "AutoJet.ACPFileServerAE.1", "SimulateEvents.ConditionState1.Inactivate", true);

                var subscriptionFilter = new AESubscriptionFilter
                {
                    Sources = new AENodeDescriptor[] { "Simulation.ConditionState1" }
                };

                // Prepare a dictionary holding requested event attributes for each event category
                // The event category IDs and event attribute IDs are hard-coded here, but can be obtained from the OPC
                // server by querying as well.
                var returnedAttributesByCategory = new AEAttributeSetDictionary();

                returnedAttributesByCategory[0x00ECFF02] = new long[] { 0x00EB0003, 0x00EB0008 };

                Console.WriteLine("Subscribing to events...");
                int handle = easyAEClient.SubscribeEvents("", "OPCLabs.KitEventServer.2", 1000, null, subscriptionFilter,
                                                          returnedAttributesByCategory);

                // Give the refresh operation time to complete
                Thread.Sleep(5 * 1000);

                // Trigger an event carrying specified attributes (activate the condition)
                easyDAClient.WriteItemValue("", "AutoJet.ACPFileServerAE.1",
                                            "SimulateEvents.ConditionState1.AttributeValues.15400963", 123456);
                easyDAClient.WriteItemValue("", "AutoJet.ACPFileServerAE.1",
                                            "SimulateEvents.ConditionState1.AttributeValues.15400968", "Some string value");
                easyDAClient.WriteItemValue("", "AutoJet.ACPFileServerAE.1", "SimulateEvents.ConditionState1.Activate", true);

                Console.WriteLine("Processing event notifications for 10 seconds...");
                Thread.Sleep(10 * 1000);

                easyAEClient.UnsubscribeEvents(handle);
            }
        /// <summary>
        /// Browse recursively the address space of an OPC server.
        /// </summary>
        /// <param name="opc">The opc client.</param>
        /// <param name="serverDescriptor">The server descriptor.</param>
        /// <param name="nodeElement">The node element.</param>
        /// <param name="opcParentItem">The opc parent item.</param>
        private void BrowseRecursive(EasyDAClient opc, ServerDescriptor serverDescriptor, DANodeElement nodeElement, OpcItem opcParentItem)
        {
            if (nodeElement == null)
            {
                var branches = opc.BrowseBranches(serverDescriptor);
                var leaves   = opc.BrowseLeaves(serverDescriptor);

                foreach (var branch in branches)
                {
                    this.BrowseRecursive(opc, serverDescriptor, branch, opcParentItem);
                }

                foreach (var leaf in leaves)
                {
                    this.BrowseRecursive(opc, serverDescriptor, leaf, opcParentItem);
                }
            }
            else
            {
                // A node element is processed only here.
                var newOpcItem = ProcessNode(nodeElement, opcParentItem);

                // Go on recursively if the node element has children.
                if (nodeElement.HasChildren)
                {
                    var nodeDescriptor = new DANodeDescriptor(nodeElement);
                    var branches       = opc.BrowseBranches(serverDescriptor, nodeDescriptor);
                    var leaves         = opc.BrowseLeaves(serverDescriptor, nodeDescriptor);

                    foreach (var branch in branches)
                    {
                        this.BrowseRecursive(opc, serverDescriptor, branch, newOpcItem);
                    }

                    foreach (var leaf in leaves)
                    {
                        this.BrowseRecursive(opc, serverDescriptor, leaf, newOpcItem);
                    }
                }
            }
        }
            public static void DataTypes()
            {
                var easyDAClient = new EasyDAClient();

                // Define the list of data types we will be checking for.
                // Change as needed for your application.
                // This technique is only usable if there is a known list of
                // data types you are interested in. If you are interested in
                // all leaves, even those that are of data types not explicitly
                // listed, always include VarTypes.Empty as the first data type.
                // The leaves of "unlisted" data types will have VarTypes.Empty
                // associated with them.
                var dataTypes = new VarType[] { VarTypes.Empty, VarTypes.I2, VarTypes.R4 };

                // For each leaf found, this dictionary wil hold its associated data type.
                var dataTypeDictionary = new Dictionary <DANodeElement, VarType>();

                // For each data type, browse for leaves of this data type.
                foreach (VarType dataType in dataTypes)
                {
                    var browseParameters = new DABrowseParameters(DABrowseFilter.Leaves, "", "", dataType);
                    DANodeElementCollection nodeElements =
                        easyDAClient.BrowseNodes("", "AutoJet.ACPFileServerDA.1", "Cttmt2008", browseParameters);

                    // Store the leaf information into the dictionary, and
                    // associate the current data type with it.
                    foreach (var nodeElement in nodeElements)
                    {
                        dataTypeDictionary[nodeElement] = dataType;
                    }
                }

                // Display each leaf found, and its associated data type.
                foreach (KeyValuePair <DANodeElement, VarType> pair in dataTypeDictionary)
                {
                    DANodeElement nodeElement = pair.Key;
                    VarType       dataType    = pair.Value;
                    Console.WriteLine("{0}: {1}", nodeElement, dataType);
                }
            }
            // Write all item values at once
            private static void WriteAllAtOnce()
            {
                var easyDAClient = new EasyDAClient();

                // Create an array of arguments for all items
                var arguments = new DAItemValueArguments[TotalItems];
                int index     = 0;

                for (int iLoop = 0; iLoop < NumberOfGroups; iLoop++)
                {
                    for (int iItem = 0; iItem < ItemsInGroup; iItem++)
                    {
                        arguments[index++] = new DAItemValueArguments(
                            "AutoJet.ACPFileServerDA.1",
                            String.Format("Simulation.Incrementing.Copy_{0}.Phase_{1}", iLoop + 1, iItem + 1),
                            0);
                    }
                }

                // Perform the OPC write
                OperationResult[] operationResults = easyDAClient.WriteMultipleItemValues(arguments);

                // Count successful results
                int successCount = 0;

                for (int iItem = 0; iItem < TotalItems; iItem++)
                {
                    Debug.Assert(operationResults[iItem] != null);
                    if (operationResults[iItem].Succeeded)
                    {
                        successCount++;
                    }
                }

                if (successCount != TotalItems)
                {
                    Console.WriteLine("Warning: There were some failures, success count is {0}", successCount);
                }
            }
            // Read all items at once
            private static void ReadAllAtOnce()
            {
                var easyDAClient = new EasyDAClient();

                // Create an array of item descriptors for all items
                var itemDescriptors = new DAItemDescriptor[TotalItems];
                int index           = 0;

                for (int iLoop = 0; iLoop < NumberOfGroups; iLoop++)
                {
                    for (int iItem = 0; iItem < ItemsInGroup; iItem++)
                    {
                        itemDescriptors[index++] = new DAItemDescriptor(
                            String.Format("Simulation.Incrementing.Copy_{0}.Phase_{1}", iLoop + 1, iItem + 1));
                    }
                }

                // Perform the OPC read
                DAVtqResult[] vtqResults = easyDAClient.ReadMultipleItems("AutoJet.ACPFileServerDA.1", itemDescriptors);

                // Count successful results
                int successCount = 0;

                for (int iItem = 0; iItem < TotalItems; iItem++)
                {
                    Debug.Assert(vtqResults[iItem] != null);
                    if (vtqResults[iItem].Succeeded)
                    {
                        successCount++;
                    }
                }

                if (successCount != TotalItems)
                {
                    Console.WriteLine("Warning: There were some failures, success count is {0}", successCount);
                }
            }
Exemplo n.º 27
0
        static void Main(string[] args)
        {
            //AEExamplesMenu.Main1(); //Faults

            DAExamplesMenu.Main1(); //Data

            // UAExamplesMenu.Main1();


            return;

            EasyDAClient Client = new EasyDAClient();

            Client.InstanceParameters.Timeouts.ReadItem = 1000;

            int          value_age   = 0;
            const string ServerClass = "AutoJet.ACPFileServerDA.1";
            const string nodeElement = "Cttmt2008.Parameter.Manual AI1.value";

            while (true)
            {
                try
                {
                    //object value = Client.ReadItemValue("", ServerClass, nodeElement);
                    object value = Client.ReadItemValue("", ServerClass, nodeElement, OpcLabs.BaseLib.ComInterop.VarTypes.Decimal);
                    Console.WriteLine("{0} = {1}", nodeElement, value);
                }
                catch (OpcException exception)
                {
                    Console.WriteLine("{0} not found!", nodeElement);
                }

                Thread.Sleep(100);
            }

            Console.ReadLine();
        }
Exemplo n.º 28
0
            public static void DataType()
            {
                var easyDAClient = new EasyDAClient();
                ServerDescriptor serverDescriptor = "AutoJet.ACPFileServerDA.1";

                // Browse for all leaves under the "Simulation" branch
                DANodeElementCollection nodeElementCollection = easyDAClient.BrowseLeaves(serverDescriptor, "Simulation");

                // Create list of node descriptors, one for each leaf obtained
                DANodeDescriptor[] nodeDescriptorArray = nodeElementCollection
                                                         .Where(element => !element.IsHint) // filter out hint leafs that do not represent real OPC items (rare)
                                                         .Select(element => new DANodeDescriptor(element))
                                                         .ToArray();

                // Get the value of DataType property; it is a 16-bit signed integer
                ValueResult[] valueResultArray = easyDAClient.GetMultiplePropertyValues(serverDescriptor,
                                                                                        nodeDescriptorArray, DAPropertyIds.DataType);

                for (int i = 0; i < valueResultArray.Length; i++)
                {
                    DANodeDescriptor nodeDescriptor = nodeDescriptorArray[i];

                    // Check if there has been an error getting the property value
                    ValueResult valueResult = valueResultArray[i];
                    if (valueResult.Exception != null)
                    {
                        Console.WriteLine("{0}: *** {1}", nodeDescriptor.NodeId, valueResult.Exception.Message);
                        continue;
                    }

                    // Convert the data type to VarType
                    var varType = (VarType)(short)valueResult.Value;

                    // Display the obtained data type
                    Console.WriteLine("{0}: {1}", nodeDescriptor.ItemId, varType);
                }
            }
Exemplo n.º 29
0
        static void DaRxxWriter(XElement tag, object value)
        {
            using (var client = new EasyDAClient())
            {

                client.WriteItemValue(
                    GetElementAttribute(tag, "da", "endpoint"),
                    GetElementAttribute(tag, "da", "server"),
                    $"{tag.Parent.Attribute("name").Value}.{tag.Attribute("node").Value}",
                     value
                );
            }

        }
Exemplo n.º 30
0
        static void Main(string[] args)
        {
            EasyDAClient client = new EasyDAClient();

            client.ReadItem("Hein_Device", )
        }
Exemplo n.º 31
0
 static void Main(string[] args)
 {
     EasyDAClient.Create();
 }