|
IgH EtherCAT Master
1.7.0
|
Ethernet over EtherCAT (EoE). More...
Go to the source code of this file.
Macros | |
| #define | SUSE_VERSION 0 |
| #define | SUSE_PATCHLEVEL 0 |
| #define | EOE_DEBUG_LEVEL 1 |
| Defines the debug level of EoE processing. More... | |
| #define | EC_EOE_TX_QUEUE_SIZE 100 |
| Size of the EoE tx queue. | |
| #define | EC_EOE_TRIES 100 |
| Number of tries. | |
Functions | |
| void | ec_eoe_flush (ec_eoe_t *eoe) |
| Empties the transmit queue. More... | |
| int | ec_eoe_send (ec_eoe_t *eoe) |
| Sends a frame or the next fragment. More... | |
| void | ec_eoe_state_rx_start (ec_eoe_t *eoe) |
| State: RX_START. More... | |
| void | ec_eoe_state_rx_fetch (ec_eoe_t *eoe) |
| State: RX_FETCH. 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... | |
| int | ec_eoe_init (ec_eoe_t *eoe, ec_slave_t *slave) |
| EoE constructor. More... | |
| void | ec_eoe_clear (ec_eoe_t *eoe) |
| EoE destructor. 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_holds_mbox_lock (const ec_eoe_t *eoe) |
| Returns, if the handler holds the mailbox read lock of its slave. More... | |
| int | ec_eoe_is_idle (const ec_eoe_t *eoe) |
| Returns the idle state. 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 62 of file ethernet.c.
| void ec_eoe_flush | ( | ec_eoe_t * | eoe | ) |
| int ec_eoe_send | ( | ec_eoe_t * | eoe | ) |
Sends a frame or the next fragment.
| eoe | EoE handler |
Definition at line 276 of file ethernet.c.
| void ec_eoe_state_rx_start | ( | ec_eoe_t * | eoe | ) |
State: RX_START.
Starts a new receiving sequence by checking the slave's mailbox once for a new EoE message.
| eoe | EoE handler |
Definition at line 446 of file ethernet.c.
| void ec_eoe_state_rx_fetch | ( | ec_eoe_t * | eoe | ) |
State: RX_FETCH.
Checks and fetches the mailbox and processes the EoE data.
| eoe | EoE handler |
Definition at line 466 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 670 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 745 of file ethernet.c.
| int ec_eoedev_open | ( | struct net_device * | dev | ) |
Opens the virtual network device.
| dev | EoE net_device |
Definition at line 811 of file ethernet.c.
| int ec_eoedev_stop | ( | struct net_device * | dev | ) |
Stops the virtual network device.
| dev | EoE net_device |
Definition at line 832 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 853 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 906 of file ethernet.c.
| int ec_eoe_init | ( | ec_eoe_t * | eoe, |
| ec_slave_t * | slave | ||
| ) |
EoE constructor.
Initializes the EoE handler, creates a net_device and registers it.
| eoe | EoE handler |
| slave | EtherCAT slave |
Definition at line 111 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 226 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 391 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 405 of file ethernet.c.
| int ec_eoe_holds_mbox_lock | ( | const ec_eoe_t * | eoe | ) |
Returns, if the handler holds the mailbox read lock of its slave.
This is the case, while a mailbox check or fetch is in progress.
| eoe | EoE handler |
Definition at line 418 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 430 of file ethernet.c.
|
static |
Device operations for EoE interfaces.
Definition at line 96 of file ethernet.c.