45 string CommandSdos::helpString() const |
45 string CommandSdos::helpString() const |
46 { |
46 { |
47 stringstream str; |
47 stringstream str; |
48 |
48 |
49 str << getName() << " [OPTIONS]" << endl |
49 str << getName() << " [OPTIONS]" << endl |
50 << endl |
50 << endl |
51 << getBriefDescription() << endl |
51 << getBriefDescription() << endl |
52 << endl |
52 << endl |
53 << "SDO dictionary information is displayed in two layers," << endl |
53 << "SDO dictionary information is displayed in two layers," << endl |
54 << "which are indented accordingly:" << endl |
54 << "which are indented accordingly:" << endl |
55 << endl |
55 << endl |
56 << "1) SDOs - Hexadecimal SDO index and the name. Example:" << endl |
56 << "1) SDOs - Hexadecimal SDO index and the name. Example:" << endl |
57 << endl |
57 << endl |
58 << " SDO 0x1018, \"Identity object\"" << endl |
58 << " SDO 0x1018, \"Identity object\"" << endl |
59 << endl |
59 << endl |
60 << "2) SDO entries - SDO index and SDO entry subindex (both" << endl |
60 << "2) SDO entries - SDO index and SDO entry subindex (both" << endl |
61 << " hexadecimal) followed by the access rights (see" << endl |
61 << " hexadecimal) followed by the access rights (see" << endl |
62 << " below), the data type, the length in bit, and the" << endl |
62 << " below), the data type, the length in bit, and the" << endl |
63 << " description. Example:" << endl |
63 << " description. Example:" << endl |
64 << endl |
64 << endl |
65 << " 0x1018:01, rwrwrw, uint32, 32 bit, \"Vendor id\"" << endl |
65 << " 0x1018:01, rwrwrw, uint32, 32 bit, \"Vendor id\"" << endl |
66 << endl |
66 << endl |
67 << "The access rights are specified for the AL states PREOP," << endl |
67 << "The access rights are specified for the AL states PREOP," << endl |
68 << "SAFEOP and OP. An 'r' means, that the entry is readable" << endl |
68 << "SAFEOP and OP. An 'r' means, that the entry is readable" << endl |
69 << "in the corresponding state, an 'w' means writable," << endl |
69 << "in the corresponding state, an 'w' means writable," << endl |
70 << "respectively. If a right is not granted, a dash '-' is" << endl |
70 << "respectively. If a right is not granted, a dash '-' is" << endl |
71 << "shown." << endl |
71 << "shown." << endl |
72 << endl |
72 << endl |
73 << "If the --quiet option is given, only the SDOs are output." |
73 << "If the --quiet option is given, only the SDOs are output." |
74 << endl << endl |
74 << endl << endl |
75 << "Command-specific options:" << endl |
75 << "Command-specific options:" << endl |
76 << " --alias -a <alias>" << endl |
76 << " --alias -a <alias>" << endl |
77 << " --position -p <pos> Slave selection. See the help of" << endl |
77 << " --position -p <pos> Slave selection. See the help of" << endl |
78 << " the 'slaves' command." << endl |
78 << " the 'slaves' command." << endl |
79 << " --quiet -q Only output SDOs (without the" << endl |
79 << " --quiet -q Only output SDOs (without the" << endl |
80 << " SDO entries)." << endl |
80 << " SDO entries)." << endl |
81 << endl |
81 << endl |
82 << numericInfo(); |
82 << numericInfo(); |
83 |
83 |
84 return str.str(); |
84 return str.str(); |
85 } |
85 } |
86 |
86 |
87 /****************************************************************************/ |
87 /****************************************************************************/ |
88 |
88 |
89 void CommandSdos::execute(MasterDevice &m, const StringVector &args) |
89 void CommandSdos::execute(MasterDevice &m, const StringVector &args) |