IgH EtherCAT Master  1.5.3
fsm_pdo_entry.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 
34 /*****************************************************************************/
35 
36 #ifndef __EC_FSM_PDO_ENTRY_H__
37 #define __EC_FSM_PDO_ENTRY_H__
38 
39 #include "globals.h"
40 #include "datagram.h"
41 #include "fsm_coe.h"
42 
43 /*****************************************************************************/
44 
49 
53 {
62  const ec_pdo_t *cur_pdo;
64  unsigned int entry_count;
65  unsigned int entry_pos;
66 };
67 
68 /*****************************************************************************/
69 
72 
74  ec_pdo_t *);
76  const ec_pdo_t *, const ec_pdo_t *);
77 
80 
81 /*****************************************************************************/
82 
83 #endif
ec_pdo_t * target_pdo
PDO to read the mapping for.
Definition: fsm_pdo_entry.h:60
void(* state)(ec_fsm_pdo_entry_t *, ec_datagram_t *)
state function
Definition: fsm_pdo_entry.h:54
void ec_fsm_pdo_entry_init(ec_fsm_pdo_entry_t *, ec_fsm_coe_t *)
Constructor.
Definition: fsm_pdo_entry.c:68
unsigned int entry_pos
Position in PDO mapping.
Definition: fsm_pdo_entry.h:65
void ec_fsm_pdo_entry_clear(ec_fsm_pdo_entry_t *)
Destructor.
Definition: fsm_pdo_entry.c:81
CANopen SDO request.
Definition: sdo_request.h:46
int ec_fsm_pdo_entry_success(const ec_fsm_pdo_entry_t *)
Get execution result.
EtherCAT datagram.
Definition: datagram.h:87
const ec_pdo_entry_t * entry
Current entry.
Definition: fsm_pdo_entry.h:63
unsigned int entry_count
Number of entries.
Definition: fsm_pdo_entry.h:64
Global definitions and macros.
PDO entry description.
Definition: pdo_entry.h:48
const ec_pdo_t * source_pdo
PDO with desired mapping.
Definition: fsm_pdo_entry.h:61
EtherCAT CoE state machines.
EtherCAT slave.
Definition: slave.h:176
const ec_pdo_t * cur_pdo
PDO with current mapping (display only).
Definition: fsm_pdo_entry.h:62
ec_fsm_coe_t * fsm_coe
CoE state machine to use.
Definition: fsm_pdo_entry.h:56
PDO description.
Definition: pdo.h:49
EtherCAT datagram structure.
void ec_fsm_pdo_entry_start_configuration(ec_fsm_pdo_entry_t *, ec_slave_t *, const ec_pdo_t *, const ec_pdo_t *)
Start PDO mapping state machine.
void ec_fsm_pdo_entry_start_reading(ec_fsm_pdo_entry_t *, ec_slave_t *, ec_pdo_t *)
Start reading a PDO's entries.
int ec_fsm_pdo_entry_exec(ec_fsm_pdo_entry_t *, ec_datagram_t *)
Executes the current state.
ec_slave_t * slave
Slave the FSM runs on.
Definition: fsm_pdo_entry.h:59
PDO configuration state machine.
Definition: fsm_pdo_entry.h:52
Finite state machines for the CANopen over EtherCAT protocol.
Definition: fsm_coe.h:52
ec_sdo_request_t request
SDO request.
Definition: fsm_pdo_entry.h:57