lib/sdo_request.h
author Martin Troxler <ch1010277@ch10pc446>
Mon, 22 Nov 2010 09:09:23 +0100
changeset 2000 c76c01572f00
parent 1959 656f114153c2
child 2421 bc2d4bf9cbe5
permissions -rw-r--r--
Idle thread considers fsm step prepared by Op-thread (Otherwise some state changes may get lost)
1352
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
/******************************************************************************
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
 *  
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
 *  $Id$
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
 * 
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
 *  Copyright (C) 2006-2009  Florian Pose, Ingenieurgemeinschaft IgH
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
 *  
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
 *  This file is part of the IgH EtherCAT master userspace library.
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
 *  
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
 *  The IgH EtherCAT master userspace library is free software; you can
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
 *  redistribute it and/or modify it under the terms of the GNU Lesser General
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
 *  Public License as published by the Free Software Foundation; version 2.1
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
 *  of the License.
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
 *
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
 *  The IgH EtherCAT master userspace library is distributed in the hope that
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
 *  it will be useful, but WITHOUT ANY WARRANTY; without even the implied
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
 *  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
 *  GNU Lesser General Public License for more details.
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
 *
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
 *  You should have received a copy of the GNU Lesser General Public License
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
 *  along with the IgH EtherCAT master userspace library. If not, see
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
 *  <http://www.gnu.org/licenses/>.
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
 *  
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1352
diff changeset
    23
 *  ---
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1352
diff changeset
    24
 *  
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1352
diff changeset
    25
 *  The license mentioned above concerns the source code only. Using the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1352
diff changeset
    26
 *  EtherCAT technology and brand is only permitted in compliance with the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1352
diff changeset
    27
 *  industrial property and similar rights of Beckhoff Automation GmbH.
1352
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
 *
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
 *****************************************************************************/
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
#include "include/ecrt.h"
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
/*****************************************************************************/
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
struct ec_sdo_request {
1959
656f114153c2 Free all userspace library objects on releasing master.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    36
    ec_sdo_request_t *next; /**< List header. */
1352
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
    ec_slave_config_t *config; /**< Parent slave configuration. */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
    unsigned int index; /**< Request index (identifier). */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
    uint16_t sdo_index; /**< SDO index. */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
    uint8_t sdo_subindex; /**< SDO subindex. */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
    uint8_t *data; /**< Pointer to SDO data. */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
    size_t mem_size; /**< Size of SDO data memory. */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
    size_t data_size; /**< Size of SDO data. */
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
};
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
275d2fdeab48 Implemented SDO requests in userspace library.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
/*****************************************************************************/
1959
656f114153c2 Free all userspace library objects on releasing master.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    47
656f114153c2 Free all userspace library objects on releasing master.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    48
void ec_sdo_request_clear(ec_sdo_request_t *);
656f114153c2 Free all userspace library objects on releasing master.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    49
656f114153c2 Free all userspace library objects on releasing master.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    50
/*****************************************************************************/