IgH EtherCAT Master  1.6.2
fsm_slave.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
4  *
5  * This file is part of the IgH EtherCAT Master.
6  *
7  * The IgH EtherCAT Master is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License version 2, as
9  * published by the Free Software Foundation.
10  *
11  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with the IgH EtherCAT Master; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  ****************************************************************************/
21 
27 /****************************************************************************/
28 
29 #ifndef __EC_FSM_SLAVE_H__
30 #define __EC_FSM_SLAVE_H__
31 
32 #include "globals.h"
33 #include "datagram.h"
34 #include "sdo_request.h"
35 #include "reg_request.h"
36 #ifdef EC_EOE
37 #include "eoe_request.h"
38 #endif
39 #include "fsm_coe.h"
40 #include "fsm_foe.h"
41 #include "fsm_soe.h"
42 #ifdef EC_EOE
43 #include "fsm_eoe.h"
44 #endif
45 
46 /****************************************************************************/
47 
48 typedef struct ec_fsm_slave ec_fsm_slave_t;
52 struct ec_fsm_slave {
54  struct list_head list;
61  off_t foe_index;
63 #ifdef EC_EOE
65 #endif
66 
70 #ifdef EC_EOE
72 #endif
73 };
74 
75 /****************************************************************************/
76 
79 
83 
84 /****************************************************************************/
85 
86 
87 #endif // __EC_FSM_SLAVE_H__
Finite state machines for the Sercos over EtherCAT protocol.
Definition: fsm_soe.h:43
ec_foe_request_t * foe_request
FoE request to process.
Definition: fsm_slave.h:60
ec_reg_request_t * reg_request
Register request to process.
Definition: fsm_slave.h:59
CANopen SDO request.
Definition: sdo_request.h:40
Register request.
Definition: reg_request.h:40
EtherCAT datagram.
Definition: datagram.h:79
ec_fsm_soe_t fsm_soe
SoE state machine.
Definition: fsm_slave.h:69
Finite state machine of an EtherCAT slave.
Definition: fsm_slave.h:52
ec_datagram_t * datagram
Previous state datagram.
Definition: fsm_slave.h:57
ec_sdo_request_t * sdo_request
SDO request to process.
Definition: fsm_slave.h:58
EtherCAT EoE set IP parameter state machines.
Global definitions and macros.
EtherCAT CoE state machines.
EtherCAT slave.
Definition: slave.h:168
ec_eoe_request_t * eoe_request
SoE request to process.
Definition: fsm_slave.h:64
ec_slave_t * slave
slave the FSM runs on
Definition: fsm_slave.h:53
void ec_fsm_slave_set_ready(ec_fsm_slave_t *)
Sets the current state of the state machine to READY.
Definition: fsm_slave.c:160
off_t foe_index
Index to FoE write request data.
Definition: fsm_slave.h:61
EtherCAT CANopen SDO request structure.
void ec_fsm_slave_clear(ec_fsm_slave_t *)
Destructor.
Definition: fsm_slave.c:87
int ec_fsm_slave_exec(ec_fsm_slave_t *, ec_datagram_t *)
Executes the current state of the state machine.
Definition: fsm_slave.c:135
int ec_fsm_slave_is_ready(const ec_fsm_slave_t *)
Returns, if the FSM is currently not busy and ready to execute.
Definition: fsm_slave.c:176
ec_soe_request_t * soe_request
SoE request to process.
Definition: fsm_slave.h:62
ec_fsm_eoe_t fsm_eoe
EoE state machine.
Definition: fsm_slave.h:71
EtherCAT EoE request structure.
EtherCAT CoE state machines.
EtherCAT datagram structure.
Ethernet-over-EtherCAT set IP parameter request.
Definition: eoe_request.h:41
FoE request.
Definition: foe_request.h:42
EtherCAT register request structure.
struct list_head list
Used for execution list.
Definition: fsm_slave.h:54
ec_fsm_foe_t fsm_foe
FoE state machine.
Definition: fsm_slave.h:68
ec_fsm_coe_t fsm_coe
CoE state machine.
Definition: fsm_slave.h:67
void ec_fsm_slave_init(ec_fsm_slave_t *, ec_slave_t *)
Constructor.
Definition: fsm_slave.c:56
void(* state)(ec_fsm_slave_t *, ec_datagram_t *)
State function.
Definition: fsm_slave.h:56
EtherCAT FoE state machines.
Sercos-over-EtherCAT request.
Definition: soe_request.h:40
Finite state machines for the CANopen-over-EtherCAT protocol.
Definition: fsm_foe.h:45
Finite state machines for the Ethernet over EtherCAT protocol.
Definition: fsm_eoe.h:43
Finite state machines for the CANopen over EtherCAT protocol.
Definition: fsm_coe.h:44