IgH EtherCAT Master
1.6.2
|
Sercos-over-EtherCAT request functions. More...
Go to the source code of this file.
Macros | |
#define | EC_SOE_REQUEST_RESPONSE_TIMEOUT 1000 |
Default timeout in ms to wait for SoE responses. | |
Functions | |
void | ec_soe_request_clear_data (ec_soe_request_t *req) |
Free allocated memory. More... | |
void | ec_soe_request_init (ec_soe_request_t *req) |
SoE request constructor. More... | |
void | ec_soe_request_clear (ec_soe_request_t *req) |
SoE request destructor. More... | |
int | ec_soe_request_copy (ec_soe_request_t *req, const ec_soe_request_t *other) |
Copy another SoE request. More... | |
void | ec_soe_request_set_drive_no (ec_soe_request_t *req, uint8_t drive_no) |
Set drive number. More... | |
void | ec_soe_request_set_idn (ec_soe_request_t *req, uint16_t idn) |
Set IDN. More... | |
int | ec_soe_request_alloc (ec_soe_request_t *req, size_t size) |
Pre-allocates the data memory. More... | |
int | ec_soe_request_copy_data (ec_soe_request_t *req, const uint8_t *source, size_t size) |
Copies SoE data from an external source. More... | |
int | ec_soe_request_append_data (ec_soe_request_t *req, const uint8_t *source, size_t size) |
Copies SoE data from an external source. More... | |
int | ec_soe_request_read (ec_soe_request_t *req) |
Request a read operation. More... | |
int | ec_soe_request_write (ec_soe_request_t *req) |
Request a write operation. More... | |
int | ec_soe_request_timed_out (const ec_soe_request_t *req) |
Checks, if the timeout was exceeded. More... | |
int | ecrt_soe_request_idn (ec_soe_request_t *req, uint8_t drive_no, uint16_t idn) |
Set the request's drive and Sercos ID numbers. More... | |
int | ecrt_soe_request_timeout (ec_soe_request_t *req, uint32_t timeout) |
Set the timeout for an SoE request. More... | |
uint8_t * | ecrt_soe_request_data (const ec_soe_request_t *req) |
Access to the SoE request's data. More... | |
size_t | ecrt_soe_request_data_size (const ec_soe_request_t *req) |
Returns the current IDN data size. More... | |
ec_request_state_t | ecrt_soe_request_state (const ec_soe_request_t *req) |
Get the current state of the SoE request. More... | |
int | ecrt_soe_request_read (ec_soe_request_t *req) |
Schedule an SoE IDN read operation. More... | |
int | ecrt_soe_request_write (ec_soe_request_t *req) |
Schedule an SoE IDN write operation. More... | |
Sercos-over-EtherCAT request functions.
Definition in file soe_request.c.
void ec_soe_request_clear_data | ( | ec_soe_request_t * | req | ) |
void ec_soe_request_init | ( | ec_soe_request_t * | req | ) |
void ec_soe_request_clear | ( | ec_soe_request_t * | req | ) |
int ec_soe_request_copy | ( | ec_soe_request_t * | req, |
const ec_soe_request_t * | other | ||
) |
Copy another SoE request.
req | SoE request. |
other | Other SoE request to copy from. |
Definition at line 84 of file soe_request.c.
void ec_soe_request_set_drive_no | ( | ec_soe_request_t * | req, |
uint8_t | drive_no | ||
) |
Set drive number.
req | SoE request. |
drive_no | Drive Number. |
Definition at line 99 of file soe_request.c.
void ec_soe_request_set_idn | ( | ec_soe_request_t * | req, |
uint16_t | idn | ||
) |
int ec_soe_request_alloc | ( | ec_soe_request_t * | req, |
size_t | size | ||
) |
Pre-allocates the data memory.
If the mem_size is already bigger than size, nothing is done.
req | SoE request. |
size | Data size to allocate. |
Definition at line 144 of file soe_request.c.
int ec_soe_request_copy_data | ( | ec_soe_request_t * | req, |
const uint8_t * | source, | ||
size_t | size | ||
) |
Copies SoE data from an external source.
If the mem_size is to small, new memory is allocated.
0 | Success. |
<0 | Error code. |
req | SoE request. |
source | Source data. |
size | Number of bytes in source. |
Definition at line 173 of file soe_request.c.
int ec_soe_request_append_data | ( | ec_soe_request_t * | req, |
const uint8_t * | source, | ||
size_t | size | ||
) |
Copies SoE data from an external source.
If the mem_size is to small, new memory is allocated.
0 | Success. |
<0 | Error code. |
req | SoE request. |
source | Source data. |
size | Number of bytes in source. |
Definition at line 197 of file soe_request.c.
int ec_soe_request_read | ( | ec_soe_request_t * | req | ) |
int ec_soe_request_write | ( | ec_soe_request_t * | req | ) |
int ec_soe_request_timed_out | ( | const ec_soe_request_t * | req | ) |
Checks, if the timeout was exceeded.
req | SDO request. |
Definition at line 258 of file soe_request.c.