tool/main.cpp
changeset 1128 b69b2c850160
parent 1127 bd7aef6c310c
child 1129 4bc1d9f9d73c
equal deleted inserted replaced
1127:bd7aef6c310c 1128:b69b2c850160
    82     INIT_COMMAND(sdo_upload, "Read an Sdo entry."),
    82     INIT_COMMAND(sdo_upload, "Read an Sdo entry."),
    83     INIT_COMMAND(slaves, "Show slaves."),
    83     INIT_COMMAND(slaves, "Show slaves."),
    84     INIT_COMMAND(sii_read, "Output a slave's SII contents."),
    84     INIT_COMMAND(sii_read, "Output a slave's SII contents."),
    85     INIT_COMMAND(sii_write, "Write slave's SII contents."),
    85     INIT_COMMAND(sii_write, "Write slave's SII contents."),
    86     INIT_COMMAND(states, "Request slave states."),
    86     INIT_COMMAND(states, "Request slave states."),
    87     INIT_COMMAND(xml, "Generate slave information xmls."),
    87     INIT_COMMAND(xml, "Generate slave information XML."),
    88 };
    88 };
    89 
    89 
    90 static const Command *cmdEnd = commands + sizeof(commands) / sizeof(Command);
    90 static const Command *cmdEnd = commands + sizeof(commands) / sizeof(Command);
    91 
    91 
    92 /*****************************************************************************/
    92 /*****************************************************************************/
   342                 retval = cmd->execute();
   342                 retval = cmd->execute();
   343             } else {
   343             } else {
   344                 cmd->displayHelp();
   344                 cmd->displayHelp();
   345             }
   345             }
   346         } else {
   346         } else {
   347             cerr << "Ambigous command abbreviation! Matching:" << endl;
   347             cerr << "Ambiguous command abbreviation! Matching:" << endl;
   348             for (ci = commands.begin(); ci != commands.end(); ci++) {
   348             for (ci = commands.begin(); ci != commands.end(); ci++) {
   349                 cerr << (*ci)->name << endl;
   349                 cerr << (*ci)->name << endl;
   350             }
   350             }
   351             cerr << endl;
   351             cerr << endl;
   352             printUsage();
   352             printUsage();