IgH EtherCAT Master  1.7.0
voe_handler.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 
27 /****************************************************************************/
28 
29 #ifndef __EC_VOE_HANDLER_H__
30 #define __EC_VOE_HANDLER_H__
31 
32 #include <linux/list.h>
33 
34 #include "globals.h"
35 #include "datagram.h"
36 #include "fsm_mbox.h"
37 
38 /****************************************************************************/
39 
43  struct list_head list;
46  uint32_t vendor_id;
47  uint16_t vendor_type;
48  size_t data_size;
52  void (*state)(ec_voe_handler_t *);
54  unsigned int retries;
55  unsigned long jiffies_start;
57 };
58 
59 /****************************************************************************/
60 
65 
66 /****************************************************************************/
67 
68 #endif
EtherCAT mailbox receive state machine.
Definition: fsm_mbox.h:62
int ec_voe_handler_init(ec_voe_handler_t *, ec_slave_config_t *, size_t)
VoE handler constructor.
Definition: voe_handler.c:61
ec_datagram_t datagram
State machine datagram.
Definition: voe_handler.h:45
ec_fsm_mbox_t fsm_mbox
Mailbox receive state machine.
Definition: voe_handler.h:56
EtherCAT datagram.
Definition: datagram.h:81
uint16_t vendor_type
Vendor type for the header.
Definition: voe_handler.h:47
struct list_head list
List item.
Definition: voe_handler.h:43
Global definitions and macros.
uint32_t vendor_id
Vendor ID for the header.
Definition: voe_handler.h:46
ec_internal_request_state_t
Generic request state.
Definition: globals.h:292
void(* state)(ec_voe_handler_t *)
State function.
Definition: voe_handler.h:52
ec_internal_request_state_t request_state
Handler state.
Definition: voe_handler.h:53
size_t data_size
Size of VoE data.
Definition: voe_handler.h:48
EtherCAT mailbox receive state machine.
ec_direction_t
Direction type for PDO assignment functions.
Definition: ecrt.h:522
unsigned long jiffies_start
Timestamp for timeout calculation.
Definition: voe_handler.h:55
Vendor specific over EtherCAT handler.
Definition: voe_handler.h:42
size_t ec_voe_handler_mem_size(const ec_voe_handler_t *)
Get usable memory size.
Definition: voe_handler.c:119
EtherCAT datagram structure.
unsigned int retries
retries upon datagram timeout
Definition: voe_handler.h:54
ec_direction_t dir
Direction.
Definition: voe_handler.h:49
void ec_voe_handler_clear(ec_voe_handler_t *)
VoE handler destructor.
Definition: voe_handler.c:85
EtherCAT slave configuration.
Definition: slave_config.h:111
ec_slave_config_t * config
Parent slave configuration.
Definition: voe_handler.h:44
void ec_voe_handler_release_mbox_lock(ec_voe_handler_t *)
Releases the mailbox read lock, if the handler holds it.
Definition: voe_handler.c:101