vxworks/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 #include <vxWorks.h>
20 
22 typedef struct ETHERCAT_PKT_DEV
23 {
24  struct ecx_port *port;
25  void *pCookie;
26  void *endObj;
27  UINT32 redundant;
28  UINT32 tx_count;
29  UINT32 rx_count;
30  UINT32 overrun_count;
33 
35 typedef struct
36 {
40  int (*txbuflength)[EC_MAXBUF];
44  int (*rxbufstat)[EC_MAXBUF];
46  int (*rxsa)[EC_MAXBUF];
47 } ec_stackT;
48 
50 typedef struct ecx_redport
51 {
59  int rxbufstat[EC_MAXBUF];
61  int rxsa[EC_MAXBUF];
63  MSG_Q_ID msgQId[EC_MAXBUF];
64 } ecx_redportt;
65 
67 typedef struct ecx_port
68 {
76  int rxbufstat[EC_MAXBUF];
78  int rxsa[EC_MAXBUF];
82  int txbuflength[EC_MAXBUF];
88  int lastidx;
90  int redstate;
94  SEM_ID sem_get_index;
96  MSG_Q_ID msgQId[EC_MAXBUF];
97 } ecx_portt;
98 
99 extern const uint16 priMAC[3];
100 extern const uint16 secMAC[3];
101 
102 #ifdef EC_VER1
103 extern ecx_portt ecx_port;
105 
106 int ec_setupnic(const char * ifname, int secondary);
107 int ec_closenic(void);
108 void ec_setbufstat(int idx, int bufstat);
109 int ec_getindex(void);
110 int ec_outframe(int idx, int sock);
111 int ec_outframe_red(int idx);
112 int ec_waitinframe(int idx, int timeout);
113 int ec_srconfirm(int idx,int timeout);
114 #endif
115 
116 void ec_setupheader(void *p);
117 int ecx_setupnic(ecx_portt *port, const char * ifname, int secondary);
119 void ecx_setbufstat(ecx_portt *port, int idx, int bufstat);
121 int ecx_outframe(ecx_portt *port, int idx, int sock);
122 int ecx_outframe_red(ecx_portt *port, int idx);
123 int ecx_waitinframe(ecx_portt *port, int idx, int timeout);
124 int ecx_srconfirm(ecx_portt *port, int idx,int timeout);
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
int ec_outframe(int idx, int sock)
int ec_setupnic(const char *ifname, int secondary)
int rxbufstat[EC_MAXBUF]
uint8 txbuf[1024]
Definition: eoe_test.c:40
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
#define EC_MAXBUF
Definition: ethercattype.h:62
struct ETHERCAT_PKT_DEV ETHERCAT_PKT_DEV
ETHERCAT_PKT_DEV pktDev
ecx_redportt * redport
int txbuflength[EC_MAXBUF]
uint16_t uint16
Definition: osal.h:29
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
ETHERCAT_PKT_DEV pktDev
ecx_portt ecx_port
Definition: ethercatmain.c:97
int rxsa[EC_MAXBUF]
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
int ecx_outframe(ecx_portt *port, int idx, int sock)
Definition: erika/nicdrv.c:215
int ec_srconfirm(int idx, int timeout)
void ec_setbufstat(int idx, int bufstat)
ec_stackT stack
struct ecx_port ecx_portt
ec_bufT txbuf2
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)
SEM_ID sem_get_index
const uint16 secMAC[3]
Definition: erika/nicdrv.c:67
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)
struct ecx_port * port
struct ecx_redport ecx_redportt
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
int txbuflength2
ec_stackT stack
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