IgH EtherCAT Master
1.6.2
|
EtherCAT master state machine. More...
Go to the source code of this file.
Macros | |
#define | EC_SYSTEM_TIME_TOLERANCE_NS 1000000 |
Time difference [ns] to tolerate without setting a new system time offset. | |
EtherCAT master state machine.
Definition in file fsm_master.c.
void ec_fsm_master_restart | ( | ec_fsm_master_t * | fsm | ) |
Restarts the master state machine.
fsm | Master state machine. |
Definition at line 203 of file fsm_master.c.
int ec_fsm_master_action_process_sii | ( | ec_fsm_master_t * | fsm | ) |
Check for pending SII write requests and process one.
fsm | Master state machine. |
Definition at line 460 of file fsm_master.c.
int ec_fsm_master_action_process_int_request | ( | ec_fsm_master_t * | fsm | ) |
Check for pending internal SDO/SoE requests and process one.
fsm | Master state machine. |
Definition at line 522 of file fsm_master.c.
void ec_fsm_master_action_idle | ( | ec_fsm_master_t * | fsm | ) |
Master action: IDLE.
Does secondary work.
fsm | Master state machine. |
Definition at line 605 of file fsm_master.c.
void ec_fsm_master_action_next_slave_state | ( | ec_fsm_master_t * | fsm | ) |
Master action: Get state of next slave.
fsm | Master state machine. |
Definition at line 663 of file fsm_master.c.
void ec_fsm_master_action_configure | ( | ec_fsm_master_t * | fsm | ) |
Master action: Configure.
fsm | Master state machine. |
Definition at line 691 of file fsm_master.c.
u64 ec_fsm_master_dc_offset32 | ( | ec_fsm_master_t * | fsm, |
u64 | system_time, | ||
u64 | old_offset, | ||
unsigned long | jiffies_since_read | ||
) |
Configure 32 bit time offset.
fsm | Master state machine. |
system_time | System time register. |
old_offset | Time offset register. |
jiffies_since_read | Jiffies for correction. |
Definition at line 1092 of file fsm_master.c.
u64 ec_fsm_master_dc_offset64 | ( | ec_fsm_master_t * | fsm, |
u64 | system_time, | ||
u64 | old_offset, | ||
unsigned long | jiffies_since_read | ||
) |
Configure 64 bit time offset.
fsm | Master state machine. |
system_time | System time register. |
old_offset | Time offset register. |
jiffies_since_read | Jiffies for correction. |
Definition at line 1134 of file fsm_master.c.
void ec_fsm_master_state_start | ( | ec_fsm_master_t * | fsm | ) |
Master state: START.
Starts with getting slave count and slave states.
fsm | Master state machine. |
Definition at line 220 of file fsm_master.c.
void ec_fsm_master_state_broadcast | ( | ec_fsm_master_t * | fsm | ) |
Master state: BROADCAST.
Processes the broadcast read slave count and slaves states.
fsm | Master state machine. |
Definition at line 278 of file fsm_master.c.
void ec_fsm_master_state_read_state | ( | ec_fsm_master_t * | fsm | ) |
Master state: READ STATE.
Fetches the AL state of a slave.
fsm | Master state machine. |
Definition at line 749 of file fsm_master.c.
void ec_fsm_master_state_acknowledge | ( | ec_fsm_master_t * | fsm | ) |
Master state: ACKNOWLEDGE.
fsm | Master state machine. |
Definition at line 804 of file fsm_master.c.
void ec_fsm_master_state_configure_slave | ( | ec_fsm_master_t * | fsm | ) |
Master state: CONFIGURE SLAVE.
Starts configuring a slave.
fsm | Master state machine. |
Definition at line 1016 of file fsm_master.c.
void ec_fsm_master_state_clear_addresses | ( | ec_fsm_master_t * | fsm | ) |
Master state: CLEAR ADDRESSES.
fsm | Master state machine. |
Definition at line 842 of file fsm_master.c.
void ec_fsm_master_state_dc_measure_delays | ( | ec_fsm_master_t * | fsm | ) |
Master state: DC MEASURE DELAYS.
fsm | Master state machine. |
Definition at line 887 of file fsm_master.c.
void ec_fsm_master_state_scan_slave | ( | ec_fsm_master_t * | fsm | ) |
Master state: SCAN SLAVE.
Executes the sub-statemachine for the scanning of a slave.
fsm | Master state machine. |
Definition at line 942 of file fsm_master.c.
void ec_fsm_master_state_dc_read_offset | ( | ec_fsm_master_t * | fsm | ) |
Master state: DC READ OFFSET.
fsm | Master state machine. |
Definition at line 1172 of file fsm_master.c.
void ec_fsm_master_state_dc_write_offset | ( | ec_fsm_master_t * | fsm | ) |
Master state: DC WRITE OFFSET.
fsm | Master state machine. |
Definition at line 1225 of file fsm_master.c.
void ec_fsm_master_state_assign_sii | ( | ec_fsm_master_t * | fsm | ) |
Master state: ASSIGN SII.
fsm | Master state machine. |
Definition at line 1260 of file fsm_master.c.
void ec_fsm_master_state_write_sii | ( | ec_fsm_master_t * | fsm | ) |
Master state: WRITE SII.
fsm | Master state machine. |
Definition at line 1297 of file fsm_master.c.
void ec_fsm_master_state_sdo_dictionary | ( | ec_fsm_master_t * | fsm | ) |
Master state: SDO DICTIONARY.
fsm | Master state machine. |
Definition at line 1351 of file fsm_master.c.
void ec_fsm_master_state_sdo_request | ( | ec_fsm_master_t * | fsm | ) |
Master state: SDO REQUEST.
fsm | Master state machine. |
Definition at line 1386 of file fsm_master.c.
void ec_fsm_master_state_soe_request | ( | ec_fsm_master_t * | fsm | ) |
Master state: SoE REQUEST.
fsm | Master state machine. |
Definition at line 1429 of file fsm_master.c.
void ec_fsm_master_enter_clear_addresses | ( | ec_fsm_master_t * | fsm | ) |
Start clearing slave addresses.
fsm | Master state machine. |
Definition at line 826 of file fsm_master.c.
void ec_fsm_master_enter_write_system_times | ( | ec_fsm_master_t * | fsm | ) |
Start writing DC system times.
fsm | Master state machine. |
Definition at line 1044 of file fsm_master.c.
void ec_fsm_master_init | ( | ec_fsm_master_t * | fsm, |
ec_master_t * | master, | ||
ec_datagram_t * | datagram | ||
) |
Constructor.
fsm | Master state machine. |
master | EtherCAT master. |
datagram | Datagram object to use. |
Definition at line 82 of file fsm_master.c.
void ec_fsm_master_clear | ( | ec_fsm_master_t * | fsm | ) |
void ec_fsm_master_reset | ( | ec_fsm_master_t * | fsm | ) |
Reset state machine.
fsm | Master state machine. |
Definition at line 144 of file fsm_master.c.
int ec_fsm_master_exec | ( | ec_fsm_master_t * | fsm | ) |
Executes the current state of the state machine.
If the state machine's datagram is not sent or received yet, the execution of the state machine is delayed to the next cycle.
fsm | Master state machine. |
Definition at line 173 of file fsm_master.c.
int ec_fsm_master_idle | ( | const ec_fsm_master_t * | fsm | ) |
fsm | Master state machine. |
Definition at line 192 of file fsm_master.c.