Public Attributes
netif Struct Reference

Generic ethercat interface towards lower level drivers. More...

#include <netif.h>

List of all members.

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

Detailed Description

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).

Definition at line 134 of file netif.h.


Member Data Documentation

List of buffers used for packet reception.

Definition at line 193 of file netif.h.

Counters for certain types of events (packet drops, invalid packets, etc)

Definition at line 174 of file netif.h.

bool(* netif::drop)(struct EtherCAT_Frame *frame, struct netif *netif, int handle)

Drop frame.

Like rx(), but does not fill in frame with result, useful for testing

Definition at line 161 of file netif.h.

The MAC address.

Definition at line 169 of file netif.h.

Definition at line 200 of file netif.h.

volatile bool netif::is_stopped

Definition at line 202 of file netif.h.

Outstanding pkt slot to use from next tx.

Definition at line 183 of file netif.h.

List of outstanding packets (packets that have been tx'ed but not rx'ed)

Definition at line 187 of file netif.h.

Definition at line 208 of file netif.h.

bool(* netif::rx)(struct EtherCAT_Frame *frame, struct netif *netif, int handle)

Recieve frame.

May block, returns true if correct frame is recieved

Definition at line 156 of file netif.h.

bool(* netif::rx_nowait)(struct EtherCAT_Frame *frame, struct netif *netif, int handle)

Recieve frame.

Will not block, returns true if correct frame is recieved

Definition at line 166 of file netif.h.

unsigned netif::rx_seqnum

Secuence number of more recently recieved packet.

Definition at line 180 of file netif.h.

Filedescriptor of the socket.

Definition at line 171 of file netif.h.

volatile bool netif::stop

Definition at line 201 of file netif.h.

Definition at line 205 of file netif.h.

int(* netif::tx)(struct EtherCAT_Frame *frame, struct netif *netif)

Transmit frame.

Negative return value is an error code, positive and zero is a handle

Definition at line 151 of file netif.h.

unsigned netif::tx_seqnum

Sequence number to put on next sent packet.

Definition at line 177 of file netif.h.

bool(* netif::txandrx)(struct EtherCAT_Frame *frame, struct netif *netif)

Transmit and receive an EtherCAT frame.

Implemented for ecos in low_level_txandrx() in packages/io/eth/current/src/ethercatmaster/eth_drv.c and mapped in eth_drv_init()

Definition at line 141 of file netif.h.

pthread_mutexattr_t netif::txandrx_attr

Definition at line 197 of file netif.h.

pthread_mutex_t netif::txandrx_mut

Definition at line 196 of file netif.h.

bool(* netif::txandrx_once)(struct EtherCAT_Frame *frame, struct netif *netif)

Transmit and receive an EtherCAT frame - only attempt to send frame once

Definition at line 145 of file netif.h.

Definition at line 190 of file netif.h.


The documentation for this struct was generated from the following file:


ros_ethercat_eml
Author(s): Tom Panis, Klaas Gadeyne, Bob Koninckx, Austin Hendrix, Manos Nikolaidis
autogenerated on Thu Aug 27 2015 14:47:07