00001 /****************************************************************************** 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (C) 2008 Olav Zarges, imc Messsysteme GmbH 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_FOE_REQUEST_H__ 00038 #define __EC_FOE_REQUEST_H__ 00039 00040 #include <linux/list.h> 00041 00042 #include "../include/ecrt.h" 00043 00044 #include "globals.h" 00045 00046 /*****************************************************************************/ 00047 00050 typedef struct { 00051 struct list_head list; 00052 uint8_t *buffer; 00053 size_t buffer_size; 00054 size_t data_size; 00056 uint32_t issue_timeout; 00058 uint32_t response_timeout; 00060 ec_direction_t dir; 00063 ec_internal_request_state_t state; 00064 unsigned long jiffies_start; 00065 unsigned long jiffies_sent; 00067 uint8_t *file_name; 00068 uint32_t result; 00069 uint32_t error_code; 00070 } ec_foe_request_t; 00071 00072 /*****************************************************************************/ 00073 00074 void ec_foe_request_init(ec_foe_request_t *, uint8_t *file_name); 00075 void ec_foe_request_clear(ec_foe_request_t *); 00076 00077 int ec_foe_request_alloc(ec_foe_request_t *, size_t); 00078 int ec_foe_request_copy_data(ec_foe_request_t *, const uint8_t *, size_t); 00079 int ec_foe_request_timed_out(const ec_foe_request_t *); 00080 00081 void ec_foe_request_write(ec_foe_request_t *); 00082 void ec_foe_request_read(ec_foe_request_t *); 00083 00084 /*****************************************************************************/ 00085 00086 #endif
1.5.6