master/ethernet.h
branchstable-1.0
changeset 1618 5cff10efb927
parent 195 674071846ee3
child 1619 0d4119024f55
equal deleted inserted replaced
1617:9f83a343ae75 1618:5cff10efb927
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
       
     3  *  e t h e r n e t . h
       
     4  *
       
     5  *  Ethernet-over-EtherCAT (EoE)
       
     6  *
     2  *
     7  *  $Id$
     3  *  $Id$
     8  *
     4  *
       
     5  *  Copyright (C) 2006  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
       
    10  *  and/or modify it under the terms of the GNU General Public License
       
    11  *  as published by the Free Software Foundation; version 2 of the License.
       
    12  *
       
    13  *  The IgH EtherCAT Master is distributed in the hope that it will be
       
    14  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    16  *  GNU General Public License for more details.
       
    17  *
       
    18  *  You should have received a copy of the GNU General Public License
       
    19  *  along 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  *
     9  *****************************************************************************/
    22  *****************************************************************************/
       
    23 
       
    24 /**
       
    25    \file
       
    26    Ethernet-over-EtherCAT (EoE)
       
    27 */
       
    28 
       
    29 /*****************************************************************************/
    10 
    30 
    11 #include <linux/list.h>
    31 #include <linux/list.h>
    12 
    32 
    13 #include "../include/ecrt.h"
    33 #include "../include/ecrt.h"
    14 #include "globals.h"
    34 #include "globals.h"
    15 #include "slave.h"
    35 #include "slave.h"
    16 #include "command.h"
    36 #include "command.h"
    17 
    37 
    18 /*****************************************************************************/
    38 /*****************************************************************************/
    19 
    39 
       
    40 /**
       
    41    State of an EoE object.
       
    42 */
       
    43 
    20 typedef enum
    44 typedef enum
    21 {
    45 {
    22     EC_EOE_IDLE,
    46     EC_EOE_IDLE,     /**< Idle. The next step ist to check for data. */
    23     EC_EOE_CHECKING,
    47     EC_EOE_CHECKING, /**< Checking frame was sent. */
    24     EC_EOE_FETCHING
    48     EC_EOE_FETCHING  /**< There is new data. Fetching frame was sent. */
    25 }
    49 }
    26 ec_eoe_state_t;
    50 ec_eoe_state_t;
    27 
    51 
    28 /*****************************************************************************/
    52 /*****************************************************************************/
    29 
    53 
       
    54 /**
       
    55    Ethernet-over-EtherCAT (EoE) Object.
       
    56    The master creates one of these objects for each slave that supports the
       
    57    EoE protocol.
       
    58 */
       
    59 
    30 typedef struct
    60 typedef struct
    31 {
    61 {
    32     struct list_head list;
    62     struct list_head list; /**< list item */
    33     ec_slave_t *slave;
    63     ec_slave_t *slave; /**< pointer to the corresponding slave */
    34     ec_eoe_state_t rx_state;
    64     ec_eoe_state_t rx_state; /**< state of the state machine */
    35 }
    65 }
    36 ec_eoe_t;
    66 ec_eoe_t;
    37 
    67 
    38 /*****************************************************************************/
    68 /*****************************************************************************/
    39 
    69