author | Florian Pose <fp@igh-essen.com> |
Thu, 02 Oct 2008 15:38:35 +0000 | |
changeset 1249 | d64ed42e0d11 |
parent 1209 | 8be462afb7f4 |
child 1326 | ef907b0b5125 |
permissions | -rw-r--r-- |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
/****************************************************************************** |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
* $Id$ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
* Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
* This file is part of the IgH EtherCAT Master. |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
* and/or modify it under the terms of the GNU General Public License |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
* as published by the Free Software Foundation; either version 2 of the |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
* License, or (at your option) any later version. |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
* The IgH EtherCAT Master is distributed in the hope that it will be |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
* GNU General Public License for more details. |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
* You should have received a copy of the GNU General Public License |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
* along with the IgH EtherCAT Master; if not, write to the Free Software |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
22 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
* The right to use EtherCAT Technology is granted and comes free of |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
* charge under condition of compatibility of product made by |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
* Licensee. People intending to distribute/sell products based on the |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
* code, have to sign an agreement to guarantee that products using |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
* software based on IgH EtherCAT master stay compatible with the actual |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
* EtherCAT specification (which are released themselves as an open |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
* standard) as the (only) precondition to have the right to use EtherCAT |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
* Technology, IP and trade marks. |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
* |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
*****************************************************************************/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
/** |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
\file |
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
36 |
EtherCAT Pdo list structure. |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
*/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
/*****************************************************************************/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
|
883
4963e22a267a
Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents:
879
diff
changeset
|
41 |
#ifndef __EC_PDO_LIST_H__ |
4963e22a267a
Equalized defines against duplicated header inclusion.
Florian Pose <fp@igh-essen.com>
parents:
879
diff
changeset
|
42 |
#define __EC_PDO_LIST_H__ |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
#include <linux/list.h> |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
#include "globals.h" |
818
b6c87ae254c9
Calculate expected working counter for domains.
Florian Pose <fp@igh-essen.com>
parents:
814
diff
changeset
|
47 |
#include "pdo.h" |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
/*****************************************************************************/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
50 |
|
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
51 |
/** EtherCAT Pdo list. |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
*/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
typedef struct { |
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
54 |
struct list_head list; /**< List of Pdos. */ |
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
55 |
} ec_pdo_list_t; |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
56 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
57 |
/*****************************************************************************/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
|
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
59 |
void ec_pdo_list_init(ec_pdo_list_t *); |
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
60 |
void ec_pdo_list_clear(ec_pdo_list_t *); |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
|
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
62 |
void ec_pdo_list_clear_pdos(ec_pdo_list_t *); |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
63 |
|
1055
2be8918682fa
Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents:
1051
diff
changeset
|
64 |
ec_pdo_t *ec_pdo_list_add_pdo(ec_pdo_list_t *, uint16_t); |
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
65 |
int ec_pdo_list_add_pdo_copy(ec_pdo_list_t *, const ec_pdo_t *); |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
66 |
|
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
67 |
int ec_pdo_list_copy(ec_pdo_list_t *, const ec_pdo_list_t *); |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
68 |
|
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
69 |
uint16_t ec_pdo_list_total_size(const ec_pdo_list_t *); |
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
70 |
int ec_pdo_list_equal(const ec_pdo_list_t *, const ec_pdo_list_t *); |
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
71 |
|
879
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
72 |
ec_pdo_t *ec_pdo_list_find_pdo(const ec_pdo_list_t *, uint16_t); |
9b395c5646ab
Changed terms "Pdo mapping" -> "Pdo assignment" and "Pdo configuration"
Florian Pose <fp@igh-essen.com>
parents:
844
diff
changeset
|
73 |
const ec_pdo_t *ec_pdo_list_find_pdo_const(const ec_pdo_list_t *, |
839
e0757d452fc9
Renamed ec_pdo_mapping_find_pdo() to ec_pdo_mapping_find_pdo_const().
Florian Pose <fp@igh-essen.com>
parents:
838
diff
changeset
|
74 |
uint16_t); |
932
dbcc06156a60
Added ec_pdo_list_find_by_pos_const().
Florian Pose <fp@igh-essen.com>
parents:
931
diff
changeset
|
75 |
const ec_pdo_t *ec_pdo_list_find_pdo_by_pos_const( |
dbcc06156a60
Added ec_pdo_list_find_by_pos_const().
Florian Pose <fp@igh-essen.com>
parents:
931
diff
changeset
|
76 |
const ec_pdo_list_t *, unsigned int); |
931 | 77 |
unsigned int ec_pdo_list_count(const ec_pdo_list_t *); |
799 | 78 |
|
1051 | 79 |
void ec_pdo_list_print(const ec_pdo_list_t *); |
80 |
||
792
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
81 |
/*****************************************************************************/ |
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
82 |
|
3778920f61e4
Implemented most realtime interface changes for version 1.4, improved
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
83 |
#endif |