IgH EtherCAT Master  1.5.3
sdo.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_H__
38 #define __EC_SDO_H__
39 
40 #include <linux/list.h>
41 
42 #include "globals.h"
43 #include "sdo_entry.h"
44 
45 /*****************************************************************************/
46 
49 struct ec_sdo {
50  struct list_head list;
52  uint16_t index;
53  uint8_t object_code;
54  char *name;
55  uint8_t max_subindex;
56  struct list_head entries;
57 };
58 
59 /*****************************************************************************/
60 
61 void ec_sdo_init(ec_sdo_t *, ec_slave_t *, uint16_t);
62 void ec_sdo_clear(ec_sdo_t *);
63 
65 const ec_sdo_entry_t *ec_sdo_get_entry_const(const ec_sdo_t *, uint8_t);
66 
67 /*****************************************************************************/
68 
69 #endif
void ec_sdo_clear(ec_sdo_t *)
SDO destructor.
Definition: sdo.c:67
const ec_sdo_entry_t * ec_sdo_get_entry_const(const ec_sdo_t *, uint8_t)
Get an SDO entry from an SDO via its subindex.
Definition: sdo.c:116
CANopen SDO entry.
Definition: sdo_entry.h:54
ec_sdo_entry_t * ec_sdo_get_entry(ec_sdo_t *, uint8_t)
Get an SDO entry from an SDO via its subindex.
Definition: sdo.c:91
void ec_sdo_init(ec_sdo_t *, ec_slave_t *, uint16_t)
Constructor.
Definition: sdo.c:47
struct list_head list
List item.
Definition: sdo.h:50
CANopen SDO.
Definition: sdo.h:49
uint16_t index
SDO index.
Definition: sdo.h:52
ec_slave_t * slave
Parent slave.
Definition: sdo.h:51
Global definitions and macros.
uint8_t object_code
Object code.
Definition: sdo.h:53
EtherCAT slave.
Definition: slave.h:176
EtherCAT CANopen SDO entry structure.
char * name
SDO name.
Definition: sdo.h:54
struct list_head entries
List of entries.
Definition: sdo.h:56
uint8_t max_subindex
Maximum subindex.
Definition: sdo.h:55