Example #1
0
        public static void ConnectToDevice()
        {
            var connInfo = GetConnectInfo();

            if (connInfo != null)
            {
                try {
                    Console.WriteLine("Connecting to the device...");

                    uint devID = connectSvc.Connect(connInfo);
                    Console.WriteLine("Connected to {0}", devID);
                } catch (Exception e) {
                    Console.WriteLine("Cannot connect to the device: {0}", e);
                }
            }
        }
Example #2
0
        public uint TestConnect()
        {
            var devList = connectSvc.GetDeviceList();

            Console.WriteLine("Device list before connection: {0}" + Environment.NewLine, devList);

            var connectInfo = new ConnectInfo {
                IPAddr = DEVICE_ADDR, Port = DEVICE_PORT, UseSSL = USE_SSL
            };
            var devID = connectSvc.Connect(connectInfo);

            devList = connectSvc.GetDeviceList();

            Console.WriteLine("Device list after connection: {0}" + Environment.NewLine, devList);

            return(devID);
        }