dummy/slave.c
author Florian Pose <fp@igh-essen.com>
Mon, 17 Sep 2007 10:24:30 +0000
changeset 726 5e230b4fe1a0
parent 665 a9794f927d78
permissions -rw-r--r--
Version 1.3.2-pre.
665
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/******************************************************************************
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
 *  $Id$
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
 *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
 *  This file is part of the IgH EtherCAT Master.
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
 *  The IgH EtherCAT Master is free software; you can redistribute it
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
 *  and/or modify it under the terms of the GNU General Public License
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
 *  as published by the Free Software Foundation; either version 2 of the
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
 *  License, or (at your option) any later version.
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
 *  The IgH EtherCAT Master is distributed in the hope that it will be
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
 *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
 *  GNU General Public License for more details.
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
 *  You should have received a copy of the GNU General Public License
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
 *  along with the IgH EtherCAT Master; if not, write to the Free Software
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
 *  The right to use EtherCAT Technology is granted and comes free of
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
 *  charge under condition of compatibility of product made by
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
 *  Licensee. People intending to distribute/sell products based on the
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
 *  code, have to sign an agreement to guarantee that products using
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
 *  software based on IgH EtherCAT master stay compatible with the actual
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
 *  EtherCAT specification (which are released themselves as an open
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
 *  standard) as the (only) precondition to have the right to use EtherCAT
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
 *  Technology, IP and trade marks.
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
 *
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
 *****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
/**
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
   \file
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
   EtherCAT DUMMY slave methods.
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
*/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
#include "../include/ecrt.h"
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
#include "../master/master.h"
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
#include "../master/slave.h"
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
/** \cond */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
int ecrt_slave_conf_sdo8(ec_slave_t *slave, /**< EtherCAT slave */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
                         uint16_t sdo_index, /**< SDO index */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
                         uint8_t sdo_subindex, /**< SDO subindex */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
                         uint8_t value /**< new SDO value */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
                         )
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    54
{
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
    return 0;
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    56
}
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    60
/**
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    61
   \return 0 in case of success, else < 0
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
   \ingroup RealtimeInterface
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    63
*/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    64
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    65
int ecrt_slave_conf_sdo16(ec_slave_t *slave, /**< EtherCAT slave */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    66
                          uint16_t sdo_index, /**< SDO index */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    67
                          uint8_t sdo_subindex, /**< SDO subindex */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    68
                          uint16_t value /**< new SDO value */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    69
                          )
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    70
{
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    71
    return 0;
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    72
}
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    74
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    76
/**
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    77
   \return 0 in case of success, else < 0
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    78
   \ingroup RealtimeInterface
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    79
*/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    81
int ecrt_slave_conf_sdo32(ec_slave_t *slave, /**< EtherCAT slave */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    82
                          uint16_t sdo_index, /**< SDO index */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    83
                          uint8_t sdo_subindex, /**< SDO subindex */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    84
                          uint32_t value /**< new SDO value */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    85
                          )
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    86
{
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    87
    return 0;
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    88
}
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    89
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    90
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    91
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    92
void ecrt_slave_pdo_mapping_clear(
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    93
        ec_slave_t *slave, /**< EtherCAT slave */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    94
        ec_direction_t dir /**< output/input */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    95
        )
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    96
{
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    97
}
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    98
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    99
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   100
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   101
int ecrt_slave_pdo_mapping_add(
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   102
        ec_slave_t *slave, /**< EtherCAT slave */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   103
        ec_direction_t dir, /**< input/output */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   104
        uint16_t pdo_index /**< Index of PDO mapping list */)
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   105
{
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   106
    return 0;
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   107
}
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   108
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   109
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   110
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   111
int ecrt_slave_pdo_mapping(ec_slave_t *slave, /**< EtherCAT slave */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   112
        ec_direction_t dir, /**< input/output */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   113
        unsigned int num_args, /**< Number of following arguments */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   114
        ... /**< PDO indices to map */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   115
        )
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   116
{
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   117
    return 0;
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   118
}
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   119
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   120
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   121
/*****************************************************************************/
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   122
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   123
/** \cond */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   124
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   125
EXPORT_SYMBOL(ecrt_slave_conf_sdo8);
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   126
EXPORT_SYMBOL(ecrt_slave_conf_sdo16);
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   127
EXPORT_SYMBOL(ecrt_slave_conf_sdo32);
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   128
EXPORT_SYMBOL(ecrt_slave_pdo_mapping_clear);
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   129
EXPORT_SYMBOL(ecrt_slave_pdo_mapping_add);
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   130
EXPORT_SYMBOL(ecrt_slave_pdo_mapping);
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   131
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   132
/** \endcond */
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   133
a9794f927d78 Added dummy module for simulation purposes.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   134
/*****************************************************************************/