Skip to content
Snippets Groups Projects
Commit 32702e44 authored by Florian Pose's avatar Florian Pose
Browse files

Removed tabs.

parent bf9eb4b7
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the * EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH. * industrial property and similar rights of Beckhoff Automation GmbH.
* *
* vim: expandtab
*
****************************************************************************/ ****************************************************************************/
#include "Command.h" #include "Command.h"
...@@ -189,35 +191,35 @@ void Command::throwSingleSlaveRequired(unsigned int size) const ...@@ -189,35 +191,35 @@ void Command::throwSingleSlaveRequired(unsigned int size) const
Command::MasterIndexList Command::getMasterIndices() const Command::MasterIndexList Command::getMasterIndices() const
{ {
MasterIndexList indices; MasterIndexList indices;
try { try {
MasterIndexParser p; MasterIndexParser p;
indices = p.parse(masters.c_str()); indices = p.parse(masters.c_str());
} catch (MasterDeviceException &e) { } catch (MasterDeviceException &e) {
stringstream err; stringstream err;
err << "Failed to obtain number of masters: " << e.what(); err << "Failed to obtain number of masters: " << e.what();
throwCommandException(err); throwCommandException(err);
} catch (runtime_error &e) { } catch (runtime_error &e) {
stringstream err; stringstream err;
err << "Invalid master argument '" << masters << "': " << e.what(); err << "Invalid master argument '" << masters << "': " << e.what();
throwInvalidUsageException(err); throwInvalidUsageException(err);
} }
return indices; return indices;
} }
/*****************************************************************************/ /*****************************************************************************/
unsigned int Command::getSingleMasterIndex() const unsigned int Command::getSingleMasterIndex() const
{ {
MasterIndexList masterIndices = getMasterIndices(); MasterIndexList masterIndices = getMasterIndices();
if (masterIndices.size() != 1) { if (masterIndices.size() != 1) {
stringstream err; stringstream err;
err << getName() << " requires to select a single master!"; err << getName() << " requires to select a single master!";
throwInvalidUsageException(err); throwInvalidUsageException(err);
} }
return masterIndices.front(); return masterIndices.front();
} }
/*****************************************************************************/ /*****************************************************************************/
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the * EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH. * industrial property and similar rights of Beckhoff Automation GmbH.
* *
* vim: expandtab
*
****************************************************************************/ ****************************************************************************/
#include <list> #include <list>
...@@ -104,7 +106,7 @@ string CommandConfig::helpString() const ...@@ -104,7 +106,7 @@ string CommandConfig::helpString() const
*/ */
void CommandConfig::execute(const StringVector &args) void CommandConfig::execute(const StringVector &args)
{ {
MasterIndexList masterIndices; MasterIndexList masterIndices;
bool doIndent; bool doIndent;
ConfigList configs; ConfigList configs;
...@@ -114,7 +116,7 @@ void CommandConfig::execute(const StringVector &args) ...@@ -114,7 +116,7 @@ void CommandConfig::execute(const StringVector &args)
throwInvalidUsageException(err); throwInvalidUsageException(err);
} }
masterIndices = getMasterIndices(); masterIndices = getMasterIndices();
doIndent = masterIndices.size() > 1; doIndent = masterIndices.size() > 1;
MasterIndexList::const_iterator mi; MasterIndexList::const_iterator mi;
for (mi = masterIndices.begin(); for (mi = masterIndices.begin();
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the * EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH. * industrial property and similar rights of Beckhoff Automation GmbH.
* *
* vim: expandtab
*
****************************************************************************/ ****************************************************************************/
#include <iostream> #include <iostream>
...@@ -66,7 +68,7 @@ string CommandData::helpString() const ...@@ -66,7 +68,7 @@ string CommandData::helpString() const
void CommandData::execute(const StringVector &args) void CommandData::execute(const StringVector &args)
{ {
MasterIndexList masterIndices; MasterIndexList masterIndices;
DomainList domains; DomainList domains;
DomainList::const_iterator di; DomainList::const_iterator di;
...@@ -76,7 +78,7 @@ void CommandData::execute(const StringVector &args) ...@@ -76,7 +78,7 @@ void CommandData::execute(const StringVector &args)
throwInvalidUsageException(err); throwInvalidUsageException(err);
} }
masterIndices = getMasterIndices(); masterIndices = getMasterIndices();
MasterIndexList::const_iterator mi; MasterIndexList::const_iterator mi;
for (mi = masterIndices.begin(); for (mi = masterIndices.begin();
mi != masterIndices.end(); mi++) { mi != masterIndices.end(); mi++) {
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
* EtherCAT technology and brand is only permitted in compliance with the * EtherCAT technology and brand is only permitted in compliance with the
* industrial property and similar rights of Beckhoff Automation GmbH. * industrial property and similar rights of Beckhoff Automation GmbH.
* *
* vim: expandtab
*
****************************************************************************/ ****************************************************************************/
#include <sstream> #include <sstream>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment