IgH EtherCAT Master  1.5.2
fsm_reboot.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  * Copyright (C) 2014 Gavin Lambert
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_REBOOT_H__
38 #define __EC_FSM_REBOOT_H__
39 
40 #include "globals.h"
41 #include "datagram.h"
42 #include "master.h"
43 #include "slave.h"
44 
45 /*****************************************************************************/
46 
54 {
58  unsigned int retries;
59  unsigned long jiffies_timeout;
61  void (*state)(ec_fsm_reboot_t *);
62 };
63 
64 /*****************************************************************************/
65 
68 
71 
74 
75 /*****************************************************************************/
76 
77 #endif
ec_slave_t * slave
slave the FSM runs on, if "single"
Definition: fsm_reboot.h:56
void ec_fsm_reboot_single(ec_fsm_reboot_t *, ec_slave_t *)
Starts the reboot state machine for a single slave.
Definition: fsm_reboot.c:92
EtherCAT slave structure.
void(* state)(ec_fsm_reboot_t *)
slave reboot state function
Definition: fsm_reboot.h:61
ec_master_t * master
master the FSM runs on, if "all"
Definition: fsm_reboot.h:55
EtherCAT datagram.
Definition: datagram.h:88
void ec_fsm_reboot_all(ec_fsm_reboot_t *, ec_master_t *)
Starts the reboot state machine for all slaves on a master.
Definition: fsm_reboot.c:107
void ec_fsm_reboot_clear(ec_fsm_reboot_t *)
Destructor.
Definition: fsm_reboot.c:82
Global definitions and macros.
EtherCAT master structure.
EtherCAT slave.
Definition: slave.h:214
EtherCAT slave reboot FSM.
Definition: fsm_reboot.h:53
int ec_fsm_reboot_exec(ec_fsm_reboot_t *)
Executes the current state of the state machine.
Definition: fsm_reboot.c:123
unsigned int retries
retries upon datagram timeout
Definition: fsm_reboot.h:58
EtherCAT datagram structure.
int ec_fsm_reboot_success(ec_fsm_reboot_t *)
Returns, if the state machine terminated with success.
Definition: fsm_reboot.c:138
void ec_fsm_reboot_init(ec_fsm_reboot_t *, ec_datagram_t *)
Constructor.
Definition: fsm_reboot.c:68
unsigned long jiffies_timeout
pause timer
Definition: fsm_reboot.h:59
ec_datagram_t * datagram
datagram used in the state machine
Definition: fsm_reboot.h:57
EtherCAT master.
Definition: master.h:202