Macros | Functions | Variables
eoe_test.c File Reference

Example code for Simple Open EtherCAT master EoE. More...

#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "ethercat.h"
Include dependency graph for eoe_test.c:

Go to the source code of this file.

Macros

#define EC_TIMEOUTMON   500
 

Functions

OSAL_THREAD_FUNC ecatcheck (void *ptr)
 
int eoe_hook (ecx_contextt *context, uint16 slave, void *eoembx)
 
OSAL_THREAD_FUNC mailbox_reader (void *lpParam)
 
int main (int argc, char *argv[])
 
void test_eoe (ecx_contextt *context)
 
void teststarter (char *ifname)
 

Variables

uint8 currentgroup = 0
 
int expectedWKC
 
volatile int globalwkc
 
boolean inOP
 
char IOmap [4096]
 
boolean needlf
 
uint8 rxbuf [1024]
 
uint8_t rxfragmentno = 0
 
uint16_t rxframeno = 0
 
uint16_t rxframeoffset = 0
 
uint16_t rxframesize = 0
 
int size_of_rx = sizeof(rxbuf)
 
OSAL_THREAD_HANDLE thread1
 
OSAL_THREAD_HANDLE thread2
 
uint8 txbuf [1024]
 

Detailed Description

Example code for Simple Open EtherCAT master EoE.

This example will run the follwing EoE functions SetIP GetIP

Loop Send fragment data (Layer 2 0x88A4) Receive fragment data (Layer 2 0x88A4)

For this to work, a special slave test code is running that will bounce the sent 0x88A4 back to receive.

Usage : eoe_test [ifname1] ifname is NIC interface, f.e. eth0

This is a minimal test.

(c)Arthur Ketels 2010 - 2011

Definition in file eoe_test.c.

Macro Definition Documentation

#define EC_TIMEOUTMON   500

Definition at line 29 of file eoe_test.c.

Function Documentation

OSAL_THREAD_FUNC ecatcheck ( void *  ptr)

Definition at line 314 of file eoe_test.c.

int eoe_hook ( ecx_contextt context,
uint16  slave,
void *  eoembx 
)

registered EoE hook

Definition at line 54 of file eoe_test.c.

OSAL_THREAD_FUNC mailbox_reader ( void *  lpParam)

Definition at line 117 of file eoe_test.c.

int main ( int  argc,
char *  argv[] 
)

Definition at line 400 of file eoe_test.c.

void test_eoe ( ecx_contextt context)

Definition at line 148 of file eoe_test.c.

void teststarter ( char *  ifname)

Definition at line 194 of file eoe_test.c.

Variable Documentation

uint8 currentgroup = 0

Definition at line 37 of file eoe_test.c.

int expectedWKC

Definition at line 33 of file eoe_test.c.

volatile int globalwkc

Definition at line 35 of file eoe_test.c.

boolean inOP

Definition at line 36 of file eoe_test.c.

char IOmap[4096]

Definition at line 31 of file eoe_test.c.

boolean needlf

Definition at line 34 of file eoe_test.c.

uint8 rxbuf[1024]

Definition at line 50 of file eoe_test.c.

uint8_t rxfragmentno = 0

Current RX fragment number

Definition at line 43 of file eoe_test.c.

uint16_t rxframeno = 0

Current RX frame number

Definition at line 49 of file eoe_test.c.

uint16_t rxframeoffset = 0

Current RX data offset in frame

Definition at line 47 of file eoe_test.c.

uint16_t rxframesize = 0

Complete RX frame size of current frame

Definition at line 45 of file eoe_test.c.

int size_of_rx = sizeof(rxbuf)

Definition at line 51 of file eoe_test.c.

Definition at line 38 of file eoe_test.c.

Definition at line 39 of file eoe_test.c.

uint8 txbuf[1024]

Definition at line 40 of file eoe_test.c.



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