|
IgH EtherCAT Master
1.5.2
|
Ethernet over EtherCAT (EoE). More...
Go to the source code of this file.
Macros | |
| #define | EOE_DEBUG_LEVEL 1 |
| Defines the debug level of EoE processing. More... | |
| #define | EC_EOE_TX_RING_SIZE 100 |
| Size of the EoE tx ring. | |
| #define | EC_EOE_TRIES 100 |
| Number of tries. | |
Functions | |
| void | ec_eoe_flush (ec_eoe_t *eoe) |
| Empties the transmit queue. More... | |
| static unsigned int | eoe_tx_unused_frames (ec_eoe_t *) |
| void | ec_eoe_state_rx_start (ec_eoe_t *eoe) |
| State: RX_START. More... | |
| void | ec_eoe_state_rx_check (ec_eoe_t *eoe) |
| State: RX_CHECK. More... | |
| void | ec_eoe_state_rx_fetch (ec_eoe_t *eoe) |
| State: RX_FETCH. More... | |
| void | ec_eoe_state_rx_fetch_data (ec_eoe_t *eoe) |
| State: RX_FETCH DATA. More... | |
| void | ec_eoe_state_tx_start (ec_eoe_t *eoe) |
| State: TX START. More... | |
| void | ec_eoe_state_tx_sent (ec_eoe_t *eoe) |
| State: TX SENT. More... | |
| int | ec_eoedev_open (struct net_device *dev) |
| Opens the virtual network device. More... | |
| int | ec_eoedev_stop (struct net_device *dev) |
| Stops the virtual network device. More... | |
| int | ec_eoedev_tx (struct sk_buff *skb, struct net_device *dev) |
| Transmits data via the virtual network device. More... | |
| struct net_device_stats * | ec_eoedev_stats (struct net_device *dev) |
| Gets statistics about the virtual network device. More... | |
| static int | ec_eoedev_set_mac (struct net_device *netdev, void *p) |
ec_eoedev_set_mac - Change the Ethernet Address of the NIC : network interface device structure : pointer to an address structure More... | |
| int | ec_eoe_parse (const char *eoe, int *master_idx, uint16_t *alias, uint16_t *posn) |
| Parse an eoe interface from a string. More... | |
| int | ec_eoe_init (ec_master_t *master, ec_eoe_t *eoe, uint16_t alias, uint16_t ring_position) |
| EoE explicit init constructor. More... | |
| int | ec_eoe_auto_init (ec_eoe_t *eoe, ec_slave_t *slave) |
| EoE auto constructor for slave. More... | |
| void | ec_eoe_link_slave (ec_eoe_t *eoe, ec_slave_t *slave) |
| EoE link slave. More... | |
| void | ec_eoe_clear_slave (ec_eoe_t *eoe) |
| EoE clear slave. More... | |
| void | ec_eoe_clear (ec_eoe_t *eoe) |
| EoE destructor. More... | |
| unsigned int | ec_eoe_tx_queued_frames (const ec_eoe_t *eoe) |
| int | ec_eoe_send (ec_eoe_t *eoe) |
| Sends a frame or the next fragment. More... | |
| void | ec_eoe_run (ec_eoe_t *eoe) |
| Runs the EoE state machine. More... | |
| void | ec_eoe_queue (ec_eoe_t *eoe) |
| Queues the datagram, if necessary. More... | |
| int | ec_eoe_is_open (const ec_eoe_t *eoe) |
| Returns the state of the device. More... | |
| int | ec_eoe_is_idle (const ec_eoe_t *eoe) |
| Returns the idle state. More... | |
| char * | ec_eoe_name (const ec_eoe_t *eoe) |
| Returns the eoe device name. More... | |
Variables | |
| static const struct net_device_ops | ec_eoedev_ops |
| Device operations for EoE interfaces. More... | |
Ethernet over EtherCAT (EoE).
Definition in file ethernet.c.
| #define EOE_DEBUG_LEVEL 1 |
Defines the debug level of EoE processing.
0 = No debug messages. 1 = Output warnings. 2 = Output actions. 3 = Output actions and frame data.
Definition at line 56 of file ethernet.c.
| void ec_eoe_flush | ( | ec_eoe_t * | eoe | ) |
|
static |
| eoe | EoE handler |
Definition at line 554 of file ethernet.c.
| void ec_eoe_state_rx_start | ( | ec_eoe_t * | eoe | ) |
State: RX_START.
Starts a new receiving sequence by queueing a datagram that checks the slave's mailbox for a new EoE datagram.
| eoe | EoE handler |
Definition at line 732 of file ethernet.c.
| void ec_eoe_state_rx_check | ( | ec_eoe_t * | eoe | ) |
State: RX_CHECK.
Processes the checking datagram sent in RX_START and issues a receive datagram, if new data is available.
| eoe | EoE handler |
Definition at line 759 of file ethernet.c.
| void ec_eoe_state_rx_fetch | ( | ec_eoe_t * | eoe | ) |
State: RX_FETCH.
Checks if the requested data of RX_CHECK was received and processes the EoE datagram.
| eoe | EoE handler |
Definition at line 800 of file ethernet.c.
| void ec_eoe_state_rx_fetch_data | ( | ec_eoe_t * | eoe | ) |
State: RX_FETCH DATA.
Processes the EoE data.
| eoe | EoE handler |
Definition at line 827 of file ethernet.c.
| void ec_eoe_state_tx_start | ( | ec_eoe_t * | eoe | ) |
State: TX START.
Starts a new transmit sequence. If no data is available, a new receive sequence is started instead.
| eoe | EoE handler |
Definition at line 1005 of file ethernet.c.
| void ec_eoe_state_tx_sent | ( | ec_eoe_t * | eoe | ) |
State: TX SENT.
Checks is the previous transmit datagram succeded and sends the next fragment, if necessary.
| eoe | EoE handler |
Definition at line 1085 of file ethernet.c.
| int ec_eoedev_open | ( | struct net_device * | dev | ) |
Opens the virtual network device.
| dev | EoE net_device |
Definition at line 1153 of file ethernet.c.
| int ec_eoedev_stop | ( | struct net_device * | dev | ) |
Stops the virtual network device.
| dev | EoE net_device |
Definition at line 1186 of file ethernet.c.
| int ec_eoedev_tx | ( | struct sk_buff * | skb, |
| struct net_device * | dev | ||
| ) |
Transmits data via the virtual network device.
| skb | transmit socket buffer |
| dev | EoE net_device |
Definition at line 1210 of file ethernet.c.
| struct net_device_stats * ec_eoedev_stats | ( | struct net_device * | dev | ) |
Gets statistics about the virtual network device.
| dev | EoE net_device |
Definition at line 1267 of file ethernet.c.
|
static |
ec_eoedev_set_mac - Change the Ethernet Address of the NIC : network interface device structure : pointer to an address structure
Returns 0 on success, negative on failure
Definition at line 110 of file ethernet.c.
| int ec_eoe_parse | ( | const char * | eoe, |
| int * | master_idx, | ||
| uint16_t * | alias, | ||
| uint16_t * | posn | ||
| ) |
Parse an eoe interface from a string.
The eoe interface must match the regular expression "eoe([0-9]*)([as])([0-9]*)".
Definition at line 132 of file ethernet.c.
| int ec_eoe_init | ( | ec_master_t * | master, |
| ec_eoe_t * | eoe, | ||
| uint16_t | alias, | ||
| uint16_t | ring_position | ||
| ) |
EoE explicit init constructor.
Initializes the EoE handler before a slave is configured, creates a net_device and registers it.
| master | EtherCAT master |
| eoe | EoE handler |
| alias | EtherCAT slave alias |
| ring_position | EtherCAT slave ring position |
Definition at line 207 of file ethernet.c.
| int ec_eoe_auto_init | ( | ec_eoe_t * | eoe, |
| ec_slave_t * | slave | ||
| ) |
EoE auto constructor for slave.
Initializes the EoE handler, creates a net_device and registers it.
| eoe | EoE handler |
| slave | EtherCAT slave |
Definition at line 385 of file ethernet.c.
| void ec_eoe_link_slave | ( | ec_eoe_t * | eoe, |
| ec_slave_t * | slave | ||
| ) |
EoE link slave.
links a slave to a handler after a slave is connected or reconfigured during a rescan.
| eoe | EoE handler |
| slave | EtherCAT slave |
Definition at line 412 of file ethernet.c.
| void ec_eoe_clear_slave | ( | ec_eoe_t * | eoe | ) |
EoE clear slave.
delinks slave from the handler so that the EoE interface is kept if a slave get disconnected.
| eoe | EoE handler |
Definition at line 448 of file ethernet.c.
| void ec_eoe_clear | ( | ec_eoe_t * | eoe | ) |
EoE destructor.
Unregisteres the net_device and frees allocated memory.
| eoe | EoE handler |
Definition at line 489 of file ethernet.c.
| unsigned int ec_eoe_tx_queued_frames | ( | const ec_eoe_t * | eoe | ) |
| eoe | EoE handler |
Definition at line 540 of file ethernet.c.
| int ec_eoe_send | ( | ec_eoe_t * | eoe | ) |
Sends a frame or the next fragment.
| eoe | EoE handler |
Definition at line 573 of file ethernet.c.
| void ec_eoe_run | ( | ec_eoe_t * | eoe | ) |
| void ec_eoe_queue | ( | ec_eoe_t * | eoe | ) |
Queues the datagram, if necessary.
| eoe | EoE handler |
Definition at line 679 of file ethernet.c.
| int ec_eoe_is_open | ( | const ec_eoe_t * | eoe | ) |
Returns the state of the device.
| eoe | EoE handler |
Definition at line 693 of file ethernet.c.
| int ec_eoe_is_idle | ( | const ec_eoe_t * | eoe | ) |
Returns the idle state.
| 1 | The device is idle. |
| 0 | The device is busy. |
| eoe | EoE handler |
Definition at line 705 of file ethernet.c.
| char* ec_eoe_name | ( | const ec_eoe_t * | eoe | ) |
Returns the eoe device name.
| the | device name. |
| eoe | EoE handler |
Definition at line 716 of file ethernet.c.
|
static |
Device operations for EoE interfaces.
Definition at line 91 of file ethernet.c.