Exemplo n.º 1
0
 public ModbusMachine(ModbusType connectionType, string connectionString,
                      IEnumerable <AddressUnit> getAddresses, bool keepConnect) : base(getAddresses, keepConnect)
 {
     BaseUtility        = new ModbusUtility(connectionType, connectionString);
     AddressFormater    = new AddressFormaterModbus();
     AddressCombiner    = new AddressCombinerContinus(AddressTranslator);
     AddressCombinerSet = new AddressCombinerContinus(AddressTranslator);
 }
Exemplo n.º 2
0
 public ModbusMachine(ModbusType connectionType, string connectionString,
                      IEnumerable <AddressUnit> getAddresses, bool keepConnect, byte slaveAddress, byte masterAddress, Endian endian = Endian.BigEndianLsb)
     : base(getAddresses, keepConnect, slaveAddress, masterAddress)
 {
     BaseUtility        = new ModbusUtility(connectionType, connectionString, slaveAddress, masterAddress, endian);
     AddressFormater    = new AddressFormaterModbus();
     AddressCombiner    = new AddressCombinerContinus(AddressTranslator);
     AddressCombinerSet = new AddressCombinerContinus(AddressTranslator);
 }