00001 /****************************************************************************** 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (C) 2006-2012 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_FSM_SLAVE_H__ 00038 #define __EC_FSM_SLAVE_H__ 00039 00040 #include "globals.h" 00041 #include "datagram.h" 00042 #include "sdo_request.h" 00043 #include "reg_request.h" 00044 #include "fsm_coe.h" 00045 #include "fsm_foe.h" 00046 #include "fsm_soe.h" 00047 00048 /*****************************************************************************/ 00049 00050 typedef struct ec_fsm_slave ec_fsm_slave_t; 00054 struct ec_fsm_slave { 00055 ec_slave_t *slave; 00056 struct list_head list; 00058 void (*state)(ec_fsm_slave_t *, ec_datagram_t *); 00059 ec_datagram_t *datagram; 00060 ec_sdo_request_t *sdo_request; 00061 ec_reg_request_t *reg_request; 00062 ec_foe_request_t *foe_request; 00063 off_t foe_index; 00064 ec_soe_request_t *soe_request; 00066 ec_fsm_coe_t fsm_coe; 00067 ec_fsm_foe_t fsm_foe; 00068 ec_fsm_soe_t fsm_soe; 00069 }; 00070 00071 /*****************************************************************************/ 00072 00073 void ec_fsm_slave_init(ec_fsm_slave_t *, ec_slave_t *); 00074 void ec_fsm_slave_clear(ec_fsm_slave_t *); 00075 00076 int ec_fsm_slave_exec(ec_fsm_slave_t *, ec_datagram_t *); 00077 void ec_fsm_slave_set_ready(ec_fsm_slave_t *); 00078 int ec_fsm_slave_is_ready(const ec_fsm_slave_t *); 00079 00080 /*****************************************************************************/ 00081 00082 00083 #endif // __EC_FSM_SLAVE_H__
1.5.6