Generic ethercat interface towards lower level drivers. More...
#include <netif.h>
Public Attributes | |
struct pkt_buf | buf_list [BUF_LIST_SIZE] |
List of buffers used for packet reception. | |
struct netif_counters | counters |
Counters for certain types of events (packet drops, invalid packets, etc) | |
bool(* | drop )(struct EtherCAT_Frame *frame, struct netif *netif, int handle) |
Drop frame. | |
unsigned char | hwaddr [MAC_ADDRESS_SIZE] |
The MAC address. | |
pthread_t | input_thread |
volatile bool | is_stopped |
unsigned | next_pkt_index |
Outstanding pkt slot to use from next tx. | |
struct outstanding_pkt | pkt_list [PKT_LIST_SIZE] |
void * | private_data |
bool(* | rx )(struct EtherCAT_Frame *frame, struct netif *netif, int handle) |
Recieve frame. | |
bool(* | rx_nowait )(struct EtherCAT_Frame *frame, struct netif *netif, int handle) |
Recieve frame. | |
unsigned | rx_seqnum |
Secuence number of more recently recieved packet. | |
int | socket_private |
Filedescriptor of the socket. | |
volatile bool | stop |
int | timeout_us |
int(* | tx )(struct EtherCAT_Frame *frame, struct netif *netif) |
Transmit frame. | |
unsigned | tx_seqnum |
Sequence number to put on next sent packet. | |
bool(* | txandrx )(struct EtherCAT_Frame *frame, struct netif *netif) |
Transmit and receive an EtherCAT frame. | |
pthread_mutexattr_t | txandrx_attr |
pthread_mutex_t | txandrx_mut |
bool(* | txandrx_once )(struct EtherCAT_Frame *frame, struct netif *netif) |
unsigned | unclaimed_packets |
Generic ethercat interface towards lower level drivers.
It should be readily re-implemented for different OSes such as RTAI, linux, ... etc. (For the ease of porting the interface is in C).
struct pkt_buf netif::buf_list[BUF_LIST_SIZE] |
struct netif_counters netif::counters |
bool(* netif::drop)(struct EtherCAT_Frame *frame, struct netif *netif, int handle) |
unsigned char netif::hwaddr[MAC_ADDRESS_SIZE] |
pthread_t netif::input_thread |
volatile bool netif::is_stopped |
unsigned netif::next_pkt_index |
void* netif::private_data |
bool(* netif::rx)(struct EtherCAT_Frame *frame, struct netif *netif, int handle) |
bool(* netif::rx_nowait)(struct EtherCAT_Frame *frame, struct netif *netif, int handle) |
unsigned netif::rx_seqnum |
volatile bool netif::stop |
int(* netif::tx)(struct EtherCAT_Frame *frame, struct netif *netif) |
unsigned netif::tx_seqnum |
bool(* netif::txandrx)(struct EtherCAT_Frame *frame, struct netif *netif) |
pthread_mutexattr_t netif::txandrx_attr |
pthread_mutex_t netif::txandrx_mut |
bool(* netif::txandrx_once)(struct EtherCAT_Frame *frame, struct netif *netif) |
unsigned netif::unclaimed_packets |