IgH EtherCAT Master
1.6.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, uint8_t *file_name) |
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 | ec_foe_request_read (ec_foe_request_t *req) |
Prepares a read request (slave to master). More... | |
void | ec_foe_request_write (ec_foe_request_t *req) |
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, |
uint8_t * | file_name | ||
) |
FoE request constructor.
req | FoE request. |
file_name | filename |
Definition at line 52 of file foe_request.c.
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 106 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 135 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 159 of file foe_request.c.
void ec_foe_request_read | ( | ec_foe_request_t * | req | ) |
Prepares a read request (slave to master).
req | FoE request. |
Definition at line 171 of file foe_request.c.
void ec_foe_request_write | ( | ec_foe_request_t * | req | ) |
Prepares a write request (master to slave).
req | FoE request. |
Definition at line 185 of file foe_request.c.