IgH EtherCAT Master  1.6.2
fsm_slave_config.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2024 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 
26 /****************************************************************************/
27 
28 #ifndef __EC_FSM_SLAVE_CONFIG_H__
29 #define __EC_FSM_SLAVE_CONFIG_H__
30 
31 #include "globals.h"
32 #include "slave.h"
33 #include "datagram.h"
34 #include "fsm_change.h"
35 #include "fsm_coe.h"
36 #include "fsm_pdo.h"
37 #include "fsm_eoe.h"
38 
39 /****************************************************************************/
40 
43 
47 {
57  unsigned int retries;
62  unsigned long jiffies_start;
63  unsigned int take_time;
64  unsigned long wait_ms;
65 };
66 
67 /****************************************************************************/
68 
71  ec_fsm_eoe_t *);
73 
75 
78 
79 /****************************************************************************/
80 
81 #endif
void ec_fsm_slave_config_start(ec_fsm_slave_config_t *, ec_slave_t *)
Start slave configuration state machine.
Finite state machines for the Sercos over EtherCAT protocol.
Definition: fsm_soe.h:43
int ec_fsm_slave_config_success(const ec_fsm_slave_config_t *)
ec_sdo_request_t * request
SDO request for SDO configuration.
EtherCAT state change FSM.
ec_fsm_change_t * fsm_change
State change state machine.
CANopen SDO request.
Definition: sdo_request.h:40
EtherCAT slave structure.
EtherCAT datagram.
Definition: datagram.h:79
EtherCAT PDO configuration state machine structures.
void ec_fsm_slave_config_clear(ec_fsm_slave_config_t *)
Destructor.
EtherCAT EoE set IP parameter state machines.
ec_fsm_eoe_t * fsm_eoe
EoE state machine.
ec_sdo_request_t request_copy
Copied SDO request.
void ec_fsm_slave_config_init(ec_fsm_slave_config_t *, ec_datagram_t *, ec_fsm_change_t *, ec_fsm_coe_t *, ec_fsm_soe_t *, ec_fsm_pdo_t *, ec_fsm_eoe_t *)
Constructor.
Global definitions and macros.
EtherCAT CoE state machines.
EtherCAT slave.
Definition: slave.h:168
ec_fsm_pdo_t * fsm_pdo
PDO configuration state machine.
ec_datagram_t * datagram
Datagram used in the state machine.
unsigned long wait_ms
Wait time (used to wait before SAFEOP).
void(* state)(ec_fsm_slave_config_t *)
State function.
int ec_fsm_slave_config_exec(ec_fsm_slave_config_t *)
Executes the current state of the state machine.
EtherCAT datagram structure.
ec_fsm_coe_t * fsm_coe
CoE state machine.
PDO configuration state machine.
Definition: fsm_pdo.h:46
ec_fsm_soe_t * fsm_soe
SoE state machine.
unsigned int take_time
Store jiffies after datagram reception.
Finite state machine to configure an EtherCAT slave.
ec_slave_t * slave
Slave the FSM runs on.
ec_soe_request_t soe_request_copy
Copied SDO request.
ec_soe_request_t * soe_request
SDO request for SDO configuration.
Sercos-over-EtherCAT request.
Definition: soe_request.h:40
EtherCAT state change FSM.
Definition: fsm_change.h:56
Finite state machines for the Ethernet over EtherCAT protocol.
Definition: fsm_eoe.h:43
unsigned long jiffies_start
For timeout calculations.
Finite state machines for the CANopen over EtherCAT protocol.
Definition: fsm_coe.h:44
unsigned int retries
Retries on datagram timeout.