IgH EtherCAT Master
1.5.3
|
EtherCAT FoE request structure. More...
Go to the source code of this file.
Data Structures | |
struct | ec_foe_request_t |
FoE request. More... | |
Functions | |
void | ec_foe_request_init (ec_foe_request_t *, uint8_t *file_name) |
FoE request constructor. More... | |
void | ec_foe_request_clear (ec_foe_request_t *) |
FoE request destructor. | |
int | ec_foe_request_alloc (ec_foe_request_t *, size_t) |
Pre-allocates the data memory. More... | |
int | ec_foe_request_copy_data (ec_foe_request_t *, const uint8_t *, size_t) |
Copies FoE data from an external source. More... | |
int | ec_foe_request_timed_out (const ec_foe_request_t *) |
Checks, if the timeout was exceeded. More... | |
void | ec_foe_request_write (ec_foe_request_t *) |
Prepares a write request (master to slave). | |
void | ec_foe_request_read (ec_foe_request_t *) |
Prepares a read request (slave to master). | |
EtherCAT FoE request structure.
Definition in file foe_request.h.
void ec_foe_request_init | ( | ec_foe_request_t * | , |
uint8_t * | file_name | ||
) |
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 111 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 140 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 164 of file foe_request.c.