author | Florian Pose <fp@igh-essen.com> |
Tue, 27 Jan 2009 14:14:37 +0000 | |
changeset 1347 | 41360ffdcb14 |
parent 1327 | 4d179b06dd3c |
child 1363 | 11c0b2caa253 |
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 |
* |
|
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
|
22 |
* Using the EtherCAT technology and brand is permitted in compliance with |
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
|
23 |
* the industrial property and similar rights of Beckhoff Automation GmbH. |
1209 | 24 |
* |
25 |
*****************************************************************************/ |
|
26 |
||
27 |
/** |
|
28 |
\file |
|
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
29 |
Vendor specific over EtherCAT protocol handler. |
1209 | 30 |
*/ |
31 |
||
32 |
/*****************************************************************************/ |
|
33 |
||
34 |
#ifndef __EC_VOE_HANDLER_H__ |
|
35 |
#define __EC_VOE_HANDLER_H__ |
|
36 |
||
37 |
#include <linux/list.h> |
|
38 |
||
39 |
#include "globals.h" |
|
40 |
#include "datagram.h" |
|
41 |
||
42 |
/*****************************************************************************/ |
|
43 |
||
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
44 |
/** Vendor specific over EtherCAT handler. |
1209 | 45 |
*/ |
46 |
struct ec_voe_handler { |
|
47 |
struct list_head list; /**< List item. */ |
|
48 |
ec_slave_config_t *config; /**< Parent slave configuration. */ |
|
49 |
ec_datagram_t datagram; /**< State machine datagram. */ |
|
1218 | 50 |
uint32_t vendor_id; /**< Vendor ID for the header. */ |
51 |
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
|
52 |
size_t data_size; /**< Size of VoE data. */ |
1209 | 53 |
ec_direction_t dir; /**< Direction. EC_DIR_OUTPUT means writing to |
54 |
the slave, EC_DIR_INPUT means reading from the |
|
55 |
slave. */ |
|
56 |
void (*state)(ec_voe_handler_t *); /**< State function */ |
|
57 |
ec_internal_request_state_t request_state; /**< Handler state. */ |
|
58 |
unsigned int retries; /**< retries upon datagram timeout */ |
|
59 |
unsigned long jiffies_start; /**< Timestamp for timeout calculation. */ |
|
60 |
}; |
|
61 |
||
62 |
/*****************************************************************************/ |
|
63 |
||
64 |
int ec_voe_handler_init(ec_voe_handler_t *, ec_slave_config_t *, size_t); |
|
65 |
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
|
66 |
size_t ec_voe_handler_mem_size(const ec_voe_handler_t *); |
1209 | 67 |
|
68 |
/*****************************************************************************/ |
|
69 |
||
70 |
#endif |