private void ProcessConnectionStateResponse(byte[] datagram) { // HEADER // 06 10 02 08 00 08 -- 48 21 var knxDatagram = new KnxDatagram { header_length = datagram[0], protocol_version = datagram[1], service_type = new[] { datagram[2], datagram[3] }, total_length = datagram[4] + datagram[5], channel_id = datagram[6] }; var response = datagram[7]; if (response != 0x21) { return; } if (KnxConnection.Debug) { Console.WriteLine("KnxReceiverTunneling: Received connection state response - No active connection with channel ID {0}", knxDatagram.channel_id); } KnxConnection.Disconnect(); }
private void ProcessConnectionStateResponse(byte[] datagram) { // HEADER // 06 10 02 08 00 08 -- 48 21 var knxDatagram = new KnxDatagram { header_length = datagram[0], protocol_version = datagram[1], service_type = new[] { datagram[2], datagram[3] }, total_length = datagram[4] + datagram[5], channel_id = datagram[6] }; var response = datagram[7]; //_logger.Debug(ClassName, "Received connection state response - response {0}", response); if (response != 0x21) { return; } _logger.Debug(ClassName, "Received connection state response - No active connection with channel ID {0}", knxDatagram.channel_id); KnxConnection.Disconnect(); }
private void ProcessDisconnectRequest(byte[] datagram) { var channelId = datagram[6]; if (channelId != KnxConnectionTunneling.ChannelId) { return; } Stop(); KnxConnection.Disconnected(); _udpClient.Close(); }
private static void Main() { _connection = new KnxConnectionTunneling("10.0.250.20", 3671, "10.0.253.5", 3671) { Debug = false }; _connection.KnxConnectedDelegate += Connected; _connection.KnxDisconnectedDelegate += Disconnected; _connection.KnxEventDelegate += Event; _connection.KnxStatusDelegate += Status; _connection.Connect(); Console.WriteLine("Done. Press [ENTER] to finish"); Console.Read(); _connection.KnxDisconnectedDelegate -= Disconnected; _connection.Disconnect(); Environment.Exit(0); }
private static void Main() { _connection = new KnxConnectionRouting { Debug = false, ActionMessageCode = 0x29 }; _connection.KnxConnectedDelegate += Connected; _connection.KnxDisconnectedDelegate += Disconnected; _connection.KnxEventDelegate += Event; _connection.KnxStatusDelegate += Status; _connection.Connect(); LightOnOff(); //BlindUpDown1(); //BlindUpDown2(); //TemperatureSetpoint(); Console.WriteLine("Done. Press [ENTER] to finish"); Console.Read(); Environment.Exit(0); }
internal KnxReceiverTunneling(KnxConnection connection, UdpClient udpClient, IPEndPoint localEndpoint) : base(connection) { _udpClient = udpClient; _localEndpoint = localEndpoint; }
internal KnxSenderRouting(KnxConnection connection, IList<UdpClient> udpClients, IPEndPoint remoteEndpoint) : base(connection) { _udpClients = udpClients; _remoteEndpoint = remoteEndpoint; }
internal KnxReceiverRouting(KnxConnection connection, IList <UdpClient> udpClients) : base(connection) { _udpClients = udpClients; }
internal KnxSenderTunneling(KnxConnection connection, UdpClient udpClient, IPEndPoint remoteEndpoint) : base(connection) { _udpClient = udpClient; _remoteEndpoint = remoteEndpoint; }
protected KnxReceiver(KnxConnection connection) { KnxConnection = connection; }
internal KnxSenderRouting(KnxConnection connection, IList <UdpClient> udpClients, IPEndPoint remoteEndpoint) : base(connection) { _udpClients = udpClients; _remoteEndpoint = remoteEndpoint; }
protected KnxSender(KnxConnection connection) => KnxConnection = connection;
internal KnxReceiverRouting(KnxConnection connection, IList<UdpClient> udpClients) : base(connection) { _udpClients = udpClients; }