fp@792: /****************************************************************************** fp@792: * fp@792: * $Id$ fp@792: * fp@1326: * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH fp@792: * fp@792: * This file is part of the IgH EtherCAT Master. fp@792: * fp@1326: * The IgH EtherCAT Master is free software; you can redistribute it and/or fp@1326: * modify it under the terms of the GNU General Public License version 2, as fp@1326: * published by the Free Software Foundation. fp@792: * fp@1326: * The IgH EtherCAT Master is distributed in the hope that it will be useful, fp@1326: * but WITHOUT ANY WARRANTY; without even the implied warranty of fp@1326: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General fp@1326: * Public License for more details. fp@792: * fp@1326: * You should have received a copy of the GNU General Public License along fp@1326: * with the IgH EtherCAT Master; if not, write to the Free Software fp@792: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@792: * fp@1363: * --- fp@1363: * fp@1363: * The license mentioned above concerns the source code only. Using the fp@1363: * EtherCAT technology and brand is only permitted in compliance with the fp@1363: * industrial property and similar rights of Beckhoff Automation GmbH. fp@792: * fp@792: *****************************************************************************/ fp@792: fp@792: /** fp@792: \file fp@1327: EtherCAT PDO list structure. fp@792: */ fp@792: fp@792: /*****************************************************************************/ fp@792: fp@883: #ifndef __EC_PDO_LIST_H__ fp@883: #define __EC_PDO_LIST_H__ fp@792: fp@792: #include fp@792: fp@792: #include "globals.h" fp@818: #include "pdo.h" fp@792: fp@792: /*****************************************************************************/ fp@792: fp@1327: /** EtherCAT PDO list. fp@792: */ fp@792: typedef struct { fp@1327: struct list_head list; /**< List of PDOs. */ fp@879: } ec_pdo_list_t; fp@792: fp@792: /*****************************************************************************/ fp@792: fp@879: void ec_pdo_list_init(ec_pdo_list_t *); fp@879: void ec_pdo_list_clear(ec_pdo_list_t *); fp@792: fp@879: void ec_pdo_list_clear_pdos(ec_pdo_list_t *); fp@792: fp@1055: ec_pdo_t *ec_pdo_list_add_pdo(ec_pdo_list_t *, uint16_t); fp@879: int ec_pdo_list_add_pdo_copy(ec_pdo_list_t *, const ec_pdo_t *); fp@792: fp@879: int ec_pdo_list_copy(ec_pdo_list_t *, const ec_pdo_list_t *); fp@792: fp@879: uint16_t ec_pdo_list_total_size(const ec_pdo_list_t *); fp@879: int ec_pdo_list_equal(const ec_pdo_list_t *, const ec_pdo_list_t *); fp@792: fp@879: ec_pdo_t *ec_pdo_list_find_pdo(const ec_pdo_list_t *, uint16_t); fp@879: const ec_pdo_t *ec_pdo_list_find_pdo_const(const ec_pdo_list_t *, fp@839: uint16_t); fp@932: const ec_pdo_t *ec_pdo_list_find_pdo_by_pos_const( fp@932: const ec_pdo_list_t *, unsigned int); fp@931: unsigned int ec_pdo_list_count(const ec_pdo_list_t *); fp@799: fp@1051: void ec_pdo_list_print(const ec_pdo_list_t *); fp@1051: fp@792: /*****************************************************************************/ fp@792: fp@792: #endif