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
#define EC_SOE_MAXMAPPING
Definition: ethercatsoe.h:29
uint32 dword[2]
Definition: ethercatsoe.h:58
PACKED_END PACKED_BEGIN struct PACKED ec_SoElistt
uint8_t uint8
Definition: osal.h:28
PACKED_BEGIN struct PACKED ec_SoEattributet
int ecx_readIDNmap(ecx_contextt *context, uint16 slave, int *Osize, int *Isize)
Definition: ethercatsoe.c:312
#define EC_SOE_MAXNAME
Definition: ethercatsoe.h:28
uint64 lword[1]
Definition: ethercatsoe.h:59
uint8 byte[8]
Definition: ethercatsoe.h:56
uint16_t uint16
Definition: osal.h:29
uint8 driveNo
Definition: ethercatsoe.c:30
uint16 maxlength
Definition: ethercatsoe.h:41
uint32 reserved1
Definition: ethercatsoe.h:103
uint32 length
Definition: ethercatsoe.h:96
uint16 idn
Definition: ethercatsoe.c:34
uint32 reserved2
Definition: ethercatsoe.h:112
int ec_SoEwrite(uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
Definition: ethercatsoe.c:380
int ec_SoEread(uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout)
Definition: ethercatsoe.c:375
uint32 wppreop
Definition: ethercatsoe.h:107
int slave
Definition: aliastool.c:44
uint32 wpop
Definition: ethercatsoe.h:111
#define PACKED_END
int ec_readIDNmap(uint16 slave, int *Osize, int *Isize)
Definition: ethercatsoe.c:385
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
uint64_t uint64
Definition: osal.h:32
uint32 wpsafeop
Definition: ethercatsoe.h:109
uint8 elementflags
Definition: ethercatsoe.c:31
PACKED_END PACKED_BEGIN struct PACKED ec_SoEmappingt
uint32 evafactor
Definition: ethercatsoe.h:94
PACKED_BEGIN struct PACKED ec_SoEnamet
int ecx_SoEwrite(ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
Definition: ethercatsoe.c:200
uint32 decimals
Definition: ethercatsoe.h:105
uint16 word[4]
Definition: ethercatsoe.h:57
uint32 list
Definition: ethercatsoe.h:98
uint32_t uint32
Definition: osal.h:30
uint32 datatype
Definition: ethercatsoe.h:102
char name[EC_SOE_MAXNAME]
Definition: ethercatsoe.h:42
uint16 currentlength
Definition: ethercatsoe.h:39
uint32 command
Definition: ethercatsoe.h:100
#define PACKED_BEGIN


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Mon Feb 28 2022 23:46:57