Servo over EtherCAT (SoE) Module. More...
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <youbot_driver/soem/ethercattype.h>
#include <youbot_driver/soem/nicdrv.h>
#include <youbot_driver/soem/ethercatbase.h>
#include <youbot_driver/soem/ethercatmain.h>
#include <youbot_driver/soem/ethercatsoe.h>
Go to the source code of this file.
Classes | |
struct | PACKED |
Typedefs | |
typedef struct PACKED | ec_SoEt |
Functions | |
int | ec_readIDNmap (uint16 slave, int *Osize, int *Isize) |
void | ec_SoEerror (uint16 Slave, uint16 idn, uint16 Error) |
int | ec_SoEread (uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int *psize, void *p, int timeout) |
int | ec_SoEwrite (uint16 slave, uint8 driveNo, uint8 elementflags, uint16 idn, int psize, void *p, int timeout) |
Variables | |
static ec_SoEattributet | SoEattribute |
static ec_SoEmappingt | SoEmapping |
Servo over EtherCAT (SoE) Module.
Definition in file ethercatsoe.c.
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.
[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 337 of file ethercatsoe.c.
void ec_SoEerror | ( | uint16 | Slave, |
uint16 | idn, | ||
uint16 | Error | ||
) |
Report SoE error.
[in] | Slave | = Slave number |
[in] | idn | = IDN that generated error |
[in] | Error | = Error code, see EtherCAT documentation for list |
Definition at line 83 of file ethercatsoe.c.
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.
[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 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.
[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 230 of file ethercatsoe.c.
ec_SoEattributet SoEattribute [static] |
Definition at line 75 of file ethercatsoe.c.
ec_SoEmappingt SoEmapping [static] |
Definition at line 74 of file ethercatsoe.c.