author | Florian Pose <fp@igh-essen.com> |
Mon, 09 Jan 2012 12:01:22 +0100 | |
branch | redundancy |
changeset 2322 | e93f9cc6f84f |
parent 1363 | 11c0b2caa253 |
child 2045 | ff2a13a4603c |
permissions | -rw-r--r-- |
1209 | 1 |
/****************************************************************************** |
2 |
* |
|
3 |
* $Id$ |
|
4 |
* |
|
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:
1264
diff
changeset
|
5 |
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH |
1209 | 6 |
* |
7 |
* This file is part of the IgH EtherCAT Master. |
|
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:
1264
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:
1264
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:
1264
diff
changeset
|
11 |
* published by the Free Software Foundation. |
1209 | 12 |
* |
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:
1264
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:
1264
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:
1264
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:
1264
diff
changeset
|
16 |
* Public License for more details. |
1209 | 17 |
* |
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:
1264
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:
1264
diff
changeset
|
19 |
* with the IgH EtherCAT Master; if not, write to the Free Software |
1209 | 20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
21 |
* |
|
1363
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1327
diff
changeset
|
22 |
* --- |
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1327
diff
changeset
|
23 |
* |
11c0b2caa253
Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents:
1327
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:
1327
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:
1327
diff
changeset
|
26 |
* industrial property and similar rights of Beckhoff Automation GmbH. |
1209 | 27 |
* |
28 |
*****************************************************************************/ |
|
29 |
||
30 |
/** |
|
31 |
\file |
|
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
32 |
Vendor specific over EtherCAT protocol handler. |
1209 | 33 |
*/ |
34 |
||
35 |
/*****************************************************************************/ |
|
36 |
||
37 |
#ifndef __EC_VOE_HANDLER_H__ |
|
38 |
#define __EC_VOE_HANDLER_H__ |
|
39 |
||
40 |
#include <linux/list.h> |
|
41 |
||
42 |
#include "globals.h" |
|
43 |
#include "datagram.h" |
|
44 |
||
45 |
/*****************************************************************************/ |
|
46 |
||
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
47 |
/** Vendor specific over EtherCAT handler. |
1209 | 48 |
*/ |
49 |
struct ec_voe_handler { |
|
50 |
struct list_head list; /**< List item. */ |
|
51 |
ec_slave_config_t *config; /**< Parent slave configuration. */ |
|
52 |
ec_datagram_t datagram; /**< State machine datagram. */ |
|
1218 | 53 |
uint32_t vendor_id; /**< Vendor ID for the header. */ |
54 |
uint16_t vendor_type; /**< Vendor type for the header. */ |
|
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
55 |
size_t data_size; /**< Size of VoE data. */ |
1209 | 56 |
ec_direction_t dir; /**< Direction. EC_DIR_OUTPUT means writing to |
57 |
the slave, EC_DIR_INPUT means reading from the |
|
58 |
slave. */ |
|
59 |
void (*state)(ec_voe_handler_t *); /**< State function */ |
|
60 |
ec_internal_request_state_t request_state; /**< Handler state. */ |
|
61 |
unsigned int retries; /**< retries upon datagram timeout */ |
|
62 |
unsigned long jiffies_start; /**< Timestamp for timeout calculation. */ |
|
63 |
}; |
|
64 |
||
65 |
/*****************************************************************************/ |
|
66 |
||
67 |
int ec_voe_handler_init(ec_voe_handler_t *, ec_slave_config_t *, size_t); |
|
68 |
void ec_voe_handler_clear(ec_voe_handler_t *); |
|
1264
e7882f246d7a
Implemented VoE handler in userspace.
Florian Pose <fp@igh-essen.com>
parents:
1218
diff
changeset
|
69 |
size_t ec_voe_handler_mem_size(const ec_voe_handler_t *); |
1209 | 70 |
|
71 |
/*****************************************************************************/ |
|
72 |
||
73 |
#endif |