equal
deleted
inserted
replaced
25 * EtherCAT technology and brand is only permitted in compliance with the |
25 * EtherCAT technology and brand is only permitted in compliance with the |
26 * industrial property and similar rights of Beckhoff Automation GmbH. |
26 * industrial property and similar rights of Beckhoff Automation GmbH. |
27 * |
27 * |
28 *****************************************************************************/ |
28 *****************************************************************************/ |
29 |
29 |
30 /** \file EtherCAT CoE state machines. |
30 /** \file |
|
31 * EtherCAT CoE state machines. |
31 */ |
32 */ |
32 |
33 |
33 /*****************************************************************************/ |
34 /*****************************************************************************/ |
34 |
35 |
35 #include "globals.h" |
36 #include "globals.h" |
305 |
306 |
306 /****************************************************************************** |
307 /****************************************************************************** |
307 * CoE dictionary state machine |
308 * CoE dictionary state machine |
308 *****************************************************************************/ |
309 *****************************************************************************/ |
309 |
310 |
|
311 /** Prepare a dictionary request. |
|
312 * |
|
313 * \return Zero on success, otherwise a negative error code. |
|
314 */ |
310 int ec_fsm_coe_prepare_dict( |
315 int ec_fsm_coe_prepare_dict( |
311 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
316 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
312 ec_datagram_t *datagram /**< Datagram to use. */ |
317 ec_datagram_t *datagram /**< Datagram to use. */ |
313 ) |
318 ) |
314 { |
319 { |
453 fsm->state = ec_fsm_coe_dict_response; |
458 fsm->state = ec_fsm_coe_dict_response; |
454 } |
459 } |
455 |
460 |
456 /*****************************************************************************/ |
461 /*****************************************************************************/ |
457 |
462 |
|
463 /** Prepare an object description request. |
|
464 * |
|
465 * \return Zero on success, otherwise a negative error code. |
|
466 */ |
458 int ec_fsm_coe_dict_prepare_desc( |
467 int ec_fsm_coe_dict_prepare_desc( |
459 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
468 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
460 ec_datagram_t *datagram /**< Datagram to use. */ |
469 ec_datagram_t *datagram /**< Datagram to use. */ |
461 ) |
470 ) |
462 { |
471 { |
731 fsm->state = ec_fsm_coe_dict_desc_response; |
740 fsm->state = ec_fsm_coe_dict_desc_response; |
732 } |
741 } |
733 |
742 |
734 /*****************************************************************************/ |
743 /*****************************************************************************/ |
735 |
744 |
|
745 /** Prepare an entry description request. |
|
746 * |
|
747 * \return Zero on success, otherwise a negative error code. |
|
748 */ |
736 int ec_fsm_coe_dict_prepare_entry( |
749 int ec_fsm_coe_dict_prepare_entry( |
737 ec_fsm_coe_t *fsm, /**< Finite state machine */ |
750 ec_fsm_coe_t *fsm, /**< Finite state machine */ |
738 ec_datagram_t *datagram /**< Datagram to use. */ |
751 ec_datagram_t *datagram /**< Datagram to use. */ |
739 ) |
752 ) |
740 { |
753 { |
1170 |
1183 |
1171 /****************************************************************************** |
1184 /****************************************************************************** |
1172 * CoE state machine |
1185 * CoE state machine |
1173 *****************************************************************************/ |
1186 *****************************************************************************/ |
1174 |
1187 |
|
1188 /** Prepare a donwnload request. |
|
1189 * |
|
1190 * \return Zero on success, otherwise a negative error code. |
|
1191 */ |
1175 int ec_fsm_coe_prepare_down_start( |
1192 int ec_fsm_coe_prepare_down_start( |
1176 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
1193 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
1177 ec_datagram_t *datagram /**< Datagram to use. */ |
1194 ec_datagram_t *datagram /**< Datagram to use. */ |
1178 ) |
1195 ) |
1179 { |
1196 { |
1812 } |
1829 } |
1813 } |
1830 } |
1814 |
1831 |
1815 /*****************************************************************************/ |
1832 /*****************************************************************************/ |
1816 |
1833 |
|
1834 /** Prepare an upload request. |
|
1835 * |
|
1836 * \return Zero on success, otherwise a negative error code. |
|
1837 */ |
1817 int ec_fsm_coe_prepare_up( |
1838 int ec_fsm_coe_prepare_up( |
1818 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
1839 ec_fsm_coe_t *fsm, /**< Finite state machine. */ |
1819 ec_datagram_t *datagram /**< Datagram to use. */ |
1840 ec_datagram_t *datagram /**< Datagram to use. */ |
1820 ) |
1841 ) |
1821 { |
1842 { |