fp@2589: /****************************************************************************** fp@2589: * fp@2589: * $Id$ fp@2589: * fp@2589: * Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH fp@2589: * fp@2589: * This file is part of the IgH EtherCAT Master. fp@2589: * fp@2589: * The IgH EtherCAT Master is free software; you can redistribute it and/or fp@2589: * modify it under the terms of the GNU General Public License version 2, as fp@2589: * published by the Free Software Foundation. fp@2589: * fp@2589: * The IgH EtherCAT Master is distributed in the hope that it will be useful, fp@2589: * but WITHOUT ANY WARRANTY; without even the implied warranty of fp@2589: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General fp@2589: * Public License for more details. fp@2589: * fp@2589: * You should have received a copy of the GNU General Public License along fp@2589: * with the IgH EtherCAT Master; if not, write to the Free Software fp@2589: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@2589: * fp@2589: * --- fp@2589: * fp@2589: * The license mentioned above concerns the source code only. Using the fp@2589: * EtherCAT technology and brand is only permitted in compliance with the fp@2589: * industrial property and similar rights of Beckhoff Automation GmbH. fp@2589: * fp@2589: *****************************************************************************/ fp@2589: fp@2589: /** fp@2589: \file fp@2589: EtherCAT datagram pair structure. fp@2589: */ fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: #ifndef __EC_DATAGRAM_PAIR_H__ fp@2589: #define __EC_DATAGRAM_PAIR_H__ fp@2589: fp@2589: #include fp@2589: fp@2589: #include "globals.h" fp@2589: #include "datagram.h" fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: /** Domain datagram pair. fp@2589: */ fp@2589: typedef struct { fp@2589: struct list_head list; /**< List header. */ fp@2589: ec_domain_t *domain; /**< Parent domain. */ fp@2589: ec_datagram_t datagrams[EC_MAX_NUM_DEVICES]; /**< Datagrams. */ fp@2589: #if EC_MAX_NUM_DEVICES > 1 fp@2589: uint8_t *send_buffer; fp@2589: #endif fp@2589: unsigned int expected_working_counter; /**< Expectord working conter. */ fp@2589: } ec_datagram_pair_t; fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: int ec_datagram_pair_init(ec_datagram_pair_t *, ec_domain_t *, uint32_t, fp@2589: uint8_t *, size_t, const unsigned int []); fp@2589: void ec_datagram_pair_clear(ec_datagram_pair_t *); fp@2589: fp@2589: uint16_t ec_datagram_pair_process(ec_datagram_pair_t *, uint16_t[]); fp@2589: fp@2589: /*****************************************************************************/ fp@2589: fp@2589: #endif