master/datagram_pair.h
author Florian Pose <fp@igh-essen.com>
Thu, 15 Mar 2012 11:30:25 +0100
branchredundancy
changeset 2364 41ad0b0e55b0
parent 2269 1d0711235a61
child 2367 8527429b6137
permissions -rw-r--r--
Use 1.5 documentation/ethercat_doc.tex.
2269
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/******************************************************************************
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
 *  $Id$
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
 *  Copyright (C) 2006-2012  Florian Pose, Ingenieurgemeinschaft IgH
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it and/or
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
 *  modify it under the terms of the GNU General Public License version 2, as
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
 *  published by the Free Software Foundation.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
 *  The IgH EtherCAT Master is distributed in the hope that it will be useful,
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
 *  Public License for more details.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
 *  You should have received a copy of the GNU General Public License along
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
 *  with the IgH EtherCAT Master; if not, write to the Free Software
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
 *  ---
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
 *  The license mentioned above concerns the source code only. Using the
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
 *  EtherCAT technology and brand is only permitted in compliance with the
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
 *  industrial property and similar rights of Beckhoff Automation GmbH.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
 *
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
 *****************************************************************************/
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
/**
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
   \file
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
   EtherCAT datagram pair structure.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
*/
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
/*****************************************************************************/
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
#ifndef __EC_DATAGRAM_PAIR_H__
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
#define __EC_DATAGRAM_PAIR_H__
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
#include <linux/list.h>
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
#include "globals.h"
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
#include "datagram.h"
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
/*****************************************************************************/
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
/** Domain datagram pair.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
 */
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
typedef struct {
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
    struct list_head list; /**< List header. */
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
    ec_datagram_t datagrams[EC_NUM_DEVICES]; /**< Main and backup datagram.
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
                                               */
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
} ec_datagram_pair_t;
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    54
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
/*****************************************************************************/
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    56
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
void ec_datagram_pair_init(ec_datagram_pair_t *);
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
void ec_datagram_pair_clear(ec_datagram_pair_t *);
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    60
/*****************************************************************************/
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    61
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
#endif