Beispiel #1
0
        public static void CloseModbusClient(SerialPort port)
        {
            var modbusClient = ModbusClients.FirstOrDefault(c => c.IPAddress == port.PortName);

            modbusClient?.Disconnect();
        }
Beispiel #2
0
        private static void CloseModbusClient(string ipAddress)
        {
            var modbusClient = ModbusClients.FirstOrDefault(c => c.IPAddress == ipAddress);

            modbusClient?.Disconnect();
        }
Beispiel #3
0
        public static void CloseModbusClient(ModbusClient client)
        {
            var modbusClient = ModbusClients.FirstOrDefault(c => c.IPAddress == client.IPAddress);

            modbusClient?.Disconnect();
        }