IgH EtherCAT Master
1.5.3
|
EtherCAT FoE state machines. More...
Go to the source code of this file.
Macros | |
#define | EC_FSM_FOE_TIMEOUT 3000 |
Maximum time in ms to wait for responses when reading out the dictionary. | |
#define | EC_FOE_HEADER_SIZE 6 |
Size of the FoE header. | |
Enumerations | |
enum | { EC_FOE_OPCODE_RRQ = 1, EC_FOE_OPCODE_WRQ = 2, EC_FOE_OPCODE_DATA = 3, EC_FOE_OPCODE_ACK = 4, EC_FOE_OPCODE_ERR = 5, EC_FOE_OPCODE_BUSY = 6 } |
FoE OpCodes. More... | |
Functions | |
int | ec_foe_prepare_data_send (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Sends a file or the next fragment. More... | |
int | ec_foe_prepare_wrq_send (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Prepare a write request (WRQ) with filename. More... | |
int | ec_foe_prepare_rrq_send (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Prepare a read request (RRQ) with filename. More... | |
int | ec_foe_prepare_send_ack (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Prepare to send an acknowledge. More... | |
void | ec_foe_set_tx_error (ec_fsm_foe_t *fsm, uint32_t errorcode) |
Set an error code and go to the send error state. More... | |
void | ec_foe_set_rx_error (ec_fsm_foe_t *fsm, uint32_t errorcode) |
Set an error code and go to the receive error state. More... | |
void | ec_fsm_foe_end (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
State: END. More... | |
void | ec_fsm_foe_error (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
State: ERROR. More... | |
void | ec_fsm_foe_state_wrq_sent (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
State: WRQ SENT. More... | |
void | ec_fsm_foe_state_rrq_sent (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
State: RRQ SENT. More... | |
void | ec_fsm_foe_state_ack_check (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Check for acknowledge. More... | |
void | ec_fsm_foe_state_ack_read (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Acknowledge a read operation. More... | |
void | ec_fsm_foe_state_data_sent (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
State: WRQ SENT. More... | |
void | ec_fsm_foe_state_data_check (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Check for data. More... | |
void | ec_fsm_foe_state_data_read (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Start reading data. More... | |
void | ec_fsm_foe_state_sent_ack (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Sent an acknowledge. More... | |
void | ec_fsm_foe_write_start (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Initializes the FoE write state machine. More... | |
void | ec_fsm_foe_read_start (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Starting state for read operations. More... | |
void | ec_fsm_foe_init (ec_fsm_foe_t *fsm) |
Constructor. More... | |
void | ec_fsm_foe_clear (ec_fsm_foe_t *fsm) |
Destructor. More... | |
int | ec_fsm_foe_exec (ec_fsm_foe_t *fsm, ec_datagram_t *datagram) |
Executes the current state of the state machine. More... | |
int | ec_fsm_foe_success (const ec_fsm_foe_t *fsm) |
Returns, if the state machine terminated with success. More... | |
void | ec_fsm_foe_transfer (ec_fsm_foe_t *fsm, ec_slave_t *slave, ec_foe_request_t *request) |
Prepares an FoE transfer. More... | |
Variables | |
enum { ... } | ec_foe_opcode_t |
FoE OpCodes. | |
EtherCAT FoE state machines.
Definition in file fsm_foe.c.
anonymous enum |
int ec_foe_prepare_data_send | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
int ec_foe_prepare_wrq_send | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
int ec_foe_prepare_rrq_send | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
int ec_foe_prepare_send_ack | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_foe_set_tx_error | ( | ec_fsm_foe_t * | fsm, |
uint32_t | errorcode | ||
) |
void ec_foe_set_rx_error | ( | ec_fsm_foe_t * | fsm, |
uint32_t | errorcode | ||
) |
void ec_fsm_foe_end | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_error | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_wrq_sent | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_rrq_sent | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_ack_check | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_ack_read | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_data_sent | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_data_check | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_data_read | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_state_sent_ack | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_write_start | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_read_start | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
void ec_fsm_foe_init | ( | ec_fsm_foe_t * | fsm | ) |
void ec_fsm_foe_clear | ( | ec_fsm_foe_t * | fsm | ) |
int ec_fsm_foe_exec | ( | ec_fsm_foe_t * | fsm, |
ec_datagram_t * | datagram | ||
) |
int ec_fsm_foe_success | ( | const ec_fsm_foe_t * | fsm | ) |
void ec_fsm_foe_transfer | ( | ec_fsm_foe_t * | fsm, |
ec_slave_t * | slave, | ||
ec_foe_request_t * | request | ||
) |