IgH EtherCAT Master  1.6.2
pdo_list.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4  *
5  * This file is part of the IgH EtherCAT Master.
6  *
7  * The IgH EtherCAT Master is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License version 2, as
9  * published by the Free Software Foundation.
10  *
11  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with the IgH EtherCAT Master; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  ****************************************************************************/
21 
27 /****************************************************************************/
28 
29 #ifndef __EC_PDO_LIST_H__
30 #define __EC_PDO_LIST_H__
31 
32 #include <linux/list.h>
33 
34 #include "globals.h"
35 #include "pdo.h"
36 
37 /****************************************************************************/
38 
41 typedef struct {
42  struct list_head list;
44 
45 /****************************************************************************/
46 
49 
51 
54 
56 
57 uint16_t ec_pdo_list_total_size(const ec_pdo_list_t *);
58 int ec_pdo_list_equal(const ec_pdo_list_t *, const ec_pdo_list_t *);
59 
60 ec_pdo_t *ec_pdo_list_find_pdo(const ec_pdo_list_t *, uint16_t);
62  uint16_t);
64  const ec_pdo_list_t *, unsigned int);
65 unsigned int ec_pdo_list_count(const ec_pdo_list_t *);
66 
67 void ec_pdo_list_print(const ec_pdo_list_t *);
68 
69 /****************************************************************************/
70 
71 #endif
EtherCAT PDO list.
Definition: pdo_list.h:41
void ec_pdo_list_init(ec_pdo_list_t *)
PDO list constructor.
Definition: pdo_list.c:42
unsigned int ec_pdo_list_count(const ec_pdo_list_t *)
Get the number of PDOs in the list.
Definition: pdo_list.c:303
void ec_pdo_list_clear(ec_pdo_list_t *)
PDO list destructor.
Definition: pdo_list.c:53
ec_pdo_t * ec_pdo_list_add_pdo(ec_pdo_list_t *, uint16_t)
Add a new PDO to the list.
Definition: pdo_list.c:109
void ec_pdo_list_clear_pdos(ec_pdo_list_t *)
Clears the list of mapped PDOs.
Definition: pdo_list.c:62
Global definitions and macros.
PDO description.
Definition: pdo.h:41
void ec_pdo_list_print(const ec_pdo_list_t *)
Outputs the PDOs in the list.
Definition: pdo_list.c:321
int ec_pdo_list_add_pdo_copy(ec_pdo_list_t *, const ec_pdo_t *)
Add the copy of an existing PDO to the list.
Definition: pdo_list.c:133
int ec_pdo_list_copy(ec_pdo_list_t *, const ec_pdo_list_t *)
Makes a deep copy of another PDO list.
Definition: pdo_list.c:169
const ec_pdo_t * ec_pdo_list_find_pdo_const(const ec_pdo_list_t *, uint16_t)
Finds a PDO with the given index and returns a const pointer.
Definition: pdo_list.c:257
uint16_t ec_pdo_list_total_size(const ec_pdo_list_t *)
Calculates the total size of the mapped PDO entries.
Definition: pdo_list.c:79
ec_pdo_t * ec_pdo_list_find_pdo(const ec_pdo_list_t *, uint16_t)
Finds a PDO with the given index.
Definition: pdo_list.c:235
const ec_pdo_t * ec_pdo_list_find_pdo_by_pos_const(const ec_pdo_list_t *, unsigned int)
Finds a PDO via its position in the list.
Definition: pdo_list.c:281
int ec_pdo_list_equal(const ec_pdo_list_t *, const ec_pdo_list_t *)
Compares two PDO lists.
Definition: pdo_list.c:199
EtherCAT Process data object structure.