ethercatcoe.h
Go to the documentation of this file.
1 /*
2  * Simple Open EtherCAT Master Library
3  *
4  * File : ethercatcoe.h
5  * Version : 1.3.0
6  * Date : 24-02-2013
7  * Copyright (C) 2005-2013 Speciaal Machinefabriek Ketels v.o.f.
8  * Copyright (C) 2005-2013 Arthur Ketels
9  * Copyright (C) 2008-2009 TU/e Technische Universiteit Eindhoven
10  *
11  * SOEM is free software; you can redistribute it and/or modify it under
12  * the terms of the GNU General Public License version 2 as published by the Free
13  * Software Foundation.
14  *
15  * SOEM is distributed in the hope that it will be useful, but WITHOUT ANY
16  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18  * for more details.
19  *
20  * As a special exception, if other files instantiate templates or use macros
21  * or inline functions from this file, or you compile this file and link it
22  * with other works to produce a work based on this file, this file does not
23  * by itself cause the resulting work to be covered by the GNU General Public
24  * License. However the source code for this file must still be made available
25  * in accordance with section (3) of the GNU General Public License.
26  *
27  * This exception does not invalidate any other reasons why a work based on
28  * this file might be covered by the GNU General Public License.
29  *
30  * The EtherCAT Technology, the trade name and logo “EtherCAT” are the intellectual
31  * property of, and protected by Beckhoff Automation GmbH. You can use SOEM for
32  * the sole purpose of creating, using and/or selling or otherwise distributing
33  * an EtherCAT network master provided that an EtherCAT Master License is obtained
34  * from Beckhoff Automation GmbH.
35  *
36  * In case you did not receive a copy of the EtherCAT Master License along with
37  * SOEM write to Beckhoff Automation GmbH, Eiserstraße 5, D-33415 Verl, Germany
38  * (www.beckhoff.com).
39  */
40 
46 #ifndef _ethercatcoe_
47 #define _ethercatcoe_
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
55 #define EC_MAXODLIST 1024
56 
58 #define EC_MAXOELIST 256
59 
60 /* Storage for object description list */
61 typedef struct
62 {
70  uint16 DataType[EC_MAXODLIST];
72  uint8 ObjectCode[EC_MAXODLIST];
76  char Name[EC_MAXODLIST][EC_MAXNAME+1];
77 } ec_ODlistt;
78 
79 /* storage for object list entry information */
80 typedef struct
81 {
85  uint8 ValueInfo[EC_MAXOELIST];
87  uint16 DataType[EC_MAXOELIST];
89  uint16 BitLength[EC_MAXOELIST];
91  uint16 ObjAccess[EC_MAXOELIST];
93  char Name[EC_MAXOELIST][EC_MAXNAME+1];
94 } ec_OElistt;
95 
96 #ifdef EC_VER1
97 void ec_SDOerror(uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode);
98 int ec_SDOread(uint16 slave, uint16 index, uint8 subindex,
99  boolean CA, int *psize, void *p, int timeout);
100 int ec_SDOwrite(uint16 Slave, uint16 Index, uint8 SubIndex,
101  boolean CA, int psize, void *p, int Timeout);
102 int ec_RxPDO(uint16 Slave, uint16 RxPDOnumber , int psize, void *p);
103 int ec_TxPDO(uint16 slave, uint16 TxPDOnumber , int *psize, void *p, int timeout);
104 int ec_readPDOmap(uint16 Slave, int *Osize, int *Isize);
105 int ec_readPDOmapCA(uint16 Slave, int *Osize, int *Isize);
106 int ec_readODlist(uint16 Slave, ec_ODlistt *pODlist);
107 int ec_readODdescription(uint16 Item, ec_ODlistt *pODlist);
108 int ec_readOEsingle(uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist);
109 int ec_readOE(uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist);
110 #endif
111 
112 void ecx_SDOerror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode);
113 int ecx_SDOread(ecx_contextt *context, uint16 slave, uint16 index, uint8 subindex,
114  boolean CA, int *psize, void *p, int timeout);
115 int ecx_SDOwrite(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIndex,
116  boolean CA, int psize, void *p, int Timeout);
117 int ecx_RxPDO(ecx_contextt *context, uint16 Slave, uint16 RxPDOnumber , int psize, void *p);
118 int ecx_TxPDO(ecx_contextt *context, uint16 slave, uint16 TxPDOnumber , int *psize, void *p, int timeout);
119 int ecx_readPDOmap(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize);
120 int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize);
121 int ecx_readODlist(ecx_contextt *context, uint16 Slave, ec_ODlistt *pODlist);
122 int ecx_readODdescription(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist);
123 int ecx_readOEsingle(ecx_contextt *context, uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist);
124 int ecx_readOE(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist);
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif
int ecx_RxPDO(ecx_contextt *context, uint16 Slave, uint16 RxPDOnumber, int psize, void *p)
Definition: ethercatcoe.c:585
int ecx_SDOwrite(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIndex, boolean CA, int psize, void *p, int Timeout)
Definition: ethercatcoe.c:363
uint8_t uint8
Definition: osal.h:33
int ecx_SDOread(ecx_contextt *context, uint16 slave, uint16 index, uint8 subindex, boolean CA, int *psize, void *p, int timeout)
Definition: ethercatcoe.c:153
uint16_t uint16
Definition: osal.h:34
int ecx_TxPDO(ecx_contextt *context, uint16 slave, uint16 TxPDOnumber, int *psize, void *p, int timeout)
Definition: ethercatcoe.c:632
#define EC_MAXOELIST
Definition: ethercatcoe.h:58
uint16 Slave
Definition: ethercatcoe.h:64
int ecx_readPDOmap(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize)
Definition: ethercatcoe.c:839
int32_t int32
Definition: osal.h:32
int ecx_readOE(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist)
Definition: ethercatcoe.c:1322
#define EC_MAXNAME
Definition: ethercatmain.h:58
uint16 Entries
Definition: ethercatcoe.h:66
uint16 Entries
Definition: ethercatcoe.h:83
int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize)
Definition: ethercatcoe.c:940
#define EC_MAXODLIST
Definition: ethercatcoe.h:55
int ecx_readOEsingle(ecx_contextt *context, uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist)
Definition: ethercatcoe.c:1232
void ecx_SDOerror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode)
Definition: ethercatcoe.c:101
int ecx_readODdescription(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist)
Definition: ethercatcoe.c:1146
int ecx_readODlist(ecx_contextt *context, uint16 Slave, ec_ODlistt *pODlist)
Definition: ethercatcoe.c:1027


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:24