rtk/nicdrv.h
Go to the documentation of this file.
1 /*
2  * Licensed under the GNU General Public License version 2 with exceptions. See
3  * LICENSE file in the project root for full license information
4  */
5 
11 #ifndef _nicdrvh_
12 #define _nicdrvh_
13 
15 typedef struct
16 {
18  int *sock;
22  int (*txbuflength)[EC_MAXBUF];
24  ec_bufT *tempbuf;
28  int (*rxbufstat)[EC_MAXBUF];
30  int (*rxsa)[EC_MAXBUF];
31 } ec_stackT;
32 
34 typedef struct
35 {
36  ec_stackT stack;
37  int sockhandle;
41  int rxbufstat[EC_MAXBUF];
43  int rxsa[EC_MAXBUF];
45  ec_bufT tempinbuf;
46 } ecx_redportt;
47 
49 typedef struct
50 {
51  ec_stackT stack;
52  int sockhandle;
56  int rxbufstat[EC_MAXBUF];
58  int rxsa[EC_MAXBUF];
60  ec_bufT tempinbuf;
62  int tempinbufs;
66  int txbuflength[EC_MAXBUF];
68  ec_bufT txbuf2;
70  int txbuflength2;
72  int lastidx;
74  int redstate;
76  ecx_redportt *redport;
77  mtx_t * getindex_mutex;
78  mtx_t * tx_mutex;
79  mtx_t * rx_mutex;
80 } ecx_portt;
81 
82 extern const uint16 priMAC[3];
83 extern const uint16 secMAC[3];
84 
85 #ifdef EC_VER1
86 extern ecx_portt ecx_port;
88 
89 int ec_setupnic(const char * ifname, int secondary);
90 int ec_closenic(void);
91 void ec_setbufstat(int idx, int bufstat);
92 int ec_getindex(void);
93 int ec_outframe(int idx, int stacknumber);
94 int ec_outframe_red(int idx);
95 int ec_waitinframe(int idx, int timeout);
96 int ec_srconfirm(int idx,int timeout);
97 #endif
98 
99 void ec_setupheader(void *p);
100 int ecx_setupnic(ecx_portt *port, const char * ifname, int secondary);
101 int ecx_closenic(ecx_portt *port);
102 void ecx_setbufstat(ecx_portt *port, int idx, int bufstat);
103 int ecx_getindex(ecx_portt *port);
104 int ecx_outframe(ecx_portt *port, int idx, int stacknumber);
105 int ecx_outframe_red(ecx_portt *port, int idx);
106 int ecx_waitinframe(ecx_portt *port, int idx, int timeout);
107 int ecx_srconfirm(ecx_portt *port, int idx,int timeout);
108 
109 #endif
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
Definition: erika/nicdrv.c:202
int ec_outframe(int idx, int sock)
int ec_setupnic(const char *ifname, int secondary)
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168
uint8 txbuf[1024]
Definition: eoe_test.c:40
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
#define EC_MAXBUF
Definition: ethercattype.h:62
mtx_t * rx_mutex
Definition: rtk/nicdrv.h:79
uint16_t uint16
Definition: osal.h:29
ecx_portt ecx_port
Definition: ethercatmain.c:97
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
int ec_srconfirm(int idx, int timeout)
mtx_t * getindex_mutex
Definition: rtk/nicdrv.h:77
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
void ec_setbufstat(int idx, int bufstat)
mtx_t * tx_mutex
Definition: rtk/nicdrv.h:78
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
struct ecx_port ecx_portt
ecx_redportt ecx_redport
Definition: ethercatmain.c:98
int ec_outframe_red(int idx)
uint8 ec_bufT[EC_BUFSIZE]
Definition: ethercattype.h:87
int ec_closenic(void)
const uint16 secMAC[3]
Definition: erika/nicdrv.c:67
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
int ec_getindex(void)
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
int ec_waitinframe(int idx, int timeout)
struct ecx_redport ecx_redportt
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
int ecx_outframe(ecx_portt *port, int idx, int stacknumber)
Definition: erika/nicdrv.c:215
uint8 rxbuf[1024]
Definition: eoe_test.c:50


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Sat Jun 27 2020 03:48:21