author | Florian Pose <fp@igh-essen.com> |
Fri, 06 Jun 2008 09:22:57 +0000 | |
changeset 964 | 957f21465052 |
parent 960 | 36e460ffbb5e |
child 965 | 1aee4aa1def3 |
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 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
* Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
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 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
* and/or modify it under the terms of the GNU General Public License |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
* as published by the Free Software Foundation; either version 2 of the |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
* License, or (at your option) any later version. |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
* The IgH EtherCAT Master is distributed in the hope that it will be |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
* GNU General Public License for more details. |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
* You should have received a copy of the GNU General Public License |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
* along with the IgH EtherCAT Master; if not, write to the Free Software |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
* 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
|
22 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
* The right to use EtherCAT Technology is granted and comes free of |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
* charge under condition of compatibility of product made by |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
* Licensee. People intending to distribute/sell products based on the |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
* code, have to sign an agreement to guarantee that products using |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
* software based on IgH EtherCAT master stay compatible with the actual |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
* EtherCAT specification (which are released themselves as an open |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
* standard) as the (only) precondition to have the right to use EtherCAT |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
* Technology, IP and trade marks. |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
* |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
*****************************************************************************/ |
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 |
\file |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
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
|
37 |
*/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
/*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
#ifndef __EC_IOCTL_H__ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
#define __EC_IOCTL_H__ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
/*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
enum { |
957
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
47 |
EC_IOCTL_MASTER, |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
48 |
EC_IOCTL_SLAVE, |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
49 |
EC_IOCTL_SYNC, |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
50 |
EC_IOCTL_PDO, |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
51 |
EC_IOCTL_PDO_ENTRY, |
948
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
52 |
EC_IOCTL_DOMAIN_COUNT, |
949
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
53 |
EC_IOCTL_DOMAIN, |
950
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
54 |
EC_IOCTL_DOMAIN_FMMU, |
956
d9b9bc794d10
Implemented 'ethercat debug' command.
Florian Pose <fp@igh-essen.com>
parents:
950
diff
changeset
|
55 |
EC_IOCTL_DATA, |
957
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
56 |
EC_IOCTL_SET_DEBUG, |
960
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
57 |
EC_IOCTL_SLAVE_STATE, |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
}; |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
59 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
60 |
/*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
|
957
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
62 |
typedef struct { |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
63 |
unsigned int slave_count; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
64 |
uint8_t mode; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
65 |
struct { |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
66 |
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
|
67 |
uint8_t attached; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
68 |
unsigned int tx_count; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
69 |
unsigned int rx_count; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
70 |
} devices[2]; |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
71 |
} 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
|
72 |
|
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
73 |
/*****************************************************************************/ |
ed5ac2e83495
Replaced EC_IOCTL_SLAVE_COUNT with EC_IOCTL_MASTER; implemented
Florian Pose <fp@igh-essen.com>
parents:
956
diff
changeset
|
74 |
|
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
75 |
#define EC_IOCTL_SLAVE_NAME_SIZE 114 |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
76 |
|
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
77 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
78 |
// input |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
79 |
uint16_t position; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
80 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
81 |
// outputs |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
82 |
uint32_t vendor_id; |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
83 |
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
|
84 |
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
|
85 |
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
|
86 |
uint16_t alias; |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
87 |
uint8_t state; |
935
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
88 |
uint8_t sync_count; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
89 |
char name[EC_IOCTL_SLAVE_NAME_SIZE]; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
90 |
} ec_ioctl_slave_t; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
91 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
92 |
/*****************************************************************************/ |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
93 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
94 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
95 |
// inputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
96 |
uint16_t slave_position; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
97 |
unsigned int sync_index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
98 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
99 |
// outputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
100 |
uint16_t physical_start_address; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
101 |
uint16_t default_size; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
102 |
uint8_t control_register; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
103 |
uint8_t enable; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
104 |
uint8_t assign_source; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
105 |
uint8_t pdo_count; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
106 |
} ec_ioctl_sync_t; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
107 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
108 |
/*****************************************************************************/ |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
109 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
110 |
#define EC_IOCTL_PDO_NAME_SIZE 114 |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
111 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
112 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
113 |
// inputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
114 |
uint16_t slave_position; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
115 |
unsigned int sync_index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
116 |
unsigned int pdo_pos; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
117 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
118 |
// outputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
119 |
uint8_t dir; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
120 |
uint16_t index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
121 |
uint8_t entry_count; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
122 |
char name[EC_IOCTL_PDO_NAME_SIZE]; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
123 |
} ec_ioctl_pdo_t; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
124 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
125 |
/*****************************************************************************/ |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
126 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
127 |
#define EC_IOCTL_PDO_ENTRY_NAME_SIZE 110 |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
128 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
129 |
typedef struct { |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
130 |
// inputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
131 |
uint16_t slave_position; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
132 |
unsigned int sync_index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
133 |
unsigned int pdo_pos; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
134 |
unsigned int entry_pos; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
135 |
|
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
136 |
// outputs |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
137 |
uint16_t index; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
138 |
uint8_t subindex; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
139 |
uint8_t bit_length; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
140 |
char name[EC_IOCTL_PDO_NAME_SIZE]; |
b954e9d91ea5
Added 'pdos' command to ethercat tool.
Florian Pose <fp@igh-essen.com>
parents:
922
diff
changeset
|
141 |
} ec_ioctl_pdo_entry_t; |
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
142 |
|
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
143 |
/*****************************************************************************/ |
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
144 |
|
948
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
145 |
typedef struct { |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
146 |
// inputs |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
147 |
unsigned int index; |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
148 |
|
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
149 |
// outputs |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
150 |
unsigned int data_size; |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
151 |
uint32_t logical_base_address; |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
152 |
uint16_t working_counter; |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
153 |
uint16_t expected_working_counter; |
950
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
154 |
unsigned int fmmu_count; |
948
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
155 |
} ec_ioctl_domain_t; |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
156 |
|
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
157 |
/*****************************************************************************/ |
1cfab7161491
Implemented domain command.
Florian Pose <fp@igh-essen.com>
parents:
938
diff
changeset
|
158 |
|
949
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
159 |
typedef struct { |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
160 |
// inputs |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
161 |
unsigned int domain_index; |
950
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
162 |
unsigned int fmmu_index; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
163 |
|
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
164 |
// outputs |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
165 |
uint16_t slave_config_alias; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
166 |
uint16_t slave_config_position; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
167 |
uint8_t fmmu_dir; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
168 |
uint32_t logical_address; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
169 |
unsigned int data_size; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
170 |
} ec_ioctl_domain_fmmu_t; |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
171 |
|
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
172 |
/*****************************************************************************/ |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
173 |
|
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
174 |
typedef struct { |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
175 |
// inputs |
8b00e63fff90
'ethercat domain' shows domain contents and process data.
Florian Pose <fp@igh-essen.com>
parents:
949
diff
changeset
|
176 |
unsigned int domain_index; |
949
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
177 |
unsigned int data_size; |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
178 |
unsigned char *target; |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
179 |
} ec_ioctl_data_t; |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
180 |
|
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
181 |
/*****************************************************************************/ |
e424c0074c67
Implemented 'data' command.
Florian Pose <fp@igh-essen.com>
parents:
948
diff
changeset
|
182 |
|
960
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
183 |
typedef struct { |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
184 |
// inputs |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
185 |
uint16_t slave_position; |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
186 |
uint8_t requested_state; |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
187 |
} 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
|
188 |
|
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
189 |
/*****************************************************************************/ |
36e460ffbb5e
Request slave state(s) with 'ethercat state'; removed sysfs state file.
Florian Pose <fp@igh-essen.com>
parents:
957
diff
changeset
|
190 |
|
922
fede1d8f5b71
Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
191 |
#endif |