IgH EtherCAT Master  1.5.2
pdo_list.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * $Id$
4 *
5 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
6 *
7 * This file is part of the IgH EtherCAT Master.
8 *
9 * The IgH EtherCAT Master is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License version 2, as
11 * published by the Free Software Foundation.
12 *
13 * The IgH EtherCAT Master is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16 * Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with the IgH EtherCAT Master; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 * ---
23 *
24 * The license mentioned above concerns the source code only. Using the
25 * EtherCAT technology and brand is only permitted in compliance with the
26 * industrial property and similar rights of Beckhoff Automation GmbH.
27 *
28 *****************************************************************************/
29
35/*****************************************************************************/
36
37#ifndef __EC_PDO_LIST_H__
38#define __EC_PDO_LIST_H__
39
40#include <linux/list.h>
41
42#include "globals.h"
43#include "pdo.h"
44
45/*****************************************************************************/
46
49typedef struct {
50 struct list_head list;
52
53/*****************************************************************************/
54
57
59
62
64
67
70 uint16_t);
72 const ec_pdo_list_t *, unsigned int);
73unsigned int ec_pdo_list_count(const ec_pdo_list_t *);
74
76
77/*****************************************************************************/
78
79#endif
Global definitions and macros.
EtherCAT Process data object structure.
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:141
unsigned int ec_pdo_list_count(const ec_pdo_list_t *)
Get the number of PDOs in the list.
Definition: pdo_list.c:311
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:117
void ec_pdo_list_clear_pdos(ec_pdo_list_t *)
Clears the list of mapped PDOs.
Definition: pdo_list.c:70
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:289
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:243
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:87
void ec_pdo_list_clear(ec_pdo_list_t *)
PDO list destructor.
Definition: pdo_list.c:61
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:265
int ec_pdo_list_equal(const ec_pdo_list_t *, const ec_pdo_list_t *)
Compares two PDO lists.
Definition: pdo_list.c:207
void ec_pdo_list_print(const ec_pdo_list_t *)
Outputs the PDOs in the list.
Definition: pdo_list.c:329
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:177
void ec_pdo_list_init(ec_pdo_list_t *)
PDO list constructor.
Definition: pdo_list.c:50
EtherCAT PDO list.
Definition: pdo_list.h:49
PDO description.
Definition: pdo.h:49