6 * |
6 * |
7 * This file is part of the IgH EtherCAT Master. |
7 * This file is part of the IgH EtherCAT Master. |
8 * |
8 * |
9 * The IgH EtherCAT Master is free software; you can redistribute it |
9 * The IgH EtherCAT Master is free software; you can redistribute it |
10 * and/or modify it under the terms of the GNU General Public License |
10 * and/or modify it under the terms of the GNU General Public License |
11 * as published by the Free Software Foundation; version 2 of the License. |
11 * as published by the Free Software Foundation; either version 2 of the |
|
12 * License, or (at your option) any later version. |
12 * |
13 * |
13 * The IgH EtherCAT Master is distributed in the hope that it will be |
14 * The IgH EtherCAT Master is distributed in the hope that it will be |
14 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 * GNU General Public License for more details. |
17 * GNU General Public License for more details. |
17 * |
18 * |
18 * You should have received a copy of the GNU General Public License |
19 * You should have received a copy of the GNU General Public License |
19 * along with the IgH EtherCAT Master; if not, write to the Free Software |
20 * along with the IgH EtherCAT Master; if not, write to the Free Software |
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
22 * |
|
23 * The right to use EtherCAT Technology is granted and comes free of |
|
24 * charge under condition of compatibility of product made by |
|
25 * Licensee. People intending to distribute/sell products based on the |
|
26 * code, have to sign an agreement to guarantee that products using |
|
27 * software based on IgH EtherCAT master stay compatible with the actual |
|
28 * EtherCAT specification (which are released themselves as an open |
|
29 * standard) as the (only) precondition to have the right to use EtherCAT |
|
30 * Technology, IP and trade marks. |
21 * |
31 * |
22 *****************************************************************************/ |
32 *****************************************************************************/ |
23 |
33 |
24 /** |
34 /** |
25 \file |
35 \file |
253 |
263 |
254 struct list_head eeprom_strings; /**< EEPROM STRING categories */ |
264 struct list_head eeprom_strings; /**< EEPROM STRING categories */ |
255 struct list_head eeprom_syncs; /**< EEPROM SYNC MANAGER categories */ |
265 struct list_head eeprom_syncs; /**< EEPROM SYNC MANAGER categories */ |
256 struct list_head eeprom_pdos; /**< EEPROM [RT]XPDO categories */ |
266 struct list_head eeprom_pdos; /**< EEPROM [RT]XPDO categories */ |
257 |
267 |
|
268 char *eeprom_group; /**< slave group acc. to EEPROM */ |
|
269 char *eeprom_image; /**< slave image name acc. to EEPROM */ |
|
270 char *eeprom_order; /**< slave order number acc. to EEPROM */ |
258 char *eeprom_name; /**< slave name acc. to EEPROM */ |
271 char *eeprom_name; /**< slave name acc. to EEPROM */ |
259 char *eeprom_group; /**< slave group acc. to EEPROM */ |
|
260 char *eeprom_desc; /**< slave description acc. to EEPROM */ |
|
261 |
272 |
262 struct list_head sdo_dictionary; /**< SDO directory list */ |
273 struct list_head sdo_dictionary; /**< SDO directory list */ |
263 |
274 |
264 ec_command_t mbox_command; /**< mailbox command */ |
275 ec_command_t mbox_command; /**< mailbox command */ |
|
276 |
|
277 ec_slave_state_t requested_state; /**< requested slave state */ |
|
278 ec_slave_state_t current_state; /**< current slave state */ |
|
279 unsigned int state_error; /**< a state error has happened */ |
|
280 unsigned int online; /**< non-zero, if the slave responds. */ |
265 }; |
281 }; |
266 |
282 |
267 /*****************************************************************************/ |
283 /*****************************************************************************/ |
268 |
284 |
269 // slave construction/destruction |
285 // slave construction/destruction |
280 const ec_sync_t *); |
296 const ec_sync_t *); |
281 |
297 |
282 // CoE |
298 // CoE |
283 int ec_slave_fetch_sdo_list(ec_slave_t *); |
299 int ec_slave_fetch_sdo_list(ec_slave_t *); |
284 |
300 |
|
301 // state machine |
|
302 int ec_slave_fetch_strings(ec_slave_t *, const uint8_t *); |
|
303 int ec_slave_fetch_general(ec_slave_t *, const uint8_t *); |
|
304 int ec_slave_fetch_sync(ec_slave_t *, const uint8_t *, size_t); |
|
305 int ec_slave_fetch_pdo(ec_slave_t *, const uint8_t *, size_t, ec_pdo_type_t); |
|
306 int ec_slave_locate_string(ec_slave_t *, unsigned int, char **); |
|
307 |
285 // misc. |
308 // misc. |
286 void ec_slave_print(const ec_slave_t *, unsigned int); |
309 void ec_slave_print(const ec_slave_t *, unsigned int); |
287 int ec_slave_check_crc(ec_slave_t *); |
310 int ec_slave_check_crc(ec_slave_t *); |
288 |
311 |
289 /*****************************************************************************/ |
312 /*****************************************************************************/ |