IgH EtherCAT Master  1.6.2
datagram_pair.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2012 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_DATAGRAM_PAIR_H__
30 #define __EC_DATAGRAM_PAIR_H__
31 
32 #include <linux/list.h>
33 
34 #include "globals.h"
35 #include "datagram.h"
36 
37 /****************************************************************************/
38 
41 typedef struct {
42  struct list_head list;
44  ec_datagram_t datagrams[EC_MAX_NUM_DEVICES];
45 #if EC_MAX_NUM_DEVICES > 1
46  uint8_t *send_buffer;
47 #endif
48  unsigned int expected_working_counter;
50 
51 /****************************************************************************/
52 
54  uint8_t *, size_t, const unsigned int []);
56 
57 uint16_t ec_datagram_pair_process(ec_datagram_pair_t *, uint16_t[]);
58 
59 /****************************************************************************/
60 
61 #endif
Domain datagram pair.
Definition: datagram_pair.h:41
unsigned int expected_working_counter
Expectord working conter.
Definition: datagram_pair.h:48
EtherCAT datagram.
Definition: datagram.h:79
Global definitions and macros.
uint16_t ec_datagram_pair_process(ec_datagram_pair_t *, uint16_t[])
Process received data.
int ec_datagram_pair_init(ec_datagram_pair_t *, ec_domain_t *, uint32_t, uint8_t *, size_t, const unsigned int [])
Datagram pair constructor.
Definition: datagram_pair.c:40
EtherCAT datagram structure.
ec_domain_t * domain
Parent domain.
Definition: datagram_pair.h:43
void ec_datagram_pair_clear(ec_datagram_pair_t *)
Datagram pair destructor.
EtherCAT domain.
Definition: domain.h:46