IgH EtherCAT Master
1.5.3
fsm_pdo.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
35
/*****************************************************************************/
36
37
#ifndef __EC_FSM_PDO_H__
38
#define __EC_FSM_PDO_H__
39
40
#include "
globals.h
"
41
#include "
datagram.h
"
42
#include "
fsm_coe.h
"
43
#include "
fsm_pdo_entry.h
"
44
45
/*****************************************************************************/
46
50
typedef
struct
ec_fsm_pdo
ec_fsm_pdo_t
;
51
54
struct
ec_fsm_pdo
55
{
56
void (*
state
)(
ec_fsm_pdo_t
*,
ec_datagram_t
*);
57
ec_fsm_coe_t
*
fsm_coe
;
58
ec_fsm_pdo_entry_t
fsm_pdo_entry
;
59
ec_pdo_list_t
pdos
;
60
ec_sdo_request_t
request
;
61
ec_pdo_t
slave_pdo
;
63
ec_slave_t
*
slave
;
64
uint8_t
sync_index
;
65
ec_sync_t
*
sync
;
66
ec_pdo_t
*
pdo
;
67
unsigned
int
pdo_pos
;
68
unsigned
int
pdo_count
;
69
};
70
71
/*****************************************************************************/
72
73
void
ec_fsm_pdo_init
(
ec_fsm_pdo_t
*,
ec_fsm_coe_t
*);
74
void
ec_fsm_pdo_clear
(
ec_fsm_pdo_t
*);
75
76
void
ec_fsm_pdo_start_reading
(
ec_fsm_pdo_t
*,
ec_slave_t
*);
77
void
ec_fsm_pdo_start_configuration
(
ec_fsm_pdo_t
*,
ec_slave_t
*);
78
79
int
ec_fsm_pdo_exec
(
ec_fsm_pdo_t
*,
ec_datagram_t
*);
80
int
ec_fsm_pdo_success
(
const
ec_fsm_pdo_t
*);
81
82
/*****************************************************************************/
83
84
#endif
ec_fsm_pdo::state
void(* state)(ec_fsm_pdo_t *, ec_datagram_t *)
State function.
Definition:
fsm_pdo.h:56
ec_pdo_list_t
EtherCAT PDO list.
Definition:
pdo_list.h:49
ec_fsm_pdo::request
ec_sdo_request_t request
SDO request.
Definition:
fsm_pdo.h:60
ec_fsm_pdo_success
int ec_fsm_pdo_success(const ec_fsm_pdo_t *)
Get execution result.
Definition:
fsm_pdo.c:180
ec_sdo_request
CANopen SDO request.
Definition:
sdo_request.h:46
ec_fsm_pdo::slave
ec_slave_t * slave
Slave the FSM runs on.
Definition:
fsm_pdo.h:63
ec_fsm_pdo::pdo
ec_pdo_t * pdo
Current PDO.
Definition:
fsm_pdo.h:66
ec_datagram_t
EtherCAT datagram.
Definition:
datagram.h:87
ec_fsm_pdo::fsm_coe
ec_fsm_coe_t * fsm_coe
CoE state machine to use.
Definition:
fsm_pdo.h:57
globals.h
Global definitions and macros.
fsm_coe.h
EtherCAT CoE state machines.
ec_slave
EtherCAT slave.
Definition:
slave.h:176
fsm_pdo_entry.h
EtherCAT PDO entry configuration state machine structures.
ec_fsm_pdo_init
void ec_fsm_pdo_init(ec_fsm_pdo_t *, ec_fsm_coe_t *)
Constructor.
Definition:
fsm_pdo.c:74
ec_pdo_t
PDO description.
Definition:
pdo.h:49
ec_sync_t
Sync manager.
Definition:
sync.h:47
ec_fsm_pdo_clear
void ec_fsm_pdo_clear(ec_fsm_pdo_t *)
Destructor.
Definition:
fsm_pdo.c:90
ec_fsm_pdo::sync_index
uint8_t sync_index
Current sync manager index.
Definition:
fsm_pdo.h:64
datagram.h
EtherCAT datagram structure.
ec_fsm_pdo
PDO configuration state machine.
Definition:
fsm_pdo.h:54
ec_fsm_pdo_exec
int ec_fsm_pdo_exec(ec_fsm_pdo_t *, ec_datagram_t *)
Executes the current state of the state machine.
Definition:
fsm_pdo.c:164
ec_fsm_pdo_start_reading
void ec_fsm_pdo_start_reading(ec_fsm_pdo_t *, ec_slave_t *)
Start reading the PDO configuration.
Definition:
fsm_pdo.c:119
ec_fsm_pdo::sync
ec_sync_t * sync
Current sync manager.
Definition:
fsm_pdo.h:65
ec_fsm_pdo::pdo_count
unsigned int pdo_count
Number of assigned PDOs.
Definition:
fsm_pdo.h:68
ec_fsm_pdo_entry
PDO configuration state machine.
Definition:
fsm_pdo_entry.h:52
ec_fsm_pdo::fsm_pdo_entry
ec_fsm_pdo_entry_t fsm_pdo_entry
PDO entry state machine.
Definition:
fsm_pdo.h:58
ec_fsm_pdo::pdos
ec_pdo_list_t pdos
PDO configuration.
Definition:
fsm_pdo.h:59
ec_fsm_pdo_start_configuration
void ec_fsm_pdo_start_configuration(ec_fsm_pdo_t *, ec_slave_t *)
Start writing the PDO configuration.
Definition:
fsm_pdo.c:132
ec_fsm_pdo::pdo_pos
unsigned int pdo_pos
Assignment position of current PDOs.
Definition:
fsm_pdo.h:67
ec_fsm_pdo::slave_pdo
ec_pdo_t slave_pdo
PDO actually appearing in a slave.
Definition:
fsm_pdo.h:61
ec_fsm_coe
Finite state machines for the CANopen over EtherCAT protocol.
Definition:
fsm_coe.h:52
Documentation automatically createt on Fri Jun 7 2024 11:28:45 by
. - IgH EtherCAT Master developed by
Ingenieurgemeinschaft IgH GmbH
. All rights reserved.