fp@627: /****************************************************************************** fp@627: * fp@627: * $Id$ fp@627: * fp@1326: * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH fp@627: * fp@627: * This file is part of the IgH EtherCAT Master. fp@627: * 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@627: * 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@627: * 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@627: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@627: * 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@627: * fp@627: *****************************************************************************/ fp@627: fp@627: /** fp@627: \file fp@627: EtherCAT Process data object structure. fp@627: */ fp@627: fp@627: /*****************************************************************************/ fp@627: fp@883: #ifndef __EC_PDO_H__ fp@883: #define __EC_PDO_H__ fp@627: fp@627: #include fp@627: fp@627: #include "globals.h" fp@933: #include "pdo_entry.h" fp@627: fp@627: /*****************************************************************************/ fp@627: fp@1327: /** PDO description. fp@627: */ fp@792: typedef struct { fp@792: struct list_head list; /**< List item. */ fp@1327: uint16_t index; /**< PDO index. */ fp@1055: int8_t sync_index; /**< Assigned sync manager. \todo remove? */ fp@1327: char *name; /**< PDO name. */ fp@1327: struct list_head entries; /**< List of PDO entries. */ fp@792: } ec_pdo_t; fp@627: fp@627: /*****************************************************************************/ fp@627: fp@627: void ec_pdo_init(ec_pdo_t *); fp@792: int ec_pdo_init_copy(ec_pdo_t *, const ec_pdo_t *); fp@627: void ec_pdo_clear(ec_pdo_t *); fp@842: void ec_pdo_clear_entries(ec_pdo_t *); fp@792: int ec_pdo_set_name(ec_pdo_t *, const char *); fp@842: ec_pdo_entry_t *ec_pdo_add_entry(ec_pdo_t *, uint16_t, uint8_t, uint8_t); fp@792: int ec_pdo_copy_entries(ec_pdo_t *, const ec_pdo_t *); fp@799: int ec_pdo_equal_entries(const ec_pdo_t *, const ec_pdo_t *); fp@934: unsigned int ec_pdo_entry_count(const ec_pdo_t *); fp@934: const ec_pdo_entry_t *ec_pdo_find_entry_by_pos_const( fp@934: const ec_pdo_t *, unsigned int); fp@792: fp@1823: void ec_pdo_print_entries(const ec_pdo_t *); fp@1823: fp@627: /*****************************************************************************/ fp@627: fp@627: #endif