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
26
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
58
59/****************************************************************************/
60
65
66/****************************************************************************/
67
68#endif
EtherCAT datagram structure.
EtherCAT mailbox receive state machine.
struct ec_fsm_mbox ec_fsm_mbox_t
Definition fsm_mbox.h:47
Global definitions and macros.
ec_internal_request_state_t
Generic request state.
Definition globals.h:292
struct ec_voe_handler ec_voe_handler_t
Definition ecrt.h:333
ec_direction_t
Direction type for PDO assignment functions.
Definition ecrt.h:522
struct ec_slave_config ec_slave_config_t
Definition ecrt.h:321
EtherCAT datagram.
Definition datagram.h:81
Vendor specific over EtherCAT handler.
Definition voe_handler.h:42
ec_internal_request_state_t request_state
Handler state.
Definition voe_handler.h:53
void(*) state(ec_voe_handler_t *)
State function.
Definition voe_handler.h:52
ec_slave_config_t * config
Parent slave configuration.
Definition voe_handler.h:44
ec_datagram_t datagram
State machine datagram.
Definition voe_handler.h:45
uint32_t vendor_id
Vendor ID for the header.
Definition voe_handler.h:46
unsigned long jiffies_start
Timestamp for timeout calculation.
Definition voe_handler.h:55
ec_direction_t dir
Direction.
Definition voe_handler.h:49
size_t data_size
Size of VoE data.
Definition voe_handler.h:48
unsigned int retries
retries upon datagram timeout
Definition voe_handler.h:54
uint16_t vendor_type
Vendor type for the header.
Definition voe_handler.h:47
ec_fsm_mbox_t fsm_mbox
Mailbox receive state machine.
Definition voe_handler.h:56
struct list_head list
List item.
Definition voe_handler.h:43
void ec_voe_handler_clear(ec_voe_handler_t *voe)
VoE handler destructor.
Definition voe_handler.c:85
int ec_voe_handler_init(ec_voe_handler_t *voe, ec_slave_config_t *sc, size_t size)
VoE handler constructor.
Definition voe_handler.c:61
size_t ec_voe_handler_mem_size(const ec_voe_handler_t *voe)
Get usable memory size.
void ec_voe_handler_release_mbox_lock(ec_voe_handler_t *voe)
Releases the mailbox read lock, if the handler holds it.