tool/main.cpp
changeset 1134 3356141fa2f8
parent 1129 4bc1d9f9d73c
child 1136 a0982873d655
equal deleted inserted replaced
1133:860d1c3d08fc 1134:3356141fa2f8
    59 DEFINE_EXTERN_COMMAND(debug);
    59 DEFINE_EXTERN_COMMAND(debug);
    60 DEFINE_EXTERN_COMMAND(domains);
    60 DEFINE_EXTERN_COMMAND(domains);
    61 DEFINE_EXTERN_COMMAND(master);
    61 DEFINE_EXTERN_COMMAND(master);
    62 DEFINE_EXTERN_COMMAND(pdos);
    62 DEFINE_EXTERN_COMMAND(pdos);
    63 DEFINE_EXTERN_COMMAND(sdos);
    63 DEFINE_EXTERN_COMMAND(sdos);
    64 DEFINE_EXTERN_COMMAND(sdo_download);
    64 DEFINE_EXTERN_COMMAND(download);
    65 DEFINE_EXTERN_COMMAND(sdo_upload);
    65 DEFINE_EXTERN_COMMAND(upload);
    66 DEFINE_EXTERN_COMMAND(slaves);
    66 DEFINE_EXTERN_COMMAND(slaves);
    67 DEFINE_EXTERN_COMMAND(sii_read);
    67 DEFINE_EXTERN_COMMAND(sii_read);
    68 DEFINE_EXTERN_COMMAND(sii_write);
    68 DEFINE_EXTERN_COMMAND(sii_write);
    69 DEFINE_EXTERN_COMMAND(states);
    69 DEFINE_EXTERN_COMMAND(states);
    70 DEFINE_EXTERN_COMMAND(xml);
    70 DEFINE_EXTERN_COMMAND(xml);
    76     INIT_COMMAND(debug, "Set the master's debug level."),
    76     INIT_COMMAND(debug, "Set the master's debug level."),
    77     INIT_COMMAND(domains, "Show domain information."),
    77     INIT_COMMAND(domains, "Show domain information."),
    78     INIT_COMMAND(master, "Show master information."),
    78     INIT_COMMAND(master, "Show master information."),
    79     INIT_COMMAND(pdos, "List Pdo assignment/mapping."),
    79     INIT_COMMAND(pdos, "List Pdo assignment/mapping."),
    80     INIT_COMMAND(sdos, "List Sdo dictionaries."),
    80     INIT_COMMAND(sdos, "List Sdo dictionaries."),
    81     INIT_COMMAND(sdo_download, "Write an Sdo entry."),
    81     INIT_COMMAND(download, "Write an Sdo entry."),
    82     INIT_COMMAND(sdo_upload, "Read an Sdo entry."),
    82     INIT_COMMAND(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 XML."),
    87     INIT_COMMAND(xml, "Generate slave information XML."),
   111         cerr << "  " << setw(maxWidth) << cmd->name
   111         cerr << "  " << setw(maxWidth) << cmd->name
   112             << " " << cmd->briefDesc << endl;
   112             << " " << cmd->briefDesc << endl;
   113     }
   113     }
   114 
   114 
   115     cerr
   115     cerr
   116         << "Commands can be generously abbreviated." << endl
   116         << "Commands can be abbreviated." << endl
   117 		<< "Global options:" << endl
   117 		<< "Global options:" << endl
   118         << "  --master  -m <master>  Index of the master to use. Default: 0"
   118         << "  --master  -m <master>  Index of the master to use. Default: 0"
   119 		<< endl
   119 		<< endl
   120         << "  --slave   -s <index>   Positive numerical ring position,"
   120         << "  --slave   -s <index>   Positive numerical ring position,"
   121         << endl
   121         << endl
   122         << "                         or 'all' for all slaves (default)."
   122         << "                         or 'all' for all slaves (default)."
   123         << endl
       
   124         << "                         or 'all' for all domains (default)."
       
   125         << endl
   123         << endl
   126         << "  --type    -t <type>    Forced Sdo data type." << endl
   124         << "  --type    -t <type>    Forced Sdo data type." << endl
   127         << "  --force   -f           Force action." << endl
   125         << "  --force   -f           Force action." << endl
   128         << "  --quiet   -q           Output less information." << endl
   126         << "  --quiet   -q           Output less information." << endl
   129         << "  --verbose -v           Output more information." << endl
   127         << "  --verbose -v           Output more information." << endl