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 32 of file ethercatsoe.h.
#define EC_IDN_MDTCONFIG 24 |
Definition at line 31 of file ethercatsoe.h.
#define EC_SOE_ATTRIBUTE_B 0x04 |
Definition at line 21 of file ethercatsoe.h.
#define EC_SOE_DATASTATE_B 0x01 |
Definition at line 19 of file ethercatsoe.h.
#define EC_SOE_DEFAULT_B 0x80 |
Definition at line 26 of file ethercatsoe.h.
#define EC_SOE_LENGTH_1 0x00 |
Definition at line 76 of file ethercatsoe.h.
#define EC_SOE_LENGTH_2 0x01 |
Definition at line 77 of file ethercatsoe.h.
#define EC_SOE_LENGTH_4 0x02 |
Definition at line 78 of file ethercatsoe.h.
#define EC_SOE_LENGTH_8 0x03 |
Definition at line 79 of file ethercatsoe.h.
#define EC_SOE_MAX_B 0x20 |
Definition at line 24 of file ethercatsoe.h.
#define EC_SOE_MAXMAPPING 64 |
Definition at line 29 of file ethercatsoe.h.
#define EC_SOE_MAXNAME 60 |
Definition at line 28 of file ethercatsoe.h.
#define EC_SOE_MIN_B 0x10 |
Definition at line 23 of file ethercatsoe.h.
#define EC_SOE_NAME_B 0x02 |
Definition at line 20 of file ethercatsoe.h.
#define EC_SOE_TYPE_BINARY 0x00 |
Definition at line 80 of file ethercatsoe.h.
#define EC_SOE_TYPE_FLOAT 0x06 |
Definition at line 86 of file ethercatsoe.h.
#define EC_SOE_TYPE_HEX 0x03 |
Definition at line 83 of file ethercatsoe.h.
#define EC_SOE_TYPE_IDN 0x05 |
Definition at line 85 of file ethercatsoe.h.
#define EC_SOE_TYPE_INT 0x02 |
Definition at line 82 of file ethercatsoe.h.
#define EC_SOE_TYPE_PARAMETER 0x07 |
Definition at line 87 of file ethercatsoe.h.
#define EC_SOE_TYPE_STRING 0x04 |
Definition at line 84 of file ethercatsoe.h.
#define EC_SOE_TYPE_UINT 0x01 |
Definition at line 81 of file ethercatsoe.h.
#define EC_SOE_UNIT_B 0x08 |
Definition at line 22 of file ethercatsoe.h.
#define EC_SOE_VALUE_B 0x40 |
Definition at line 25 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 312 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 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 |
Definition at line 78 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 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 |
Definition at line 200 of file ethercatsoe.c.