IgH EtherCAT Master  1.6.9
fsm_change.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * Copyright (C) 2006-2008 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
26
27/****************************************************************************/
28
29#ifndef __EC_FSM_CHANGE_H__
30#define __EC_FSM_CHANGE_H__
31
32#include "globals.h"
33#include "datagram.h"
34#include "slave.h"
35
36/****************************************************************************/
37
41
47
48/****************************************************************************/
49
51
55
70
71/****************************************************************************/
72
75
78
81
82/****************************************************************************/
83
84#endif
EtherCAT datagram structure.
int ec_fsm_change_success(ec_fsm_change_t *)
Returns, if the state machine terminated with success.
Definition fsm_change.c:172
void ec_fsm_change_start(ec_fsm_change_t *, ec_slave_t *, ec_slave_state_t)
Starts the change state machine.
Definition fsm_change.c:123
int ec_fsm_change_exec(ec_fsm_change_t *)
Executes the current state of the state machine.
Definition fsm_change.c:157
struct ec_fsm_change ec_fsm_change_t
Definition fsm_change.h:50
void ec_fsm_change_ack(ec_fsm_change_t *, ec_slave_t *)
Starts the change state machine to only acknowlegde a slave's state.
Definition fsm_change.c:140
void ec_fsm_change_init(ec_fsm_change_t *, ec_datagram_t *)
Constructor.
Definition fsm_change.c:54
void ec_fsm_change_clear(ec_fsm_change_t *)
Destructor.
Definition fsm_change.c:69
ec_fsm_change_mode_t
Mode of the change state machine.
Definition fsm_change.h:42
@ EC_FSM_CHANGE_MODE_FULL
full state change
Definition fsm_change.h:43
@ EC_FSM_CHANGE_MODE_ACK_ONLY
only state acknowledgement
Definition fsm_change.h:44
Global definitions and macros.
ec_slave_state_t
State of an EtherCAT slave.
Definition globals.h:121
struct ec_slave ec_slave_t
Definition globals.h:310
EtherCAT slave structure.
EtherCAT datagram.
Definition datagram.h:79
EtherCAT state change FSM.
Definition fsm_change.h:57
unsigned int retries
retries upon datagram timeout
Definition fsm_change.h:60
ec_slave_state_t old_state
prior slave state
Definition fsm_change.h:65
ec_fsm_change_mode_t mode
full state change, or ack only.
Definition fsm_change.h:63
ec_slave_state_t requested_state
input: state
Definition fsm_change.h:64
uint8_t spontaneous_change
spontaneous state change detected
Definition fsm_change.h:68
uint8_t take_time
take sending timestamp
Definition fsm_change.h:67
unsigned long jiffies_start
change timer
Definition fsm_change.h:66
ec_datagram_t * datagram
datagram used in the state machine
Definition fsm_change.h:59
void(* state)(ec_fsm_change_t *)
slave state change state function
Definition fsm_change.h:62
ec_slave_t * slave
slave the FSM runs on
Definition fsm_change.h:58