fp@665: /****************************************************************************** fp@665: * fp@665: * $Id$ fp@665: * fp@665: * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@665: * fp@665: * This file is part of the IgH EtherCAT Master. fp@665: * fp@665: * The IgH EtherCAT Master is free software; you can redistribute it fp@665: * and/or modify it under the terms of the GNU General Public License fp@665: * as published by the Free Software Foundation; either version 2 of the fp@665: * License, or (at your option) any later version. fp@665: * fp@665: * The IgH EtherCAT Master is distributed in the hope that it will be fp@665: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@665: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@665: * GNU General Public License for more details. fp@665: * fp@665: * You should have received a copy of the GNU General Public License fp@665: * along with the IgH EtherCAT Master; if not, write to the Free Software fp@665: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@665: * fp@665: * The right to use EtherCAT Technology is granted and comes free of fp@665: * charge under condition of compatibility of product made by fp@665: * Licensee. People intending to distribute/sell products based on the fp@665: * code, have to sign an agreement to guarantee that products using fp@665: * software based on IgH EtherCAT master stay compatible with the actual fp@665: * EtherCAT specification (which are released themselves as an open fp@665: * standard) as the (only) precondition to have the right to use EtherCAT fp@665: * Technology, IP and trade marks. fp@665: * fp@665: *****************************************************************************/ fp@665: fp@665: /** fp@665: \file fp@665: EtherCAT DUMMY domain methods. fp@665: */ fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: #include "../master/globals.h" fp@665: #include "../master/domain.h" fp@665: #include "../master/master.h" fp@665: fp@666: uint8_t *get_dummy_data(void); fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** \cond */ fp@665: fp@665: int ecrt_domain_register_pdo( fp@665: ec_domain_t *domain, /**< EtherCAT domain */ fp@665: ec_slave_t *slave, /**< EtherCAT slave */ fp@665: uint16_t pdo_entry_index, /**< PDO entry index */ fp@665: uint8_t pdo_entry_subindex, /**< PDO entry subindex */ fp@665: void **data_ptr /**< address of the process data pointer */ fp@665: ) fp@665: { fp@666: *data_ptr = get_dummy_data(); fp@665: return 0; fp@665: } fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** fp@665: * Registers a bunch of data fields. fp@665: * \attention The list has to be terminated with a NULL structure ({})! fp@665: * \return 0 in case of success, else < 0 fp@665: * \ingroup RealtimeInterface fp@665: */ fp@665: fp@665: int ecrt_domain_register_pdo_list( fp@665: ec_domain_t *domain, /**< EtherCAT domain */ fp@665: const ec_pdo_reg_t *pdo_regs /**< array of PDO registrations */ fp@665: ) fp@665: { fp@665: const ec_pdo_reg_t *reg; fp@665: fp@665: for (reg = pdo_regs; reg->slave_address; reg++) { fp@666: *(reg->data_ptr) = get_dummy_data(); fp@665: } fp@665: fp@665: return 0; fp@665: } fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** fp@665: * Registers a PDO range in a domain. fp@665: * \return 0 on success, else non-zero fp@665: * \ingroup RealtimeInterface fp@665: */ fp@665: fp@665: int ecrt_domain_register_pdo_range( fp@665: ec_domain_t *domain, /**< EtherCAT domain */ fp@665: ec_slave_t *slave, /**< EtherCAT slave */ fp@665: ec_direction_t dir, /**< data direction */ fp@665: uint16_t offset, /**< offset in slave's PDO range */ fp@665: uint16_t length, /**< length of this range */ fp@665: void **data_ptr /**< address of the process data pointer */ fp@665: ) fp@665: { fp@666: *data_ptr = get_dummy_data(); fp@665: return 0; fp@665: } fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** fp@665: Processes received process data and requeues the domain datagram(s). fp@665: \ingroup RealtimeInterface fp@665: */ fp@665: fp@665: void ecrt_domain_process(ec_domain_t *domain /**< EtherCAT domain */) fp@665: { fp@665: } fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** fp@665: Places all process data datagrams in the masters datagram queue. fp@665: \ingroup RealtimeInterface fp@665: */ fp@665: fp@665: void ecrt_domain_queue(ec_domain_t *domain /**< EtherCAT domain */) fp@665: { fp@665: } fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** fp@665: Returns the state of a domain. fp@665: \return 0 if all datagrams were received, else -1. fp@665: \ingroup RealtimeInterface fp@665: */ fp@665: fp@665: int ecrt_domain_state(const ec_domain_t *domain /**< EtherCAT domain */) fp@665: { fp@665: return 0; fp@665: } fp@665: fp@665: /*****************************************************************************/ fp@665: fp@665: /** \cond */ fp@665: fp@665: EXPORT_SYMBOL(ecrt_domain_register_pdo); fp@665: EXPORT_SYMBOL(ecrt_domain_register_pdo_list); fp@665: EXPORT_SYMBOL(ecrt_domain_register_pdo_range); fp@665: EXPORT_SYMBOL(ecrt_domain_process); fp@665: EXPORT_SYMBOL(ecrt_domain_queue); fp@665: EXPORT_SYMBOL(ecrt_domain_state); fp@665: fp@665: /** \endcond */ fp@665: fp@665: /*****************************************************************************/