Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("OpcUa Client Start ...");
            OpcUaClient m_OpcUaClient = new OpcUaClient
            {
                UserIdentity = new UserIdentity(new AnonymousIdentityToken())
            };

            m_OpcUaClient.ConnectServer("opc.tcp://localhost:62567");

            m_OpcUaClient.AddSubscription("CPU_Usage", "ns=2;i=15014", SubCallback);
            m_OpcUaClient.AddSubscription("LogLine", "ns=2;i=15022", SubCallback);

            Console.WriteLine("Please enter any key to quit!");
            Console.ReadLine();
            m_OpcUaClient.Disconnect();
        }
Beispiel #2
0
 private static void Disconnect()
 {
     client.Disconnect();
 }