EasyModbusTCP.NET
EasyModbusTCP.NET copied to clipboard
Serial Port Parity
Using an empty constructor to generate a ModbusClient, then setting its properties. Setting ModbusClient.Parity = Parity.None; before calling .Connect() results in the internal serialport still creating with Parity.Even
It all boils down to this deprecable getter/setter
public Parity Parity
{
get
{
if (serialport != null)
return parity;
else
return Parity.Even;
}
set
{
if (serialport != null)
parity = value;
}
}
Definining a property with the same name of an enum is a terrible idea. Also Parity.Even is returned when serialport is null.