|
IgH EtherCAT Master
1.5.2
|
File-over-EtherCAT request functions. More...
Go to the source code of this file.
Macros | |
| #define | EC_FOE_REQUEST_RESPONSE_TIMEOUT 3000 |
| Default timeout in ms to wait for FoE transfer responses. | |
Functions | |
| void | ec_foe_request_clear_data (ec_foe_request_t *req) |
| FoE request destructor. More... | |
| void | ec_foe_request_init (ec_foe_request_t *req) |
| FoE request constructor. More... | |
| void | ec_foe_request_clear (ec_foe_request_t *req) |
| FoE request destructor. More... | |
| int | ec_foe_request_alloc (ec_foe_request_t *req, size_t size) |
| Pre-allocates the data memory. More... | |
| int | ec_foe_request_copy_data (ec_foe_request_t *req, const uint8_t *source, size_t size) |
| Copies FoE data from an external source. More... | |
| int | ec_foe_request_timed_out (const ec_foe_request_t *req) |
| Checks, if the timeout was exceeded. More... | |
| void | ecrt_foe_request_timeout (ec_foe_request_t *req, uint32_t timeout) |
| Set the request timeout. More... | |
| void | ecrt_foe_request_file (ec_foe_request_t *req, const char *file_name, uint32_t password) |
| Selects a new file for the request. More... | |
| uint8_t * | ecrt_foe_request_data (ec_foe_request_t *req) |
| Returns a pointer to the request's data. More... | |
| size_t | ecrt_foe_request_data_size (const ec_foe_request_t *req) |
| Returns the data size. More... | |
| ec_request_state_t | ecrt_foe_request_state (const ec_foe_request_t *req) |
| Get the current state of the FoE request. More... | |
| ec_foe_error_t | ecrt_foe_request_result (const ec_foe_request_t *req) |
| Get the result of the FoE request. More... | |
| uint32_t | ecrt_foe_request_error_code (const ec_foe_request_t *req) |
| Get the FoE error code from the FoE request. More... | |
| size_t | ecrt_foe_request_progress (const ec_foe_request_t *req) |
| Returns the progress of the current transfer. More... | |
| void | ecrt_foe_request_read (ec_foe_request_t *req) |
| Prepares a read request (slave to master). More... | |
| void | ecrt_foe_request_write (ec_foe_request_t *req, size_t data_size) |
| Prepares a write request (master to slave). More... | |
File-over-EtherCAT request functions.
Definition in file foe_request.c.
| void ec_foe_request_clear_data | ( | ec_foe_request_t * | req | ) |
| void ec_foe_request_init | ( | ec_foe_request_t * | req | ) |
| void ec_foe_request_clear | ( | ec_foe_request_t * | req | ) |
| int ec_foe_request_alloc | ( | ec_foe_request_t * | req, |
| size_t | size | ||
| ) |
Pre-allocates the data memory.
If the internal buffer_size is already bigger than size, nothing is done.
| req | FoE request. |
| size | Data size to allocate. |
Definition at line 112 of file foe_request.c.
| int ec_foe_request_copy_data | ( | ec_foe_request_t * | req, |
| const uint8_t * | source, | ||
| size_t | size | ||
| ) |
Copies FoE data from an external source.
If the buffer_size is to small, new memory is allocated.
| req | FoE request. |
| source | Source data. |
| size | Number of bytes in source. |
Definition at line 141 of file foe_request.c.
| int ec_foe_request_timed_out | ( | const ec_foe_request_t * | req | ) |
Checks, if the timeout was exceeded.
| req | FoE request. |
Definition at line 165 of file foe_request.c.