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