Hello,
I tested this program with the latest version 1.1.10:
1- The name Status does not exist , so I removed the line.
2- when I remove the cable , the Disconnected respond after 20 to 40 sec .
3- after I return the cable , the connected respond after 20 to 40 sec .
with the following Exception :
please help.
Thanks
using System;
using KNXLib;
using System.Threading;
Hello, I tested this program with the latest version 1.1.10: 1- The name Status does not exist , so I removed the line. 2- when I remove the cable , the Disconnected respond after 20 to 40 sec . 3- after I return the cable , the connected respond after 20 to 40 sec . with the following Exception :
please help. Thanks
using System; using KNXLib; using System.Threading;
namespace KNXTest {
class Program { public static int u1; static KnxConnectionTunneling conn; static void Main(string[] args) { u1 = 0;
try { conn = new KnxConnectionTunneling("172.21.2.85", 3671, "172.21.3.32", 3671); conn.SetLockIntervalMs(10); conn.Connect(); Console.WriteLine(" conn try wait 1 "); Thread.Sleep(1000); conn.KnxConnectedDelegate += Connected;
// conn.KnxStatusDelegate += Status; conn.KnxDisconnectedDelegate += Disconnected;
conn.KnxEventDelegate += Event; while (true) { conn.RequestStatus("2/2/4"); Thread.Sleep(10); } } catch (Exception e) { Console.WriteLine(e.ToString()); Console.ReadKey(); throw e; } } private static void Connected() { // if (u1 == 0) { Console.WriteLine(" conection is now " ); u1 = 1; } } private static void Disconnected() { // if (u1 == 1) { u1 = 0;
}