author | Florian Pose <fp@igh-essen.com> |
Thu, 12 May 2011 16:38:48 +0200 | |
changeset 2065 | 4d8c9a441ef6 |
parent 1363 | 11c0b2caa253 |
permissions | -rw-r--r-- |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
/****************************************************************************** |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
* $Id$ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
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:
1209
diff
changeset
|
5 |
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
* This file is part of the IgH EtherCAT Master. |
618ab9e03321
Separated Pdo and Pdo entry classes.
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:
1209
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:
1209
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:
1209
diff
changeset
|
11 |
* published by the Free Software Foundation. |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
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:
1209
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:
1209
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:
1209
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:
1209
diff
changeset
|
16 |
* Public License for more details. |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
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:
1209
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:
1209
diff
changeset
|
19 |
* with the IgH EtherCAT Master; if not, write to the Free Software |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
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. |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
/** |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
\file |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
EtherCAT Process data object structure. |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
*/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
/*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
#ifndef __EC_PDO_ENTRY_H__ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
#define __EC_PDO_ENTRY_H__ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
#include <linux/list.h> |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
#include "globals.h" |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
/*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
|
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
46 |
/** PDO entry description. |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
47 |
*/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
typedef struct { |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
struct list_head list; /**< list item */ |
1327
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
50 |
uint16_t index; /**< PDO entry index */ |
4d179b06dd3c
merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents:
1326
diff
changeset
|
51 |
uint8_t subindex; /**< PDO entry subindex */ |
933
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
char *name; /**< entry name */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
uint8_t bit_length; /**< entry length in bit */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
54 |
} ec_pdo_entry_t; |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
55 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
56 |
/*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
57 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
void ec_pdo_entry_init(ec_pdo_entry_t *); |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
59 |
int ec_pdo_entry_init_copy(ec_pdo_entry_t *, const ec_pdo_entry_t *); |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
60 |
void ec_pdo_entry_clear(ec_pdo_entry_t *); |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
int ec_pdo_entry_set_name(ec_pdo_entry_t *, const char *); |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
62 |
int ec_pdo_entry_equal(const ec_pdo_entry_t *, const ec_pdo_entry_t *); |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
63 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
64 |
/*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
65 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
66 |
#endif |