IgH EtherCAT Master  1.5.2
fsm_slave.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  * Copyright (C) 2006-2012 Florian Pose, Ingenieurgemeinschaft IgH
6  *
7  * This file is part of the IgH EtherCAT Master.
8  *
9  * The IgH EtherCAT Master is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License version 2, as
11  * published by the Free Software Foundation.
12  *
13  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with the IgH EtherCAT Master; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  * ---
23  *
24  * The license mentioned above concerns the source code only. Using the
25  * EtherCAT technology and brand is only permitted in compliance with the
26  * industrial property and similar rights of Beckhoff Automation GmbH.
27  *
28  *****************************************************************************/
29 
35 /*****************************************************************************/
36 
37 #ifndef __EC_FSM_SLAVE_H__
38 #define __EC_FSM_SLAVE_H__
39 
40 #include "globals.h"
41 #include "datagram.h"
42 #include "sdo_request.h"
43 #include "reg_request.h"
44 #include "eoe_request.h"
45 #include "mbox_gateway_request.h"
46 #include "dict_request.h"
47 #include "fsm_coe.h"
48 #include "fsm_foe.h"
49 #include "fsm_soe.h"
50 #ifdef EC_EOE
51 #include "fsm_eoe.h"
52 #endif
53 #include "fsm_mbox_gateway.h"
54 #include "fsm_slave_config.h"
55 #include "fsm_slave_scan.h"
56 
57 /*****************************************************************************/
58 
59 typedef struct ec_fsm_slave ec_fsm_slave_t;
63 struct ec_fsm_slave {
65  struct list_head list;
73  off_t foe_index;
75 #ifdef EC_EOE
77 #endif
84 #ifdef EC_EOE
86 #endif
92 };
93 
94 /*****************************************************************************/
95 
98 
103 
104 /*****************************************************************************/
105 
106 
107 #endif // __EC_FSM_SLAVE_H__
ec_fsm_change_t fsm_change
State change state machine.
Definition: fsm_slave.h:89
Finite state machines for the Sercos over EtherCAT protocol.
Definition: fsm_soe.h:51
int ec_fsm_slave_set_unready(ec_fsm_slave_t *)
Sets the current state of the state machine to IDLE.
Definition: fsm_slave.c:661
ec_dict_request_t * dict_request
Dictionary request to process.
Definition: fsm_slave.h:79
ec_foe_request_t * foe_request
FoE request to process.
Definition: fsm_slave.h:72
EtherCAT Mailbox Gateway request.
ec_reg_request_t * reg_request
Register request to process.
Definition: fsm_slave.h:71
CANopen SDO request.
Definition: sdo_request.h:48
Register request.
Definition: reg_request.h:48
EtherCAT datagram.
Definition: datagram.h:88
ec_fsm_soe_t fsm_soe
SoE state machine.
Definition: fsm_slave.h:83
Finite state machine of an EtherCAT slave.
Definition: fsm_slave.h:63
ec_datagram_t * datagram
Previous state datagram.
Definition: fsm_slave.h:69
ec_dict_request_t int_dict_request
Internal dictionary request.
Definition: fsm_slave.h:66
ec_sdo_request_t * sdo_request
SDO request to process.
Definition: fsm_slave.h:70
EtherCAT slave scanning state machine.
EtherCAT EoE set IP parameter state machines.
Global definitions and macros.
EtherCAT CoE state machines.
EtherCAT slave.
Definition: slave.h:214
ec_eoe_request_t * eoe_request
EoE request to process.
Definition: fsm_slave.h:76
ec_slave_t * slave
slave the FSM runs on
Definition: fsm_slave.h:64
void ec_fsm_slave_set_ready(ec_fsm_slave_t *)
Sets the current state of the state machine to READY.
Definition: fsm_slave.c:209
EtherCAT slave configuration state machine.
off_t foe_index
Index to FoE write request data.
Definition: fsm_slave.h:73
EtherCAT CANopen SDO request structure.
void ec_fsm_slave_clear(ec_fsm_slave_t *)
Destructor.
Definition: fsm_slave.c:116
int ec_fsm_slave_exec(ec_fsm_slave_t *, ec_datagram_t *)
Executes the current state of the state machine.
Definition: fsm_slave.c:183
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:681
ec_fsm_slave_config_t fsm_slave_config
slave config state machine.
Definition: fsm_slave.h:91
ec_soe_request_t * soe_request
SoE request to process.
Definition: fsm_slave.h:74
ec_fsm_eoe_t fsm_eoe
EoE state machine.
Definition: fsm_slave.h:85
EtherCAT EoE request structure.
Finite state machine for scanning an EtherCAT slave.
Finite state machines for the CANopen over EtherCAT protocol.
EtherCAT CoE state machines.
EtherCAT datagram structure.
EtherCAT CANopen dictionary request structure.
CANopen dictionary request.
Definition: dict_request.h:48
PDO configuration state machine.
Definition: fsm_pdo.h:54
EtherCAT Mailbox Gateway request structure.
Ethernet-over-EtherCAT set IP parameter request.
Definition: eoe_request.h:49
ec_fsm_mbg_t fsm_mbg
MBox Gateway state machine.
Definition: fsm_slave.h:87
EtherCAT Mailbox Gateway state machine.
Finite state machine to configure an EtherCAT slave.
EtherCAT register request structure.
struct list_head list
Used for execution list.
Definition: fsm_slave.h:65
ec_fsm_slave_scan_t fsm_slave_scan
slave scan state machine
Definition: fsm_slave.h:90
ec_fsm_pdo_t fsm_pdo
PDO configuration state machine.
Definition: fsm_slave.h:88
ec_mbg_request_t * mbg_request
MBox Gateway request to process.
Definition: fsm_slave.h:78
ec_fsm_foe_t fsm_foe
FoE state machine.
Definition: fsm_slave.h:82
ec_fsm_coe_t fsm_coe
CoE state machine.
Definition: fsm_slave.h:81
void ec_fsm_slave_init(ec_fsm_slave_t *, ec_slave_t *)
Constructor.
Definition: fsm_slave.c:74
FoE request.
Definition: foe_request.h:50
void(* state)(ec_fsm_slave_t *, ec_datagram_t *)
State function.
Definition: fsm_slave.h:68
EtherCAT FoE state machines.
EtherCAT state change FSM.
Definition: fsm_change.h:64
Finite state machines for the CANopen-over-EtherCAT protocol.
Definition: fsm_foe.h:53
Finite state machines for the Ethernet over EtherCAT protocol.
Definition: fsm_eoe.h:51
Sercos-over-EtherCAT request.
Definition: soe_request.h:48
Finite state machines for the CANopen over EtherCAT protocol.
Definition: fsm_coe.h:52