37 #ifndef __EC_FSM_COE_H__ 38 #define __EC_FSM_COE_H__ uint32_t offset
Data offset during segmented download.
size_t segment_size
Current segment size.
EtherCAT slave structure.
void ec_fsm_coe_clear(ec_fsm_coe_t *)
Destructor.
void(* state)(ec_fsm_coe_t *, ec_datagram_t *)
CoE state function.
void ec_fsm_coe_transfer(ec_fsm_coe_t *, ec_slave_t *, ec_sdo_request_t *)
Starts to transfer an SDO to/from a slave.
Global definitions and macros.
ec_sdo_t * sdo
current SDO
EtherCAT CANopen SDO request structure.
ec_sdo_request_t * request
SDO request.
uint8_t subindex
current subindex
ec_datagram_t * datagram
Datagram used in last step.
uint32_t remaining
Remaining bytes during segmented download.
uint32_t complete_size
Used when segmenting.
unsigned long jiffies_start
CoE timestamp.
void ec_fsm_coe_dictionary(ec_fsm_coe_t *, ec_slave_t *)
Starts reading a slaves' SDO dictionary.
EtherCAT datagram structure.
int ec_fsm_coe_exec(ec_fsm_coe_t *, ec_datagram_t *)
Executes the current state of the state machine.
int ec_fsm_coe_success(const ec_fsm_coe_t *)
Returns, if the state machine terminated with success.
void ec_fsm_coe_init(ec_fsm_coe_t *)
Constructor.
uint8_t toggle
toggle bit for segment commands
unsigned int retries
retries upon datagram timeout
EtherCAT CANopen SDO structure.
ec_slave_t * slave
slave the FSM runs on
Finite state machines for the CANopen over EtherCAT protocol.