author | Florian Pose <fp@igh-essen.com> |
Wed, 18 Jun 2008 14:37:00 +0000 | |
changeset 1032 | 748c34ab66b6 |
parent 933 | 618ab9e03321 |
child 1209 | 8be462afb7f4 |
child 1685 | 399ef727bf62 |
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 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
* Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
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 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
* and/or modify it under the terms of the GNU General Public License |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
* as published by the Free Software Foundation; either version 2 of the |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
* License, or (at your option) any later version. |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
* The IgH EtherCAT Master is distributed in the hope that it will be |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
* GNU General Public License for more details. |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
* You should have received a copy of the GNU General Public License |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
* along with the IgH EtherCAT Master; if not, write to the Free Software |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
* 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
|
22 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
* The right to use EtherCAT Technology is granted and comes free of |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
* charge under condition of compatibility of product made by |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
* Licensee. People intending to distribute/sell products based on the |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
* code, have to sign an agreement to guarantee that products using |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
* software based on IgH EtherCAT master stay compatible with the actual |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
* EtherCAT specification (which are released themselves as an open |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
* standard) as the (only) precondition to have the right to use EtherCAT |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
* Technology, IP and trade marks. |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
* |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
*****************************************************************************/ |
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 |
\file |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
EtherCAT Process data object structure. |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
*/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
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 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
#ifndef __EC_PDO_ENTRY_H__ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
#define __EC_PDO_ENTRY_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 |
#include <linux/list.h> |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
#include "../include/ecrt.h" |
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 |
#include "globals.h" |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
50 |
/*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
51 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
/** Pdo entry description. |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
*/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
54 |
typedef struct { |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
55 |
struct list_head list; /**< list item */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
56 |
uint16_t index; /**< Pdo entry index */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
57 |
uint8_t subindex; /**< Pdo entry subindex */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
char *name; /**< entry name */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
59 |
uint8_t bit_length; /**< entry length in bit */ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
60 |
} ec_pdo_entry_t; |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
62 |
/*****************************************************************************/ |
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 |
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
|
65 |
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
|
66 |
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
|
67 |
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
|
68 |
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
|
69 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
70 |
/*****************************************************************************/ |
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
71 |
|
618ab9e03321
Separated Pdo and Pdo entry classes.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
72 |
#endif |