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 {
63  MSG_Q_ID msgQId[EC_MAXBUF];
64 } ecx_redportt;
65 
67 typedef struct ecx_port
68 {
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);
118 int ecx_closenic(ecx_portt *port);
119 void ecx_setbufstat(ecx_portt *port, int idx, int bufstat);
120 int ecx_getindex(ecx_portt *port);
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
ec_bufT
uint8 ec_bufT[EC_BUFSIZE]
Definition: ethercattype.h:87
ec_waitinframe
int ec_waitinframe(int idx, int timeout)
ecx_redport::rxsa
int rxsa[EC_MAXBUF]
Definition: vxworks/nicdrv.h:61
ecx_port::pktDev
ETHERCAT_PKT_DEV pktDev
Definition: vxworks/nicdrv.h:72
rxbuf
uint8 rxbuf[1024]
Definition: eoe_test.c:50
ecx_redportt
struct ecx_redport ecx_redportt
ecx_port::txbuf2
ec_bufT txbuf2
Definition: vxworks/nicdrv.h:84
ETHERCAT_PKT_DEV::overrun_count
UINT32 overrun_count
Definition: vxworks/nicdrv.h:30
ec_closenic
int ec_closenic(void)
ec_setupnic
int ec_setupnic(const char *ifname, int secondary)
ecx_port
Definition: vxworks/nicdrv.h:67
ec_setbufstat
void ec_setbufstat(int idx, int bufstat)
EC_MAXBUF
#define EC_MAXBUF
Definition: ethercattype.h:62
ec_outframe
int ec_outframe(int idx, int sock)
txbuf
uint8 txbuf[1024]
Definition: eoe_test.c:40
ecx_port::txbuf
ec_bufT txbuf[EC_MAXBUF]
Definition: vxworks/nicdrv.h:80
ec_srconfirm
int ec_srconfirm(int idx, int timeout)
ecx_port::stack
ec_stackT stack
Definition: vxworks/nicdrv.h:70
ecx_port::sem_get_index
SEM_ID sem_get_index
Definition: vxworks/nicdrv.h:94
ETHERCAT_PKT_DEV::tx_count
UINT32 tx_count
Definition: vxworks/nicdrv.h:28
ec_outframe_red
int ec_outframe_red(int idx)
ETHERCAT_PKT_DEV::endObj
void * endObj
Definition: vxworks/nicdrv.h:26
ecx_redport::pktDev
ETHERCAT_PKT_DEV pktDev
Definition: vxworks/nicdrv.h:55
ecx_setupnic
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
Definition: erika/nicdrv.c:90
ecx_port
ecx_portt ecx_port
Definition: ethercatmain.c:97
ecx_closenic
int ecx_closenic(ecx_portt *port)
Definition: erika/nicdrv.c:140
ec_getindex
int ec_getindex(void)
ecx_getindex
int ecx_getindex(ecx_portt *port)
Definition: erika/nicdrv.c:168
ecx_redport
Definition: vxworks/nicdrv.h:50
ecx_redport::rxbuf
ec_bufT rxbuf[EC_MAXBUF]
Definition: vxworks/nicdrv.h:57
priMAC
const uint16 priMAC[3]
Definition: erika/nicdrv.c:65
ecx_waitinframe
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:467
ecx_redport::msgQId
MSG_Q_ID msgQId[EC_MAXBUF]
Definition: vxworks/nicdrv.h:63
ecx_port::lastidx
int lastidx
Definition: vxworks/nicdrv.h:88
ec_stackT
Definition: erika/nicdrv.h:19
ecx_port::txbuflength
int txbuflength[EC_MAXBUF]
Definition: vxworks/nicdrv.h:82
uint16
uint16_t uint16
Definition: osal.h:29
ETHERCAT_PKT_DEV::redundant
UINT32 redundant
Definition: vxworks/nicdrv.h:27
ETHERCAT_PKT_DEV
Definition: vxworks/nicdrv.h:22
ecx_redport::stack
ec_stackT stack
Definition: vxworks/nicdrv.h:53
ecx_port::rxsa
int rxsa[EC_MAXBUF]
Definition: vxworks/nicdrv.h:78
ETHERCAT_PKT_DEV::port
struct ecx_port * port
Definition: vxworks/nicdrv.h:24
ETHERCAT_PKT_DEV::pCookie
void * pCookie
Definition: vxworks/nicdrv.h:25
ecx_outframe
int ecx_outframe(ecx_portt *port, int idx, int sock)
Definition: erika/nicdrv.c:215
ecx_port::msgQId
MSG_Q_ID msgQId[EC_MAXBUF]
Definition: vxworks/nicdrv.h:96
ecx_portt
Definition: erika/nicdrv.h:53
ecx_port::redport
ecx_redportt * redport
Definition: vxworks/nicdrv.h:92
ETHERCAT_PKT_DEV
struct ETHERCAT_PKT_DEV ETHERCAT_PKT_DEV
ETHERCAT_PKT_DEV::abandoned_count
UINT32 abandoned_count
Definition: vxworks/nicdrv.h:31
ec_setupheader
void ec_setupheader(void *p)
Definition: erika/nicdrv.c:151
ecx_port::redstate
int redstate
Definition: vxworks/nicdrv.h:90
ecx_setbufstat
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
Definition: erika/nicdrv.c:202
ecx_redport
ecx_redportt ecx_redport
Definition: ethercatmain.c:98
ecx_port::rxbuf
ec_bufT rxbuf[EC_MAXBUF]
Definition: vxworks/nicdrv.h:74
ecx_port::txbuflength2
int txbuflength2
Definition: vxworks/nicdrv.h:86
secMAC
const uint16 secMAC[3]
Definition: erika/nicdrv.c:67
ecx_redport::rxbufstat
int rxbufstat[EC_MAXBUF]
Definition: vxworks/nicdrv.h:59
ecx_srconfirm
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
Definition: erika/nicdrv.c:490
ecx_outframe_red
int ecx_outframe_red(ecx_portt *port, int idx)
Definition: erika/nicdrv.c:237
ecx_portt
struct ecx_port ecx_portt
ETHERCAT_PKT_DEV::rx_count
UINT32 rx_count
Definition: vxworks/nicdrv.h:29
ecx_port::rxbufstat
int rxbufstat[EC_MAXBUF]
Definition: vxworks/nicdrv.h:76
ecx_redportt
Definition: erika/nicdrv.h:38


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49