Open claudioliciotti opened 5 years ago
void BatchProcessor::runBatch()
{
const int func = stringToHex( embracedString( ui->functionCode->currentText() ) );
const QStringList slaves = ui->slaveEdit->text().split( ';' );
QTextStream out( &m_outputFile );
foreach( const QString &slaveCfg, slaves )
{
if( slaveCfg.contains( ':' ) )
{
const int slaveID = slaveCfg.split( ':' ).first().toInt();
const QStringList addresses = slaveCfg.split( ':' ).last().split( ',' );
foreach( const QString &addr, addresses )
{
out << QDateTime::currentDateTime().toTime_t() << slaveID << ", " << addr.toInt() << ", " << sendModbusRequest( slaveID, func, addr.toInt() ) << endl;
}
}
}
}
I'm not currently sure about how it works in deep.
#ID:#Addr,#Addr
#ID:#Addr,#Addr;#ID:#Addr,#Addr;#ID:#Addr,#Addr;#ID:#Addr,#Addr
coud be possible to receive info about the syntax that should be used in the "ID & registers" field for Batch processing?