author | Florian Pose <fp@igh-essen.com> |
Fri, 30 Nov 2012 15:24:38 +0100 | |
branch | stable-1.5 |
changeset 2452 | abc1d1caead7 |
parent 2447 | e93efb4af231 |
child 2453 | d461b1f07296 |
permissions | -rw-r--r-- |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
/****************************************************************************** |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
* $Id$ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
* |
2433
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
5 |
* Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
* This file is part of the IgH EtherCAT Master. |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
* |
1326
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it and/or |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
10 |
* modify it under the terms of the GNU General Public License version 2, as |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
11 |
* published by the Free Software Foundation. |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
12 |
* |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
13 |
* The IgH EtherCAT Master is distributed in the hope that it will be useful, |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
16 |
* Public License for more details. |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
17 |
* |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
18 |
* You should have received a copy of the GNU General Public License along |
ef907b0b5125
merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents:
1314
diff
changeset
|
19 |
* with the IgH EtherCAT Master; if not, write to the Free Software |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
* |
1363
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1352
diff
changeset
|
22 |
* --- |
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1352
diff
changeset
|
23 |
* |
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1352
diff
changeset
|
24 |
* The license mentioned above concerns the source code only. Using the |
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1352
diff
changeset
|
25 |
* EtherCAT technology and brand is only permitted in compliance with the |
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1352
diff
changeset
|
26 |
* industrial property and similar rights of Beckhoff Automation GmbH. |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
/** |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
\file |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
EtherCAT master character device IOCTL commands. |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
*/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
/*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
#ifndef __EC_IOCTL_H__ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
#define __EC_IOCTL_H__ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
|
971
d169890332fe
Using Linux ioctl() number generation macros.
Florian Pose <fp@igh-essen.com>
parents:
968
diff
changeset
|
40 |
#include <linux/ioctl.h> |
d169890332fe
Using Linux ioctl() number generation macros.
Florian Pose <fp@igh-essen.com>
parents:
968
diff
changeset
|
41 |
|
989
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
42 |
#include "globals.h" |
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
43 |
|
971
d169890332fe
Using Linux ioctl() number generation macros.
Florian Pose <fp@igh-essen.com>
parents:
968
diff
changeset
|
44 |
/*****************************************************************************/ |
d169890332fe
Using Linux ioctl() number generation macros.
Florian Pose <fp@igh-essen.com>
parents:
968
diff
changeset
|
45 |
|
1082
ff06c58e269c
Renamed ecrt_slave_config_sync_managers() to ecrt_slave_config_pdos();
Florian Pose <fp@igh-essen.com>
parents:
1079
diff
changeset
|
46 |
/** \cond */ |
ff06c58e269c
Renamed ecrt_slave_config_sync_managers() to ecrt_slave_config_pdos();
Florian Pose <fp@igh-essen.com>
parents:
1079
diff
changeset
|
47 |
|
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
48 |
#define EC_IOCTL_TYPE 0xa4 |
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
49 |
|
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
50 |
#define EC_IO(nr) _IO(EC_IOCTL_TYPE, nr) |
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
51 |
#define EC_IOR(nr, type) _IOR(EC_IOCTL_TYPE, nr, type) |
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
52 |
#define EC_IOW(nr, type) _IOW(EC_IOCTL_TYPE, nr, type) |
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
53 |
#define EC_IOWR(nr, type) _IOWR(EC_IOCTL_TYPE, nr, type) |
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
54 |
|
1826
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
55 |
/** EtherCAT master ioctl() version magic. |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
56 |
* |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
57 |
* Increment this when changing the ioctl interface! |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
58 |
*/ |
2447
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
59 |
#define EC_IOCTL_VERSION_MAGIC 23 |
1826
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
60 |
|
1259
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
61 |
// Command-line tool |
1826
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
62 |
#define EC_IOCTL_MODULE EC_IOR(0x00, ec_ioctl_module_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
63 |
#define EC_IOCTL_MASTER EC_IOR(0x01, ec_ioctl_master_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
64 |
#define EC_IOCTL_SLAVE EC_IOWR(0x02, ec_ioctl_slave_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
65 |
#define EC_IOCTL_SLAVE_SYNC EC_IOWR(0x03, ec_ioctl_slave_sync_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
66 |
#define EC_IOCTL_SLAVE_SYNC_PDO EC_IOWR(0x04, ec_ioctl_slave_sync_pdo_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
67 |
#define EC_IOCTL_SLAVE_SYNC_PDO_ENTRY EC_IOWR(0x05, ec_ioctl_slave_sync_pdo_entry_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
68 |
#define EC_IOCTL_DOMAIN EC_IOWR(0x06, ec_ioctl_domain_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
69 |
#define EC_IOCTL_DOMAIN_FMMU EC_IOWR(0x07, ec_ioctl_domain_fmmu_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
70 |
#define EC_IOCTL_DOMAIN_DATA EC_IOWR(0x08, ec_ioctl_domain_data_t) |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
71 |
#define EC_IOCTL_MASTER_DEBUG EC_IO(0x09) |
1961 | 72 |
#define EC_IOCTL_MASTER_RESCAN EC_IO(0x0a) |
73 |
#define EC_IOCTL_SLAVE_STATE EC_IOW(0x0b, ec_ioctl_slave_state_t) |
|
74 |
#define EC_IOCTL_SLAVE_SDO EC_IOWR(0x0c, ec_ioctl_slave_sdo_t) |
|
75 |
#define EC_IOCTL_SLAVE_SDO_ENTRY EC_IOWR(0x0d, ec_ioctl_slave_sdo_entry_t) |
|
76 |
#define EC_IOCTL_SLAVE_SDO_UPLOAD EC_IOWR(0x0e, ec_ioctl_slave_sdo_upload_t) |
|
77 |
#define EC_IOCTL_SLAVE_SDO_DOWNLOAD EC_IOWR(0x0f, ec_ioctl_slave_sdo_download_t) |
|
78 |
#define EC_IOCTL_SLAVE_SII_READ EC_IOWR(0x10, ec_ioctl_slave_sii_t) |
|
79 |
#define EC_IOCTL_SLAVE_SII_WRITE EC_IOW(0x11, ec_ioctl_slave_sii_t) |
|
80 |
#define EC_IOCTL_SLAVE_REG_READ EC_IOWR(0x12, ec_ioctl_slave_reg_t) |
|
81 |
#define EC_IOCTL_SLAVE_REG_WRITE EC_IOW(0x13, ec_ioctl_slave_reg_t) |
|
82 |
#define EC_IOCTL_SLAVE_FOE_READ EC_IOWR(0x14, ec_ioctl_slave_foe_t) |
|
83 |
#define EC_IOCTL_SLAVE_FOE_WRITE EC_IOW(0x15, ec_ioctl_slave_foe_t) |
|
84 |
#define EC_IOCTL_SLAVE_SOE_READ EC_IOWR(0x16, ec_ioctl_slave_soe_read_t) |
|
85 |
#define EC_IOCTL_SLAVE_SOE_WRITE EC_IOWR(0x17, ec_ioctl_slave_soe_write_t) |
|
86 |
#define EC_IOCTL_CONFIG EC_IOWR(0x18, ec_ioctl_config_t) |
|
87 |
#define EC_IOCTL_CONFIG_PDO EC_IOWR(0x19, ec_ioctl_config_pdo_t) |
|
88 |
#define EC_IOCTL_CONFIG_PDO_ENTRY EC_IOWR(0x1a, ec_ioctl_config_pdo_entry_t) |
|
89 |
#define EC_IOCTL_CONFIG_SDO EC_IOWR(0x1b, ec_ioctl_config_sdo_t) |
|
1966
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
90 |
#define EC_IOCTL_CONFIG_IDN EC_IOWR(0x1c, ec_ioctl_config_idn_t) |
1516
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
91 |
#ifdef EC_EOE |
1966
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
92 |
#define EC_IOCTL_EOE_HANDLER EC_IOWR(0x1d, ec_ioctl_eoe_handler_t) |
1516
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
93 |
#endif |
1244
0b70040d3daa
No kernel handles in userspace; Domain creation.
Florian Pose <fp@igh-essen.com>
parents:
1242
diff
changeset
|
94 |
|
1259
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
95 |
// Application interface |
1966
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
96 |
#define EC_IOCTL_REQUEST EC_IO(0x1e) |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
97 |
#define EC_IOCTL_CREATE_DOMAIN EC_IO(0x1f) |
2009
b5391b329b5d
Added ecrt_master_reset() method.
Florian Pose <fp@igh-essen.com>
parents:
1972
diff
changeset
|
98 |
#define EC_IOCTL_CREATE_SLAVE_CONFIG EC_IOWR(0x20, ec_ioctl_config_t) |
2447
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
99 |
#define EC_IOCTL_SELECT_REF_CLOCK EC_IOW(0x21, uint32_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
100 |
#define EC_IOCTL_ACTIVATE EC_IOR(0x22, ec_ioctl_master_activate_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
101 |
#define EC_IOCTL_DEACTIVATE EC_IO(0x23) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
102 |
#define EC_IOCTL_SEND EC_IO(0x24) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
103 |
#define EC_IOCTL_RECEIVE EC_IO(0x25) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
104 |
#define EC_IOCTL_MASTER_STATE EC_IOR(0x26, ec_master_state_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
105 |
#define EC_IOCTL_MASTER_LINK_STATE EC_IOWR(0x27, ec_ioctl_link_state_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
106 |
#define EC_IOCTL_APP_TIME EC_IOW(0x28, ec_ioctl_app_time_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
107 |
#define EC_IOCTL_SYNC_REF EC_IO(0x29) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
108 |
#define EC_IOCTL_SYNC_SLAVES EC_IO(0x2a) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
109 |
#define EC_IOCTL_REF_CLOCK_TIME EC_IOR(0x2b, uint32_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
110 |
#define EC_IOCTL_SYNC_MON_QUEUE EC_IO(0x2c) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
111 |
#define EC_IOCTL_SYNC_MON_PROCESS EC_IOR(0x2d, uint32_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
112 |
#define EC_IOCTL_RESET EC_IO(0x2e) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
113 |
#define EC_IOCTL_SC_SYNC EC_IOW(0x2f, ec_ioctl_config_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
114 |
#define EC_IOCTL_SC_WATCHDOG EC_IOW(0x30, ec_ioctl_config_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
115 |
#define EC_IOCTL_SC_ADD_PDO EC_IOW(0x31, ec_ioctl_config_pdo_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
116 |
#define EC_IOCTL_SC_CLEAR_PDOS EC_IOW(0x32, ec_ioctl_config_pdo_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
117 |
#define EC_IOCTL_SC_ADD_ENTRY EC_IOW(0x33, ec_ioctl_add_pdo_entry_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
118 |
#define EC_IOCTL_SC_CLEAR_ENTRIES EC_IOW(0x34, ec_ioctl_config_pdo_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
119 |
#define EC_IOCTL_SC_REG_PDO_ENTRY EC_IOWR(0x35, ec_ioctl_reg_pdo_entry_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
120 |
#define EC_IOCTL_SC_DC EC_IOW(0x36, ec_ioctl_config_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
121 |
#define EC_IOCTL_SC_SDO EC_IOW(0x37, ec_ioctl_sc_sdo_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
122 |
#define EC_IOCTL_SC_EMERG_SIZE EC_IOW(0x38, ec_ioctl_sc_emerg_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
123 |
#define EC_IOCTL_SC_EMERG_POP EC_IOWR(0x39, ec_ioctl_sc_emerg_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
124 |
#define EC_IOCTL_SC_EMERG_CLEAR EC_IOW(0x3a, ec_ioctl_sc_emerg_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
125 |
#define EC_IOCTL_SC_EMERG_OVERRUNS EC_IOWR(0x3b, ec_ioctl_sc_emerg_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
126 |
#define EC_IOCTL_SC_SDO_REQUEST EC_IOWR(0x3c, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
127 |
#define EC_IOCTL_SC_REG_REQUEST EC_IOWR(0x3d, ec_ioctl_reg_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
128 |
#define EC_IOCTL_SC_VOE EC_IOWR(0x3e, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
129 |
#define EC_IOCTL_SC_STATE EC_IOWR(0x3f, ec_ioctl_sc_state_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
130 |
#define EC_IOCTL_SC_IDN EC_IOW(0x40, ec_ioctl_sc_idn_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
131 |
#define EC_IOCTL_DOMAIN_OFFSET EC_IO(0x41) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
132 |
#define EC_IOCTL_DOMAIN_PROCESS EC_IO(0x42) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
133 |
#define EC_IOCTL_DOMAIN_QUEUE EC_IO(0x43) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
134 |
#define EC_IOCTL_DOMAIN_STATE EC_IOWR(0x44, ec_ioctl_domain_state_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
135 |
#define EC_IOCTL_SDO_REQUEST_INDEX EC_IOWR(0x45, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
136 |
#define EC_IOCTL_SDO_REQUEST_TIMEOUT EC_IOWR(0x46, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
137 |
#define EC_IOCTL_SDO_REQUEST_STATE EC_IOWR(0x47, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
138 |
#define EC_IOCTL_SDO_REQUEST_READ EC_IOWR(0x48, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
139 |
#define EC_IOCTL_SDO_REQUEST_WRITE EC_IOWR(0x49, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
140 |
#define EC_IOCTL_SDO_REQUEST_DATA EC_IOWR(0x4a, ec_ioctl_sdo_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
141 |
#define EC_IOCTL_REG_REQUEST_DATA EC_IOWR(0x4b, ec_ioctl_reg_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
142 |
#define EC_IOCTL_REG_REQUEST_STATE EC_IOWR(0x4c, ec_ioctl_reg_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
143 |
#define EC_IOCTL_REG_REQUEST_WRITE EC_IOWR(0x4d, ec_ioctl_reg_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
144 |
#define EC_IOCTL_REG_REQUEST_READ EC_IOWR(0x4e, ec_ioctl_reg_request_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
145 |
#define EC_IOCTL_VOE_SEND_HEADER EC_IOW(0x4f, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
146 |
#define EC_IOCTL_VOE_REC_HEADER EC_IOWR(0x50, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
147 |
#define EC_IOCTL_VOE_READ EC_IOW(0x51, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
148 |
#define EC_IOCTL_VOE_READ_NOSYNC EC_IOW(0x52, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
149 |
#define EC_IOCTL_VOE_WRITE EC_IOWR(0x53, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
150 |
#define EC_IOCTL_VOE_EXEC EC_IOWR(0x54, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
151 |
#define EC_IOCTL_VOE_DATA EC_IOWR(0x55, ec_ioctl_voe_t) |
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
152 |
#define EC_IOCTL_SET_SEND_INTERVAL EC_IOW(0x56, size_t) |
1259
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
153 |
|
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
154 |
/*****************************************************************************/ |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
155 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
156 |
#define EC_IOCTL_STRING_SIZE 64 |
978 | 157 |
|
158 |
/*****************************************************************************/ |
|
159 |
||
160 |
typedef struct { |
|
1826
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
161 |
uint32_t ioctl_version_magic; |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
162 |
uint32_t master_count; |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
163 |
} ec_ioctl_module_t; |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
164 |
|
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
165 |
/*****************************************************************************/ |
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
166 |
|
ec6223c3b7ec
Multi-master support for command-line tool. The --master option supports
Florian Pose <fp@igh-essen.com>
parents:
1600
diff
changeset
|
167 |
typedef struct { |
978 | 168 |
uint32_t slave_count; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
169 |
uint32_t config_count; |
1001
a8eab75aa8e3
Removed EC_IOCTL_DOMAIN_COUNT.
Florian Pose <fp@igh-essen.com>
parents:
990
diff
changeset
|
170 |
uint32_t domain_count; |
1516
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
171 |
#ifdef EC_EOE |
1485 | 172 |
uint32_t eoe_handler_count; |
1516
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
173 |
#endif |
1029
61ffe5f22306
Renamed master 'mode' to 'phase'.
Florian Pose <fp@igh-essen.com>
parents:
1001
diff
changeset
|
174 |
uint8_t phase; |
1530
96629de2202b
Added ecrt_master_deactivate() to remove the bus configuration.
Florian Pose <fp@igh-essen.com>
parents:
1526
diff
changeset
|
175 |
uint8_t active; |
1447
846d75637c43
Added scan_busy flag to ioctl().
Florian Pose <fp@igh-essen.com>
parents:
1438
diff
changeset
|
176 |
uint8_t scan_busy; |
1857
ed8b490b5bc3
Output tx errors and tx rate in byte/s.
Florian Pose <fp@igh-essen.com>
parents:
1851
diff
changeset
|
177 |
struct ec_ioctl_device { |
957
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
178 |
uint8_t address[6]; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
179 |
uint8_t attached; |
1401
96baef8a3162
Output link state in 'ethercat master'.
Florian Pose <fp@igh-essen.com>
parents:
1388
diff
changeset
|
180 |
uint8_t link_state; |
1863 | 181 |
uint64_t tx_count; |
182 |
uint64_t rx_count; |
|
183 |
uint64_t tx_bytes; |
|
2158
69f2b2702336
Adjusted frame statistics for the use with two devices.
Florian Pose <fp@igh-essen.com>
parents:
2124
diff
changeset
|
184 |
uint64_t rx_bytes; |
1863 | 185 |
uint64_t tx_errors; |
2372
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
186 |
int32_t tx_frame_rates[EC_RATE_COUNT]; |
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
187 |
int32_t rx_frame_rates[EC_RATE_COUNT]; |
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
188 |
int32_t tx_byte_rates[EC_RATE_COUNT]; |
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
189 |
int32_t rx_byte_rates[EC_RATE_COUNT]; |
2267
2d36f36a433c
Devices as array; lock all device modules with module_get().
Florian Pose <fp@igh-essen.com>
parents:
2158
diff
changeset
|
190 |
} devices[EC_NUM_DEVICES]; |
2158
69f2b2702336
Adjusted frame statistics for the use with two devices.
Florian Pose <fp@igh-essen.com>
parents:
2124
diff
changeset
|
191 |
uint64_t tx_count; |
69f2b2702336
Adjusted frame statistics for the use with two devices.
Florian Pose <fp@igh-essen.com>
parents:
2124
diff
changeset
|
192 |
uint64_t rx_count; |
69f2b2702336
Adjusted frame statistics for the use with two devices.
Florian Pose <fp@igh-essen.com>
parents:
2124
diff
changeset
|
193 |
uint64_t tx_bytes; |
69f2b2702336
Adjusted frame statistics for the use with two devices.
Florian Pose <fp@igh-essen.com>
parents:
2124
diff
changeset
|
194 |
uint64_t rx_bytes; |
2372
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
195 |
int32_t tx_frame_rates[EC_RATE_COUNT]; |
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
196 |
int32_t rx_frame_rates[EC_RATE_COUNT]; |
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
197 |
int32_t tx_byte_rates[EC_RATE_COUNT]; |
d895cd1db2bf
Improved/fixed frame statistics (low-pass filters).
Florian Pose <fp@igh-essen.com>
parents:
2369
diff
changeset
|
198 |
int32_t rx_byte_rates[EC_RATE_COUNT]; |
2158
69f2b2702336
Adjusted frame statistics for the use with two devices.
Florian Pose <fp@igh-essen.com>
parents:
2124
diff
changeset
|
199 |
int32_t loss_rates[EC_RATE_COUNT]; |
1415
9d1cdbf41247
Output reference clock and application time in 'ethercat Master'.
Florian Pose <fp@igh-essen.com>
parents:
1413
diff
changeset
|
200 |
uint64_t app_time; |
9d1cdbf41247
Output reference clock and application time in 'ethercat Master'.
Florian Pose <fp@igh-essen.com>
parents:
1413
diff
changeset
|
201 |
uint16_t ref_clock; |
957
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
202 |
} ec_ioctl_master_t; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
203 |
|
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
204 |
/*****************************************************************************/ |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
205 |
|
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
206 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
207 |
// input |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
208 |
uint16_t position; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
209 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
210 |
// outputs |
2374
e898451c054a
Slave scanning and configuration on all links.
Florian Pose <fp@igh-essen.com>
parents:
2372
diff
changeset
|
211 |
unsigned int device_index; |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
212 |
uint32_t vendor_id; |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
213 |
uint32_t product_code; |
938
5b936e8e39fa
Added 'xml' command to generate a slave description file from a real
Florian Pose <fp@igh-essen.com>
parents:
935
diff
changeset
|
214 |
uint32_t revision_number; |
5b936e8e39fa
Added 'xml' command to generate a slave description file from a real
Florian Pose <fp@igh-essen.com>
parents:
935
diff
changeset
|
215 |
uint32_t serial_number; |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
216 |
uint16_t alias; |
1337
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
217 |
uint16_t boot_rx_mailbox_offset; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
218 |
uint16_t boot_rx_mailbox_size; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
219 |
uint16_t boot_tx_mailbox_offset; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
220 |
uint16_t boot_tx_mailbox_size; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
221 |
uint16_t std_rx_mailbox_offset; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
222 |
uint16_t std_rx_mailbox_size; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
223 |
uint16_t std_tx_mailbox_offset; |
0253c74d0940
merge -c1619 branches/1.4-foe: Implemented going to bootstrap state BOOT.
Florian Pose <fp@igh-essen.com>
parents:
1336
diff
changeset
|
224 |
uint16_t std_tx_mailbox_size; |
989
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
225 |
uint16_t mailbox_protocols; |
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
226 |
uint8_t has_general_category; |
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
227 |
ec_sii_coe_details_t coe_details; |
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
228 |
ec_sii_general_flags_t general_flags; |
816663ca9370
Slave information via 'ethercat slave'.
Florian Pose <fp@igh-essen.com>
parents:
987
diff
changeset
|
229 |
int16_t current_on_ebus; |
1425
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
230 |
struct { |
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
231 |
ec_slave_port_desc_t desc; |
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
232 |
ec_slave_port_link_t link; |
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
233 |
uint32_t receive_time; |
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
234 |
uint16_t next_slave; |
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
235 |
uint32_t delay_to_next_dc; |
c1322a8793c0
Transition delay calculation. TBC...
Florian Pose <fp@igh-essen.com>
parents:
1421
diff
changeset
|
236 |
} ports[EC_MAX_PORTS]; |
1379
cbceb0e2f2a0
Reading more base information (incl. whether DC supported).
Florian Pose <fp@igh-essen.com>
parents:
1363
diff
changeset
|
237 |
uint8_t fmmu_bit; |
cbceb0e2f2a0
Reading more base information (incl. whether DC supported).
Florian Pose <fp@igh-essen.com>
parents:
1363
diff
changeset
|
238 |
uint8_t dc_supported; |
cbceb0e2f2a0
Reading more base information (incl. whether DC supported).
Florian Pose <fp@igh-essen.com>
parents:
1363
diff
changeset
|
239 |
ec_slave_dc_range_t dc_range; |
1419
8fc38c37d86e
Determine type of DC implementation (full or delay meas. only); update scan FSM graph.
Florian Pose <fp@igh-essen.com>
parents:
1417
diff
changeset
|
240 |
uint8_t has_dc_system_time; |
1426 | 241 |
uint32_t transmission_delay; |
1148
1762296870bd
Renamed state field to al_state.
Florian Pose <fp@igh-essen.com>
parents:
1147
diff
changeset
|
242 |
uint8_t al_state; |
987
3c9090138140
Display error flag in 'ethercat ls'; cleaned up usage of error flag;
Florian Pose <fp@igh-essen.com>
parents:
980
diff
changeset
|
243 |
uint8_t error_flag; |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
244 |
uint8_t sync_count; |
965
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
245 |
uint16_t sdo_count; |
978 | 246 |
uint32_t sii_nwords; |
1109
11ac4051db6b
Group/Image/Order strings in slave ioctl; order number as text content
Florian Pose <fp@igh-essen.com>
parents:
1082
diff
changeset
|
247 |
char group[EC_IOCTL_STRING_SIZE]; |
11ac4051db6b
Group/Image/Order strings in slave ioctl; order number as text content
Florian Pose <fp@igh-essen.com>
parents:
1082
diff
changeset
|
248 |
char image[EC_IOCTL_STRING_SIZE]; |
11ac4051db6b
Group/Image/Order strings in slave ioctl; order number as text content
Florian Pose <fp@igh-essen.com>
parents:
1082
diff
changeset
|
249 |
char order[EC_IOCTL_STRING_SIZE]; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
250 |
char name[EC_IOCTL_STRING_SIZE]; |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
251 |
} ec_ioctl_slave_t; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
252 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
253 |
/*****************************************************************************/ |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
254 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
255 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
256 |
// inputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
257 |
uint16_t slave_position; |
978 | 258 |
uint32_t sync_index; |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
259 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
260 |
// outputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
261 |
uint16_t physical_start_address; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
262 |
uint16_t default_size; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
263 |
uint8_t control_register; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
264 |
uint8_t enable; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
265 |
uint8_t pdo_count; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
266 |
} ec_ioctl_slave_sync_t; |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
267 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
268 |
/*****************************************************************************/ |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
269 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
270 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
271 |
// inputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
272 |
uint16_t slave_position; |
978 | 273 |
uint32_t sync_index; |
274 |
uint32_t pdo_pos; |
|
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
275 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
276 |
// outputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
277 |
uint16_t index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
278 |
uint8_t entry_count; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
279 |
int8_t name[EC_IOCTL_STRING_SIZE]; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
280 |
} ec_ioctl_slave_sync_pdo_t; |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
281 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
282 |
/*****************************************************************************/ |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
283 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
284 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
285 |
// inputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
286 |
uint16_t slave_position; |
978 | 287 |
uint32_t sync_index; |
288 |
uint32_t pdo_pos; |
|
289 |
uint32_t entry_pos; |
|
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
290 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
291 |
// outputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
292 |
uint16_t index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
293 |
uint8_t subindex; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
294 |
uint8_t bit_length; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
295 |
int8_t name[EC_IOCTL_STRING_SIZE]; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
296 |
} ec_ioctl_slave_sync_pdo_entry_t; |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
297 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
298 |
/*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
299 |
|
948
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
300 |
typedef struct { |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
301 |
// inputs |
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
302 |
uint32_t index; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
303 |
|
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
304 |
// outputs |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
305 |
uint32_t data_size; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
306 |
uint32_t logical_base_address; |
2369
2536d60dea6e
Partial WC output in domains command.
Florian Pose <fp@igh-essen.com>
parents:
2267
diff
changeset
|
307 |
uint16_t working_counter[EC_NUM_DEVICES]; |
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
308 |
uint16_t expected_working_counter; |
978 | 309 |
uint32_t fmmu_count; |
948
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
310 |
} ec_ioctl_domain_t; |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
311 |
|
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
312 |
/*****************************************************************************/ |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
313 |
|
949
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
314 |
typedef struct { |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
315 |
// inputs |
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
316 |
uint32_t domain_index; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
317 |
uint32_t fmmu_index; |
950
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
318 |
|
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
319 |
// outputs |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
320 |
uint16_t slave_config_alias; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
321 |
uint16_t slave_config_position; |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
322 |
uint8_t sync_index; |
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
323 |
ec_direction_t dir; |
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
324 |
uint32_t logical_address; |
978 | 325 |
uint32_t data_size; |
950
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
326 |
} ec_ioctl_domain_fmmu_t; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
327 |
|
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
328 |
/*****************************************************************************/ |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
329 |
|
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
330 |
typedef struct { |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
331 |
// inputs |
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
332 |
uint32_t domain_index; |
978 | 333 |
uint32_t data_size; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
334 |
uint8_t *target; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
335 |
} ec_ioctl_domain_data_t; |
949
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
336 |
|
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
337 |
/*****************************************************************************/ |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
338 |
|
960
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
339 |
typedef struct { |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
340 |
// inputs |
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
341 |
uint16_t slave_position; |
1148
1762296870bd
Renamed state field to al_state.
Florian Pose <fp@igh-essen.com>
parents:
1147
diff
changeset
|
342 |
uint8_t al_state; |
960
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
343 |
} ec_ioctl_slave_state_t; |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
344 |
|
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
345 |
/*****************************************************************************/ |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
346 |
|
965
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
347 |
typedef struct { |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
348 |
// inputs |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
349 |
uint16_t slave_position; |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
350 |
uint16_t sdo_position; |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
351 |
|
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
352 |
// outputs |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
353 |
uint16_t sdo_index; |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
354 |
uint8_t max_subindex; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
355 |
int8_t name[EC_IOCTL_STRING_SIZE]; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
356 |
} ec_ioctl_slave_sdo_t; |
965
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
357 |
|
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
358 |
/*****************************************************************************/ |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
359 |
|
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
360 |
typedef struct { |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
361 |
// inputs |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
362 |
uint16_t slave_position; |
968
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
363 |
int sdo_spec; // positive: index, negative: list position |
965
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
364 |
uint8_t sdo_entry_subindex; |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
365 |
|
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
366 |
// outputs |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
367 |
uint16_t data_type; |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
368 |
uint16_t bit_length; |
1382
cb2188d111f3
Read SDO entry access rights.
Florian Pose <fp@igh-essen.com>
parents:
1379
diff
changeset
|
369 |
uint8_t read_access[EC_SDO_ENTRY_ACCESS_COUNT]; |
cb2188d111f3
Read SDO entry access rights.
Florian Pose <fp@igh-essen.com>
parents:
1379
diff
changeset
|
370 |
uint8_t write_access[EC_SDO_ENTRY_ACCESS_COUNT]; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
371 |
int8_t description[EC_IOCTL_STRING_SIZE]; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
372 |
} ec_ioctl_slave_sdo_entry_t; |
965
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
373 |
|
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
374 |
/*****************************************************************************/ |
1aee4aa1def3
Implemented Sdo dictionary info via 'ethercat sdos'.
Florian Pose <fp@igh-essen.com>
parents:
960
diff
changeset
|
375 |
|
968
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
376 |
typedef struct { |
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
377 |
// inputs |
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
378 |
uint16_t slave_position; |
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
379 |
uint16_t sdo_index; |
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
380 |
uint8_t sdo_entry_subindex; |
978 | 381 |
uint32_t target_size; |
968
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
382 |
uint8_t *target; |
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
383 |
|
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
384 |
// outputs |
978 | 385 |
uint32_t data_size; |
1037
59f191c9185b
Store abort code in sdo request; output it in user space; added some
Florian Pose <fp@igh-essen.com>
parents:
1029
diff
changeset
|
386 |
uint32_t abort_code; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
387 |
} ec_ioctl_slave_sdo_upload_t; |
968
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
388 |
|
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
389 |
/*****************************************************************************/ |
b0e894257743
Implemented sdo_upload command.
Florian Pose <fp@igh-essen.com>
parents:
965
diff
changeset
|
390 |
|
974
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
391 |
typedef struct { |
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
392 |
// inputs |
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
393 |
uint16_t slave_position; |
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
394 |
uint16_t sdo_index; |
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
395 |
uint8_t sdo_entry_subindex; |
2124
c4afc5fede19
Added ecrt_master_sdo_download_complete() for ad-hoc downloading SDOs (also
Florian Pose <fp@igh-essen.com>
parents:
2009
diff
changeset
|
396 |
uint8_t complete_access; |
978 | 397 |
uint32_t data_size; |
974
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
398 |
uint8_t *data; |
1037
59f191c9185b
Store abort code in sdo request; output it in user space; added some
Florian Pose <fp@igh-essen.com>
parents:
1029
diff
changeset
|
399 |
|
59f191c9185b
Store abort code in sdo request; output it in user space; added some
Florian Pose <fp@igh-essen.com>
parents:
1029
diff
changeset
|
400 |
// outputs |
59f191c9185b
Store abort code in sdo request; output it in user space; added some
Florian Pose <fp@igh-essen.com>
parents:
1029
diff
changeset
|
401 |
uint32_t abort_code; |
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
402 |
} ec_ioctl_slave_sdo_download_t; |
974
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
403 |
|
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
404 |
/*****************************************************************************/ |
5868944a6456
Implemented Sdo download via ethercat command.
Florian Pose <fp@igh-essen.com>
parents:
971
diff
changeset
|
405 |
|
978 | 406 |
typedef struct { |
407 |
// inputs |
|
408 |
uint16_t slave_position; |
|
409 |
uint16_t offset; |
|
410 |
uint32_t nwords; |
|
411 |
uint16_t *words; |
|
1079
ef1266652c4d
Improved locking between ioctl()s and master state machine; separate
Florian Pose <fp@igh-essen.com>
parents:
1057
diff
changeset
|
412 |
} ec_ioctl_slave_sii_t; |
978 | 413 |
|
414 |
/*****************************************************************************/ |
|
415 |
||
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
416 |
typedef struct { |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
417 |
// inputs |
1200 | 418 |
uint16_t slave_position; |
2443
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
419 |
uint16_t address; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
420 |
size_t size; |
1200 | 421 |
uint8_t *data; |
1388
3c886ec376f5
Renamed phy_ commands to reg_.
Florian Pose <fp@igh-essen.com>
parents:
1382
diff
changeset
|
422 |
} ec_ioctl_slave_reg_t; |
1200 | 423 |
|
424 |
/*****************************************************************************/ |
|
425 |
||
426 |
typedef struct { |
|
427 |
// inputs |
|
1335
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
428 |
uint16_t slave_position; |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
429 |
uint16_t offset; |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
430 |
uint32_t buffer_size; |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
431 |
uint8_t *buffer; |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
432 |
|
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
433 |
// outputs |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
434 |
uint32_t data_size; |
1336
e27b37e80a99
merge -c1618 branches/1.4-foe: Improved FoE.
Florian Pose <fp@igh-essen.com>
parents:
1335
diff
changeset
|
435 |
uint32_t result; |
e27b37e80a99
merge -c1618 branches/1.4-foe: Improved FoE.
Florian Pose <fp@igh-essen.com>
parents:
1335
diff
changeset
|
436 |
uint32_t error_code; |
1335
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
437 |
char file_name[32]; |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
438 |
} ec_ioctl_slave_foe_t; |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
439 |
|
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
440 |
/*****************************************************************************/ |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
441 |
|
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
442 |
typedef struct { |
09c6fce1ae45
merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
443 |
// inputs |
1831
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
444 |
uint16_t slave_position; |
1952
7d9fb723fc4b
Added drive_no parameter to SoE layer.
Florian Pose <fp@igh-essen.com>
parents:
1945
diff
changeset
|
445 |
uint8_t drive_no; |
1831
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
446 |
uint16_t idn; |
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
447 |
uint32_t mem_size; |
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
448 |
uint8_t *data; |
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
449 |
|
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
450 |
// outputs |
1972 | 451 |
size_t data_size; |
1831
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
452 |
uint16_t error_code; |
1837
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
453 |
} ec_ioctl_slave_soe_read_t; |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
454 |
|
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
455 |
/*****************************************************************************/ |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
456 |
|
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
457 |
typedef struct { |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
458 |
// inputs |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
459 |
uint16_t slave_position; |
1952
7d9fb723fc4b
Added drive_no parameter to SoE layer.
Florian Pose <fp@igh-essen.com>
parents:
1945
diff
changeset
|
460 |
uint8_t drive_no; |
1837
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
461 |
uint16_t idn; |
1972 | 462 |
size_t data_size; |
1837
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
463 |
uint8_t *data; |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
464 |
|
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
465 |
// outputs |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
466 |
uint16_t error_code; |
32136215c1fa
Implemented SoE write state machine and soe_write command.
Florian Pose <fp@igh-essen.com>
parents:
1831
diff
changeset
|
467 |
} ec_ioctl_slave_soe_write_t; |
1831
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
468 |
|
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
469 |
/*****************************************************************************/ |
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
470 |
|
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
471 |
typedef struct { |
1875b9fea0ba
Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents:
1826
diff
changeset
|
472 |
// inputs |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
473 |
uint32_t config_index; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
474 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
475 |
// outputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
476 |
uint16_t alias; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
477 |
uint16_t position; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
478 |
uint32_t vendor_id; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
479 |
uint32_t product_code; |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
480 |
struct { |
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
481 |
ec_direction_t dir; |
1509
a864688e7de5
Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents:
1507
diff
changeset
|
482 |
ec_watchdog_mode_t watchdog_mode; |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
483 |
uint32_t pdo_count; |
1509
a864688e7de5
Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents:
1507
diff
changeset
|
484 |
uint8_t config_this; |
1082
ff06c58e269c
Renamed ecrt_slave_config_sync_managers() to ecrt_slave_config_pdos();
Florian Pose <fp@igh-essen.com>
parents:
1079
diff
changeset
|
485 |
} syncs[EC_MAX_SYNC_MANAGERS]; |
1509
a864688e7de5
Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents:
1507
diff
changeset
|
486 |
uint16_t watchdog_divider; |
a864688e7de5
Added watchdog configuration via application interface (thanks to J. Mohre).
Florian Pose <fp@igh-essen.com>
parents:
1507
diff
changeset
|
487 |
uint16_t watchdog_intervals; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
488 |
uint32_t sdo_count; |
1966
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
489 |
uint32_t idn_count; |
1147
0eac1ee8512a
Show attached slave position and state in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1109
diff
changeset
|
490 |
int32_t slave_position; |
1455
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
491 |
uint16_t dc_assign_activate; |
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
492 |
ec_sync_signal_t dc_sync[EC_SYNC_SIGNAL_COUNT]; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
493 |
} ec_ioctl_config_t; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
494 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
495 |
/*****************************************************************************/ |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
496 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
497 |
typedef struct { |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
498 |
// inputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
499 |
uint32_t config_index; |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
500 |
uint8_t sync_index; |
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
501 |
uint16_t pdo_pos; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
502 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
503 |
// outputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
504 |
uint16_t index; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
505 |
uint8_t entry_count; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
506 |
int8_t name[EC_IOCTL_STRING_SIZE]; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
507 |
} ec_ioctl_config_pdo_t; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
508 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
509 |
/*****************************************************************************/ |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
510 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
511 |
typedef struct { |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
512 |
// inputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
513 |
uint32_t config_index; |
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
514 |
uint8_t sync_index; |
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
515 |
uint16_t pdo_pos; |
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1037
diff
changeset
|
516 |
uint8_t entry_pos; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
517 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
518 |
// outputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
519 |
uint16_t index; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
520 |
uint8_t subindex; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
521 |
uint8_t bit_length; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
522 |
int8_t name[EC_IOCTL_STRING_SIZE]; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
523 |
} ec_ioctl_config_pdo_entry_t; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
524 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
525 |
/*****************************************************************************/ |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
526 |
|
1526
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
527 |
/** Maximum size for displayed SDO data. |
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
528 |
* \todo Make this dynamic. |
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
529 |
*/ |
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
530 |
#define EC_MAX_SDO_DATA_SIZE 1024 |
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
531 |
|
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
532 |
typedef struct { |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
533 |
// inputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
534 |
uint32_t config_index; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
535 |
uint32_t sdo_pos; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
536 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
537 |
// outputs |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
538 |
uint16_t index; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
539 |
uint8_t subindex; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
540 |
uint32_t size; |
1526
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
541 |
uint8_t data[EC_MAX_SDO_DATA_SIZE]; |
2435
4151f6f4c3e1
Show complete access flag in config view.
Florian Pose <fp@igh-essen.com>
parents:
2434
diff
changeset
|
542 |
uint8_t complete_access; |
990
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
543 |
} ec_ioctl_config_sdo_t; |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
544 |
|
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
545 |
/*****************************************************************************/ |
4f223f3df05a
Bus configuration via 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
989
diff
changeset
|
546 |
|
1966
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
547 |
/** Maximum size for displayed IDN data. |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
548 |
* \todo Make this dynamic. |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
549 |
*/ |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
550 |
#define EC_MAX_IDN_DATA_SIZE 1024 |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
551 |
|
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
552 |
typedef struct { |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
553 |
// inputs |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
554 |
uint32_t config_index; |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
555 |
uint32_t idn_pos; |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
556 |
|
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
557 |
// outputs |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
558 |
uint8_t drive_no; |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
559 |
uint16_t idn; |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
560 |
ec_al_state_t state; |
1972 | 561 |
size_t size; |
1966
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
562 |
uint8_t data[EC_MAX_IDN_DATA_SIZE]; |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
563 |
} ec_ioctl_config_idn_t; |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
564 |
|
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
565 |
/*****************************************************************************/ |
23c638a81fe7
Output IDN configuration as part of 'ethercat config -v'.
Florian Pose <fp@igh-essen.com>
parents:
1963
diff
changeset
|
566 |
|
1516
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
567 |
#ifdef EC_EOE |
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
568 |
|
1255
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
569 |
typedef struct { |
1485 | 570 |
// input |
571 |
uint16_t eoe_index; |
|
572 |
||
573 |
// outputs |
|
1507
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
574 |
char name[EC_DATAGRAM_NAME_SIZE]; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
575 |
uint16_t slave_position; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
576 |
uint8_t open; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
577 |
uint32_t rx_bytes; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
578 |
uint32_t rx_rate; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
579 |
uint32_t tx_bytes; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
580 |
uint32_t tx_rate; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
581 |
uint32_t tx_queued_frames; |
68e89abadd19
Removed unwanted tabulators.
Florian Pose <fp@igh-essen.com>
parents:
1485
diff
changeset
|
582 |
uint32_t tx_queue_size; |
1485 | 583 |
} ec_ioctl_eoe_handler_t; |
584 |
||
1516
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
585 |
#endif |
e3b09f847512
Fixed compiler error on --disable-eoe.
Florian Pose <fp@igh-essen.com>
parents:
1509
diff
changeset
|
586 |
|
1485 | 587 |
/*****************************************************************************/ |
588 |
||
589 |
typedef struct { |
|
2433
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
590 |
// outputs |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
591 |
void *process_data; |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
592 |
size_t process_data_size; |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
593 |
} ec_ioctl_master_activate_t; |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
594 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
595 |
/*****************************************************************************/ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
596 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
597 |
typedef struct { |
1255
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
598 |
// inputs |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
599 |
uint32_t config_index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
600 |
uint16_t pdo_index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
601 |
uint16_t entry_index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
602 |
uint8_t entry_subindex; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
603 |
uint8_t entry_bit_length; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
604 |
} ec_ioctl_add_pdo_entry_t; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
605 |
|
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
606 |
/*****************************************************************************/ |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
607 |
|
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
608 |
typedef struct { |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
609 |
// inputs |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
610 |
uint32_t config_index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
611 |
uint16_t entry_index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
612 |
uint8_t entry_subindex; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
613 |
uint32_t domain_index; |
2421 | 614 |
|
1255
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
615 |
// outputs |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
616 |
unsigned int bit_position; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
617 |
} ec_ioctl_reg_pdo_entry_t; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
618 |
|
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
619 |
/*****************************************************************************/ |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
620 |
|
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
621 |
typedef struct { |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
622 |
// inputs |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
623 |
uint32_t config_index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
624 |
uint16_t index; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
625 |
uint8_t subindex; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
626 |
const uint8_t *data; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
627 |
size_t size; |
1526
66edd310830c
Implemented CompleteAccess for SDO downloads.
Florian Pose <fp@igh-essen.com>
parents:
1516
diff
changeset
|
628 |
uint8_t complete_access; |
1255
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
629 |
} ec_ioctl_sc_sdo_t; |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
630 |
|
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
631 |
/*****************************************************************************/ |
38b7e05b20c1
Added some slave configuration methods.
Florian Pose <fp@igh-essen.com>
parents:
1247
diff
changeset
|
632 |
|
1259
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
633 |
typedef struct { |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
634 |
// inputs |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
635 |
uint32_t config_index; |
2438
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
636 |
size_t size; |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
637 |
uint8_t *target; |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
638 |
|
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
639 |
// outputs |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
640 |
int32_t overruns; |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
641 |
} ec_ioctl_sc_emerg_t; |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
642 |
|
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
643 |
/*****************************************************************************/ |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
644 |
|
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
645 |
typedef struct { |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
646 |
// inputs |
9c3e629a220c
Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents:
2435
diff
changeset
|
647 |
uint32_t config_index; |
1259
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
648 |
|
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
649 |
// outputs |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
650 |
ec_slave_config_state_t *state; |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
651 |
} ec_ioctl_sc_state_t; |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
652 |
|
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
653 |
/*****************************************************************************/ |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
654 |
|
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
655 |
typedef struct { |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
656 |
// inputs |
1862
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
657 |
uint32_t config_index; |
1952
7d9fb723fc4b
Added drive_no parameter to SoE layer.
Florian Pose <fp@igh-essen.com>
parents:
1945
diff
changeset
|
658 |
uint8_t drive_no; |
1862
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
659 |
uint16_t idn; |
1945
f9204699e799
Incremented ioctl interface version; Minor changes.
Florian Pose <fp@igh-essen.com>
parents:
1944
diff
changeset
|
660 |
ec_al_state_t al_state; |
1862
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
661 |
const uint8_t *data; |
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
662 |
size_t size; |
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
663 |
} ec_ioctl_sc_idn_t; |
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
664 |
|
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
665 |
/*****************************************************************************/ |
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
666 |
|
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
667 |
typedef struct { |
05d224a66270
Implemented ecrt_slave_config_idn() for user-space library.
Florian Pose <fp@igh-essen.com>
parents:
1857
diff
changeset
|
668 |
// inputs |
1259
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
669 |
uint32_t domain_index; |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
670 |
|
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
671 |
// outputs |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
672 |
ec_domain_state_t *state; |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
673 |
} ec_ioctl_domain_state_t; |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
674 |
|
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
675 |
/*****************************************************************************/ |
5f9d1abbee71
Added state functions; writing of process data works.
Florian Pose <fp@igh-essen.com>
parents:
1258
diff
changeset
|
676 |
|
1264
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
677 |
typedef struct { |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
678 |
// inputs |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
679 |
uint32_t config_index; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
680 |
|
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
681 |
// inputs/outputs |
1352
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
682 |
uint32_t request_index; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
683 |
uint16_t sdo_index; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
684 |
uint8_t sdo_subindex; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
685 |
size_t size; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
686 |
uint8_t *data; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
687 |
uint32_t timeout; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
688 |
ec_request_state_t state; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
689 |
} ec_ioctl_sdo_request_t; |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
690 |
|
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
691 |
/*****************************************************************************/ |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
692 |
|
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
693 |
typedef struct { |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
694 |
// inputs |
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
695 |
uint32_t config_index; |
2443
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
696 |
size_t mem_size; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
697 |
|
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
698 |
// inputs/outputs |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
699 |
uint32_t request_index; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
700 |
uint8_t *data; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
701 |
ec_request_state_t state; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
702 |
uint8_t new_data; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
703 |
uint16_t address; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
704 |
size_t transfer_size; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
705 |
} ec_ioctl_reg_request_t; |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
706 |
|
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
707 |
/*****************************************************************************/ |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
708 |
|
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
709 |
typedef struct { |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
710 |
// inputs |
2c3ccdde3919
Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents:
2438
diff
changeset
|
711 |
uint32_t config_index; |
1352
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
712 |
|
275d2fdeab48
Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
1337
diff
changeset
|
713 |
// inputs/outputs |
1264
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
714 |
uint32_t voe_index; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
715 |
uint32_t *vendor_id; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
716 |
uint16_t *vendor_type; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
717 |
size_t size; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
718 |
uint8_t *data; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
719 |
ec_request_state_t state; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
720 |
} ec_ioctl_voe_t; |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
721 |
|
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
722 |
/*****************************************************************************/ |
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1259
diff
changeset
|
723 |
|
1455
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
724 |
typedef struct { |
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
725 |
// inputs |
2380
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
726 |
uint32_t dev_idx; |
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
727 |
|
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
728 |
// outputs |
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
729 |
ec_master_link_state_t *state; |
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
730 |
} ec_ioctl_link_state_t; |
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
731 |
|
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
732 |
/*****************************************************************************/ |
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
733 |
|
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
734 |
typedef struct { |
cf9db49bcce8
Added ecrt_master_link_state() to retrieve information about a redundant link.
Florian Pose <fp@igh-essen.com>
parents:
2374
diff
changeset
|
735 |
// inputs |
1455
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
736 |
uint64_t app_time; |
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
737 |
} ec_ioctl_app_time_t; |
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
738 |
|
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
739 |
/*****************************************************************************/ |
aa18fcfe0fd1
Output DC config in 'ethercat config'.
Florian Pose <fp@igh-essen.com>
parents:
1448
diff
changeset
|
740 |
|
2433
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
741 |
#ifdef __KERNEL__ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
742 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
743 |
/** Context data structure for file handles. |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
744 |
*/ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
745 |
typedef struct { |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
746 |
unsigned int writable; /**< Device was opened with write permission. */ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
747 |
unsigned int requested; /**< Master was requested via this file handle. */ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
748 |
uint8_t *process_data; /**< Total process data area. */ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
749 |
size_t process_data_size; /**< Size of the \a process_data. */ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
750 |
} ec_ioctl_context_t; |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
751 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
752 |
long ec_ioctl(ec_master_t *, ec_ioctl_context_t *, unsigned int, |
2447
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
753 |
void __user *); |
2433
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
754 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
755 |
#ifdef EC_RTDM |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
756 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
757 |
long ec_ioctl_rtdm(ec_master_t *, ec_ioctl_context_t *, unsigned int, |
2447
e93efb4af231
Added interface to select the reference clock and to sync to it.
Florian Pose <fp@igh-essen.com>
parents:
2443
diff
changeset
|
758 |
void __user *); |
2433
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
759 |
int ec_rtdm_mmap(ec_ioctl_context_t *, void **); |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
760 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
761 |
#endif |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
762 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
763 |
#endif |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
764 |
|
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
765 |
/*****************************************************************************/ |
3bdd7a747fae
Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents:
2421
diff
changeset
|
766 |
|
1082
ff06c58e269c
Renamed ecrt_slave_config_sync_managers() to ecrt_slave_config_pdos();
Florian Pose <fp@igh-essen.com>
parents:
1079
diff
changeset
|
767 |
/** \endcond */ |
ff06c58e269c
Renamed ecrt_slave_config_sync_managers() to ecrt_slave_config_pdos();
Florian Pose <fp@igh-essen.com>
parents:
1079
diff
changeset
|
768 |
|
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
769 |
#endif |