IgH EtherCAT Master
1.5.3
|
Canopen over EtherCAT SDO request functions. More...
Go to the source code of this file.
Macros | |
#define | EC_SDO_REQUEST_RESPONSE_TIMEOUT 1000 |
Default timeout in ms to wait for SDO transfer responses. | |
Functions | |
void | ec_sdo_request_clear_data (ec_sdo_request_t *req) |
SDO request destructor. More... | |
void | ec_sdo_request_init (ec_sdo_request_t *req) |
SDO request constructor. More... | |
void | ec_sdo_request_clear (ec_sdo_request_t *req) |
SDO request destructor. More... | |
int | ec_sdo_request_copy (ec_sdo_request_t *req, const ec_sdo_request_t *other) |
Copy another SDO request. More... | |
int | ec_sdo_request_alloc (ec_sdo_request_t *req, size_t size) |
Pre-allocates the data memory. More... | |
int | ec_sdo_request_copy_data (ec_sdo_request_t *req, const uint8_t *source, size_t size) |
Copies SDO data from an external source. More... | |
int | ec_sdo_request_timed_out (const ec_sdo_request_t *req) |
Checks, if the timeout was exceeded. More... | |
void | ecrt_sdo_request_index (ec_sdo_request_t *req, uint16_t index, uint8_t subindex) |
Set the SDO index and subindex. More... | |
void | ecrt_sdo_request_timeout (ec_sdo_request_t *req, uint32_t timeout) |
Set the timeout for an SDO request. More... | |
uint8_t * | ecrt_sdo_request_data (ec_sdo_request_t *req) |
Access to the SDO request's data. More... | |
size_t | ecrt_sdo_request_data_size (const ec_sdo_request_t *req) |
Returns the current SDO data size. More... | |
ec_request_state_t | ecrt_sdo_request_state (const ec_sdo_request_t *req) |
Get the current state of the SDO request. More... | |
void | ecrt_sdo_request_read (ec_sdo_request_t *req) |
Schedule an SDO read operation. More... | |
void | ecrt_sdo_request_write (ec_sdo_request_t *req) |
Schedule an SDO write operation. More... | |
Canopen over EtherCAT SDO request functions.
Definition in file sdo_request.c.
void ec_sdo_request_clear_data | ( | ec_sdo_request_t * | req | ) |
void ec_sdo_request_init | ( | ec_sdo_request_t * | req | ) |
void ec_sdo_request_clear | ( | ec_sdo_request_t * | req | ) |
int ec_sdo_request_copy | ( | ec_sdo_request_t * | req, |
const ec_sdo_request_t * | other | ||
) |
Copy another SDO request.
req | SDO request. |
other | Other SDO request to copy from. |
Definition at line 91 of file sdo_request.c.
int ec_sdo_request_alloc | ( | ec_sdo_request_t * | req, |
size_t | size | ||
) |
Pre-allocates the data memory.
If the mem_size is already bigger than size, nothing is done.
req | SDO request. |
size | Data size to allocate. |
Definition at line 127 of file sdo_request.c.
int ec_sdo_request_copy_data | ( | ec_sdo_request_t * | req, |
const uint8_t * | source, | ||
size_t | size | ||
) |
Copies SDO data from an external source.
If the mem_size is to small, new memory is allocated.
0 | Success. |
<0 | Error code. |
req | SDO request. |
source | Source data. |
size | Number of bytes in source. |
Definition at line 156 of file sdo_request.c.
int ec_sdo_request_timed_out | ( | const ec_sdo_request_t * | req | ) |
Checks, if the timeout was exceeded.
req | SDO request. |
Definition at line 177 of file sdo_request.c.