tool/CommandCStruct.cpp
changeset 1879 7539329b5cf6
parent 1869 14f634f5b613
child 1949 bde584664aa2
equal deleted inserted replaced
1878:8f37abf260cf 1879:7539329b5cf6
    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  *
    27  *
       
    28  *  vim: expandtab
       
    29  *
    28  ****************************************************************************/
    30  ****************************************************************************/
    29 
    31 
    30 #include <iostream>
    32 #include <iostream>
    31 #include <iomanip>
    33 #include <iomanip>
    32 #include <string.h>
    34 #include <string.h>
    68 
    70 
    69 /****************************************************************************/
    71 /****************************************************************************/
    70 
    72 
    71 void CommandCStruct::execute(const StringVector &args)
    73 void CommandCStruct::execute(const StringVector &args)
    72 {
    74 {
    73 	MasterIndexList masterIndices;
    75     MasterIndexList masterIndices;
    74     SlaveList slaves;
    76     SlaveList slaves;
    75     SlaveList::const_iterator si;
    77     SlaveList::const_iterator si;
    76 
    78 
    77     if (args.size()) {
    79     if (args.size()) {
    78         stringstream err;
    80         stringstream err;
    79         err << "'" << getName() << "' takes no arguments!";
    81         err << "'" << getName() << "' takes no arguments!";
    80         throwInvalidUsageException(err);
    82         throwInvalidUsageException(err);
    81     }
    83     }
    82 
    84 
    83 	masterIndices = getMasterIndices();
    85     masterIndices = getMasterIndices();
    84     MasterIndexList::const_iterator mi;
    86     MasterIndexList::const_iterator mi;
    85     for (mi = masterIndices.begin();
    87     for (mi = masterIndices.begin();
    86             mi != masterIndices.end(); mi++) {
    88             mi != masterIndices.end(); mi++) {
    87         MasterDevice m(*mi);
    89         MasterDevice m(*mi);
    88         m.open(MasterDevice::Read);
    90         m.open(MasterDevice::Read);