ethercatcoe.h
Go to the documentation of this file.
1 /*
2  * Licensed under the GNU General Public License version 2 with exceptions. See
3  * LICENSE file in the project root for full license information
4  */
5 
11 #ifndef _ethercatcoe_
12 #define _ethercatcoe_
13 
14 #ifdef __cplusplus
15 extern "C"
16 {
17 #endif
18 
20 #define EC_MAXODLIST 1024
21 
23 #define EC_MAXOELIST 256
24 
25 /* Storage for object description list */
26 typedef struct
27 {
35  uint16 DataType[EC_MAXODLIST];
37  uint8 ObjectCode[EC_MAXODLIST];
41  char Name[EC_MAXODLIST][EC_MAXNAME+1];
42 } ec_ODlistt;
43 
44 /* storage for object list entry information */
45 typedef struct
46 {
50  uint8 ValueInfo[EC_MAXOELIST];
52  uint16 DataType[EC_MAXOELIST];
54  uint16 BitLength[EC_MAXOELIST];
56  uint16 ObjAccess[EC_MAXOELIST];
58  char Name[EC_MAXOELIST][EC_MAXNAME+1];
59 } ec_OElistt;
60 
61 #ifdef EC_VER1
62 void ec_SDOerror(uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode);
63 int ec_SDOread(uint16 slave, uint16 index, uint8 subindex,
64  boolean CA, int *psize, void *p, int timeout);
65 int ec_SDOwrite(uint16 Slave, uint16 Index, uint8 SubIndex,
66  boolean CA, int psize, void *p, int Timeout);
67 int ec_RxPDO(uint16 Slave, uint16 RxPDOnumber , int psize, void *p);
68 int ec_TxPDO(uint16 slave, uint16 TxPDOnumber , int *psize, void *p, int timeout);
69 int ec_readPDOmap(uint16 Slave, int *Osize, int *Isize);
70 int ec_readPDOmapCA(uint16 Slave, int Thread_n, int *Osize, int *Isize);
71 int ec_readODlist(uint16 Slave, ec_ODlistt *pODlist);
72 int ec_readODdescription(uint16 Item, ec_ODlistt *pODlist);
73 int ec_readOEsingle(uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist);
74 int ec_readOE(uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist);
75 #endif
76 
77 void ecx_SDOerror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode);
78 int ecx_SDOread(ecx_contextt *context, uint16 slave, uint16 index, uint8 subindex,
79  boolean CA, int *psize, void *p, int timeout);
80 int ecx_SDOwrite(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIndex,
81  boolean CA, int psize, void *p, int Timeout);
82 int ecx_RxPDO(ecx_contextt *context, uint16 Slave, uint16 RxPDOnumber , int psize, void *p);
83 int ecx_TxPDO(ecx_contextt *context, uint16 slave, uint16 TxPDOnumber , int *psize, void *p, int timeout);
84 int ecx_readPDOmap(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize);
85 int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int Thread_n, int *Osize, int *Isize);
86 int ecx_readODlist(ecx_contextt *context, uint16 Slave, ec_ODlistt *pODlist);
87 int ecx_readODdescription(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist);
88 int ecx_readOEsingle(ecx_contextt *context, uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist);
89 int ecx_readOE(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist);
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif
ecx_SDOwrite
int ecx_SDOwrite(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIndex, boolean CA, int psize, void *p, int Timeout)
Definition: ethercatcoe.c:330
slave
int slave
Definition: aliastool.c:44
ec_ODlistt
Definition: ethercatcoe.h:26
ecx_readODlist
int ecx_readODlist(ecx_contextt *context, uint16 Slave, ec_ODlistt *pODlist)
Definition: ethercatcoe.c:998
ecx_readODdescription
int ecx_readODdescription(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist)
Definition: ethercatcoe.c:1117
ec_RxPDO
int ec_RxPDO(uint16 Slave, uint16 RxPDOnumber, int psize, void *p)
Definition: ethercatcoe.c:1384
ec_readOE
int ec_readOE(uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist)
Definition: ethercatcoe.c:1501
ec_readOEsingle
int ec_readOEsingle(uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist)
Definition: ethercatcoe.c:1488
ec_TxPDO
int ec_TxPDO(uint16 slave, uint16 TxPDOnumber, int *psize, void *p, int timeout)
Definition: ethercatcoe.c:1401
ecx_readOEsingle
int ecx_readOEsingle(ecx_contextt *context, uint16 Item, uint8 SubI, ec_ODlistt *pODlist, ec_OElistt *pOElist)
Definition: ethercatcoe.c:1203
ecx_RxPDO
int ecx_RxPDO(ecx_contextt *context, uint16 Slave, uint16 RxPDOnumber, int psize, void *p)
Definition: ethercatcoe.c:552
int32
int32_t int32
Definition: osal.h:27
uint8
uint8_t uint8
Definition: osal.h:28
EC_MAXNAME
#define EC_MAXNAME
Definition: ethercatmain.h:23
ec_ODlistt::Entries
uint16 Entries
Definition: ethercatcoe.h:31
ecx_TxPDO
int ecx_TxPDO(ecx_contextt *context, uint16 slave, uint16 TxPDOnumber, int *psize, void *p, int timeout)
Definition: ethercatcoe.c:599
uint16
uint16_t uint16
Definition: osal.h:29
EC_MAXODLIST
#define EC_MAXODLIST
Definition: ethercatcoe.h:20
ecx_readPDOmap
int ecx_readPDOmap(ecx_contextt *context, uint16 Slave, int *Osize, int *Isize)
Definition: ethercatcoe.c:810
ec_readPDOmap
int ec_readPDOmap(uint16 Slave, int *Osize, int *Isize)
Definition: ethercatcoe.c:1441
ec_SDOwrite
int ec_SDOwrite(uint16 Slave, uint16 Index, uint8 SubIndex, boolean CA, int psize, void *p, int Timeout)
Definition: ethercatcoe.c:1367
ec_readPDOmapCA
int ec_readPDOmapCA(uint16 Slave, int Thread_n, int *Osize, int *Isize)
Definition: ethercatcoe.c:1459
ecx_context
Definition: ethercatmain.h:384
ec_SDOerror
void ec_SDOerror(uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode)
Definition: ethercatcoe.c:1322
ec_OElistt
Definition: ethercatcoe.h:45
ec_readODdescription
int ec_readODdescription(uint16 Item, ec_ODlistt *pODlist)
Definition: ethercatcoe.c:1483
ec_SDOread
int ec_SDOread(uint16 slave, uint16 index, uint8 subindex, boolean CA, int *psize, void *p, int timeout)
Definition: ethercatcoe.c:1344
ec_ODlistt::Slave
uint16 Slave
Definition: ethercatcoe.h:29
EC_MAXOELIST
#define EC_MAXOELIST
Definition: ethercatcoe.h:23
ecx_readOE
int ecx_readOE(ecx_contextt *context, uint16 Item, ec_ODlistt *pODlist, ec_OElistt *pOElist)
Definition: ethercatcoe.c:1294
ecx_SDOerror
void ecx_SDOerror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, int32 AbortCode)
Definition: ethercatcoe.c:66
ec_OElistt::Entries
uint16 Entries
Definition: ethercatcoe.h:48
ecx_SDOread
int ecx_SDOread(ecx_contextt *context, uint16 slave, uint16 index, uint8 subindex, boolean CA, int *psize, void *p, int timeout)
Definition: ethercatcoe.c:120
ecx_readPDOmapCA
int ecx_readPDOmapCA(ecx_contextt *context, uint16 Slave, int Thread_n, int *Osize, int *Isize)
Definition: ethercatcoe.c:910
ec_readODlist
int ec_readODlist(uint16 Slave, ec_ODlistt *pODlist)
Definition: ethercatcoe.c:1471


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:48