fp@792: /******************************************************************************
fp@792:  *
fp@792:  *  $Id$
fp@792:  *
fp@792:  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
fp@792:  *
fp@792:  *  This file is part of the IgH EtherCAT Master.
fp@792:  *
fp@792:  *  The IgH EtherCAT Master is free software; you can redistribute it
fp@792:  *  and/or modify it under the terms of the GNU General Public License
fp@792:  *  as published by the Free Software Foundation; either version 2 of the
fp@792:  *  License, or (at your option) any later version.
fp@792:  *
fp@792:  *  The IgH EtherCAT Master is distributed in the hope that it will be
fp@792:  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
fp@792:  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
fp@792:  *  GNU General Public License for more details.
fp@792:  *
fp@792:  *  You should have received a copy of the GNU General Public License
fp@792:  *  along 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@792:  *  The right to use EtherCAT Technology is granted and comes free of
fp@792:  *  charge under condition of compatibility of product made by
fp@792:  *  Licensee. People intending to distribute/sell products based on the
fp@792:  *  code, have to sign an agreement to guarantee that products using
fp@792:  *  software based on IgH EtherCAT master stay compatible with the actual
fp@792:  *  EtherCAT specification (which are released themselves as an open
fp@792:  *  standard) as the (only) precondition to have the right to use EtherCAT
fp@792:  *  Technology, IP and trade marks.
fp@792:  *
fp@792:  *****************************************************************************/
fp@792: 
fp@792: /**
fp@792:    \file
fp@879:    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 <linux/list.h>
fp@792: 
fp@792: #include "globals.h"
fp@818: #include "pdo.h"
fp@792: 
fp@792: /*****************************************************************************/
fp@792: 
fp@879: /** EtherCAT Pdo list.
fp@792:  */
fp@792: typedef struct {
fp@879:     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