IgH EtherCAT Master  1.6.2
sdo.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4  *
5  * This file is part of the IgH EtherCAT Master.
6  *
7  * The IgH EtherCAT Master is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License version 2, as
9  * published by the Free Software Foundation.
10  *
11  * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14  * Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with the IgH EtherCAT Master; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  ****************************************************************************/
21 
27 /****************************************************************************/
28 
29 #ifndef __EC_SDO_H__
30 #define __EC_SDO_H__
31 
32 #include <linux/list.h>
33 
34 #include "globals.h"
35 #include "sdo_entry.h"
36 
37 /****************************************************************************/
38 
41 struct ec_sdo {
42  struct list_head list;
44  uint16_t index;
45  uint8_t object_code;
46  char *name;
47  uint8_t max_subindex;
48  struct list_head entries;
49 };
50 
51 /****************************************************************************/
52 
53 void ec_sdo_init(ec_sdo_t *, ec_slave_t *, uint16_t);
54 void ec_sdo_clear(ec_sdo_t *);
55 
57 const ec_sdo_entry_t *ec_sdo_get_entry_const(const ec_sdo_t *, uint8_t);
58 
59 /****************************************************************************/
60 
61 #endif
void ec_sdo_clear(ec_sdo_t *)
SDO destructor.
Definition: sdo.c:59
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:108
CANopen SDO entry.
Definition: sdo_entry.h:46
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:83
void ec_sdo_init(ec_sdo_t *, ec_slave_t *, uint16_t)
Constructor.
Definition: sdo.c:39
struct list_head list
List item.
Definition: sdo.h:42
CANopen SDO.
Definition: sdo.h:41
uint16_t index
SDO index.
Definition: sdo.h:44
ec_slave_t * slave
Parent slave.
Definition: sdo.h:43
Global definitions and macros.
uint8_t object_code
Object code.
Definition: sdo.h:45
EtherCAT slave.
Definition: slave.h:168
EtherCAT CANopen SDO entry structure.
char * name
SDO name.
Definition: sdo.h:46
struct list_head entries
List of entries.
Definition: sdo.h:48
uint8_t max_subindex
Maximum subindex.
Definition: sdo.h:47