Inheritance: IDisposable
Esempio n. 1
0
        private void Initialization()
        {
            using (var knxClient = new KnxClient(_hostName, _port, _password))
            {
                knxClient.Connect();
                string response = knxClient.SendRequestAndWaitForResponse("i=1");

                Log.Verbose("knx-init-answer: " + response);
            }
        }
        public void SendDigitalJoinOn(string identifier)
        {
            if (identifier == null) throw new ArgumentNullException(nameof(identifier));

            lock (_syncRoot)
            {
                using (var knxClient = new KnxClient(_hostName, _port, _password))
                {
                    knxClient.Connect();
                    string response = knxClient.SendRequestAndWaitForResponse(identifier + "=1");

                    Log.Verbose("KnxClient: send-digitalJoinOn: " + response);
                }
            }
        }
Esempio n. 3
0
        public void SendDigitalJoinOff(string identifier)
        {
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            lock (_syncRoot)
            {
                using (var knxClient = new KnxClient(_hostName, _port, _password))
                {
                    knxClient.Connect();
                    string response = knxClient.SendRequestAndWaitForResponse(identifier + "=0");

                    Log.Verbose("KnxClient: send-digitalJoinOff: " + response);
                }
            }
        }
        private void Initialization()
        {
            using (var knxClient = new KnxClient(_hostName, _port, _password))
            {
                knxClient.Connect();
                string response = knxClient.SendRequestAndWaitForResponse("i=1");

                Log.Verbose("knx-init-answer: " + response);
            }
        }