IgH EtherCAT Master  1.5.2
soe_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_SOE_REQUEST_H__
38 #define __EC_SOE_REQUEST_H__
39 
40 #include <linux/list.h>
41 
42 #include "globals.h"
43 
44 /*****************************************************************************/
45 
48 typedef struct {
49  struct list_head list;
50  uint8_t drive_no;
51  uint16_t idn;
53  uint8_t *data;
54  size_t mem_size;
55  size_t data_size;
59  unsigned long jiffies_sent;
61  uint16_t error_code;
63 
64 /*****************************************************************************/
65 
68 
73 int ec_soe_request_copy_data(ec_soe_request_t *, const uint8_t *, size_t);
74 int ec_soe_request_append_data(ec_soe_request_t *, const uint8_t *, size_t);
77 
78 /*****************************************************************************/
79 
80 #endif
unsigned long jiffies_sent
Jiffies, when the upload/download request was sent.
Definition: soe_request.h:59
uint8_t * data
Pointer to SDO data.
Definition: soe_request.h:53
ec_al_state_t
Application-layer state.
Definition: ecrt.h:572
void ec_soe_request_write(ec_soe_request_t *)
Request a write operation.
Definition: soe_request.c:245
void ec_soe_request_clear(ec_soe_request_t *)
SoE request destructor.
Definition: soe_request.c:77
ec_internal_request_state_t state
Request state.
Definition: soe_request.h:58
uint16_t error_code
SoE error code.
Definition: soe_request.h:61
uint8_t drive_no
Drive number.
Definition: soe_request.h:50
Global definitions and macros.
void ec_soe_request_set_drive_no(ec_soe_request_t *, uint8_t)
Set drive number.
Definition: soe_request.c:105
ec_internal_request_state_t
Generic request state.
Definition: globals.h:325
void ec_soe_request_read(ec_soe_request_t *)
Request a read operation.
Definition: soe_request.c:232
int ec_soe_request_append_data(ec_soe_request_t *, const uint8_t *, size_t)
Copies SoE data from an external source.
Definition: soe_request.c:203
size_t data_size
Size of SDO data.
Definition: soe_request.h:55
void ec_soe_request_init(ec_soe_request_t *)
SoE request constructor.
Definition: soe_request.c:56
ec_direction_t
Direction type for PDO assignment functions.
Definition: ecrt.h:436
ec_direction_t dir
Direction.
Definition: soe_request.h:56
int ec_soe_request_alloc(ec_soe_request_t *, size_t)
Pre-allocates the data memory.
Definition: soe_request.c:150
ec_al_state_t al_state
AL state (only valid for IDN config).
Definition: soe_request.h:52
size_t mem_size
Size of SDO data memory.
Definition: soe_request.h:54
void ec_soe_request_set_idn(ec_soe_request_t *, uint16_t)
Set IDN.
Definition: soe_request.c:117
uint16_t idn
Sercos ID-Number.
Definition: soe_request.h:51
int ec_soe_request_copy_data(ec_soe_request_t *, const uint8_t *, size_t)
Copies SoE data from an external source.
Definition: soe_request.c:179
int ec_soe_request_copy(ec_soe_request_t *, const ec_soe_request_t *)
Copy another SoE request.
Definition: soe_request.c:90
Sercos-over-EtherCAT request.
Definition: soe_request.h:48