IgH EtherCAT Master  1.5.3
fsm_slave_scan.c File Reference

EtherCAT slave state machines. More...

Go to the source code of this file.

Functions

void ec_fsm_slave_scan_state_start (ec_fsm_slave_scan_t *fsm)
 Slave scan state: START. More...
 
void ec_fsm_slave_scan_state_address (ec_fsm_slave_scan_t *fsm)
 Slave scan state: ADDRESS. More...
 
void ec_fsm_slave_scan_state_state (ec_fsm_slave_scan_t *fsm)
 Slave scan state: STATE. More...
 
void ec_fsm_slave_scan_state_base (ec_fsm_slave_scan_t *fsm)
 Slave scan state: BASE. More...
 
void ec_fsm_slave_scan_state_dc_cap (ec_fsm_slave_scan_t *fsm)
 Slave scan state: DC CAPABILITIES. More...
 
void ec_fsm_slave_scan_state_dc_times (ec_fsm_slave_scan_t *fsm)
 Slave scan state: DC TIMES. More...
 
void ec_fsm_slave_scan_state_datalink (ec_fsm_slave_scan_t *fsm)
 Slave scan state: DATALINK. More...
 
void ec_fsm_slave_scan_state_assign_sii (ec_fsm_slave_scan_t *fsm)
 Slave scan state: ASSIGN_SII. More...
 
void ec_fsm_slave_scan_state_sii_size (ec_fsm_slave_scan_t *fsm)
 Slave scan state: SII SIZE. More...
 
void ec_fsm_slave_scan_state_sii_data (ec_fsm_slave_scan_t *fsm)
 Slave scan state: SII DATA. More...
 
void ec_fsm_slave_scan_state_preop (ec_fsm_slave_scan_t *fsm)
 Slave scan state: PREOP. More...
 
void ec_fsm_slave_scan_state_sync (ec_fsm_slave_scan_t *fsm)
 Slave scan state: SYNC. More...
 
void ec_fsm_slave_scan_state_pdos (ec_fsm_slave_scan_t *fsm)
 Slave scan state: PDOS. More...
 
void ec_fsm_slave_scan_state_end (ec_fsm_slave_scan_t *fsm)
 State: END. More...
 
void ec_fsm_slave_scan_state_error (ec_fsm_slave_scan_t *fsm)
 State: ERROR. More...
 
void ec_fsm_slave_scan_enter_datalink (ec_fsm_slave_scan_t *fsm)
 Slave scan entry function: DATALINK. More...
 
void ec_fsm_slave_scan_enter_preop (ec_fsm_slave_scan_t *fsm)
 Enter slave scan state PREOP. More...
 
void ec_fsm_slave_scan_enter_pdos (ec_fsm_slave_scan_t *fsm)
 Enter slave scan state PDOS. More...
 
void ec_fsm_slave_scan_init (ec_fsm_slave_scan_t *fsm, ec_datagram_t *datagram, ec_fsm_slave_config_t *fsm_slave_config, ec_fsm_pdo_t *fsm_pdo)
 Constructor. More...
 
void ec_fsm_slave_scan_clear (ec_fsm_slave_scan_t *fsm)
 Destructor. More...
 
void ec_fsm_slave_scan_start (ec_fsm_slave_scan_t *fsm, ec_slave_t *slave)
 Start slave scan state machine. More...
 
int ec_fsm_slave_scan_running (const ec_fsm_slave_scan_t *fsm)
 
int ec_fsm_slave_scan_exec (ec_fsm_slave_scan_t *fsm)
 Executes the current state of the state machine. More...
 
int ec_fsm_slave_scan_success (const ec_fsm_slave_scan_t *fsm)
 
void ec_fsm_slave_scan_enter_sii_size (ec_fsm_slave_scan_t *fsm)
 Enter slave scan state SII_SIZE. More...
 
void ec_fsm_slave_scan_enter_assign_sii (ec_fsm_slave_scan_t *fsm)
 Enter slave scan state ASSIGN_SII. More...
 

Detailed Description

EtherCAT slave state machines.

Definition in file fsm_slave_scan.c.

Function Documentation

◆ ec_fsm_slave_scan_state_start()

void ec_fsm_slave_scan_state_start ( ec_fsm_slave_scan_t fsm)

Slave scan state: START.

First state of the slave state machine. Writes the station address to the slave, according to its ring position.

Parameters
fsmslave state machine

Definition at line 174 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_address()

void ec_fsm_slave_scan_state_address ( ec_fsm_slave_scan_t fsm)

Slave scan state: ADDRESS.

Parameters
fsmslave state machine

Definition at line 189 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_state()

void ec_fsm_slave_scan_state_state ( ec_fsm_slave_scan_t fsm)

Slave scan state: STATE.

Parameters
fsmslave state machine

Definition at line 227 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_base()

void ec_fsm_slave_scan_state_base ( ec_fsm_slave_scan_t fsm)

Slave scan state: BASE.

Parameters
fsmslave state machine

Definition at line 271 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_dc_cap()

void ec_fsm_slave_scan_state_dc_cap ( ec_fsm_slave_scan_t fsm)

Slave scan state: DC CAPABILITIES.

Parameters
fsmslave state machine

Definition at line 345 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_dc_times()

void ec_fsm_slave_scan_state_dc_times ( ec_fsm_slave_scan_t fsm)

Slave scan state: DC TIMES.

Parameters
fsmslave state machine

Definition at line 390 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_datalink()

void ec_fsm_slave_scan_state_datalink ( ec_fsm_slave_scan_t fsm)

Slave scan state: DATALINK.

Parameters
fsmslave state machine

Definition at line 492 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_assign_sii()

void ec_fsm_slave_scan_state_assign_sii ( ec_fsm_slave_scan_t fsm)

Slave scan state: ASSIGN_SII.

Parameters
fsmslave state machine

Definition at line 544 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_sii_size()

void ec_fsm_slave_scan_state_sii_size ( ec_fsm_slave_scan_t fsm)

Slave scan state: SII SIZE.

Parameters
fsmslave state machine

Definition at line 580 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_sii_data()

void ec_fsm_slave_scan_state_sii_data ( ec_fsm_slave_scan_t fsm)

Slave scan state: SII DATA.

Parameters
fsmslave state machine

Definition at line 657 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_preop()

void ec_fsm_slave_scan_state_preop ( ec_fsm_slave_scan_t fsm)

Slave scan state: PREOP.

Parameters
fsmslave state machine

Definition at line 979 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_sync()

void ec_fsm_slave_scan_state_sync ( ec_fsm_slave_scan_t fsm)

Slave scan state: SYNC.

Parameters
fsmslave state machine

Definition at line 998 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_pdos()

void ec_fsm_slave_scan_state_pdos ( ec_fsm_slave_scan_t fsm)

Slave scan state: PDOS.

Parameters
fsmslave state machine

Definition at line 1082 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_end()

void ec_fsm_slave_scan_state_end ( ec_fsm_slave_scan_t fsm)

State: END.

Parameters
fsmslave state machine

Definition at line 1115 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_state_error()

void ec_fsm_slave_scan_state_error ( ec_fsm_slave_scan_t fsm)

State: ERROR.

Parameters
fsmslave state machine

Definition at line 1105 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_enter_datalink()

void ec_fsm_slave_scan_enter_datalink ( ec_fsm_slave_scan_t fsm)

Slave scan entry function: DATALINK.

Parameters
fsmslave state machine

Definition at line 429 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_enter_preop()

void ec_fsm_slave_scan_enter_preop ( ec_fsm_slave_scan_t fsm)

Enter slave scan state PREOP.

Parameters
fsmslave state machine

Definition at line 941 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_enter_pdos()

void ec_fsm_slave_scan_enter_pdos ( ec_fsm_slave_scan_t fsm)

Enter slave scan state PDOS.

Parameters
fsmslave state machine

Definition at line 1066 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_init()

void ec_fsm_slave_scan_init ( ec_fsm_slave_scan_t fsm,
ec_datagram_t datagram,
ec_fsm_slave_config_t fsm_slave_config,
ec_fsm_pdo_t fsm_pdo 
)

Constructor.

Parameters
fsmSlave scanning state machine.
datagramDatagram to use.
fsm_slave_configSlave configuration state machine to use.
fsm_pdoPDO configuration machine to use.

Definition at line 79 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_clear()

void ec_fsm_slave_scan_clear ( ec_fsm_slave_scan_t fsm)

Destructor.

Parameters
fsmslave state machine

Definition at line 99 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_start()

void ec_fsm_slave_scan_start ( ec_fsm_slave_scan_t fsm,
ec_slave_t slave 
)

Start slave scan state machine.

Parameters
fsmslave state machine
slaveslave to configure

Definition at line 111 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_running()

int ec_fsm_slave_scan_running ( const ec_fsm_slave_scan_t fsm)
Returns
false, if state machine has terminated
Parameters
fsmslave state machine

Definition at line 126 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_exec()

int ec_fsm_slave_scan_exec ( ec_fsm_slave_scan_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.

Returns
false, if state machine has terminated
Parameters
fsmslave state machine

Definition at line 141 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_success()

int ec_fsm_slave_scan_success ( const ec_fsm_slave_scan_t fsm)
Returns
true, if the state machine terminated gracefully
Parameters
fsmslave state machine

Definition at line 159 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_enter_sii_size()

void ec_fsm_slave_scan_enter_sii_size ( ec_fsm_slave_scan_t fsm)

Enter slave scan state SII_SIZE.

Parameters
fsmslave state machine

Definition at line 447 of file fsm_slave_scan.c.

◆ ec_fsm_slave_scan_enter_assign_sii()

void ec_fsm_slave_scan_enter_assign_sii ( ec_fsm_slave_scan_t fsm)

Enter slave scan state ASSIGN_SII.

Parameters
fsmslave state machine

Definition at line 468 of file fsm_slave_scan.c.