Headerfile for ethercatsoe.c. More...
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) |
Headerfile for ethercatsoe.c.
Definition in file ethercatsoe.h.
#define EC_IDN_ATCONFIG 16 |
Definition at line 67 of file ethercatsoe.h.
#define EC_IDN_MDTCONFIG 24 |
Definition at line 66 of file ethercatsoe.h.
#define EC_SOE_ATTRIBUTE_B 0x04 |
Definition at line 56 of file ethercatsoe.h.
#define EC_SOE_DATASTATE_B 0x01 |
Definition at line 54 of file ethercatsoe.h.
#define EC_SOE_DEFAULT_B 0x80 |
Definition at line 61 of file ethercatsoe.h.
#define EC_SOE_LENGTH_1 0x00 |
Definition at line 111 of file ethercatsoe.h.
#define EC_SOE_LENGTH_2 0x01 |
Definition at line 112 of file ethercatsoe.h.
#define EC_SOE_LENGTH_4 0x02 |
Definition at line 113 of file ethercatsoe.h.
#define EC_SOE_LENGTH_8 0x03 |
Definition at line 114 of file ethercatsoe.h.
#define EC_SOE_MAX_B 0x20 |
Definition at line 59 of file ethercatsoe.h.
#define EC_SOE_MAXMAPPING 64 |
Definition at line 64 of file ethercatsoe.h.
#define EC_SOE_MAXNAME 60 |
Definition at line 63 of file ethercatsoe.h.
#define EC_SOE_MIN_B 0x10 |
Definition at line 58 of file ethercatsoe.h.
#define EC_SOE_NAME_B 0x02 |
Definition at line 55 of file ethercatsoe.h.
#define EC_SOE_TYPE_BINARY 0x00 |
Definition at line 115 of file ethercatsoe.h.
#define EC_SOE_TYPE_FLOAT 0x06 |
Definition at line 121 of file ethercatsoe.h.
#define EC_SOE_TYPE_HEX 0x03 |
Definition at line 118 of file ethercatsoe.h.
#define EC_SOE_TYPE_IDN 0x05 |
Definition at line 120 of file ethercatsoe.h.
#define EC_SOE_TYPE_INT 0x02 |
Definition at line 117 of file ethercatsoe.h.
#define EC_SOE_TYPE_PARAMETER 0x07 |
Definition at line 122 of file ethercatsoe.h.
#define EC_SOE_TYPE_STRING 0x04 |
Definition at line 119 of file ethercatsoe.h.
#define EC_SOE_TYPE_UINT 0x01 |
Definition at line 116 of file ethercatsoe.h.
#define EC_SOE_UNIT_B 0x08 |
Definition at line 57 of file ethercatsoe.h.
#define EC_SOE_VALUE_B 0x40 |
Definition at line 60 of file ethercatsoe.h.
typedef PACKED_BEGIN struct PACKED ec_SoEattributet |
SoE attribute structure
typedef PACKED_END PACKED_BEGIN struct PACKED ec_SoElistt |
SoE list structure
typedef PACKED_END PACKED_BEGIN struct PACKED ec_SoEmappingt |
SoE IDN mapping structure
typedef PACKED_BEGIN struct PACKED ec_SoEnamet |
SoE name structure
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.
[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 |
Definition at line 346 of file ethercatsoe.c.
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.
[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 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 |
Definition at line 112 of file ethercatsoe.c.
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.
[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 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 |
Definition at line 234 of file ethercatsoe.c.