Search in sources :

Example 6 with RequestTransactionManager

use of org.apache.plc4x.java.spi.transaction.RequestTransactionManager in project plc4x by apache.

the class KnxNetIpProtocolLogic method setDriverContext.

@Override
public void setDriverContext(DriverContext driverContext) {
    super.setDriverContext(driverContext);
    this.knxNetIpDriverContext = (KnxNetIpDriverContext) driverContext;
    // Initialize Transaction Manager.
    // Until the number of concurrent requests is successfully negotiated we set it to a
    // maximum of only one request being able to be sent at a time. During the login process
    // No concurrent requests can be sent anyway. It will be updated when receiving the
    // S7ParameterSetupCommunication response.
    this.tm = new RequestTransactionManager(1);
}
Also used : RequestTransactionManager(org.apache.plc4x.java.spi.transaction.RequestTransactionManager)

Example 7 with RequestTransactionManager

use of org.apache.plc4x.java.spi.transaction.RequestTransactionManager in project plc4x by apache.

the class EipProtocolLogic method setConfiguration.

@Override
public void setConfiguration(EIPConfiguration configuration) {
    this.configuration = configuration;
    // Set the transaction manager to allow only one message at a time.
    this.tm = new RequestTransactionManager(1);
}
Also used : RequestTransactionManager(org.apache.plc4x.java.spi.transaction.RequestTransactionManager)

Example 8 with RequestTransactionManager

use of org.apache.plc4x.java.spi.transaction.RequestTransactionManager in project plc4x by apache.

the class ModbusTcpProtocolLogic method setConfiguration.

@Override
public void setConfiguration(ModbusTcpConfiguration configuration) {
    this.requestTimeout = Duration.ofMillis(configuration.getRequestTimeout());
    this.unitIdentifier = (short) configuration.getUnitIdentifier();
    this.tm = new RequestTransactionManager(1);
}
Also used : RequestTransactionManager(org.apache.plc4x.java.spi.transaction.RequestTransactionManager)

Example 9 with RequestTransactionManager

use of org.apache.plc4x.java.spi.transaction.RequestTransactionManager in project plc4x by apache.

the class Plc4xProtocolLogic method setConfiguration.

@Override
public void setConfiguration(Plc4xConfiguration configuration) {
    this.tm = new RequestTransactionManager(1);
    this.remoteConnectionString = configuration.getRemoteConnectionString();
    this.requestTimeout = Duration.ofMillis(configuration.getRequestTimeout());
    this.connectionId = 0;
}
Also used : RequestTransactionManager(org.apache.plc4x.java.spi.transaction.RequestTransactionManager)

Example 10 with RequestTransactionManager

use of org.apache.plc4x.java.spi.transaction.RequestTransactionManager in project plc4x by apache.

the class ModbusAsciiProtocolLogic method setConfiguration.

@Override
public void setConfiguration(ModbusAsciiConfiguration configuration) {
    this.requestTimeout = Duration.ofMillis(configuration.getRequestTimeout());
    this.unitIdentifier = (short) configuration.getUnitIdentifier();
    this.tm = new RequestTransactionManager(1);
}
Also used : RequestTransactionManager(org.apache.plc4x.java.spi.transaction.RequestTransactionManager)

Aggregations

RequestTransactionManager (org.apache.plc4x.java.spi.transaction.RequestTransactionManager)16 CompletableFuture (java.util.concurrent.CompletableFuture)4 Test (org.junit.jupiter.api.Test)4 Disabled (org.junit.jupiter.api.Disabled)1