tool/CommandDomains.cpp
changeset 1144 7dbfdd61812c
parent 1142 59be91dfcbe1
child 1166 006244d53f68
equal deleted inserted replaced
1143:09ee878d7214 1144:7dbfdd61812c
    21 
    21 
    22 string CommandDomains::helpString() const
    22 string CommandDomains::helpString() const
    23 {
    23 {
    24     stringstream str;
    24     stringstream str;
    25 
    25 
    26 	str << getName() << " [OPTIONS]"
    26 	str << getName() << " [OPTIONS]" << endl
    27     	<< endl
    27     	<< endl
    28     	<< getBriefDescription() << endl
    28     	<< getBriefDescription() << endl
    29         << endl
    29         << endl
    30     	<< "Without the --verbose option, the domains are displayed" << endl
    30     	<< "Without the --verbose option, the domains are displayed" << endl
    31         << "one-per-line. Example:" << endl
    31         << "one-per-line. Example:" << endl
    34 		<< endl << endl
    34 		<< endl << endl
    35     	<< "The domain's base address for the logical datagram" << endl
    35     	<< "The domain's base address for the logical datagram" << endl
    36     	<< "(LRD/LWR/LRW) is displayed followed by the domain's" << endl
    36     	<< "(LRD/LWR/LRW) is displayed followed by the domain's" << endl
    37     	<< "process data size in byte. The last values are the current" << endl
    37     	<< "process data size in byte. The last values are the current" << endl
    38     	<< "datagram working counter sum and the expected working" << endl
    38     	<< "datagram working counter sum and the expected working" << endl
    39     	<< "counter sum. If the values are equal, all Pdos are exchanged."
    39     	<< "counter sum. If the values are equal, all Pdos were exchanged."
    40 		<< endl << endl
    40 		<< endl << endl
    41     	<< "If the --verbose option is given, the participating slave" << endl
    41     	<< "If the --verbose option is given, the participating slave" << endl
    42     	<< "configurations/FMMUs and the current process data are" << endl
    42     	<< "configurations/FMMUs and the current process data are" << endl
    43     	<< "additionally displayed:" << endl
    43     	<< "additionally displayed:" << endl
    44     	<< endl
    44     	<< endl
    45     	<< "Domain1: LogBaseAddr 0x00000006, Size   6, WorkingCounter 0/1"
    45     	<< "Domain1: LogBaseAddr 0x00000006, Size   6, WorkingCounter 0/1"
    46 		<< endl
    46 		<< endl
    47     	<< "  SlaveConfig 1001:0, SM3 ( Input), LogAddr 0x00000006, Size 6"
    47     	<< "  SlaveConfig 1001:0, SM3 ( Input), LogAddr 0x00000006, Size 6"
    48 		<< endl
    48 		<< endl
    49     	<< "    00 00 00 00 00 00" << endl
    49     	<< "    0x00 0x00 0x00 0x00 0x00 0x00" << endl
    50     	<< endl
    50     	<< endl
    51     	<< "The process data are displayed as hexadecimal bytes." << endl
    51     	<< "The process data are displayed as hexadecimal bytes." << endl
    52     	<< endl
    52     	<< endl
    53     	<< "Command-specific options:" << endl
    53     	<< "Command-specific options:" << endl
    54     	<< "  --domain  -d <index>  Positive numerical domain index," << endl
    54     	<< "  --domain  -d <index>  Positive numerical domain index," << endl
    55     	<< "                        or 'all' for all domains (default)."
    55     	<< "                        or 'all' for all domains (default)."
    56 		<< endl
    56 		<< endl
    57     	<< "  --verbose -v          Show FMMUs and process data" << endl
    57     	<< "  --verbose -v          Show FMMUs and process data" << endl
    58 		<< "                        additionally." << endl
    58 		<< "                        in addition." << endl
    59     	<< endl
    59     	<< endl
    60 		<< numericInfo();
    60 		<< numericInfo();
    61 
    61 
    62 	return str.str();
    62 	return str.str();
    63 }
    63 }
   141 
   141 
   142         cout << "    " << hex << setfill('0');
   142         cout << "    " << hex << setfill('0');
   143         for (j = 0; j < fmmu.data_size; j++) {
   143         for (j = 0; j < fmmu.data_size; j++) {
   144             if (j && !(j % BreakAfterBytes))
   144             if (j && !(j % BreakAfterBytes))
   145                 cout << endl << "    ";
   145                 cout << endl << "    ";
   146             cout << setw(2)
   146             cout << "0x" << setw(2)
   147                 << (unsigned int) *(processData + dataOffset + j) << " ";
   147                 << (unsigned int) *(processData + dataOffset + j) << " ";
   148         }
   148         }
   149         cout << endl;
   149         cout << endl;
   150     }
   150     }
   151 
   151