IgH EtherCAT Master
1.5.3
|
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_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 207 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 265 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 735 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 790 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 997 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 828 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 872 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 925 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 1153 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 1206 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 1241 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 1278 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 1332 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 1367 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 1410 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 812 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 1025 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 76 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 131 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 160 of file fsm_master.c.
int ec_fsm_master_idle | ( | const ec_fsm_master_t * | fsm | ) |
fsm | Master state machine. |
Definition at line 179 of 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 190 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 446 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 508 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 591 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 649 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 677 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 1073 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 1115 of file fsm_master.c.