Example code for Simple Open EtherCAT master. More...
#include <stdio.h>#include <string.h>#include "osal.h"#include "ethercattype.h"#include "nicdrv.h"#include "ethercatbase.h"#include "ethercatmain.h"#include "ethercatdc.h"#include "ethercatcoe.h"#include "ethercatfoe.h"#include "ethercatconfig.h"#include "ethercatprint.h"
Go to the source code of this file.
Macros | |
| #define | EC_TIMEOUTMON 500 |
Functions | |
| int | AEPsetup (uint16 slave) |
| DWORD WINAPI | ecatcheck (LPVOID lpParam) |
| int | EL7031setup (uint16 slave) |
| int | main (int argc, char *argv[]) |
| void CALLBACK | RTthread (UINT uTimerID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) |
| void | simpletest (char *ifname) |
Variables | |
| uint8 | currentgroup = 0 |
| int | expectedWKC |
| char | ifbuf [1024] |
| boolean | inOP |
| char | IOmap [4096] |
| boolean | needlf |
| volatile int | rtcnt |
| HANDLE | thread1 |
| volatile int | wkc |
Example code for Simple Open EtherCAT master.
Usage : simple_test [ifname1] ifname is NIC interface, f.e. eth0
This is a minimal test.
(c)Arthur Ketels 2010 - 2011
Definition in file win32/simple_test/simple_test.c.
| #define EC_TIMEOUTMON 500 |
Definition at line 27 of file win32/simple_test/simple_test.c.
| int AEPsetup | ( | uint16 | slave | ) |
Definition at line 85 of file win32/simple_test/simple_test.c.
| DWORD WINAPI ecatcheck | ( | LPVOID | lpParam | ) |
Definition at line 273 of file win32/simple_test/simple_test.c.
| int EL7031setup | ( | uint16 | slave | ) |
Definition at line 49 of file win32/simple_test/simple_test.c.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 353 of file win32/simple_test/simple_test.c.
| void CALLBACK RTthread | ( | UINT | uTimerID, |
| UINT | uMsg, | ||
| DWORD_PTR | dwUser, | ||
| DWORD_PTR | dw1, | ||
| DWORD_PTR | dw2 | ||
| ) |
Definition at line 39 of file win32/simple_test/simple_test.c.
| void simpletest | ( | char * | ifname | ) |
Definition at line 125 of file win32/simple_test/simple_test.c.
| uint8 currentgroup = 0 |
Definition at line 36 of file win32/simple_test/simple_test.c.
| int expectedWKC |
Definition at line 31 of file win32/simple_test/simple_test.c.
| char ifbuf[1024] |
Definition at line 351 of file win32/simple_test/simple_test.c.
| boolean inOP |
Definition at line 35 of file win32/simple_test/simple_test.c.
| char IOmap[4096] |
Definition at line 29 of file win32/simple_test/simple_test.c.
| boolean needlf |
Definition at line 32 of file win32/simple_test/simple_test.c.
| volatile int rtcnt |
Definition at line 34 of file win32/simple_test/simple_test.c.
| HANDLE thread1 |
Definition at line 30 of file win32/simple_test/simple_test.c.
| volatile int wkc |
Definition at line 33 of file win32/simple_test/simple_test.c.