00001 /****************************************************************************** 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH 00006 * 00007 * This file is part of the IgH EtherCAT Master. 00008 * 00009 * The IgH EtherCAT Master is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License version 2, as 00011 * published by the Free Software Foundation. 00012 * 00013 * The IgH EtherCAT Master is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 00016 * Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License along 00019 * with the IgH EtherCAT Master; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 * --- 00023 * 00024 * The license mentioned above concerns the source code only. Using the 00025 * EtherCAT technology and brand is only permitted in compliance with the 00026 * industrial property and similar rights of Beckhoff Automation GmbH. 00027 * 00028 *****************************************************************************/ 00029 00035 /*****************************************************************************/ 00036 00037 #ifndef __EC_DOMAIN_H__ 00038 #define __EC_DOMAIN_H__ 00039 00040 #include <linux/list.h> 00041 00042 #include "globals.h" 00043 #include "datagram.h" 00044 #include "master.h" 00045 #include "fmmu_config.h" 00046 00047 /*****************************************************************************/ 00048 00054 struct ec_domain 00055 { 00056 struct list_head list; 00057 ec_master_t *master; 00058 unsigned int index; 00060 struct list_head fmmu_configs; 00061 size_t data_size; 00062 uint8_t *data; 00063 ec_origin_t data_origin; 00064 uint32_t logical_base_address; 00066 struct list_head datagram_pairs; 00068 uint16_t working_counter[EC_MAX_NUM_DEVICES]; 00070 uint16_t expected_working_counter; 00071 unsigned int working_counter_changes; 00073 unsigned int redundancy_active; 00074 unsigned long notify_jiffies; 00075 }; 00076 00077 /*****************************************************************************/ 00078 00079 void ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int); 00080 void ec_domain_clear(ec_domain_t *); 00081 00082 void ec_domain_add_fmmu_config(ec_domain_t *, ec_fmmu_config_t *); 00083 int ec_domain_finish(ec_domain_t *, uint32_t); 00084 00085 unsigned int ec_domain_fmmu_count(const ec_domain_t *); 00086 const ec_fmmu_config_t *ec_domain_find_fmmu(const ec_domain_t *, unsigned int); 00087 00088 /*****************************************************************************/ 00089 00090 #endif
1.5.6