tool/CommandConfig.cpp
changeset 1144 7dbfdd61812c
parent 1142 59be91dfcbe1
child 1147 0eac1ee8512a
equal deleted inserted replaced
1143:09ee878d7214 1144:7dbfdd61812c
    24 
    24 
    25 string CommandConfig::helpString() const
    25 string CommandConfig::helpString() const
    26 {
    26 {
    27     stringstream str;
    27     stringstream str;
    28 
    28 
    29     str << "[OPTIONS]" << endl
    29     str << getName() << " [OPTIONS]" << endl
    30     	<< endl
    30     	<< endl
    31     	<< "Output information about the slave configurations" << endl
    31     	<< getBriefDescription() << endl
    32     	<< "supplied by the application." << endl
       
    33     	<< endl
    32     	<< endl
    34     	<< "Without the --verbose option, slave configurations are" << endl
    33     	<< "Without the --verbose option, slave configurations are" << endl
    35     	<< "output one-per-line. Example:" << endl
    34     	<< "output one-per-line. Example:" << endl
    36     	<< endl
    35     	<< endl
    37     	<< "1001:0  0x0000003b/0x02010000  -  -" << endl
    36     	<< "1001:0  0x0000003b/0x02010000  -  -" << endl
    38     	<< "|       |                      |  |" << endl
    37     	<< "|       |                      |  |" << endl
    39     	<< "|       |                      |  \\- Slave is operational."
    38     	<< "|       |                      |  \\- Slave is operational."
    40 		<< endl
    39 		<< endl
    41     	<< "|       |                      \\- Slave has been found." << endl
    40     	<< "|       |                      \\- Slave has been found." << endl
    42     	<< "|       \\- Hexadecimal vendor ID and product code, separated"
    41     	<< "|       \\- Vendor ID and product code (both" << endl
    43 		<< endl
    42     	<< "|          hexadecimal)." << endl
    44     	<< "|          by a slash." << endl
    43     	<< "\\- Alias and relative position (both decimal)." << endl
    45     	<< "\\- Decimal alias and position, separated by a colon." << endl
       
    46     	<< endl
    44     	<< endl
    47     	<< "With the --verbose option given, the configured Pdos and" << endl
    45     	<< "With the --verbose option given, the configured Pdos and" << endl
    48     	<< "Sdos are additionally printed." << endl
    46     	<< "Sdos are output in addition." << endl
    49     	<< endl
    47     	<< endl
    50     	<< "Command-specific options:" << endl
    48     	<< "Command-specific options:" << endl
    51     	<< "  --verbose  -v  Show detailed configurations." << endl;
    49     	<< "  --verbose -v  Show detailed configurations." << endl;
    52 
    50 
    53 	return str.str();
    51 	return str.str();
    54 }
    52 }
    55 
    53 
    56 /*****************************************************************************/
    54 /*****************************************************************************/
    57 
    55 
    58 /*****************************************************************************/
    56 bool operator<(
    59 
    57         const ec_ioctl_config_t &a,
    60 bool operator<(const ec_ioctl_config_t &a, const ec_ioctl_config_t &b)
    58         const ec_ioctl_config_t &b
       
    59         )
    61 {
    60 {
    62     return a.alias < b.alias
    61     return a.alias < b.alias
    63         || (a.alias == b.alias && a.position < b.position);
    62         || (a.alias == b.alias && a.position < b.position);
    64 }
    63 }
    65 
    64