IgH EtherCAT Master  1.5.2
sdo_request.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * $Id$
4 *
5 * Copyright (C) 2006-2008 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 and/or
10 * modify it under the terms of the GNU General Public License version 2, as
11 * published by the Free Software Foundation.
12 *
13 * The IgH EtherCAT Master is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16 * Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * 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 *
22 * ---
23 *
24 * The license mentioned above concerns the source code only. Using the
25 * EtherCAT technology and brand is only permitted in compliance with the
26 * industrial property and similar rights of Beckhoff Automation GmbH.
27 *
28 *****************************************************************************/
29
35/*****************************************************************************/
36
37#ifndef __EC_SDO_REQUEST_H__
38#define __EC_SDO_REQUEST_H__
39
40#include <linux/list.h>
41
42#include "globals.h"
43
44/*****************************************************************************/
45
49 struct list_head list;
50 uint16_t index;
51 uint8_t subindex;
52 uint8_t *data;
53 size_t mem_size;
54 size_t data_size;
56 uint32_t issue_timeout;
64 unsigned long jiffies_start;
65 unsigned long jiffies_sent;
67 int errno;
68 uint32_t abort_code;
69};
70
71/*****************************************************************************/
72
75
78int ec_sdo_request_copy_data(ec_sdo_request_t *, const uint8_t *, size_t);
80
81/*****************************************************************************/
82
83#endif
Global definitions and macros.
ec_internal_request_state_t
Generic request state.
Definition: globals.h:278
ec_direction_t
Direction type for PDO assignment functions.
Definition: ecrt.h:430
int ec_sdo_request_copy_data(ec_sdo_request_t *, const uint8_t *, size_t)
Copies SDO data from an external source.
Definition: sdo_request.c:156
int ec_sdo_request_alloc(ec_sdo_request_t *, size_t)
Pre-allocates the data memory.
Definition: sdo_request.c:127
int ec_sdo_request_copy(ec_sdo_request_t *, const ec_sdo_request_t *)
Copy another SDO request.
Definition: sdo_request.c:91
void ec_sdo_request_clear(ec_sdo_request_t *)
SDO request destructor.
Definition: sdo_request.c:76
void ec_sdo_request_init(ec_sdo_request_t *)
SDO request constructor.
Definition: sdo_request.c:56
int ec_sdo_request_timed_out(const ec_sdo_request_t *)
Checks, if the timeout was exceeded.
Definition: sdo_request.c:177
CANopen SDO request.
Definition: sdo_request.h:48
uint32_t response_timeout
Maximum time in ms, the transfer is retried, if the slave does not respond.
Definition: sdo_request.h:58
uint32_t issue_timeout
Maximum time in ms, the processing of the request may take.
Definition: sdo_request.h:56
ec_internal_request_state_t state
SDO request state.
Definition: sdo_request.h:63
int errno
Error number.
Definition: sdo_request.h:67
size_t mem_size
Size of SDO data memory.
Definition: sdo_request.h:53
struct list_head list
List item.
Definition: sdo_request.h:49
uint8_t complete_access
SDO shall be transferred completely.
Definition: sdo_request.h:55
size_t data_size
Size of SDO data.
Definition: sdo_request.h:54
uint8_t * data
Pointer to SDO data.
Definition: sdo_request.h:52
unsigned long jiffies_start
Jiffies, when the request was issued.
Definition: sdo_request.h:64
uint32_t abort_code
SDO request abort code.
Definition: sdo_request.h:68
ec_direction_t dir
Direction.
Definition: sdo_request.h:60
unsigned long jiffies_sent
Jiffies, when the upload/download request was sent.
Definition: sdo_request.h:65
uint16_t index
SDO index.
Definition: sdo_request.h:50
uint8_t subindex
SDO subindex.
Definition: sdo_request.h:51