erika/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 
14 #ifdef __cplusplus
15 extern "C"
16 {
17 #endif
18 
19 typedef struct
20 {
22  int *sock;
26  int (*txbuflength)[EC_MAXBUF];
32  int (*rxbufstat)[EC_MAXBUF];
34  int (*rxsa)[EC_MAXBUF];
35 } ec_stackT;
36 
38 typedef struct
39 {
45  int rxbufstat[EC_MAXBUF];
47  int rxsa[EC_MAXBUF];
50 } ecx_redportt;
51 
53 typedef struct
54 {
60  int rxbufstat[EC_MAXBUF];
62  int rxsa[EC_MAXBUF];
70  int txbuflength[EC_MAXBUF];
76  int lastidx;
78  int redstate;
81 
83  int dev_id;
84 
85  // TODO: add mutex support
86 } ecx_portt;
87 
88 extern const uint16 priMAC[3];
89 extern const uint16 secMAC[3];
90 
91 #ifdef EC_VER1
92 extern ecx_portt ecx_port;
94 
95 int ec_setupnic(const char * ifname, int secondary);
96 int ec_closenic(void);
97 void ec_setbufstat(int idx, int bufstat);
98 int ec_getindex(void);
99 int ec_outframe(int idx, int sock);
100 int ec_outframe_red(int idx);
101 int ec_waitinframe(int idx, int timeout);
102 int ec_srconfirm(int idx,int timeout);
103 int ec_inframe(int idx, int stacknumber);
104 #endif
105 
106 void ec_setupheader(void *p);
107 int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary);
108 int ecx_closenic(ecx_portt *port);
109 void ecx_setbufstat(ecx_portt *port, int idx, int bufstat);
110 int ecx_getindex(ecx_portt *port);
111 int ecx_outframe(ecx_portt *port, int idx, int sock);
112 int ecx_outframe_red(ecx_portt *port, int idx);
113 int ecx_waitinframe(ecx_portt *port, int idx, int timeout);
114 int ecx_srconfirm(ecx_portt *port, int idx,int timeout);
115 
116 int ecx_inframe(ecx_portt *port, int idx, int stacknumber);
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif
int ec_outframe(int idx, int sock)
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
int ec_setupnic(const char *ifname, int secondary)
uint8 txbuf[1024]
Definition: eoe_test.c:40
#define EC_MAXBUF
Definition: ethercattype.h:62
ec_bufT txbuf2
Definition: erika/nicdrv.h:72
ec_bufT * tempbuf
Definition: erika/nicdrv.h:28
int txbuflength2
Definition: erika/nicdrv.h:74
uint16_t uint16
Definition: osal.h:29
int ecx_outframe(ecx_portt *port, int idx, int sock)
Definition: erika/nicdrv.c:215
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
ec_stackT stack
Definition: erika/nicdrv.h:55
ecx_portt ecx_port
Definition: ethercatmain.c:97
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168
ec_stackT stack
Definition: erika/nicdrv.h:40
ec_bufT tempinbuf
Definition: erika/nicdrv.h:64
int ec_srconfirm(int idx, int timeout)
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
int tempinbufs
Definition: erika/nicdrv.h:66
void ec_setbufstat(int idx, int bufstat)
ecx_redportt * redport
Definition: erika/nicdrv.h:80
struct ecx_port ecx_portt
ecx_redportt ecx_redport
Definition: ethercatmain.c:98
int ec_outframe_red(int idx)
int redstate
Definition: erika/nicdrv.h:78
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
int ecx_inframe(ecx_portt *port, int idx, int stacknumber)
Definition: erika/nicdrv.c:303
uint8 ec_bufT[EC_BUFSIZE]
Definition: ethercattype.h:87
ec_bufT tempinbuf
Definition: erika/nicdrv.h:49
int ec_closenic(void)
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
int ec_getindex(void)
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
Definition: erika/nicdrv.c:202
int ec_waitinframe(int idx, int timeout)
int sockhandle
Definition: erika/nicdrv.h:56
struct ecx_redport ecx_redportt
int * sock
Definition: erika/nicdrv.h:22
const uint16 secMAC[3]
Definition: erika/nicdrv.c:67
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