tool/CommandConfig.cpp
changeset 1880 f46bec1b5f21
parent 1869 14f634f5b613
child 1918 c58633eed20b
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 <list>
    32 #include <list>
    31 #include <iostream>
    33 #include <iostream>
   102 
   104 
   103 /** Lists the bus configuration.
   105 /** Lists the bus configuration.
   104  */
   106  */
   105 void CommandConfig::execute(const StringVector &args)
   107 void CommandConfig::execute(const StringVector &args)
   106 {
   108 {
   107 	MasterIndexList masterIndices;
   109     MasterIndexList masterIndices;
   108     bool doIndent;
   110     bool doIndent;
   109     ConfigList configs;
   111     ConfigList configs;
   110 
   112 
   111     if (args.size()) {
   113     if (args.size()) {
   112         stringstream err;
   114         stringstream err;
   113         err << "'" << getName() << "' takes no arguments!";
   115         err << "'" << getName() << "' takes no arguments!";
   114         throwInvalidUsageException(err);
   116         throwInvalidUsageException(err);
   115     }
   117     }
   116 
   118 
   117 	masterIndices = getMasterIndices();
   119     masterIndices = getMasterIndices();
   118     doIndent = masterIndices.size() > 1;
   120     doIndent = masterIndices.size() > 1;
   119     MasterIndexList::const_iterator mi;
   121     MasterIndexList::const_iterator mi;
   120     for (mi = masterIndices.begin();
   122     for (mi = masterIndices.begin();
   121             mi != masterIndices.end(); mi++) {
   123             mi != masterIndices.end(); mi++) {
   122         MasterDevice m(*mi);
   124         MasterDevice m(*mi);