tool/CommandConfig.cpp
changeset 1327 4d179b06dd3c
parent 1254 c19d273a9e76
child 1363 11c0b2caa253
equal deleted inserted replaced
1326:ef907b0b5125 1327:4d179b06dd3c
    44     	<< "|       |                         attached." << endl
    44     	<< "|       |                         attached." << endl
    45     	<< "|       \\- Expected vendor ID and product code (both" << endl
    45     	<< "|       \\- Expected vendor ID and product code (both" << endl
    46     	<< "|          hexadecimal)." << endl
    46     	<< "|          hexadecimal)." << endl
    47     	<< "\\- Alias address and relative position (both decimal)." << endl
    47     	<< "\\- Alias address and relative position (both decimal)." << endl
    48     	<< endl
    48     	<< endl
    49     	<< "With the --verbose option given, the configured Pdos and" << endl
    49     	<< "With the --verbose option given, the configured PDOs and" << endl
    50     	<< "Sdos are output in addition." << endl
    50     	<< "SDOs are output in addition." << endl
    51         << endl
    51         << endl
    52         << "Configuration selection:" << endl
    52         << "Configuration selection:" << endl
    53         << "  Slave configurations can be selected with" << endl
    53         << "  Slave configurations can be selected with" << endl
    54         << "  the --alias and --position parameters as follows:" << endl
    54         << "  the --alias and --position parameters as follows:" << endl
    55         << endl
    55         << endl
   136                     << (configIter->syncs[j].dir == EC_DIR_INPUT
   136                     << (configIter->syncs[j].dir == EC_DIR_INPUT
   137                             ? "Input" : "Output") << ")" << endl;
   137                             ? "Input" : "Output") << ")" << endl;
   138                 for (k = 0; k < configIter->syncs[j].pdo_count; k++) {
   138                 for (k = 0; k < configIter->syncs[j].pdo_count; k++) {
   139                     m.getConfigPdo(&pdo, configIter->config_index, j, k);
   139                     m.getConfigPdo(&pdo, configIter->config_index, j, k);
   140 
   140 
   141                     cout << "  Pdo 0x" << hex << setw(4) << pdo.index << endl;
   141                     cout << "  PDO 0x" << hex << setw(4) << pdo.index << endl;
   142 
   142 
   143                     for (l = 0; l < pdo.entry_count; l++) {
   143                     for (l = 0; l < pdo.entry_count; l++) {
   144                         m.getConfigPdoEntry(&entry,
   144                         m.getConfigPdoEntry(&entry,
   145                                 configIter->config_index, j, k, l);
   145                                 configIter->config_index, j, k, l);
   146 
   146 
   147                         cout << "    Pdo entry 0x" << hex << setfill('0')
   147                         cout << "    PDO entry 0x" << hex << setfill('0')
   148                             << setw(4) << entry.index << ":"
   148                             << setw(4) << entry.index << ":"
   149                             << setw(2) << (unsigned int) entry.subindex
   149                             << setw(2) << (unsigned int) entry.subindex
   150                             << ", " << dec << setfill(' ')
   150                             << ", " << dec << setfill(' ')
   151                             << setw(2) << (unsigned int) entry.bit_length
   151                             << setw(2) << (unsigned int) entry.bit_length
   152                             << " bit" << endl;
   152                             << " bit" << endl;
   153                     }
   153                     }
   154                 }
   154                 }
   155             }
   155             }
   156         }
   156         }
   157 
   157 
   158         cout << "Sdo configuration:" << endl;
   158         cout << "SDO configuration:" << endl;
   159         if (configIter->sdo_count) {
   159         if (configIter->sdo_count) {
   160             for (j = 0; j < configIter->sdo_count; j++) {
   160             for (j = 0; j < configIter->sdo_count; j++) {
   161                 m.getConfigSdo(&sdo, configIter->config_index, j);
   161                 m.getConfigSdo(&sdo, configIter->config_index, j);
   162 
   162 
   163                 cout << "  0x"
   163                 cout << "  0x"