Search in sources :

Example 1 with ModbusSerialTransaction

use of com.ghgande.j2mod.modbus.io.ModbusSerialTransaction in project openems by OpenEMS.

the class ModbusRtu method getTransaction.

@Override
public ModbusTransaction getTransaction() throws OpenemsModbusException {
    SerialConnection connection = getModbusConnection();
    ModbusSerialTransaction trans = new ModbusSerialTransaction(connection);
    trans.setRetries(0);
    return trans;
}
Also used : SerialConnection(com.ghgande.j2mod.modbus.net.SerialConnection) ModbusSerialTransaction(com.ghgande.j2mod.modbus.io.ModbusSerialTransaction)

Aggregations

ModbusSerialTransaction (com.ghgande.j2mod.modbus.io.ModbusSerialTransaction)1 SerialConnection (com.ghgande.j2mod.modbus.net.SerialConnection)1