|
|
@ -48,6 +48,11 @@ void ModbusWrapper::init() |
|
|
|
&_modbusMaster, |
|
|
|
&ModbusMaster::getHoldingRegister, |
|
|
|
Qt::BlockingQueuedConnection); |
|
|
|
connect(this, |
|
|
|
&ModbusWrapper::getInputRegisterOrder, |
|
|
|
&_modbusMaster, |
|
|
|
&ModbusMaster::getInputRegister, |
|
|
|
Qt::BlockingQueuedConnection); |
|
|
|
|
|
|
|
emit initOrder(); |
|
|
|
|
|
|
@ -81,6 +86,15 @@ QVector<quint16> ModbusWrapper::getHoldingRegister(int startAddress, quint16 rea |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
QVector<quint16> ModbusWrapper::getInputRegister(int startAddress, quint16 readSize) |
|
|
|
{ |
|
|
|
auto result = emit getInputRegisterOrder(startAddress, readSize); |
|
|
|
qDebug() << "getInputRegister done"; |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/*************************************************************************************************/ |
|
|
|
void ModbusWrapper::connectToDevice(ModbusConfig modbusConfig) |
|
|
|
{ |
|
|
|