IgH EtherCAT Master  1.5.2
fsm_slave_config.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  * Copyright (C) 2006-2008 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_CONFIG_H__
38 #define __EC_FSM_SLAVE_CONFIG_H__
39 
40 #include "globals.h"
41 #include "slave.h"
42 #include "datagram.h"
43 #include "fsm_change.h"
44 #include "fsm_coe.h"
45 #include "fsm_pdo.h"
46 
47 /*****************************************************************************/
48 
51 
55 {
64  unsigned int retries;
69  unsigned long last_diff_ms;
70  unsigned long jiffies_start;
71  unsigned int take_time;
72 };
73 
74 /*****************************************************************************/
75 
79 
82 
85 
86 /*****************************************************************************/
87 
88 #endif
Finite state machines for the Sercos over EtherCAT protocol.
Definition: fsm_soe.h:51
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:48
EtherCAT slave structure.
EtherCAT datagram.
Definition: datagram.h:88
EtherCAT PDO configuration state machine structures.
void ec_fsm_slave_config_clear(ec_fsm_slave_config_t *)
Destructor.
ec_sdo_request_t request_copy
Copied SDO request.
Global definitions and macros.
EtherCAT CoE state machines.
void ec_fsm_slave_config_quick_start(ec_fsm_slave_config_t *)
Start slave configuration state machine for "quick" SAFEOP->OP.
EtherCAT slave.
Definition: slave.h:214
ec_fsm_pdo_t * fsm_pdo
PDO configuration state machine.
ec_datagram_t * datagram
Datagram used in the state machine.
EtherCAT datagram structure.
ec_fsm_coe_t * fsm_coe
CoE state machine.
PDO configuration state machine.
Definition: fsm_pdo.h:54
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.
int ec_fsm_slave_config_exec(ec_fsm_slave_config_t *, ec_datagram_t *)
Executes the current state of the state machine.
void ec_fsm_slave_config_init(ec_fsm_slave_config_t *, ec_slave_t *, ec_fsm_change_t *, ec_fsm_coe_t *, ec_fsm_soe_t *, ec_fsm_pdo_t *)
Constructor.
ec_soe_request_t * soe_request
SDO request for SDO configuration.
unsigned long last_diff_ms
For sync reporting.
void(* state)(ec_fsm_slave_config_t *, ec_datagram_t *)
State function.
void ec_fsm_slave_config_start(ec_fsm_slave_config_t *)
Start slave configuration state machine.
EtherCAT state change FSM.
Definition: fsm_change.h:64
unsigned long jiffies_start
For timeout calculations.
Sercos-over-EtherCAT request.
Definition: soe_request.h:48
Finite state machines for the CANopen over EtherCAT protocol.
Definition: fsm_coe.h:52
unsigned int retries
Retries on datagram timeout.