tool/CommandData.cpp
changeset 1880 f46bec1b5f21
parent 1869 14f634f5b613
child 1968 4f682084c643
equal deleted inserted replaced
1879:7539329b5cf6 1880:f46bec1b5f21
    22  *  ---
    22  *  ---
    23  *
    23  *
    24  *  The license mentioned above concerns the source code only. Using the
    24  *  The license mentioned above concerns the source code only. Using the
    25  *  EtherCAT technology and brand is only permitted in compliance with the
    25  *  EtherCAT technology and brand is only permitted in compliance with the
    26  *  industrial property and similar rights of Beckhoff Automation GmbH.
    26  *  industrial property and similar rights of Beckhoff Automation GmbH.
       
    27  *
       
    28  *  vim: expandtab
    27  *
    29  *
    28  ****************************************************************************/
    30  ****************************************************************************/
    29 
    31 
    30 #include <iostream>
    32 #include <iostream>
    31 using namespace std;
    33 using namespace std;
    64 
    66 
    65 /****************************************************************************/
    67 /****************************************************************************/
    66 
    68 
    67 void CommandData::execute(const StringVector &args)
    69 void CommandData::execute(const StringVector &args)
    68 {
    70 {
    69 	MasterIndexList masterIndices;
    71     MasterIndexList masterIndices;
    70     DomainList domains;
    72     DomainList domains;
    71     DomainList::const_iterator di;
    73     DomainList::const_iterator di;
    72 
    74 
    73     if (args.size()) {
    75     if (args.size()) {
    74         stringstream err;
    76         stringstream err;
    75         err << "'" << getName() << "' takes no arguments!";
    77         err << "'" << getName() << "' takes no arguments!";
    76         throwInvalidUsageException(err);
    78         throwInvalidUsageException(err);
    77     }
    79     }
    78 
    80 
    79 	masterIndices = getMasterIndices();
    81     masterIndices = getMasterIndices();
    80     MasterIndexList::const_iterator mi;
    82     MasterIndexList::const_iterator mi;
    81     for (mi = masterIndices.begin();
    83     for (mi = masterIndices.begin();
    82             mi != masterIndices.end(); mi++) {
    84             mi != masterIndices.end(); mi++) {
    83         MasterDevice m(*mi);
    85         MasterDevice m(*mi);
    84         m.open(MasterDevice::Read);
    86         m.open(MasterDevice::Read);