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.

Data Structures

struct  PACKED
 SDO structure, not to be confused with EcSDOserviceT. More...
struct  PACKED
 SDO structure, not to be confused with EcSDOserviceT. More...
struct  PACKED
 SDO structure, not to be confused with EcSDOserviceT. More...
struct  PACKED
 SDO structure, not to be confused with EcSDOserviceT. More...

Defines

#define EC_SOE_DATASTATE_B   0x01
#define EC_SOE_NAME_B   0x02
#define EC_SOE_ATTRIBUTE_B   0x04
#define EC_SOE_UNIT_B   0x08
#define EC_SOE_MIN_B   0x10
#define EC_SOE_MAX_B   0x20
#define EC_SOE_VALUE_B   0x40
#define EC_SOE_DEFAULT_B   0x80
#define EC_SOE_MAXNAME   60
#define EC_SOE_MAXMAPPING   64
#define EC_IDN_MDTCONFIG   24
#define EC_IDN_ATCONFIG   16
#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_TYPE_BINARY   0x00
#define EC_SOE_TYPE_UINT   0x01
#define EC_SOE_TYPE_INT   0x02
#define EC_SOE_TYPE_HEX   0x03
#define EC_SOE_TYPE_STRING   0x04
#define EC_SOE_TYPE_IDN   0x05
#define EC_SOE_TYPE_FLOAT   0x06
#define EC_SOE_TYPE_PARAMETER   0x07

Typedefs

typedef struct PACKED ec_SoEnamet
 SoE name structure.
typedef struct PACKED ec_SoElistt
 SoE list structure.
typedef struct PACKED ec_SoEmappingt
 SoE IDN mapping structure.
typedef struct PACKED ec_SoEattributet
 SoE attribute structure.

Functions

int ec_SoEread (uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout)
 SoE read, blocking.
int ec_SoEwrite (uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout)
 SoE write, blocking.
int ec_readIDNmap (uint16 slave, int *Osize, int *Isize)
 SoE read AT and MTD mapping.

Detailed Description

Headerfile for ethercatsoe.c.

Definition in file ethercatsoe.h.


Define Documentation

#define EC_IDN_ATCONFIG   16

Definition at line 62 of file ethercatsoe.h.

#define EC_IDN_MDTCONFIG   24

Definition at line 61 of file ethercatsoe.h.

#define EC_SOE_ATTRIBUTE_B   0x04

Definition at line 51 of file ethercatsoe.h.

#define EC_SOE_DATASTATE_B   0x01

Definition at line 49 of file ethercatsoe.h.

#define EC_SOE_DEFAULT_B   0x80

Definition at line 56 of file ethercatsoe.h.

#define EC_SOE_LENGTH_1   0x00

Definition at line 100 of file ethercatsoe.h.

#define EC_SOE_LENGTH_2   0x01

Definition at line 101 of file ethercatsoe.h.

#define EC_SOE_LENGTH_4   0x02

Definition at line 102 of file ethercatsoe.h.

#define EC_SOE_LENGTH_8   0x03

Definition at line 103 of file ethercatsoe.h.

#define EC_SOE_MAX_B   0x20

Definition at line 54 of file ethercatsoe.h.

#define EC_SOE_MAXMAPPING   64

Definition at line 59 of file ethercatsoe.h.

#define EC_SOE_MAXNAME   60

Definition at line 58 of file ethercatsoe.h.

#define EC_SOE_MIN_B   0x10

Definition at line 53 of file ethercatsoe.h.

#define EC_SOE_NAME_B   0x02

Definition at line 50 of file ethercatsoe.h.

#define EC_SOE_TYPE_BINARY   0x00

Definition at line 104 of file ethercatsoe.h.

#define EC_SOE_TYPE_FLOAT   0x06

Definition at line 110 of file ethercatsoe.h.

#define EC_SOE_TYPE_HEX   0x03

Definition at line 107 of file ethercatsoe.h.

#define EC_SOE_TYPE_IDN   0x05

Definition at line 109 of file ethercatsoe.h.

#define EC_SOE_TYPE_INT   0x02

Definition at line 106 of file ethercatsoe.h.

#define EC_SOE_TYPE_PARAMETER   0x07

Definition at line 111 of file ethercatsoe.h.

#define EC_SOE_TYPE_STRING   0x04

Definition at line 108 of file ethercatsoe.h.

#define EC_SOE_TYPE_UINT   0x01

Definition at line 105 of file ethercatsoe.h.

#define EC_SOE_UNIT_B   0x08

Definition at line 52 of file ethercatsoe.h.

#define EC_SOE_VALUE_B   0x40

Definition at line 55 of file ethercatsoe.h.


Typedef Documentation

typedef struct PACKED ec_SoEattributet

SoE attribute structure.

typedef struct PACKED ec_SoElistt

SoE list structure.

typedef struct PACKED ec_SoEmappingt

SoE IDN mapping structure.

typedef struct PACKED ec_SoEnamet

SoE name structure.


Function Documentation

int ec_readIDNmap ( 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] 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 succesful.

Definition at line 343 of file ethercatsoe.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ec_SoEread ( 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] slave = Slave number
[in] driveNo = Drive number in slave
[in] elementflags = Flags to select what properties of IDN are to be transfered.
[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 111 of file ethercatsoe.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int ec_SoEwrite ( 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] slave = Slave number
[in] driveNo = Drive number in slave
[in] elementflags = Flags to select what properties of IDN are to be transfered.
[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 232 of file ethercatsoe.c.

Here is the call graph for this function:

Generated by  doxygen 1.6.3