18 lines
431 B
C++
18 lines
431 B
C++
#include "modbusconfig.h"
|
|
|
|
ModbusConfig ModbusConfig::defaultConfig()
|
|
{
|
|
ModbusConfig config;
|
|
config.host = "127.0.0.1";
|
|
config.port = 502;
|
|
config.serverAddress = 1;
|
|
config.timeoutMs = 1000;
|
|
config.retryCount = 1;
|
|
config.pollIntervalMs = 1000;
|
|
config.commandPulseMs = 100;
|
|
config.feedbackTimeoutMs = 2000;
|
|
config.reconnectDelayMs = 200;
|
|
config.reconnectAttempts = 2;
|
|
return config;
|
|
}
|