45 string CommandPdos::helpString() const |
45 string CommandPdos::helpString() const |
46 { |
46 { |
47 stringstream str; |
47 stringstream str; |
48 |
48 |
49 str << getName() << " [OPTIONS]" << endl |
49 str << getName() << " [OPTIONS]" << endl |
50 << endl |
|
51 << getBriefDescription() << endl |
|
52 << endl |
50 << endl |
53 << "The information is displayed in three layers, which are" << endl |
51 << getBriefDescription() << endl |
54 << "indented accordingly:" << endl |
52 << endl |
55 << endl |
53 << "The information is displayed in three layers, which are" << endl |
56 << "1) Sync managers - Contains the sync manager information" << endl |
54 << "indented accordingly:" << endl |
57 << " from the SII: Index, physical start address, default" << endl |
55 << endl |
58 << " size, control register and enable word. Example:" << endl |
56 << "1) Sync managers - Contains the sync manager information" << endl |
59 << endl |
57 << " from the SII: Index, physical start address, default" << endl |
60 << " SM3: PhysAddr 0x1100, DefaultSize 0, ControlRegister 0x20, " |
58 << " size, control register and enable word. Example:" << endl |
61 << "Enable 1" << endl |
59 << endl |
62 << endl |
60 << " SM3: PhysAddr 0x1100, DefaultSize 0, ControlRegister 0x20, " |
63 << "2) Assigned PDOs - PDO direction, hexadecimal index and" << endl |
61 << "Enable 1" << endl |
64 << " the PDO name, if avaliable. Note that a 'Tx' and 'Rx'" << endl |
62 << endl |
|
63 << "2) Assigned PDOs - PDO direction, hexadecimal index and" << endl |
|
64 << " the PDO name, if avaliable. Note that a 'Tx' and 'Rx'" << endl |
65 << " are seen from the slave's point of view. Example:" << endl |
65 << " are seen from the slave's point of view. Example:" << endl |
66 << endl |
66 << endl |
67 << " TxPDO 0x1a00 \"Channel1\"" << endl |
67 << " TxPDO 0x1a00 \"Channel1\"" << endl |
68 << endl |
68 << endl |
69 << "3) Mapped PDO entries - PDO entry index and subindex (both" << endl |
69 << "3) Mapped PDO entries - PDO entry index and subindex (both" << endl |
70 << " hexadecimal), the length in bit and the description, if" << endl |
70 << " hexadecimal), the length in bit and the description, if" << endl |
71 << " available. Example:" << endl |
71 << " available. Example:" << endl |
72 << endl |
72 << endl |
73 << " PDO entry 0x3101:01, 8 bit, \"Status\"" << endl |
73 << " PDO entry 0x3101:01, 8 bit, \"Status\"" << endl |
74 << endl |
74 << endl |
75 << "Note, that the displayed PDO assignment and PDO mapping" << endl |
75 << "Note, that the displayed PDO assignment and PDO mapping" << endl |
76 << "information can either originate from the SII or from the" << endl |
76 << "information can either originate from the SII or from the" << endl |
77 << "CoE communication area." << endl |
77 << "CoE communication area." << endl |
78 << endl |
78 << endl |
79 << "Command-specific options:" << endl |
79 << "Command-specific options:" << endl |
80 << " --alias -a <alias>" << endl |
80 << " --alias -a <alias>" << endl |
81 << " --position -p <pos> Slave selection. See the help of" << endl |
81 << " --position -p <pos> Slave selection. See the help of" << endl |
82 << " the 'slaves' command." << endl |
82 << " the 'slaves' command." << endl |
83 << endl |
83 << endl |
84 << numericInfo(); |
84 << numericInfo(); |
85 |
85 |
86 return str.str(); |
86 return str.str(); |
87 } |
87 } |
88 |
88 |
89 /****************************************************************************/ |
89 /****************************************************************************/ |
90 |
90 |
91 void CommandPdos::execute(MasterDevice &m, const StringVector &args) |
91 void CommandPdos::execute(MasterDevice &m, const StringVector &args) |
110 } |
110 } |
111 |
111 |
112 /****************************************************************************/ |
112 /****************************************************************************/ |
113 |
113 |
114 void CommandPdos::listSlavePdos( |
114 void CommandPdos::listSlavePdos( |
115 MasterDevice &m, |
115 MasterDevice &m, |
116 const ec_ioctl_slave_t &slave, |
116 const ec_ioctl_slave_t &slave, |
117 bool showHeader |
117 bool showHeader |
118 ) |
118 ) |
119 { |
119 { |
120 ec_ioctl_slave_sync_t sync; |
120 ec_ioctl_slave_sync_t sync; |
121 ec_ioctl_slave_sync_pdo_t pdo; |
121 ec_ioctl_slave_sync_pdo_t pdo; |
122 ec_ioctl_slave_sync_pdo_entry_t entry; |
122 ec_ioctl_slave_sync_pdo_entry_t entry; |
123 unsigned int i, j, k; |
123 unsigned int i, j, k; |