IgH EtherCAT Master
1.6.4
|
EtherCAT EoE state machines. More...
Go to the source code of this file.
Macros | |
#define | EC_EOE_RESPONSE_TIMEOUT 3000 |
Maximum time to wait for a set IP parameter response. | |
Functions | |
void | memcpy_swap32 (void *dst, const void *src) |
Host-architecture-independent 32-bit swap function. More... | |
int | ec_fsm_eoe_prepare_set (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
Prepare a set IP parameters operation. More... | |
void | ec_fsm_eoe_set_ip_start (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
EoE state: SET IP START. More... | |
void | ec_fsm_eoe_set_ip_request (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
EoE state: SET IP REQUEST. More... | |
void | ec_fsm_eoe_set_ip_check (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
EoE state: SET IP CHECK. More... | |
void | ec_fsm_eoe_set_ip_response (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
EoE state: SET IP RESPONSE. More... | |
void | ec_fsm_eoe_end (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
State: END. More... | |
void | ec_fsm_eoe_error (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
State: ERROR. More... | |
void | ec_fsm_eoe_init (ec_fsm_eoe_t *fsm) |
Constructor. More... | |
void | ec_fsm_eoe_clear (ec_fsm_eoe_t *fsm) |
Destructor. More... | |
void | ec_fsm_eoe_set_ip_param (ec_fsm_eoe_t *fsm, ec_slave_t *slave, ec_eoe_request_t *request) |
Starts to set the EoE IP partameters of a slave. More... | |
int | ec_fsm_eoe_exec (ec_fsm_eoe_t *fsm, ec_datagram_t *datagram) |
Executes the current state of the state machine. More... | |
int | ec_fsm_eoe_success (const ec_fsm_eoe_t *fsm) |
Returns, if the state machine terminated with success. More... | |
EtherCAT EoE state machines.
Definition in file fsm_eoe.c.
void memcpy_swap32 | ( | void * | dst, |
const void * | src | ||
) |
Host-architecture-independent 32-bit swap function.
The internal storage of struct in_addr is always big-endian. The mailbox protocol format to supply IPv4 adresses is little-endian (Yuck!). So we need a swap function, that is independent of the CPU architecture. ntohl()/htonl() can not be used, because they evaluate to NOPs if the host architecture matches the target architecture!
int ec_fsm_eoe_prepare_set | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_set_ip_start | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_set_ip_request | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_set_ip_check | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_set_ip_response | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_end | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_error | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_eoe_init | ( | ec_fsm_eoe_t * | fsm | ) |
void ec_fsm_eoe_clear | ( | ec_fsm_eoe_t * | fsm | ) |
void ec_fsm_eoe_set_ip_param | ( | ec_fsm_eoe_t * | fsm, |
ec_slave_t * | slave, | ||
ec_eoe_request_t * | request | ||
) |
int ec_fsm_eoe_exec | ( | ec_fsm_eoe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
int ec_fsm_eoe_success | ( | const ec_fsm_eoe_t * | fsm | ) |