IgH EtherCAT Master  1.6.9
fsm_sii.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_SII_H__
30#define __EC_FSM_SII_H__
31
32#include "globals.h"
33#include "datagram.h"
34#include "slave.h"
35
36/****************************************************************************/
37
44
45/****************************************************************************/
46
47typedef struct ec_fsm_sii ec_fsm_sii_t;
48
52
66
67/****************************************************************************/
68
71
73 uint16_t, ec_fsm_sii_addressing_t);
74void ec_fsm_sii_write(ec_fsm_sii_t *, ec_slave_t *, uint16_t,
75 const uint16_t *, ec_fsm_sii_addressing_t);
76
79
80/****************************************************************************/
81
82#endif
EtherCAT datagram structure.
void ec_fsm_sii_write(ec_fsm_sii_t *, ec_slave_t *, uint16_t, const uint16_t *, ec_fsm_sii_addressing_t)
Initializes the SII write state machine.
Definition fsm_sii.c:108
int ec_fsm_sii_success(ec_fsm_sii_t *)
Returns, if the master startup state machine terminated with success.
Definition fsm_sii.c:144
void ec_fsm_sii_read(ec_fsm_sii_t *, ec_slave_t *, uint16_t, ec_fsm_sii_addressing_t)
Initializes the SII read state machine.
Definition fsm_sii.c:90
struct ec_fsm_sii ec_fsm_sii_t
Definition fsm_sii.h:47
int ec_fsm_sii_exec(ec_fsm_sii_t *)
Executes the SII state machine.
Definition fsm_sii.c:129
void ec_fsm_sii_clear(ec_fsm_sii_t *)
Destructor.
Definition fsm_sii.c:80
void ec_fsm_sii_init(ec_fsm_sii_t *, ec_datagram_t *)
Constructor.
Definition fsm_sii.c:66
ec_fsm_sii_addressing_t
SII access addressing mode.
Definition fsm_sii.h:40
@ EC_FSM_SII_USE_CONFIGURED_ADDRESS
Use configured addresses.
Definition fsm_sii.h:42
@ EC_FSM_SII_USE_INCREMENT_ADDRESS
Use auto-increment addressing.
Definition fsm_sii.h:41
Global definitions and macros.
struct ec_slave ec_slave_t
Definition globals.h:310
EtherCAT slave structure.
EtherCAT datagram.
Definition datagram.h:79
Slave information interface FSM.
Definition fsm_sii.h:54
ec_datagram_t * datagram
datagram used in the state machine
Definition fsm_sii.h:56
unsigned int retries
retries upon datagram timeout
Definition fsm_sii.h:57
void(* state)(ec_fsm_sii_t *)
SII state function.
Definition fsm_sii.h:59
ec_slave_t * slave
slave the FSM runs on
Definition fsm_sii.h:55
uint8_t check_once_more
one more try after timeout
Definition fsm_sii.h:64
unsigned long jiffies_start
Start timestamp.
Definition fsm_sii.h:63
ec_fsm_sii_addressing_t mode
reading via APRD or NPRD
Definition fsm_sii.h:61
uint8_t value[4]
raw SII value (32bit)
Definition fsm_sii.h:62
uint16_t word_offset
input: word offset in SII
Definition fsm_sii.h:60