fp@627: /****************************************************************************** fp@627: * fp@627: * $Id$ fp@627: * fp@627: * Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@627: * fp@627: * This file is part of the IgH EtherCAT Master. fp@627: * fp@627: * The IgH EtherCAT Master is free software; you can redistribute it fp@627: * and/or modify it under the terms of the GNU General Public License fp@627: * as published by the Free Software Foundation; either version 2 of the fp@627: * License, or (at your option) any later version. fp@627: * fp@627: * The IgH EtherCAT Master is distributed in the hope that it will be fp@627: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@627: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@627: * GNU General Public License for more details. fp@627: * fp@627: * You should have received a copy of the GNU General Public License fp@627: * along with the IgH EtherCAT Master; if not, write to the Free Software fp@627: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@627: * fp@627: * The right to use EtherCAT Technology is granted and comes free of fp@627: * charge under condition of compatibility of product made by fp@627: * Licensee. People intending to distribute/sell products based on the fp@627: * code, have to sign an agreement to guarantee that products using fp@627: * software based on IgH EtherCAT master stay compatible with the actual fp@627: * EtherCAT specification (which are released themselves as an open fp@627: * standard) as the (only) precondition to have the right to use EtherCAT fp@627: * Technology, IP and trade marks. fp@627: * fp@627: *****************************************************************************/ fp@627: fp@627: /** fp@627: \file fp@627: EtherCAT Process data object structure. fp@627: */ fp@627: fp@627: /*****************************************************************************/ fp@627: fp@627: #ifndef _EC_PDO_H_ fp@627: #define _EC_PDO_H_ fp@627: fp@627: #include fp@627: fp@792: #include "../include/ecrt.h" fp@792: fp@627: #include "globals.h" fp@627: fp@627: /*****************************************************************************/ fp@627: fp@792: /** PDO description. fp@627: */ fp@792: typedef struct { fp@792: struct list_head list; /**< List item. */ fp@792: ec_direction_t dir; /**< PDO direction. */ fp@792: uint16_t index; /**< PDO index. */ fp@792: int8_t sync_index; /**< Assigned sync manager. */ fp@792: char *name; /**< PDO name. */ fp@792: struct list_head entries; /**< List of PDO entries. */ fp@792: } ec_pdo_t; fp@627: fp@627: /*****************************************************************************/ fp@627: fp@792: /** PDO entry description. fp@627: */ fp@792: typedef struct { fp@627: struct list_head list; /**< list item */ fp@627: uint16_t index; /**< PDO entry index */ fp@627: uint8_t subindex; /**< PDO entry subindex */ fp@627: char *name; /**< entry name */ fp@627: uint8_t bit_length; /**< entry length in bit */ fp@792: } ec_pdo_entry_t; fp@627: fp@627: /*****************************************************************************/ fp@627: fp@627: void ec_pdo_init(ec_pdo_t *); fp@792: int ec_pdo_init_copy(ec_pdo_t *, const ec_pdo_t *); fp@627: void ec_pdo_clear(ec_pdo_t *); fp@792: int ec_pdo_set_name(ec_pdo_t *, const char *); fp@792: int ec_pdo_copy_entries(ec_pdo_t *, const ec_pdo_t *); fp@792: fp@792: void ec_pdo_entry_init(ec_pdo_entry_t *); fp@792: int ec_pdo_entry_init_copy(ec_pdo_entry_t *, const ec_pdo_entry_t *); fp@792: void ec_pdo_entry_clear(ec_pdo_entry_t *); fp@792: int ec_pdo_entry_set_name(ec_pdo_entry_t *, const char *); fp@627: fp@627: /*****************************************************************************/ fp@627: fp@627: #endif