Classes | Macros | Typedefs | Functions
ethercatsoe.h File Reference

Headerfile for ethercatsoe.c. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PACKED
 
struct  PACKED
 
struct  PACKED
 
struct  PACKED
 

Macros

#define EC_IDN_ATCONFIG   16
 
#define EC_IDN_MDTCONFIG   24
 
#define EC_SOE_ATTRIBUTE_B   0x04
 
#define EC_SOE_DATASTATE_B   0x01
 
#define EC_SOE_DEFAULT_B   0x80
 
#define EC_SOE_LENGTH_1   0x00
 
#define EC_SOE_LENGTH_2   0x01
 
#define EC_SOE_LENGTH_4   0x02
 
#define EC_SOE_LENGTH_8   0x03
 
#define EC_SOE_MAX_B   0x20
 
#define EC_SOE_MAXMAPPING   64
 
#define EC_SOE_MAXNAME   60
 
#define EC_SOE_MIN_B   0x10
 
#define EC_SOE_NAME_B   0x02
 
#define EC_SOE_TYPE_BINARY   0x00
 
#define EC_SOE_TYPE_FLOAT   0x06
 
#define EC_SOE_TYPE_HEX   0x03
 
#define EC_SOE_TYPE_IDN   0x05
 
#define EC_SOE_TYPE_INT   0x02
 
#define EC_SOE_TYPE_PARAMETER   0x07
 
#define EC_SOE_TYPE_STRING   0x04
 
#define EC_SOE_TYPE_UINT   0x01
 
#define EC_SOE_UNIT_B   0x08
 
#define EC_SOE_VALUE_B   0x40
 

Typedefs

typedef PACKED_BEGIN struct PACKED ec_SoEattributet
 
typedef PACKED_END PACKED_BEGIN struct PACKED ec_SoElistt
 
typedef PACKED_END PACKED_BEGIN struct PACKED ec_SoEmappingt
 
typedef PACKED_BEGIN struct PACKED ec_SoEnamet
 

Functions

int ecx_readIDNmap (ecx_contextt *context, uint16 slave, int *Osize, int *Isize)
 
PACKED_END int ecx_SoEread (ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout)
 
int ecx_SoEwrite (ecx_contextt *context, uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
 

Detailed Description

Headerfile for ethercatsoe.c.

Definition in file ethercatsoe.h.

Macro Definition Documentation

◆ EC_IDN_ATCONFIG

#define EC_IDN_ATCONFIG   16

Definition at line 32 of file ethercatsoe.h.

◆ EC_IDN_MDTCONFIG

#define EC_IDN_MDTCONFIG   24

Definition at line 31 of file ethercatsoe.h.

◆ EC_SOE_ATTRIBUTE_B

#define EC_SOE_ATTRIBUTE_B   0x04

Definition at line 21 of file ethercatsoe.h.

◆ EC_SOE_DATASTATE_B

#define EC_SOE_DATASTATE_B   0x01

Definition at line 19 of file ethercatsoe.h.

◆ EC_SOE_DEFAULT_B

#define EC_SOE_DEFAULT_B   0x80

Definition at line 26 of file ethercatsoe.h.

◆ EC_SOE_LENGTH_1

#define EC_SOE_LENGTH_1   0x00

Definition at line 76 of file ethercatsoe.h.

◆ EC_SOE_LENGTH_2

#define EC_SOE_LENGTH_2   0x01

Definition at line 77 of file ethercatsoe.h.

◆ EC_SOE_LENGTH_4

#define EC_SOE_LENGTH_4   0x02

Definition at line 78 of file ethercatsoe.h.

◆ EC_SOE_LENGTH_8

#define EC_SOE_LENGTH_8   0x03

Definition at line 79 of file ethercatsoe.h.

◆ EC_SOE_MAX_B

#define EC_SOE_MAX_B   0x20

Definition at line 24 of file ethercatsoe.h.

◆ EC_SOE_MAXMAPPING

#define EC_SOE_MAXMAPPING   64

Definition at line 29 of file ethercatsoe.h.

◆ EC_SOE_MAXNAME

#define EC_SOE_MAXNAME   60

Definition at line 28 of file ethercatsoe.h.

◆ EC_SOE_MIN_B

#define EC_SOE_MIN_B   0x10

Definition at line 23 of file ethercatsoe.h.

◆ EC_SOE_NAME_B

#define EC_SOE_NAME_B   0x02

Definition at line 20 of file ethercatsoe.h.

◆ EC_SOE_TYPE_BINARY

#define EC_SOE_TYPE_BINARY   0x00

Definition at line 80 of file ethercatsoe.h.

◆ EC_SOE_TYPE_FLOAT

#define EC_SOE_TYPE_FLOAT   0x06

Definition at line 86 of file ethercatsoe.h.

◆ EC_SOE_TYPE_HEX

#define EC_SOE_TYPE_HEX   0x03

Definition at line 83 of file ethercatsoe.h.

◆ EC_SOE_TYPE_IDN

#define EC_SOE_TYPE_IDN   0x05

Definition at line 85 of file ethercatsoe.h.

◆ EC_SOE_TYPE_INT

#define EC_SOE_TYPE_INT   0x02

Definition at line 82 of file ethercatsoe.h.

◆ EC_SOE_TYPE_PARAMETER

#define EC_SOE_TYPE_PARAMETER   0x07

Definition at line 87 of file ethercatsoe.h.

◆ EC_SOE_TYPE_STRING

#define EC_SOE_TYPE_STRING   0x04

Definition at line 84 of file ethercatsoe.h.

◆ EC_SOE_TYPE_UINT

#define EC_SOE_TYPE_UINT   0x01

Definition at line 81 of file ethercatsoe.h.

◆ EC_SOE_UNIT_B

#define EC_SOE_UNIT_B   0x08

Definition at line 22 of file ethercatsoe.h.

◆ EC_SOE_VALUE_B

#define EC_SOE_VALUE_B   0x40

Definition at line 25 of file ethercatsoe.h.

Typedef Documentation

◆ ec_SoEattributet

SoE attribute structure

◆ ec_SoElistt

SoE list structure

◆ ec_SoEmappingt

SoE IDN mapping structure

◆ ec_SoEnamet

SoE name structure

Function Documentation

◆ ecx_readIDNmap()

int ecx_readIDNmap ( ecx_contextt context,
uint16  slave,
int *  Osize,
int *  Isize 
)

SoE read AT and MTD mapping.

SoE has standard indexes defined for mapping. This function tries to read them and collect a full input and output mapping size of designated slave.

Parameters
[in]context= context struct
[in]slave= Slave number
[out]Osize= Size in bits of output mapping (MTD) found
[out]Isize= Size in bits of input mapping (AT) found
Returns
>0 if mapping successful.

Definition at line 312 of file ethercatsoe.c.

◆ ecx_SoEread()

PACKED_END int ecx_SoEread ( ecx_contextt context,
uint16  slave,
uint8  driveNo,
uint8  elementflags,
uint16  idn,
int *  psize,
void *  p,
int  timeout 
)

SoE read, blocking.

The IDN object of the selected slave and DriveNo is read. If a response is larger than the mailbox size then the response is segmented. The function will combine all segments and copy them to the parameter buffer.

Parameters
[in]context= context struct
[in]slave= Slave number
[in]driveNo= Drive number in slave
[in]elementflags= Flags to select what properties of IDN are to be transferred.
[in]idn= IDN.
[in,out]psize= Size in bytes of parameter buffer, returns bytes read from SoE.
[out]p= Pointer to parameter buffer
[in]timeout= Timeout in us, standard is EC_TIMEOUTRXM
Returns
Workcounter from last slave response

Definition at line 78 of file ethercatsoe.c.

◆ ecx_SoEwrite()

int ecx_SoEwrite ( ecx_contextt context,
uint16  slave,
uint8  driveNo,
uint8  elementflags,
uint16  idn,
int  psize,
void *  p,
int  timeout 
)

SoE write, blocking.

The IDN object of the selected slave and DriveNo is written. If a response is larger than the mailbox size then the response is segmented.

Parameters
[in]context= context struct
[in]slave= Slave number
[in]driveNo= Drive number in slave
[in]elementflags= Flags to select what properties of IDN are to be transferred.
[in]idn= IDN.
[in]psize= Size in bytes of parameter buffer.
[out]p= Pointer to parameter buffer
[in]timeout= Timeout in us, standard is EC_TIMEOUTRXM
Returns
Workcounter from last slave response

Definition at line 200 of file ethercatsoe.c.



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