mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-02-06 11:51:45 +08:00
Multi-master support for command-line tool. The --master option supports
ranges like '1-3,6,7-9'. The ioctl() interface version is checked.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
using namespace std;
|
||||
|
||||
#include "CommandDebug.h"
|
||||
#include "MasterDevice.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -65,7 +66,7 @@ string CommandDebug::helpString() const
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void CommandDebug::execute(MasterDevice &m, const StringVector &args)
|
||||
void CommandDebug::execute(const StringVector &args)
|
||||
{
|
||||
stringstream str;
|
||||
int debugLevel;
|
||||
@@ -86,8 +87,13 @@ void CommandDebug::execute(MasterDevice &m, const StringVector &args)
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
|
||||
m.open(MasterDevice::ReadWrite);
|
||||
m.setDebug(debugLevel);
|
||||
MasterIndexList::const_iterator mi;
|
||||
for (mi = getMasterIndices().begin();
|
||||
mi != getMasterIndices().end(); mi++) {
|
||||
MasterDevice m(*mi);
|
||||
m.open(MasterDevice::ReadWrite);
|
||||
m.setDebug(debugLevel);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user