author | Florian Pose <fp@igh-essen.com> |
Thu, 24 Jul 2008 08:15:44 +0000 | |
changeset 1141 | 7ffbca63fc72 |
parent 1092 | 69393cf60399 |
child 1186 | ff481f097c97 |
permissions | -rw-r--r-- |
39
6965c23a6826
likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents:
5
diff
changeset
|
1 |
/****************************************************************************** |
0 | 2 |
* |
39
6965c23a6826
likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents:
5
diff
changeset
|
3 |
* $Id$ |
0 | 4 |
* |
197
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
5 |
* Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
6 |
* |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
7 |
* This file is part of the IgH EtherCAT Master. |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
8 |
* |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
10 |
* and/or modify it under the terms of the GNU General Public License |
246
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
11 |
* as published by the Free Software Foundation; either version 2 of the |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
12 |
* License, or (at your option) any later version. |
197
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
13 |
* |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
14 |
* The IgH EtherCAT Master is distributed in the hope that it will be |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
15 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
17 |
* GNU General Public License for more details. |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
18 |
* |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
19 |
* You should have received a copy of the GNU General Public License |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
20 |
* along with the IgH EtherCAT Master; if not, write to the Free Software |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
21 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
195
diff
changeset
|
22 |
* |
246
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
23 |
* The right to use EtherCAT Technology is granted and comes free of |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
24 |
* charge under condition of compatibility of product made by |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
25 |
* Licensee. People intending to distribute/sell products based on the |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
26 |
* code, have to sign an agreement to guarantee that products using |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
27 |
* software based on IgH EtherCAT master stay compatible with the actual |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
28 |
* EtherCAT specification (which are released themselves as an open |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
29 |
* standard) as the (only) precondition to have the right to use EtherCAT |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
30 |
* Technology, IP and trade marks. |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
31 |
* |
39
6965c23a6826
likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents:
5
diff
changeset
|
32 |
*****************************************************************************/ |
0 | 33 |
|
199
04ecf40fc2e9
Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents:
197
diff
changeset
|
34 |
/** |
04ecf40fc2e9
Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents:
197
diff
changeset
|
35 |
\file |
791 | 36 |
EtherCAT slave structure. |
199
04ecf40fc2e9
Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents:
197
diff
changeset
|
37 |
*/ |
04ecf40fc2e9
Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents:
197
diff
changeset
|
38 |
|
04ecf40fc2e9
Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents:
197
diff
changeset
|
39 |
/*****************************************************************************/ |
04ecf40fc2e9
Doxygen added interface modules and file documentation.
Florian Pose <fp@igh-essen.com>
parents:
197
diff
changeset
|
40 |
|
883
4963e22a267a
Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents:
872
diff
changeset
|
41 |
#ifndef __EC_SLAVE_H__ |
4963e22a267a
Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents:
872
diff
changeset
|
42 |
#define __EC_SLAVE_H__ |
0 | 43 |
|
145
11a82e4fd31b
Mailbox-Interface ausgelagert, erster EOE-Ansatz.
Florian Pose <fp@igh-essen.com>
parents:
144
diff
changeset
|
44 |
#include <linux/list.h> |
182
8c0bc99229a9
Slaves stored in list, slaves in SysFS
Florian Pose <fp@igh-essen.com>
parents:
175
diff
changeset
|
45 |
#include <linux/kobject.h> |
145
11a82e4fd31b
Mailbox-Interface ausgelagert, erster EOE-Ansatz.
Florian Pose <fp@igh-essen.com>
parents:
144
diff
changeset
|
46 |
|
325
7833cf70c4f2
VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents:
298
diff
changeset
|
47 |
#include "../include/ecrt.h" |
7833cf70c4f2
VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents:
298
diff
changeset
|
48 |
|
145
11a82e4fd31b
Mailbox-Interface ausgelagert, erster EOE-Ansatz.
Florian Pose <fp@igh-essen.com>
parents:
144
diff
changeset
|
49 |
#include "globals.h" |
293
14aeb79aa992
Renamed command structure to datagram.
Florian Pose <fp@igh-essen.com>
parents:
291
diff
changeset
|
50 |
#include "datagram.h" |
627
4793ca94f082
Layed out PDO structures to own files.
Florian Pose <fp@igh-essen.com>
parents:
626
diff
changeset
|
51 |
#include "pdo.h" |
628
e94a16bc52ce
Layed out sync manager structures and methods into own files.
Florian Pose <fp@igh-essen.com>
parents:
627
diff
changeset
|
52 |
#include "sync.h" |
847
92266462d411
Saparated ec_sdo_t, ec_sdo_entry_t and ec_sdo_request_t.
Florian Pose <fp@igh-essen.com>
parents:
836
diff
changeset
|
53 |
#include "sdo.h" |
0 | 54 |
|
39
6965c23a6826
likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents:
5
diff
changeset
|
55 |
/*****************************************************************************/ |
0 | 56 |
|
834
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
57 |
/** Slave information interface data. |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
58 |
*/ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
59 |
typedef struct { |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
60 |
// Non-category data |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
61 |
uint16_t alias; /**< Configured station alias. */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
62 |
uint32_t vendor_id; /**< Vendor ID. */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
63 |
uint32_t product_code; /**< Vendor-specific product code. */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
64 |
uint32_t revision_number; /**< Revision number. */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
65 |
uint32_t serial_number; /**< Serial number. */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
66 |
uint16_t rx_mailbox_offset; /**< Mailbox address (master to slave). */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
67 |
uint16_t rx_mailbox_size; /**< Mailbox size (master to slave). */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
68 |
uint16_t tx_mailbox_offset; /**< Mailbox address (slave to master). */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
69 |
uint16_t tx_mailbox_size; /**< Mailbox size (slave to master). */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
70 |
uint16_t mailbox_protocols; /**< Supported mailbox protocols. */ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
71 |
|
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
72 |
// Strings |
872 | 73 |
char **strings; /**< Strings in SII categories. */ |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
74 |
unsigned int string_count; /**< Number of SII strings. */ |
834
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
75 |
|
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
76 |
// General |
835
23fd8b510803
Evaluate CoE details from general category; moved current consumption
Florian Pose <fp@igh-essen.com>
parents:
834
diff
changeset
|
77 |
unsigned int has_general; /**< General category present. */ |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
78 |
char *group; /**< Group name. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
79 |
char *image; /**< Image name. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
80 |
char *order; /**< Order number. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
81 |
char *name; /**< Slave name. */ |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1000
diff
changeset
|
82 |
uint8_t physical_layer[EC_MAX_PORTS]; /**< Port media. */ |
835
23fd8b510803
Evaluate CoE details from general category; moved current consumption
Florian Pose <fp@igh-essen.com>
parents:
834
diff
changeset
|
83 |
ec_sii_coe_details_t coe_details; /**< CoE detail flags. */ |
836 | 84 |
ec_sii_general_flags_t general_flags; /**< General flags. */ |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
85 |
int16_t current_on_ebus; /**< Power consumption in mA. */ |
834
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
86 |
|
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
87 |
// SyncM |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
88 |
ec_sync_t *syncs; /**< SYNC MANAGER categories. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
89 |
unsigned int sync_count; /**< Number of sync managers. */ |
834
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
90 |
|
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
91 |
// [RT]XPDO |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
92 |
struct list_head pdos; /**< SII [RT]XPDO categories. */ |
834
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
93 |
} ec_sii_t; |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
94 |
|
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
95 |
/*****************************************************************************/ |
0791aac03180
Separated SII data from slave.
Florian Pose <fp@igh-essen.com>
parents:
831
diff
changeset
|
96 |
|
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
97 |
/** EtherCAT slave port information. |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
98 |
*/ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
99 |
typedef struct { |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
100 |
uint8_t dl_link; /**< Link detected. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
101 |
uint8_t dl_loop; /**< Loop closed. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
102 |
uint8_t dl_signal; /**< Detected signal on RX port. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
103 |
} ec_slave_port_t; |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
104 |
|
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
105 |
/*****************************************************************************/ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
106 |
|
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
107 |
/** EtherCAT slave. |
635
d304ef4af542
Implemented alternative PDO mapping configuration interface.
Florian Pose <fp@igh-essen.com>
parents:
630
diff
changeset
|
108 |
*/ |
73
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
109 |
struct ec_slave |
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
110 |
{ |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
111 |
ec_master_t *master; /**< Master owning the slave. */ |
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
112 |
|
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
113 |
// addresses |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
114 |
uint16_t ring_position; /**< Ring position. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
115 |
uint16_t station_address; /**< Configured station address. */ |
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
116 |
|
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
117 |
// configuration |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
118 |
ec_slave_config_t *config; /**< Current configuration. */ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
119 |
ec_slave_state_t requested_state; /**< Requested application state. */ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
120 |
ec_slave_state_t current_state; /**< Current application state. */ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
121 |
unsigned int error_flag; /**< Stop processing after an error. */ |
908
386b908033be
Replaced self_configured flag with force_config flag.
Florian Pose <fp@igh-essen.com>
parents:
906
diff
changeset
|
122 |
unsigned int force_config; /**< Force (re-)configuration. */ |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
123 |
|
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
124 |
// base data |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
125 |
uint8_t base_type; /**< Slave type. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
126 |
uint8_t base_revision; /**< Revision. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
127 |
uint16_t base_build; /**< Build number. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
128 |
uint16_t base_fmmu_count; /**< Number of supported FMMUs. */ |
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
129 |
|
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
130 |
// data link status |
1092 | 131 |
ec_slave_port_t ports[EC_MAX_PORTS]; /**< Port link status. */ |
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
132 |
|
872 | 133 |
// SII |
977 | 134 |
uint16_t *sii_words; /**< Complete SII image. */ |
135 |
size_t sii_nwords; /**< Size of the SII contents in words. */ |
|
325
7833cf70c4f2
VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents:
298
diff
changeset
|
136 |
|
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
137 |
// Slave information interface |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
138 |
ec_sii_t sii; /**< Extracted SII data. */ |
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
139 |
|
814 | 140 |
struct list_head sdo_dictionary; /**< Sdo dictionary list */ |
1000
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
141 |
uint8_t sdo_dictionary_fetched; /**< Dictionary has been fetched. */ |
5746fdd1ca2e
Store slaves in an array instead of a list.
Florian Pose <fp@igh-essen.com>
parents:
992
diff
changeset
|
142 |
unsigned long jiffies_preop; /**< Time, the slave went to PREOP. */ |
73
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
143 |
}; |
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
144 |
|
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
145 |
/*****************************************************************************/ |
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
146 |
|
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
147 |
// slave construction/destruction |
992
50a44cbd30af
Removed kobjects from sdo and slave.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
148 |
void ec_slave_init(ec_slave_t *, ec_master_t *, uint16_t, uint16_t); |
50a44cbd30af
Removed kobjects from sdo and slave.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
149 |
void ec_slave_clear(ec_slave_t *); |
73
9f4ea66d89a3
Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents:
55
diff
changeset
|
150 |
|
870
fbd5924690ee
Allow multiple sync manager categories.
Florian Pose <fp@igh-essen.com>
parents:
847
diff
changeset
|
151 |
void ec_slave_clear_sync_managers(ec_slave_t *); |
fbd5924690ee
Allow multiple sync manager categories.
Florian Pose <fp@igh-essen.com>
parents:
847
diff
changeset
|
152 |
|
446 | 153 |
void ec_slave_request_state(ec_slave_t *, ec_slave_state_t); |
610
29489a43ecee
Introduced ec_slave_online_state_t, ec_slave_set_online_state(), renamed
Florian Pose <fp@igh-essen.com>
parents:
601
diff
changeset
|
154 |
void ec_slave_set_state(ec_slave_t *, ec_slave_state_t); |
446 | 155 |
|
325
7833cf70c4f2
VERSION 1.1: New realtime interface, only state machines.
Florian Pose <fp@igh-essen.com>
parents:
298
diff
changeset
|
156 |
// SII categories |
742
03d2fe3d4a93
Improved checking of EEPROM data while reading.
Florian Pose <fp@igh-essen.com>
parents:
741
diff
changeset
|
157 |
int ec_slave_fetch_sii_strings(ec_slave_t *, const uint8_t *, size_t); |
03d2fe3d4a93
Improved checking of EEPROM data while reading.
Florian Pose <fp@igh-essen.com>
parents:
741
diff
changeset
|
158 |
int ec_slave_fetch_sii_general(ec_slave_t *, const uint8_t *, size_t); |
620
4f76acbf54a0
Renamed SII fetching functions (non-functional).
Florian Pose <fp@igh-essen.com>
parents:
619
diff
changeset
|
159 |
int ec_slave_fetch_sii_syncs(ec_slave_t *, const uint8_t *, size_t); |
4f76acbf54a0
Renamed SII fetching functions (non-functional).
Florian Pose <fp@igh-essen.com>
parents:
619
diff
changeset
|
160 |
int ec_slave_fetch_sii_pdos(ec_slave_t *, const uint8_t *, size_t, |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
791
diff
changeset
|
161 |
ec_direction_t); |
238
b4960499098f
Added finite state machine (FSM) processing.
Florian Pose <fp@igh-essen.com>
parents:
199
diff
changeset
|
162 |
|
195
674071846ee3
Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents:
190
diff
changeset
|
163 |
// misc. |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1000
diff
changeset
|
164 |
ec_sync_t *ec_slave_get_sync(ec_slave_t *, uint8_t); |
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1000
diff
changeset
|
165 |
|
423
862ff892cf18
Better debugging output for SDO dictionaries.
Florian Pose <fp@igh-essen.com>
parents:
421
diff
changeset
|
166 |
void ec_slave_sdo_dict_info(const ec_slave_t *, |
635
d304ef4af542
Implemented alternative PDO mapping configuration interface.
Florian Pose <fp@igh-essen.com>
parents:
630
diff
changeset
|
167 |
unsigned int *, unsigned int *); |
740
68d83b45dfa2
Added ec_slave_get_sdo() and ec_sdo_get_entry().
Florian Pose <fp@igh-essen.com>
parents:
643
diff
changeset
|
168 |
ec_sdo_t *ec_slave_get_sdo(ec_slave_t *, uint16_t); |
967
93807963b906
Added ec_slave_get_sdo_const().
Florian Pose <fp@igh-essen.com>
parents:
964
diff
changeset
|
169 |
const ec_sdo_t *ec_slave_get_sdo_const(const ec_slave_t *, uint16_t); |
964
957f21465052
Added ec_slave_get_sdo_by_pos_const() and ec_slave_sdo_count().
Florian Pose <fp@igh-essen.com>
parents:
928
diff
changeset
|
170 |
const ec_sdo_t *ec_slave_get_sdo_by_pos_const(const ec_slave_t *, uint16_t); |
957f21465052
Added ec_slave_get_sdo_by_pos_const() and ec_slave_sdo_count().
Florian Pose <fp@igh-essen.com>
parents:
928
diff
changeset
|
171 |
uint16_t ec_slave_sdo_count(const ec_slave_t *); |
799 | 172 |
const ec_pdo_t *ec_slave_find_pdo(const ec_slave_t *, uint16_t); |
423
862ff892cf18
Better debugging output for SDO dictionaries.
Florian Pose <fp@igh-essen.com>
parents:
421
diff
changeset
|
173 |
|
39
6965c23a6826
likely/unlikely, Fehlermeldungen in zyklischem Code begrenzt und Kommentare ge??ndert.
Florian Pose <fp@igh-essen.com>
parents:
5
diff
changeset
|
174 |
/*****************************************************************************/ |
0 | 175 |
|
176 |
#endif |