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 "fsm_coe.h"
45#include "fsm_foe.h"
46#include "fsm_soe.h"
47
48/*****************************************************************************/
49
56 struct list_head list;
63 off_t foe_index;
69};
70
71/*****************************************************************************/
72
75
79
80/*****************************************************************************/
81
82
83#endif // __EC_FSM_SLAVE_H__
EtherCAT datagram structure.
EtherCAT CoE state machines.
EtherCAT FoE state machines.
void ec_fsm_slave_set_ready(ec_fsm_slave_t *)
Sets the current state of the state machine to READY.
Definition: fsm_slave.c:148
void ec_fsm_slave_clear(ec_fsm_slave_t *)
Destructor.
Definition: fsm_slave.c:85
void ec_fsm_slave_init(ec_fsm_slave_t *, ec_slave_t *)
Constructor.
Definition: fsm_slave.c:60
int ec_fsm_slave_exec(ec_fsm_slave_t *, ec_datagram_t *)
Executes the current state of the state machine.
Definition: fsm_slave.c:123
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:164
EtherCAT CoE state machines.
Global definitions and macros.
EtherCAT register request structure.
EtherCAT CANopen SDO request structure.
EtherCAT datagram.
Definition: datagram.h:87
FoE request.
Definition: foe_request.h:50
Finite state machines for the CANopen over EtherCAT protocol.
Definition: fsm_coe.h:52
Finite state machines for the CANopen-over-EtherCAT protocol.
Definition: fsm_foe.h:53
Finite state machine of an EtherCAT slave.
Definition: fsm_slave.h:54
ec_datagram_t * datagram
Previous state datagram.
Definition: fsm_slave.h:59
void(* state)(ec_fsm_slave_t *, ec_datagram_t *)
State function.
Definition: fsm_slave.h:58
ec_reg_request_t * reg_request
Register request to process.
Definition: fsm_slave.h:61
ec_foe_request_t * foe_request
FoE request to process.
Definition: fsm_slave.h:62
ec_sdo_request_t * sdo_request
SDO request to process.
Definition: fsm_slave.h:60
ec_fsm_soe_t fsm_soe
SoE state machine.
Definition: fsm_slave.h:68
ec_soe_request_t * soe_request
SoE request to process.
Definition: fsm_slave.h:64
ec_slave_t * slave
slave the FSM runs on
Definition: fsm_slave.h:55
off_t foe_index
Index to FoE write request data.
Definition: fsm_slave.h:63
ec_fsm_foe_t fsm_foe
FoE state machine.
Definition: fsm_slave.h:67
ec_fsm_coe_t fsm_coe
CoE state machine.
Definition: fsm_slave.h:66
struct list_head list
Used for execution list.
Definition: fsm_slave.h:56
Finite state machines for the Sercos over EtherCAT protocol.
Definition: fsm_soe.h:51
Register request.
Definition: reg_request.h:48
CANopen SDO request.
Definition: sdo_request.h:48
EtherCAT slave.
Definition: slave.h:177
Sercos-over-EtherCAT request.
Definition: soe_request.h:48