ethercatsoe.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 _ethercatsoe_
12 #define _ethercatsoe_
13 
14 #ifdef __cplusplus
15 extern "C"
16 {
17 #endif
18 
19 #define EC_SOE_DATASTATE_B 0x01
20 #define EC_SOE_NAME_B 0x02
21 #define EC_SOE_ATTRIBUTE_B 0x04
22 #define EC_SOE_UNIT_B 0x08
23 #define EC_SOE_MIN_B 0x10
24 #define EC_SOE_MAX_B 0x20
25 #define EC_SOE_VALUE_B 0x40
26 #define EC_SOE_DEFAULT_B 0x80
27 
28 #define EC_SOE_MAXNAME 60
29 #define EC_SOE_MAXMAPPING 64
30 
31 #define EC_IDN_MDTCONFIG 24
32 #define EC_IDN_ATCONFIG 16
33 
36 typedef struct PACKED
37 {
43 } ec_SoEnamet;
45 
48 typedef struct PACKED
49 {
54  union
55  {
56  uint8 byte[8];
60  };
61 } ec_SoElistt;
63 
66 typedef struct PACKED
67 {
75 
76 #define EC_SOE_LENGTH_1 0x00
77 #define EC_SOE_LENGTH_2 0x01
78 #define EC_SOE_LENGTH_4 0x02
79 #define EC_SOE_LENGTH_8 0x03
80 #define EC_SOE_TYPE_BINARY 0x00
81 #define EC_SOE_TYPE_UINT 0x01
82 #define EC_SOE_TYPE_INT 0x02
83 #define EC_SOE_TYPE_HEX 0x03
84 #define EC_SOE_TYPE_STRING 0x04
85 #define EC_SOE_TYPE_IDN 0x05
86 #define EC_SOE_TYPE_FLOAT 0x06
87 #define EC_SOE_TYPE_PARAMETER 0x07
88 
91 typedef struct PACKED
92 {
115 
116 #ifdef EC_VER1
117 int ec_SoEread(uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout);
118 int ec_SoEwrite(uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout);
119 int ec_readIDNmap(uint16 slave, int *Osize, int *Isize);
120 #endif
121 
122 int ecx_SoEread(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout);
123 int ecx_SoEwrite(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout);
124 int ecx_readIDNmap(ecx_contextt *context, uint16 slave, int *Osize, int *Isize);
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif
slave
int slave
Definition: aliastool.c:44
ec_SoEattributet
PACKED_BEGIN struct PACKED ec_SoEattributet
PACKED::name
char name[EC_SOE_MAXNAME]
Definition: ethercatsoe.h:42
PACKED::length
uint32 length
Definition: ethercatsoe.h:96
ec_SoEread
int ec_SoEread(uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout)
Definition: ethercatsoe.c:375
uint32
uint32_t uint32
Definition: osal.h:30
PACKED::wppreop
uint32 wppreop
Definition: ethercatsoe.h:107
PACKED::currentlength
uint16 currentlength
Definition: ethercatsoe.h:39
PACKED::decimals
uint32 decimals
Definition: ethercatsoe.h:105
PACKED::word
uint16 word[4]
Definition: ethercatsoe.h:57
PACKED::list
uint32 list
Definition: ethercatsoe.h:98
EC_SOE_MAXMAPPING
#define EC_SOE_MAXMAPPING
Definition: ethercatsoe.h:29
uint8
uint8_t uint8
Definition: osal.h:28
uint64
uint64_t uint64
Definition: osal.h:32
PACKED::datatype
uint32 datatype
Definition: ethercatsoe.h:102
PACKED_END
#define PACKED_END
Definition: erika/osal_defs.h:30
PACKED_BEGIN
#define PACKED_BEGIN
Definition: erika/osal_defs.h:28
PACKED
Definition: ethercatcoe.c:24
PACKED::wpop
uint32 wpop
Definition: ethercatsoe.h:111
PACKED::idn
uint16 idn
Definition: ethercatsoe.c:34
ec_SoEnamet
PACKED_BEGIN struct PACKED ec_SoEnamet
PACKED::reserved2
uint32 reserved2
Definition: ethercatsoe.h:112
uint16
uint16_t uint16
Definition: osal.h:29
PACKED::dword
uint32 dword[2]
Definition: ethercatsoe.h:58
ec_SoElistt
PACKED_END PACKED_BEGIN struct PACKED ec_SoElistt
PACKED::evafactor
uint32 evafactor
Definition: ethercatsoe.h:94
PACKED::command
uint32 command
Definition: ethercatsoe.h:100
ecx_SoEread
PACKED_END int ecx_SoEread(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout)
Definition: ethercatsoe.c:78
EC_SOE_MAXNAME
#define EC_SOE_MAXNAME
Definition: ethercatsoe.h:28
ecx_context
Definition: ethercatmain.h:384
PACKED::wpsafeop
uint32 wpsafeop
Definition: ethercatsoe.h:109
ecx_SoEwrite
int ecx_SoEwrite(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
Definition: ethercatsoe.c:200
ecx_readIDNmap
int ecx_readIDNmap(ecx_contextt *context, uint16 slave, int *Osize, int *Isize)
Definition: ethercatsoe.c:312
PACKED::reserved1
uint32 reserved1
Definition: ethercatsoe.h:103
ec_SoEwrite
int ec_SoEwrite(uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
Definition: ethercatsoe.c:380
ec_SoEmappingt
PACKED_END PACKED_BEGIN struct PACKED ec_SoEmappingt
PACKED::lword
uint64 lword[1]
Definition: ethercatsoe.h:59
ec_readIDNmap
int ec_readIDNmap(uint16 slave, int *Osize, int *Isize)
Definition: ethercatsoe.c:385
PACKED::maxlength
uint16 maxlength
Definition: ethercatsoe.h:41


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