You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Staging: epl: run Lindent on *.h files
It's a start, still a mess... Cc: Daniel Krueger <daniel.krueger@systec-electronic.com> Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
+160
-166
@@ -73,31 +73,30 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
|
||||
#if (TARGET_SYSTEM == _NO_OS_) && (DEV_SYSTEM == _DEV_GNU_CF548X_)
|
||||
#include "common.h"
|
||||
#include "common.h"
|
||||
|
||||
#elif (TARGET_SYSTEM == _LINUX_) && defined(__KERNEL__)
|
||||
|
||||
// #include <linux/config.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#ifdef CONFIG_COLDFIRE
|
||||
#include <asm/coldfire.h>
|
||||
#include <asm/m5485gpio.h>
|
||||
#ifdef CONFIG_COLDFIRE
|
||||
#include <asm/coldfire.h>
|
||||
#include <asm/m5485gpio.h>
|
||||
|
||||
#define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1)
|
||||
#define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1)
|
||||
#define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5))
|
||||
#else
|
||||
#undef BENCHMARK_MODULES
|
||||
#define BENCHMARK_MODULES 0x00000000
|
||||
#endif
|
||||
#define BENCHMARK_SET(x) MCF_GPIO_PODR_PCIBG |= (1 << (x)) // (x+1)
|
||||
#define BENCHMARK_RESET(x) MCF_GPIO_PODR_PCIBG &= ~(1 << (x)) // (x+1)
|
||||
#define BENCHMARK_TOGGLE(x) MCF_GPIO_PODR_PCIBR ^= (1 << (x - 5))
|
||||
#else
|
||||
#undef BENCHMARK_MODULES
|
||||
#define BENCHMARK_MODULES 0x00000000
|
||||
#endif
|
||||
|
||||
#else
|
||||
// disable Benchmarking
|
||||
#undef BENCHMARK_MODULES
|
||||
#define BENCHMARK_MODULES 0x00000000
|
||||
#undef BENCHMARK_MODULES
|
||||
#define BENCHMARK_MODULES 0x00000000
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
@@ -149,295 +148,290 @@
|
||||
#define BENCHMARK_MOD_31 0x40000000
|
||||
#define BENCHMARK_MOD_32 0x80000000
|
||||
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_01)
|
||||
#define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_01_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_01_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_01_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_01_SET(x)
|
||||
#define BENCHMARK_MOD_01_RESET(x)
|
||||
#define BENCHMARK_MOD_01_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_01_SET(x)
|
||||
#define BENCHMARK_MOD_01_RESET(x)
|
||||
#define BENCHMARK_MOD_01_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_02)
|
||||
#define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_02_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_02_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_02_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_02_SET(x)
|
||||
#define BENCHMARK_MOD_02_RESET(x)
|
||||
#define BENCHMARK_MOD_02_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_02_SET(x)
|
||||
#define BENCHMARK_MOD_02_RESET(x)
|
||||
#define BENCHMARK_MOD_02_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_03)
|
||||
#define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_03_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_03_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_03_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_03_SET(x)
|
||||
#define BENCHMARK_MOD_03_RESET(x)
|
||||
#define BENCHMARK_MOD_03_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_03_SET(x)
|
||||
#define BENCHMARK_MOD_03_RESET(x)
|
||||
#define BENCHMARK_MOD_03_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_04)
|
||||
#define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_04_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_04_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_04_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_04_SET(x)
|
||||
#define BENCHMARK_MOD_04_RESET(x)
|
||||
#define BENCHMARK_MOD_04_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_04_SET(x)
|
||||
#define BENCHMARK_MOD_04_RESET(x)
|
||||
#define BENCHMARK_MOD_04_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_05)
|
||||
#define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_05_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_05_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_05_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_05_SET(x)
|
||||
#define BENCHMARK_MOD_05_RESET(x)
|
||||
#define BENCHMARK_MOD_05_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_05_SET(x)
|
||||
#define BENCHMARK_MOD_05_RESET(x)
|
||||
#define BENCHMARK_MOD_05_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_06)
|
||||
#define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_06_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_06_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_06_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_06_SET(x)
|
||||
#define BENCHMARK_MOD_06_RESET(x)
|
||||
#define BENCHMARK_MOD_06_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_06_SET(x)
|
||||
#define BENCHMARK_MOD_06_RESET(x)
|
||||
#define BENCHMARK_MOD_06_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_07)
|
||||
#define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_07_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_07_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_07_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_07_SET(x)
|
||||
#define BENCHMARK_MOD_07_RESET(x)
|
||||
#define BENCHMARK_MOD_07_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_07_SET(x)
|
||||
#define BENCHMARK_MOD_07_RESET(x)
|
||||
#define BENCHMARK_MOD_07_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_08)
|
||||
#define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_08_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_08_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_08_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_08_SET(x)
|
||||
#define BENCHMARK_MOD_08_RESET(x)
|
||||
#define BENCHMARK_MOD_08_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_08_SET(x)
|
||||
#define BENCHMARK_MOD_08_RESET(x)
|
||||
#define BENCHMARK_MOD_08_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_09)
|
||||
#define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_09_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_09_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_09_TOGGLE(x) BENCHMARK_TOGGLE(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_09_SET(x)
|
||||
#define BENCHMARK_MOD_09_RESET(x)
|
||||
#define BENCHMARK_MOD_09_TOGGLE(x)
|
||||
#define BENCHMARK_MOD_09_SET(x)
|
||||
#define BENCHMARK_MOD_09_RESET(x)
|
||||
#define BENCHMARK_MOD_09_TOGGLE(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_10)
|
||||
#define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_10_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_10_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_10_SET(x)
|
||||
#define BENCHMARK_MOD_10_RESET(x)
|
||||
#define BENCHMARK_MOD_10_SET(x)
|
||||
#define BENCHMARK_MOD_10_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_11)
|
||||
#define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_11_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_11_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_11_SET(x)
|
||||
#define BENCHMARK_MOD_11_RESET(x)
|
||||
#define BENCHMARK_MOD_11_SET(x)
|
||||
#define BENCHMARK_MOD_11_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_12)
|
||||
#define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_12_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_12_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_12_SET(x)
|
||||
#define BENCHMARK_MOD_12_RESET(x)
|
||||
#define BENCHMARK_MOD_12_SET(x)
|
||||
#define BENCHMARK_MOD_12_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_13)
|
||||
#define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_13_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_13_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_13_SET(x)
|
||||
#define BENCHMARK_MOD_13_RESET(x)
|
||||
#define BENCHMARK_MOD_13_SET(x)
|
||||
#define BENCHMARK_MOD_13_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_14)
|
||||
#define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_14_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_14_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_14_SET(x)
|
||||
#define BENCHMARK_MOD_14_RESET(x)
|
||||
#define BENCHMARK_MOD_14_SET(x)
|
||||
#define BENCHMARK_MOD_14_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_15)
|
||||
#define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_15_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_15_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_15_SET(x)
|
||||
#define BENCHMARK_MOD_15_RESET(x)
|
||||
#define BENCHMARK_MOD_15_SET(x)
|
||||
#define BENCHMARK_MOD_15_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_16)
|
||||
#define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_16_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_16_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_16_SET(x)
|
||||
#define BENCHMARK_MOD_16_RESET(x)
|
||||
#define BENCHMARK_MOD_16_SET(x)
|
||||
#define BENCHMARK_MOD_16_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_17)
|
||||
#define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_17_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_17_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_17_SET(x)
|
||||
#define BENCHMARK_MOD_17_RESET(x)
|
||||
#define BENCHMARK_MOD_17_SET(x)
|
||||
#define BENCHMARK_MOD_17_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_18)
|
||||
#define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_18_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_18_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_18_SET(x)
|
||||
#define BENCHMARK_MOD_18_RESET(x)
|
||||
#define BENCHMARK_MOD_18_SET(x)
|
||||
#define BENCHMARK_MOD_18_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_19)
|
||||
#define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_19_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_19_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_19_SET(x)
|
||||
#define BENCHMARK_MOD_19_RESET(x)
|
||||
#define BENCHMARK_MOD_19_SET(x)
|
||||
#define BENCHMARK_MOD_19_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_20)
|
||||
#define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_20_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_20_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_20_SET(x)
|
||||
#define BENCHMARK_MOD_20_RESET(x)
|
||||
#define BENCHMARK_MOD_20_SET(x)
|
||||
#define BENCHMARK_MOD_20_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_21)
|
||||
#define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_21_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_21_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_21_SET(x)
|
||||
#define BENCHMARK_MOD_21_RESET(x)
|
||||
#define BENCHMARK_MOD_21_SET(x)
|
||||
#define BENCHMARK_MOD_21_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_22)
|
||||
#define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_22_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_22_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_22_SET(x)
|
||||
#define BENCHMARK_MOD_22_RESET(x)
|
||||
#define BENCHMARK_MOD_22_SET(x)
|
||||
#define BENCHMARK_MOD_22_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_23)
|
||||
#define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_23_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_23_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_23_SET(x)
|
||||
#define BENCHMARK_MOD_23_RESET(x)
|
||||
#define BENCHMARK_MOD_23_SET(x)
|
||||
#define BENCHMARK_MOD_23_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_24)
|
||||
#define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_24_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_24_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_24_SET(x)
|
||||
#define BENCHMARK_MOD_24_RESET(x)
|
||||
#define BENCHMARK_MOD_24_SET(x)
|
||||
#define BENCHMARK_MOD_24_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_25)
|
||||
#define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_25_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_25_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_25_SET(x)
|
||||
#define BENCHMARK_MOD_25_RESET(x)
|
||||
#define BENCHMARK_MOD_25_SET(x)
|
||||
#define BENCHMARK_MOD_25_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_26)
|
||||
#define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_26_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_26_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_26_SET(x)
|
||||
#define BENCHMARK_MOD_26_RESET(x)
|
||||
#define BENCHMARK_MOD_26_SET(x)
|
||||
#define BENCHMARK_MOD_26_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_27)
|
||||
#define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_27_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_27_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_27_SET(x)
|
||||
#define BENCHMARK_MOD_27_RESET(x)
|
||||
#define BENCHMARK_MOD_27_SET(x)
|
||||
#define BENCHMARK_MOD_27_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_28)
|
||||
#define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_28_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_28_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_28_SET(x)
|
||||
#define BENCHMARK_MOD_28_RESET(x)
|
||||
#define BENCHMARK_MOD_28_SET(x)
|
||||
#define BENCHMARK_MOD_28_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_29)
|
||||
#define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_29_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_29_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_29_SET(x)
|
||||
#define BENCHMARK_MOD_29_RESET(x)
|
||||
#define BENCHMARK_MOD_29_SET(x)
|
||||
#define BENCHMARK_MOD_29_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_30)
|
||||
#define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_30_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_30_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_30_SET(x)
|
||||
#define BENCHMARK_MOD_30_RESET(x)
|
||||
#define BENCHMARK_MOD_30_SET(x)
|
||||
#define BENCHMARK_MOD_30_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_31)
|
||||
#define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_31_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_31_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_31_SET(x)
|
||||
#define BENCHMARK_MOD_31_RESET(x)
|
||||
#define BENCHMARK_MOD_31_SET(x)
|
||||
#define BENCHMARK_MOD_31_RESET(x)
|
||||
#endif
|
||||
|
||||
#if (BENCHMARK_MODULES & BENCHMARK_MOD_32)
|
||||
#define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x)
|
||||
#define BENCHMARK_MOD_32_SET(x) BENCHMARK_SET(x)
|
||||
#define BENCHMARK_MOD_32_RESET(x) BENCHMARK_RESET(x)
|
||||
#else
|
||||
#define BENCHMARK_MOD_32_SET(x)
|
||||
#define BENCHMARK_MOD_32_RESET(x)
|
||||
#define BENCHMARK_MOD_32_SET(x)
|
||||
#define BENCHMARK_MOD_32_RESET(x)
|
||||
#endif
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// modul global types
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// local vars
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// local function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // _BENCHMARK_H_
|
||||
|
||||
+491
-507
File diff suppressed because it is too large
Load Diff
@@ -73,40 +73,32 @@
|
||||
#ifndef _EDRVFEC_H_
|
||||
#define _EDRVFEC_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
// do this in config header
|
||||
#define TARGET_HARDWARE TGTHW_SPLC_CF54
|
||||
|
||||
|
||||
// base addresses
|
||||
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
|
||||
|
||||
|
||||
#elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485)
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#error 'ERROR: Target was never implemented!'
|
||||
#error 'ERROR: Target was never implemented!'
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// types
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Rx and Tx buffer descriptor format
|
||||
typedef struct
|
||||
{
|
||||
WORD m_wStatus; // control / status --- used by edrv, do not change in application
|
||||
WORD m_wLength; // transfer length
|
||||
BYTE * m_pbData; // buffer address
|
||||
typedef struct {
|
||||
WORD m_wStatus; // control / status --- used by edrv, do not change in application
|
||||
WORD m_wLength; // transfer length
|
||||
BYTE *m_pbData; // buffer address
|
||||
} tBufferDescr;
|
||||
|
||||
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
|
||||
@@ -119,8 +111,4 @@ typedef struct
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EDRV_FEC_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EDRV_FEC_H_
|
||||
|
||||
@@ -73,94 +73,93 @@
|
||||
#ifndef _EDRVFEC_H_
|
||||
#define _EDRVFEC_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
// base addresses
|
||||
#define FEC0_ADDR 0x0000
|
||||
#define FEC1_ADDR 0x0000 //tbd
|
||||
#define FEC1_ADDR 0x0000 //tbd
|
||||
|
||||
// control / status registers
|
||||
#define FEC_EIR 0x1004 // interrupt event register
|
||||
#define FEC_EIMR 0x1008 // interrupt mask register
|
||||
#define FEC_RDAR 0x1010 // receive descriptor active register
|
||||
#define FEC_TDAR 0x1014 // transmit descriptor active register
|
||||
#define FEC_ECR 0x1024 // ethernet control register
|
||||
#define FEC_MMFR 0x1040 // MII data register
|
||||
#define FEC_MSCR 0x1044 // MII speed register
|
||||
#define FEC_MIBC 0x1064 // MIB control/status register
|
||||
#define FEC_RCR 0x1084 // receive control register
|
||||
#define FEC_TCR 0x10C4 // transmit control register
|
||||
#define FEC_PALR 0x10E4 // physical address low register
|
||||
#define FEC_PAUR 0x10E8 // physical address high + type register
|
||||
#define FEC_OPD 0x10EC // opcode + pause register
|
||||
#define FEC_IAUR 0x1118 // upper 32 bit of individual hash table
|
||||
#define FEC_IALR 0x111C // lower 32 bit of individual hash table
|
||||
#define FEC_GAUR 0x1120 // upper 32 bit of group hash table
|
||||
#define FEC_GALR 0x1124 // lower 32 bit of group hash table
|
||||
#define FEC_TFWR 0x1144 // transmit FIFO watermark
|
||||
#define FEC_FRBR 0x114C // FIFO receive bound register
|
||||
#define FEC_FRSR 0x1150 // FIFO receive FIFO start register
|
||||
#define FEC_ERDSR 0x1180 // pointer to receive descriptor ring
|
||||
#define FEC_ETDSR 0x1184 // pointer to transmit descriptor ring
|
||||
#define FEC_EMRBR 0x1188 // maximum receive buffer size
|
||||
#define FEC_EIR 0x1004 // interrupt event register
|
||||
#define FEC_EIMR 0x1008 // interrupt mask register
|
||||
#define FEC_RDAR 0x1010 // receive descriptor active register
|
||||
#define FEC_TDAR 0x1014 // transmit descriptor active register
|
||||
#define FEC_ECR 0x1024 // ethernet control register
|
||||
#define FEC_MMFR 0x1040 // MII data register
|
||||
#define FEC_MSCR 0x1044 // MII speed register
|
||||
#define FEC_MIBC 0x1064 // MIB control/status register
|
||||
#define FEC_RCR 0x1084 // receive control register
|
||||
#define FEC_TCR 0x10C4 // transmit control register
|
||||
#define FEC_PALR 0x10E4 // physical address low register
|
||||
#define FEC_PAUR 0x10E8 // physical address high + type register
|
||||
#define FEC_OPD 0x10EC // opcode + pause register
|
||||
#define FEC_IAUR 0x1118 // upper 32 bit of individual hash table
|
||||
#define FEC_IALR 0x111C // lower 32 bit of individual hash table
|
||||
#define FEC_GAUR 0x1120 // upper 32 bit of group hash table
|
||||
#define FEC_GALR 0x1124 // lower 32 bit of group hash table
|
||||
#define FEC_TFWR 0x1144 // transmit FIFO watermark
|
||||
#define FEC_FRBR 0x114C // FIFO receive bound register
|
||||
#define FEC_FRSR 0x1150 // FIFO receive FIFO start register
|
||||
#define FEC_ERDSR 0x1180 // pointer to receive descriptor ring
|
||||
#define FEC_ETDSR 0x1184 // pointer to transmit descriptor ring
|
||||
#define FEC_EMRBR 0x1188 // maximum receive buffer size
|
||||
|
||||
// mib block counters memory map
|
||||
#define FEC_RMON_T_DROP 0x1200 // count of frames not counted correctly
|
||||
#define FEC_RMON_T_PACKETS 0x1204 // RMON tx packet count
|
||||
#define FEC_RMON_T_BC_PKT 0x1208 // RMON tx broadcast packets
|
||||
#define FEC_RMON_T_MC_PKT 0x120C // RMON tx multicast packets
|
||||
#define FEC_RMON_T_CRC_ALIGN 0x1210 // RMON tx packets w CRC/align error
|
||||
#define FEC_RMON_T_UNDERSIZE 0x1214 // RMON tx packets < 64 bytes, good CRC
|
||||
#define FEC_RMON_T_OVERSIZE 0x1218 // RMON tx packets > MAX_FL bytes, good CRC
|
||||
#define FEC_RMON_T_FRAG 0x121C // RMON tx packets < 64 bytes, bad CRC
|
||||
#define FEC_RMON_T_JAB 0x1220 // RMON tx packets > MAX_FL bytes, bad CRC
|
||||
#define FEC_RMON_T_COL 0x1224 // RMON tx collision count
|
||||
#define FEC_RMON_T_P64 0x1228 // RMON tx 64 byte packets
|
||||
#define FEC_RMON_T_P65TO127 0x122C // RMON tx 65 to 127 byte packets
|
||||
#define FEC_RMON_T_P128TO255 0x1230 // RMON tx 128 to 255 byte packets
|
||||
#define FEC_RMON_T_P256TO511 0x1234 // RMON tx 256 to 511 byte packets
|
||||
#define FEC_RMON_T_P512TO1023 0x1238 // RMON tx 512 to 1023 byte packets
|
||||
#define FEC_RMON_T_P1024TO2047 0x123C // RMON tx 1024 to 2047 byte packets
|
||||
#define FEC_RMON_T_P_GTE2048 0x1240 // RMON tx w > 2048 bytes
|
||||
#define FEC_RMON_T_OCTETS 0x1244 // RMON tx octets
|
||||
#define FEC_IEEE_T_DROP 0x1248 // count of frames not counted correctly
|
||||
#define FEC_IEEE_T_FRAME_OK 0x124C // frames transmitted OK
|
||||
#define FEC_IEEE_T_1COL 0x1250 // frames transmitted with single collision
|
||||
#define FEC_IEEE_T_MCOL 0x1254 // frames transmitted with multiple collisions
|
||||
#define FEC_IEEE_T_DEF 0x1258 // frames transmitted after deferral delay
|
||||
#define FEC_IEEE_T_LCOL 0x125C // frames transmitted with late collisions
|
||||
#define FEC_IEEE_T_EXCOL 0x1260 // frames transmitted with excessive collisions
|
||||
#define FEC_IEEE_T_MACERR 0x1264 // frames transmitted with tx-FIFO underrun
|
||||
#define FEC_IEEE_T_CSERR 0x1268 // frames transmitted with carrier sense error
|
||||
#define FEC_IEEE_T_SQE 0x126C // frames transmitted with SQE error
|
||||
#define FEC_IEEE_T_FDXFC 0x1270 // flow control pause frames transmitted
|
||||
#define FEC_IEEE_T_OCTETS_OK 0x1274 // octet count for frames transmitted w/o error
|
||||
#define FEC_RMON_R_PACKETS 0x1284 // RMON rx packet count
|
||||
#define FEC_RMON_R_BC_PKT 0x1288 // RMON rx broadcast packets
|
||||
#define FEC_RMON_R_MC_PKT 0x128C // RMON rx multicast packets
|
||||
#define FEC_RMON_R_CRC_ALIGN 0x1290 // RMON rx packets w CRC/align error
|
||||
#define FEC_RMON_R_UNDERSIZE 0x1294 // RMON rx packets < 64 bytes, good CRC
|
||||
#define FEC_RMON_R_OVERSIZE 0x1298 // RMON rx packets > MAX_FL bytes, good CRC
|
||||
#define FEC_RMON_R_FRAG 0x129C // RMON rx packets < 64 bytes, bad CRC
|
||||
#define FEC_RMON_R_JAB 0x12A0 // RMON rx packets > MAX_FL bytes, bad CRC
|
||||
#define FEC_RMON_R_RESVD_0 0x12A4 //
|
||||
#define FEC_RMON_R_P64 0x12A8 // RMON rx 64 byte packets
|
||||
#define FEC_RMON_R_P65T0127 0x12AC // RMON rx 65 to 127 byte packets
|
||||
#define FEC_RMON_R_P128TO255 0x12B0 // RMON rx 128 to 255 byte packets
|
||||
#define FEC_RMON_R_P256TO511 0x12B4 // RMON rx 256 to 511 byte packets
|
||||
#define FEC_RMON_R_P512TO1023 0x12B8 // RMON rx 512 to 1023 byte packets
|
||||
#define FEC_RMON_R_P1024TO2047 0x12BC // RMON rx 1024 to 2047 byte packets
|
||||
#define FEC_RMON_R_GTE2048 0x12C0 // RMON rx w > 2048 bytes
|
||||
#define FEC_RMON_R_OCTETS 0x12C4 // RMON rx octets
|
||||
#define FEC_IEEE_R_DROP 0x12C8 // count of frames not counted correctly
|
||||
#define FEC_IEEE_R_FRAME_OK 0x12CC // frames received OK
|
||||
#define FEC_IEEE_R_CRC 0x12D0 // frames received with CRC error
|
||||
#define FEC_IEEE_R_ALIGN 0x12D4 // frames received with alignment error
|
||||
#define FEC_IEEE_R_MACERR 0x12D8 // receive FIFO overflow count
|
||||
#define FEC_IEEE_R_FDXFC 0x12DC // flow control pause frames received
|
||||
#define FEC_IEEE_R_OCTETS_OK 0x12E0 // octet count for frames rcvd w/o error
|
||||
#define FEC_RMON_T_DROP 0x1200 // count of frames not counted correctly
|
||||
#define FEC_RMON_T_PACKETS 0x1204 // RMON tx packet count
|
||||
#define FEC_RMON_T_BC_PKT 0x1208 // RMON tx broadcast packets
|
||||
#define FEC_RMON_T_MC_PKT 0x120C // RMON tx multicast packets
|
||||
#define FEC_RMON_T_CRC_ALIGN 0x1210 // RMON tx packets w CRC/align error
|
||||
#define FEC_RMON_T_UNDERSIZE 0x1214 // RMON tx packets < 64 bytes, good CRC
|
||||
#define FEC_RMON_T_OVERSIZE 0x1218 // RMON tx packets > MAX_FL bytes, good CRC
|
||||
#define FEC_RMON_T_FRAG 0x121C // RMON tx packets < 64 bytes, bad CRC
|
||||
#define FEC_RMON_T_JAB 0x1220 // RMON tx packets > MAX_FL bytes, bad CRC
|
||||
#define FEC_RMON_T_COL 0x1224 // RMON tx collision count
|
||||
#define FEC_RMON_T_P64 0x1228 // RMON tx 64 byte packets
|
||||
#define FEC_RMON_T_P65TO127 0x122C // RMON tx 65 to 127 byte packets
|
||||
#define FEC_RMON_T_P128TO255 0x1230 // RMON tx 128 to 255 byte packets
|
||||
#define FEC_RMON_T_P256TO511 0x1234 // RMON tx 256 to 511 byte packets
|
||||
#define FEC_RMON_T_P512TO1023 0x1238 // RMON tx 512 to 1023 byte packets
|
||||
#define FEC_RMON_T_P1024TO2047 0x123C // RMON tx 1024 to 2047 byte packets
|
||||
#define FEC_RMON_T_P_GTE2048 0x1240 // RMON tx w > 2048 bytes
|
||||
#define FEC_RMON_T_OCTETS 0x1244 // RMON tx octets
|
||||
#define FEC_IEEE_T_DROP 0x1248 // count of frames not counted correctly
|
||||
#define FEC_IEEE_T_FRAME_OK 0x124C // frames transmitted OK
|
||||
#define FEC_IEEE_T_1COL 0x1250 // frames transmitted with single collision
|
||||
#define FEC_IEEE_T_MCOL 0x1254 // frames transmitted with multiple collisions
|
||||
#define FEC_IEEE_T_DEF 0x1258 // frames transmitted after deferral delay
|
||||
#define FEC_IEEE_T_LCOL 0x125C // frames transmitted with late collisions
|
||||
#define FEC_IEEE_T_EXCOL 0x1260 // frames transmitted with excessive collisions
|
||||
#define FEC_IEEE_T_MACERR 0x1264 // frames transmitted with tx-FIFO underrun
|
||||
#define FEC_IEEE_T_CSERR 0x1268 // frames transmitted with carrier sense error
|
||||
#define FEC_IEEE_T_SQE 0x126C // frames transmitted with SQE error
|
||||
#define FEC_IEEE_T_FDXFC 0x1270 // flow control pause frames transmitted
|
||||
#define FEC_IEEE_T_OCTETS_OK 0x1274 // octet count for frames transmitted w/o error
|
||||
#define FEC_RMON_R_PACKETS 0x1284 // RMON rx packet count
|
||||
#define FEC_RMON_R_BC_PKT 0x1288 // RMON rx broadcast packets
|
||||
#define FEC_RMON_R_MC_PKT 0x128C // RMON rx multicast packets
|
||||
#define FEC_RMON_R_CRC_ALIGN 0x1290 // RMON rx packets w CRC/align error
|
||||
#define FEC_RMON_R_UNDERSIZE 0x1294 // RMON rx packets < 64 bytes, good CRC
|
||||
#define FEC_RMON_R_OVERSIZE 0x1298 // RMON rx packets > MAX_FL bytes, good CRC
|
||||
#define FEC_RMON_R_FRAG 0x129C // RMON rx packets < 64 bytes, bad CRC
|
||||
#define FEC_RMON_R_JAB 0x12A0 // RMON rx packets > MAX_FL bytes, bad CRC
|
||||
#define FEC_RMON_R_RESVD_0 0x12A4 //
|
||||
#define FEC_RMON_R_P64 0x12A8 // RMON rx 64 byte packets
|
||||
#define FEC_RMON_R_P65T0127 0x12AC // RMON rx 65 to 127 byte packets
|
||||
#define FEC_RMON_R_P128TO255 0x12B0 // RMON rx 128 to 255 byte packets
|
||||
#define FEC_RMON_R_P256TO511 0x12B4 // RMON rx 256 to 511 byte packets
|
||||
#define FEC_RMON_R_P512TO1023 0x12B8 // RMON rx 512 to 1023 byte packets
|
||||
#define FEC_RMON_R_P1024TO2047 0x12BC // RMON rx 1024 to 2047 byte packets
|
||||
#define FEC_RMON_R_GTE2048 0x12C0 // RMON rx w > 2048 bytes
|
||||
#define FEC_RMON_R_OCTETS 0x12C4 // RMON rx octets
|
||||
#define FEC_IEEE_R_DROP 0x12C8 // count of frames not counted correctly
|
||||
#define FEC_IEEE_R_FRAME_OK 0x12CC // frames received OK
|
||||
#define FEC_IEEE_R_CRC 0x12D0 // frames received with CRC error
|
||||
#define FEC_IEEE_R_ALIGN 0x12D4 // frames received with alignment error
|
||||
#define FEC_IEEE_R_MACERR 0x12D8 // receive FIFO overflow count
|
||||
#define FEC_IEEE_R_FDXFC 0x12DC // flow control pause frames received
|
||||
#define FEC_IEEE_R_OCTETS_OK 0x12E0 // octet count for frames rcvd w/o error
|
||||
|
||||
// register bit definitions and macros
|
||||
#define FEC_EIR_UN (0x00080000)
|
||||
@@ -315,11 +314,10 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Rx and Tx buffer descriptor format
|
||||
typedef struct
|
||||
{
|
||||
WORD m_wStatus; // control / status --- used by edrv, do not change in application
|
||||
WORD m_wLength; // transfer length
|
||||
BYTE * m_pbData; // buffer address
|
||||
typedef struct {
|
||||
WORD m_wStatus; // control / status --- used by edrv, do not change in application
|
||||
WORD m_wLength; // transfer length
|
||||
BYTE *m_pbData; // buffer address
|
||||
} tBufferDescr;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -327,21 +325,16 @@ typedef struct
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if (NO_OF_INSTANCES > 1)
|
||||
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val)
|
||||
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off]))
|
||||
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val)
|
||||
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off]))
|
||||
#else
|
||||
#if (EDRV_USED_ETH_CTRL == 0)
|
||||
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val)
|
||||
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]))
|
||||
#else
|
||||
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val)
|
||||
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]))
|
||||
#endif
|
||||
#if (EDRV_USED_ETH_CTRL == 0)
|
||||
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val)
|
||||
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]))
|
||||
#else
|
||||
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val)
|
||||
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EDRV_FEC_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EDRV_FEC_H_
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
#ifndef _EDRVSIM_H_
|
||||
#define _EDRVSIM_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -80,15 +79,11 @@
|
||||
// types
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void EdrvRxInterruptHandler (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p);
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EDRVSIM_H_
|
||||
|
||||
void EdrvRxInterruptHandler(BYTE bBufferInFrame_p, BYTE * pbEthernetData_p,
|
||||
WORD wDataLen_p);
|
||||
|
||||
#endif // #ifndef _EDRVSIM_H_
|
||||
|
||||
+130
-161
@@ -66,7 +66,6 @@
|
||||
|
||||
2006/05/22 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_API_H_
|
||||
@@ -82,223 +81,193 @@
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiNodeId;
|
||||
tEplNmtState m_NmtState;
|
||||
tEplNmtNodeEvent m_NodeEvent;
|
||||
WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError
|
||||
BOOL m_fMandatory;
|
||||
typedef struct {
|
||||
unsigned int m_uiNodeId;
|
||||
tEplNmtState m_NmtState;
|
||||
tEplNmtNodeEvent m_NodeEvent;
|
||||
WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError
|
||||
BOOL m_fMandatory;
|
||||
|
||||
} tEplApiEventNode;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tEplNmtState m_NmtState; // local NMT state
|
||||
tEplNmtBootEvent m_BootEvent;
|
||||
WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError
|
||||
typedef struct {
|
||||
tEplNmtState m_NmtState; // local NMT state
|
||||
tEplNmtBootEvent m_BootEvent;
|
||||
WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError
|
||||
|
||||
} tEplApiEventBoot;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tEplLedType m_LedType; // type of the LED (e.g. Status or Error)
|
||||
BOOL m_fOn; // state of the LED (e.g. on or off)
|
||||
typedef struct {
|
||||
tEplLedType m_LedType; // type of the LED (e.g. Status or Error)
|
||||
BOOL m_fOn; // state of the LED (e.g. on or off)
|
||||
|
||||
} tEplApiEventLed;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange
|
||||
typedef enum {
|
||||
kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange
|
||||
// kEplApiEventRequestNmt = 0x11, // m_bNmtCmd
|
||||
kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted
|
||||
kEplApiEventWarning = 0x13, // m_InternalError, Stack running
|
||||
kEplApiEventNode = 0x20, // m_Node
|
||||
kEplApiEventBoot = 0x21, // m_Boot
|
||||
kEplApiEventSdo = 0x62, // m_Sdo
|
||||
kEplApiEventObdAccess = 0x69, // m_ObdCbParam
|
||||
kEplApiEventLed = 0x70, // m_Led
|
||||
kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted
|
||||
kEplApiEventWarning = 0x13, // m_InternalError, Stack running
|
||||
kEplApiEventNode = 0x20, // m_Node
|
||||
kEplApiEventBoot = 0x21, // m_Boot
|
||||
kEplApiEventSdo = 0x62, // m_Sdo
|
||||
kEplApiEventObdAccess = 0x69, // m_ObdCbParam
|
||||
kEplApiEventLed = 0x70, // m_Led
|
||||
|
||||
} tEplApiEventType;
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
tEplEventNmtStateChange m_NmtStateChange;
|
||||
tEplEventError m_InternalError;
|
||||
tEplSdoComFinished m_Sdo;
|
||||
tEplObdCbParam m_ObdCbParam;
|
||||
tEplApiEventNode m_Node;
|
||||
tEplApiEventBoot m_Boot;
|
||||
tEplApiEventLed m_Led;
|
||||
typedef union {
|
||||
tEplEventNmtStateChange m_NmtStateChange;
|
||||
tEplEventError m_InternalError;
|
||||
tEplSdoComFinished m_Sdo;
|
||||
tEplObdCbParam m_ObdCbParam;
|
||||
tEplApiEventNode m_Node;
|
||||
tEplApiEventBoot m_Boot;
|
||||
tEplApiEventLed m_Led;
|
||||
|
||||
} tEplApiEventArg;
|
||||
|
||||
typedef tEplKernel(PUBLIC ROM * tEplApiCbEvent) (tEplApiEventType EventType_p, // IN: event type (enum)
|
||||
tEplApiEventArg * pEventArg_p, // IN: event argument (union)
|
||||
void GENERIC * pUserArg_p);
|
||||
|
||||
typedef tEplKernel (PUBLIC ROM* tEplApiCbEvent) (
|
||||
tEplApiEventType EventType_p, // IN: event type (enum)
|
||||
tEplApiEventArg* pEventArg_p, // IN: event argument (union)
|
||||
void GENERIC* pUserArg_p);
|
||||
typedef struct {
|
||||
unsigned int m_uiSizeOfStruct;
|
||||
BOOL m_fAsyncOnly; // do not need to register PRes
|
||||
unsigned int m_uiNodeId; // local node ID
|
||||
BYTE m_abMacAddress[6]; // local MAC address
|
||||
|
||||
// 0x1F82: NMT_FeatureFlags_U32
|
||||
DWORD m_dwFeatureFlags;
|
||||
// Cycle Length (0x1006: NMT_CycleLen_U32) in [us]
|
||||
DWORD m_dwCycleLen; // required for error detection
|
||||
// 0x1F98: NMT_CycleTiming_REC
|
||||
// 0x1F98.1: IsochrTxMaxPayload_U16
|
||||
unsigned int m_uiIsochrTxMaxPayload; // const
|
||||
// 0x1F98.2: IsochrRxMaxPayload_U16
|
||||
unsigned int m_uiIsochrRxMaxPayload; // const
|
||||
// 0x1F98.3: PResMaxLatency_U32
|
||||
DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.4: PReqActPayloadLimit_U16
|
||||
unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes)
|
||||
// 0x1F98.5: PResActPayloadLimit_U16
|
||||
unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes)
|
||||
// 0x1F98.6: ASndMaxLatency_U32
|
||||
DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.7: MultiplCycleCnt_U8
|
||||
unsigned int m_uiMultiplCycleCnt; // required for error detection
|
||||
// 0x1F98.8: AsyncMTU_U16
|
||||
unsigned int m_uiAsyncMtu; // required to set up max frame size
|
||||
// 0x1F98.9: Prescaler_U16
|
||||
unsigned int m_uiPrescaler; // required for sync
|
||||
// $$$ Multiplexed Slot
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiSizeOfStruct;
|
||||
BOOL m_fAsyncOnly; // do not need to register PRes
|
||||
unsigned int m_uiNodeId; // local node ID
|
||||
BYTE m_abMacAddress[6]; // local MAC address
|
||||
// 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns]
|
||||
DWORD m_dwLossOfFrameTolerance;
|
||||
|
||||
// 0x1F82: NMT_FeatureFlags_U32
|
||||
DWORD m_dwFeatureFlags;
|
||||
// Cycle Length (0x1006: NMT_CycleLen_U32) in [us]
|
||||
DWORD m_dwCycleLen; // required for error detection
|
||||
// 0x1F98: NMT_CycleTiming_REC
|
||||
// 0x1F98.1: IsochrTxMaxPayload_U16
|
||||
unsigned int m_uiIsochrTxMaxPayload; // const
|
||||
// 0x1F98.2: IsochrRxMaxPayload_U16
|
||||
unsigned int m_uiIsochrRxMaxPayload; // const
|
||||
// 0x1F98.3: PResMaxLatency_U32
|
||||
DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.4: PReqActPayloadLimit_U16
|
||||
unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+28 bytes)
|
||||
// 0x1F98.5: PResActPayloadLimit_U16
|
||||
unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+28 bytes)
|
||||
// 0x1F98.6: ASndMaxLatency_U32
|
||||
DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.7: MultiplCycleCnt_U8
|
||||
unsigned int m_uiMultiplCycleCnt; // required for error detection
|
||||
// 0x1F98.8: AsyncMTU_U16
|
||||
unsigned int m_uiAsyncMtu; // required to set up max frame size
|
||||
// 0x1F98.9: Prescaler_U16
|
||||
unsigned int m_uiPrescaler; // required for sync
|
||||
// $$$ Multiplexed Slot
|
||||
// 0x1F8A: NMT_MNCycleTiming_REC
|
||||
// 0x1F8A.1: WaitSoCPReq_U32 in [ns]
|
||||
DWORD m_dwWaitSocPreq;
|
||||
|
||||
// 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns]
|
||||
DWORD m_dwLossOfFrameTolerance;
|
||||
// 0x1F8A.2: AsyncSlotTimeout_U32 in [ns]
|
||||
DWORD m_dwAsyncSlotTimeout;
|
||||
|
||||
// 0x1F8A: NMT_MNCycleTiming_REC
|
||||
// 0x1F8A.1: WaitSoCPReq_U32 in [ns]
|
||||
DWORD m_dwWaitSocPreq;
|
||||
DWORD m_dwDeviceType; // NMT_DeviceType_U32
|
||||
DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
|
||||
DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
|
||||
DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
|
||||
DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
|
||||
QWORD m_qwVendorSpecificExt1;
|
||||
DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
|
||||
DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
|
||||
DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwIpAddress;
|
||||
DWORD m_dwSubnetMask;
|
||||
DWORD m_dwDefaultGateway;
|
||||
BYTE m_sHostname[32];
|
||||
BYTE m_abVendorSpecificExt2[48];
|
||||
|
||||
// 0x1F8A.2: AsyncSlotTimeout_U32 in [ns]
|
||||
DWORD m_dwAsyncSlotTimeout;
|
||||
char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD)
|
||||
char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD)
|
||||
char *m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD)
|
||||
|
||||
DWORD m_dwDeviceType; // NMT_DeviceType_U32
|
||||
DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
|
||||
DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
|
||||
DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
|
||||
DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
|
||||
QWORD m_qwVendorSpecificExt1;
|
||||
DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
|
||||
DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
|
||||
DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwIpAddress;
|
||||
DWORD m_dwSubnetMask;
|
||||
DWORD m_dwDefaultGateway;
|
||||
BYTE m_sHostname[32];
|
||||
BYTE m_abVendorSpecificExt2[48];
|
||||
|
||||
char* m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD)
|
||||
char* m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD)
|
||||
char* m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD)
|
||||
|
||||
tEplApiCbEvent m_pfnCbEvent;
|
||||
void* m_pEventUserArg;
|
||||
tEplSyncCb m_pfnCbSync;
|
||||
tEplApiCbEvent m_pfnCbEvent;
|
||||
void *m_pEventUserArg;
|
||||
tEplSyncCb m_pfnCbSync;
|
||||
|
||||
} tEplApiInitParam;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* m_pImage;
|
||||
unsigned int m_uiSize;
|
||||
typedef struct {
|
||||
void *m_pImage;
|
||||
unsigned int m_uiSize;
|
||||
|
||||
} tEplApiProcessImage;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam* pInitParam_p);
|
||||
tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam * pInitParam_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiShutdown(void);
|
||||
|
||||
tEplKernel PUBLIC EplApiReadObject(
|
||||
tEplSdoComConHdl* pSdoComConHdl_p,
|
||||
unsigned int uiNodeId_p,
|
||||
unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void* pDstData_le_p,
|
||||
unsigned int* puiSize_p,
|
||||
tEplSdoType SdoType_p,
|
||||
void* pUserArg_p);
|
||||
tEplKernel PUBLIC EplApiReadObject(tEplSdoComConHdl * pSdoComConHdl_p,
|
||||
unsigned int uiNodeId_p,
|
||||
unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void *pDstData_le_p,
|
||||
unsigned int *puiSize_p,
|
||||
tEplSdoType SdoType_p, void *pUserArg_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiWriteObject(
|
||||
tEplSdoComConHdl* pSdoComConHdl_p,
|
||||
unsigned int uiNodeId_p,
|
||||
unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void* pSrcData_le_p,
|
||||
unsigned int uiSize_p,
|
||||
tEplSdoType SdoType_p,
|
||||
void* pUserArg_p);
|
||||
tEplKernel PUBLIC EplApiWriteObject(tEplSdoComConHdl * pSdoComConHdl_p,
|
||||
unsigned int uiNodeId_p,
|
||||
unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void *pSrcData_le_p,
|
||||
unsigned int uiSize_p,
|
||||
tEplSdoType SdoType_p, void *pUserArg_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiFreeSdoChannel(
|
||||
tEplSdoComConHdl SdoComConHdl_p);
|
||||
tEplKernel PUBLIC EplApiFreeSdoChannel(tEplSdoComConHdl SdoComConHdl_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiReadLocalObject(
|
||||
unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void* pDstData_p,
|
||||
unsigned int* puiSize_p);
|
||||
tEplKernel PUBLIC EplApiReadLocalObject(unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void *pDstData_p,
|
||||
unsigned int *puiSize_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiWriteLocalObject(
|
||||
unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void* pSrcData_p,
|
||||
unsigned int uiSize_p);
|
||||
tEplKernel PUBLIC EplApiWriteLocalObject(unsigned int uiIndex_p,
|
||||
unsigned int uiSubindex_p,
|
||||
void *pSrcData_p,
|
||||
unsigned int uiSize_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiCbObdAccess(tEplObdCbParam MEM* pParam_p);
|
||||
tEplKernel PUBLIC EplApiCbObdAccess(tEplObdCbParam MEM * pParam_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiLinkObject( unsigned int uiObjIndex_p,
|
||||
void* pVar_p,
|
||||
unsigned int* puiVarEntries_p,
|
||||
tEplObdSize* pEntrySize_p,
|
||||
unsigned int uiFirstSubindex_p);
|
||||
tEplKernel PUBLIC EplApiLinkObject(unsigned int uiObjIndex_p,
|
||||
void *pVar_p,
|
||||
unsigned int *puiVarEntries_p,
|
||||
tEplObdSize * pEntrySize_p,
|
||||
unsigned int uiFirstSubindex_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiProcess(void);
|
||||
|
||||
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0)
|
||||
tEplKernel PUBLIC EplApiMnTriggerStateChange(unsigned int uiNodeId_p,
|
||||
tEplNmtNodeCommand NodeCommand_p);
|
||||
tEplNmtNodeCommand NodeCommand_p);
|
||||
#endif
|
||||
|
||||
tEplKernel PUBLIC EplApiGetIdentResponse(
|
||||
unsigned int uiNodeId_p,
|
||||
tEplIdentResponse** ppIdentResponse_p);
|
||||
|
||||
tEplKernel PUBLIC EplApiGetIdentResponse(unsigned int uiNodeId_p,
|
||||
tEplIdentResponse **
|
||||
ppIdentResponse_p);
|
||||
|
||||
// functions for process image will be implemented in separate file
|
||||
tEplKernel PUBLIC EplApiProcessImageSetup(void);
|
||||
tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage* pPI_p);
|
||||
tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage* pPI_p);
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_API_H_
|
||||
|
||||
tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage * pPI_p);
|
||||
tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage * pPI_p);
|
||||
|
||||
#endif // #ifndef _EPL_API_H_
|
||||
|
||||
@@ -86,46 +86,43 @@
|
||||
#ifndef _EPLAMI_H_
|
||||
#define _EPLAMI_H_
|
||||
|
||||
|
||||
#if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0)
|
||||
// #ifdef USE_VAR64
|
||||
#error 'ERROR: development system does not support 64 bit operations!'
|
||||
#error 'ERROR: development system does not support 64 bit operations!'
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// types
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Prototypen
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if (TARGET_SYSTEM == _WIN32_)
|
||||
#if defined(INLINE_FUNCTION_DEF)
|
||||
#undef INLINE_FUNCTION
|
||||
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
|
||||
#define INLINE_ENABLED TRUE
|
||||
#define EPL_AMI_INLINED
|
||||
#include "../EplStack/amix86.c"
|
||||
#endif
|
||||
#if defined(INLINE_FUNCTION_DEF)
|
||||
#undef INLINE_FUNCTION
|
||||
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
|
||||
#define INLINE_ENABLED TRUE
|
||||
#define EPL_AMI_INLINED
|
||||
#include "../EplStack/amix86.c"
|
||||
#endif
|
||||
|
||||
#elif (TARGET_SYSTEM == _LINUX_)
|
||||
#if defined(__m68k__) // it is an big endian machine
|
||||
#if defined(INLINE_FUNCTION_DEF)
|
||||
#undef INLINE_FUNCTION
|
||||
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
|
||||
#define INLINE_ENABLED TRUE
|
||||
#define EPL_AMI_INLINED
|
||||
#include "../EplStack/amibe.c"
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__m68k__) // it is an big endian machine
|
||||
#if defined(INLINE_FUNCTION_DEF)
|
||||
#undef INLINE_FUNCTION
|
||||
#define INLINE_FUNCTION INLINE_FUNCTION_DEF
|
||||
#define INLINE_ENABLED TRUE
|
||||
#define EPL_AMI_INLINED
|
||||
#include "../EplStack/amibe.c"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -140,13 +137,12 @@
|
||||
#define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);}
|
||||
|
||||
#if !defined(INLINE_ENABLED)
|
||||
void PUBLIC AmiSetWordToBe (void FAR* pAddr_p, WORD wWordVal_p);
|
||||
void PUBLIC AmiSetDwordToBe (void FAR* pAddr_p, DWORD dwDwordVal_p);
|
||||
void PUBLIC AmiSetWordToLe (void FAR* pAddr_p, WORD wWordVal_p);
|
||||
void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p);
|
||||
void PUBLIC AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p);
|
||||
void PUBLIC AmiSetDwordToBe(void FAR * pAddr_p, DWORD dwDwordVal_p);
|
||||
void PUBLIC AmiSetWordToLe(void FAR * pAddr_p, WORD wWordVal_p);
|
||||
void PUBLIC AmiSetDwordToLe(void FAR * pAddr_p, DWORD dwDwordVal_p);
|
||||
#endif
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// read functions
|
||||
@@ -160,10 +156,10 @@ void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p);
|
||||
|
||||
#if !defined(INLINE_ENABLED)
|
||||
|
||||
WORD PUBLIC AmiGetWordFromBe (void FAR* pAddr_p);
|
||||
DWORD PUBLIC AmiGetDwordFromBe (void FAR* pAddr_p);
|
||||
WORD PUBLIC AmiGetWordFromLe (void FAR* pAddr_p);
|
||||
DWORD PUBLIC AmiGetDwordFromLe (void FAR* pAddr_p);
|
||||
WORD PUBLIC AmiGetWordFromBe(void FAR * pAddr_p);
|
||||
DWORD PUBLIC AmiGetDwordFromBe(void FAR * pAddr_p);
|
||||
WORD PUBLIC AmiGetWordFromLe(void FAR * pAddr_p);
|
||||
DWORD PUBLIC AmiGetDwordFromLe(void FAR * pAddr_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -178,9 +174,8 @@ DWORD PUBLIC AmiGetDwordFromLe (void FAR* pAddr_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiSetDword24ToBe (void FAR* pAddr_p, DWORD dwDwordVal_p);
|
||||
void PUBLIC AmiSetDword24ToLe (void FAR* pAddr_p, DWORD dwDwordVal_p);
|
||||
|
||||
void PUBLIC AmiSetDword24ToBe(void FAR * pAddr_p, DWORD dwDwordVal_p);
|
||||
void PUBLIC AmiSetDword24ToLe(void FAR * pAddr_p, DWORD dwDwordVal_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -194,9 +189,8 @@ void PUBLIC AmiSetDword24ToLe (void FAR* pAddr_p, DWORD dwDwordVal_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DWORD PUBLIC AmiGetDword24FromBe (void FAR* pAddr_p);
|
||||
DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p);
|
||||
|
||||
DWORD PUBLIC AmiGetDword24FromBe(void FAR * pAddr_p);
|
||||
DWORD PUBLIC AmiGetDword24FromLe(void FAR * pAddr_p);
|
||||
|
||||
//#ifdef USE_VAR64
|
||||
|
||||
@@ -213,9 +207,8 @@ DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiSetQword40ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword40ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
void PUBLIC AmiSetQword40ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword40ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -229,9 +222,8 @@ void PUBLIC AmiSetQword40ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
QWORD PUBLIC AmiGetQword40FromBe (void FAR* pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword40FromLe (void FAR* pAddr_p);
|
||||
|
||||
QWORD PUBLIC AmiGetQword40FromBe(void FAR * pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword40FromLe(void FAR * pAddr_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -246,9 +238,8 @@ QWORD PUBLIC AmiGetQword40FromLe (void FAR* pAddr_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiSetQword48ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword48ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
void PUBLIC AmiSetQword48ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword48ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -262,9 +253,8 @@ void PUBLIC AmiSetQword48ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
QWORD PUBLIC AmiGetQword48FromBe (void FAR* pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword48FromLe (void FAR* pAddr_p);
|
||||
|
||||
QWORD PUBLIC AmiGetQword48FromBe(void FAR * pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword48FromLe(void FAR * pAddr_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -279,9 +269,8 @@ QWORD PUBLIC AmiGetQword48FromLe (void FAR* pAddr_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiSetQword56ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword56ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
void PUBLIC AmiSetQword56ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword56ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -295,9 +284,8 @@ void PUBLIC AmiSetQword56ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
QWORD PUBLIC AmiGetQword56FromBe (void FAR* pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword56FromLe (void FAR* pAddr_p);
|
||||
|
||||
QWORD PUBLIC AmiGetQword56FromBe(void FAR * pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword56FromLe(void FAR * pAddr_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -312,9 +300,8 @@ QWORD PUBLIC AmiGetQword56FromLe (void FAR* pAddr_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiSetQword64ToBe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword64ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
void PUBLIC AmiSetQword64ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
void PUBLIC AmiSetQword64ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -328,9 +315,8 @@ void PUBLIC AmiSetQword64ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
QWORD PUBLIC AmiGetQword64FromBe (void FAR* pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword64FromLe (void FAR* pAddr_p);
|
||||
|
||||
QWORD PUBLIC AmiGetQword64FromBe(void FAR * pAddr_p);
|
||||
QWORD PUBLIC AmiGetQword64FromLe(void FAR * pAddr_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -345,8 +331,8 @@ QWORD PUBLIC AmiGetQword64FromLe (void FAR* pAddr_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiSetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p);
|
||||
|
||||
void PUBLIC AmiSetTimeOfDay(void FAR * pAddr_p,
|
||||
tTimeOfDay FAR * pTimeOfDay_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -361,20 +347,16 @@ void PUBLIC AmiSetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p);
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void PUBLIC AmiGetTimeOfDay (void FAR* pAddr_p, tTimeOfDay FAR* pTimeOfDay_p);
|
||||
void PUBLIC AmiGetTimeOfDay(void FAR * pAddr_p,
|
||||
tTimeOfDay FAR * pTimeOfDay_p);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#undef INLINE_ENABLED // disable actual inlining of functions
|
||||
#undef INLINE_ENABLED // disable actual inlining of functions
|
||||
#define EPL_AMI_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ifndef _EPLAMI_H_
|
||||
|
||||
// Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler
|
||||
// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
|
||||
#endif // ifndef _EPLAMI_H_
|
||||
// Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
|
||||
|
||||
@@ -66,79 +66,71 @@
|
||||
|
||||
2006/10/11 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_API_LINUX_H_
|
||||
#define _EPL_API_LINUX_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry
|
||||
|
||||
#define EPLLIN_DEV_NAME "epl" // used for "/dev" and "/proc" entry
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Commands for <ioctl>
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam*
|
||||
#define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage*
|
||||
#define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage*
|
||||
#define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject*
|
||||
#define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject*
|
||||
#define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject*
|
||||
#define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject*
|
||||
#define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl
|
||||
#define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent
|
||||
#define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent*
|
||||
#define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject*
|
||||
#define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0
|
||||
#define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0
|
||||
|
||||
#define EPLLIN_CMD_INITIALIZE 0 // ulArg_p ~ tEplApiInitParam*
|
||||
#define EPLLIN_CMD_PI_IN 1 // ulArg_p ~ tEplApiProcessImage*
|
||||
#define EPLLIN_CMD_PI_OUT 2 // ulArg_p ~ tEplApiProcessImage*
|
||||
#define EPLLIN_CMD_WRITE_OBJECT 3 // ulArg_p ~ tEplLinSdoObject*
|
||||
#define EPLLIN_CMD_READ_OBJECT 4 // ulArg_p ~ tEplLinSdoObject*
|
||||
#define EPLLIN_CMD_WRITE_LOCAL_OBJECT 5 // ulArg_p ~ tEplLinLocalObject*
|
||||
#define EPLLIN_CMD_READ_LOCAL_OBJECT 6 // ulArg_p ~ tEplLinLocalObject*
|
||||
#define EPLLIN_CMD_FREE_SDO_CHANNEL 7 // ulArg_p ~ tEplSdoComConHdl
|
||||
#define EPLLIN_CMD_NMT_COMMAND 8 // ulArg_p ~ tEplNmtEvent
|
||||
#define EPLLIN_CMD_GET_EVENT 9 // ulArg_p ~ tEplLinEvent*
|
||||
#define EPLLIN_CMD_MN_TRIGGER_STATE_CHANGE 10 // ulArg_p ~ tEplLinNodeCmdObject*
|
||||
#define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0
|
||||
#define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiEventArgSize;
|
||||
tEplApiEventArg* m_pEventArg;
|
||||
tEplApiEventType* m_pEventType;
|
||||
tEplKernel m_RetCbEvent;
|
||||
typedef struct {
|
||||
unsigned int m_uiEventArgSize;
|
||||
tEplApiEventArg *m_pEventArg;
|
||||
tEplApiEventType *m_pEventType;
|
||||
tEplKernel m_RetCbEvent;
|
||||
|
||||
} tEplLinEvent;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tEplSdoComConHdl m_SdoComConHdl;
|
||||
BOOL m_fValidSdoComConHdl;
|
||||
unsigned int m_uiNodeId;
|
||||
unsigned int m_uiIndex;
|
||||
unsigned int m_uiSubindex;
|
||||
void* m_le_pData;
|
||||
unsigned int m_uiSize;
|
||||
tEplSdoType m_SdoType;
|
||||
void* m_pUserArg;
|
||||
typedef struct {
|
||||
tEplSdoComConHdl m_SdoComConHdl;
|
||||
BOOL m_fValidSdoComConHdl;
|
||||
unsigned int m_uiNodeId;
|
||||
unsigned int m_uiIndex;
|
||||
unsigned int m_uiSubindex;
|
||||
void *m_le_pData;
|
||||
unsigned int m_uiSize;
|
||||
tEplSdoType m_SdoType;
|
||||
void *m_pUserArg;
|
||||
|
||||
} tEplLinSdoObject;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiIndex;
|
||||
unsigned int m_uiSubindex;
|
||||
void* m_pData;
|
||||
unsigned int m_uiSize;
|
||||
typedef struct {
|
||||
unsigned int m_uiIndex;
|
||||
unsigned int m_uiSubindex;
|
||||
void *m_pData;
|
||||
unsigned int m_uiSize;
|
||||
|
||||
} tEplLinLocalObject;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiNodeId;
|
||||
tEplNmtNodeCommand m_NodeCommand;
|
||||
typedef struct {
|
||||
unsigned int m_uiNodeId;
|
||||
tEplNmtNodeCommand m_NodeCommand;
|
||||
|
||||
} tEplLinNodeCmdObject;
|
||||
|
||||
@@ -146,8 +138,4 @@ typedef struct
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_API_LINUX_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_API_LINUX_H_
|
||||
|
||||
@@ -71,9 +71,6 @@
|
||||
#ifndef _EPLCFG_H_
|
||||
#define _EPLCFG_H_
|
||||
|
||||
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// generic defines which for whole EPL Stack
|
||||
// =========================================================================
|
||||
@@ -100,7 +97,7 @@
|
||||
#define EPL_NO_USER_KERNEL
|
||||
|
||||
#ifndef BENCHMARK_MODULES
|
||||
#define BENCHMARK_MODULES 0 //0xEE800042L
|
||||
#define BENCHMARK_MODULES 0 //0xEE800042L
|
||||
#endif
|
||||
|
||||
// Default defug level:
|
||||
@@ -113,7 +110,6 @@
|
||||
// * EPL_DBGLVL_ERROR = 0x40000000L
|
||||
// * EPL_DBGLVL_ALWAYS = 0x80000000L
|
||||
|
||||
|
||||
// EPL_MODULE_INTEGRATION defines all modules which are included in
|
||||
// EPL application. Please add or delete modules for your application.
|
||||
#define EPL_MODULE_INTEGRATION EPL_MODULE_OBDK \
|
||||
@@ -155,7 +151,6 @@
|
||||
// number of used ethernet controller
|
||||
//#define EDRV_USED_ETH_CTRL 1
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// Data Link Layer (DLL) specific defines
|
||||
// =========================================================================
|
||||
@@ -170,7 +165,6 @@
|
||||
#define EPL_DLL_PRES_READY_AFTER_SOA FALSE
|
||||
//#define EPL_DLL_PRES_READY_AFTER_SOA TRUE
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// OBD specific defines
|
||||
// =========================================================================
|
||||
@@ -188,7 +182,6 @@
|
||||
|
||||
#define EPL_OBD_USE_VARIABLE_SUBINDEX_TAB TRUE
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// Timer module specific defines
|
||||
// =========================================================================
|
||||
@@ -200,8 +193,4 @@
|
||||
#define EPL_TIMER_USE_HIGHRES TRUE
|
||||
//#define EPL_TIMER_USE_HIGHRES FALSE
|
||||
|
||||
|
||||
#endif //_EPLCFG_H_
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -66,81 +66,77 @@
|
||||
|
||||
2006/05/22 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_DEF_H_
|
||||
#define _EPL_DEF_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define EPL_C_ADR_BROADCAST 0xFF // EPL broadcast address
|
||||
#define EPL_C_ADR_DIAG_DEF_NODE_ID 0xFD // EPL default address of dignostic device
|
||||
#define EPL_C_ADR_DUMMY_NODE_ID 0xFC // EPL dummy node address
|
||||
#define EPL_C_ADR_INVALID 0x00 // invalid EPL address
|
||||
#define EPL_C_ADR_MN_DEF_NODE_ID 0xF0 // EPL default address of MN
|
||||
#define EPL_C_ADR_RT1_DEF_NODE_ID 0xFE // EPL default address of router type 1
|
||||
#define EPL_C_DLL_ASND_PRIO_NMTRQST 7 // increased ASnd request priority to be used by NMT Requests
|
||||
#define EPL_C_DLL_ASND_PRIO_STD 0 // standard ASnd request priority
|
||||
#define EPL_C_ADR_BROADCAST 0xFF // EPL broadcast address
|
||||
#define EPL_C_ADR_DIAG_DEF_NODE_ID 0xFD // EPL default address of dignostic device
|
||||
#define EPL_C_ADR_DUMMY_NODE_ID 0xFC // EPL dummy node address
|
||||
#define EPL_C_ADR_INVALID 0x00 // invalid EPL address
|
||||
#define EPL_C_ADR_MN_DEF_NODE_ID 0xF0 // EPL default address of MN
|
||||
#define EPL_C_ADR_RT1_DEF_NODE_ID 0xFE // EPL default address of router type 1
|
||||
#define EPL_C_DLL_ASND_PRIO_NMTRQST 7 // increased ASnd request priority to be used by NMT Requests
|
||||
#define EPL_C_DLL_ASND_PRIO_STD 0 // standard ASnd request priority
|
||||
#define EPL_C_DLL_ETHERTYPE_EPL 0x88AB
|
||||
#define EPL_C_DLL_ISOCHR_MAX_PAYL 1490 // Byte: maximum size of PReq and PRes payload data, requires C_IP_MAX_MTU
|
||||
#define EPL_C_DLL_MAX_ASYNC_MTU 1500 // Byte: maximum asynchronous payload in bytes
|
||||
#define EPL_C_DLL_MAX_PAYL_OFFSET 1499 // Byte: maximum offset of Ethernet frame payload, requires C_IP_MAX_MTU
|
||||
#define EPL_C_DLL_ISOCHR_MAX_PAYL 1490 // Byte: maximum size of PReq and PRes payload data, requires C_IP_MAX_MTU
|
||||
#define EPL_C_DLL_MAX_ASYNC_MTU 1500 // Byte: maximum asynchronous payload in bytes
|
||||
#define EPL_C_DLL_MAX_PAYL_OFFSET 1499 // Byte: maximum offset of Ethernet frame payload, requires C_IP_MAX_MTU
|
||||
#define EPL_C_DLL_MAX_RS 7
|
||||
#define EPL_C_DLL_MIN_ASYNC_MTU 282 // Byte: minimum asynchronous payload in bytes.
|
||||
#define EPL_C_DLL_MIN_PAYL_OFFSET 45 // Byte: minimum offset of Ethernet frame payload
|
||||
#define EPL_C_DLL_MULTICAST_ASND 0x01111E000004LL // EPL ASnd multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_MULTICAST_PRES 0x01111E000002LL // EPL PRes multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_MULTICAST_SOA 0x01111E000003LL // EPL SoA multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_MULTICAST_SOC 0x01111E000001LL // EPL Soc multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_PREOP1_START_CYCLES 10 // number of unassigning SoA frames at start of NMT_MS_PRE_OPERATIONAL_1
|
||||
#define EPL_C_DLL_T_BITTIME 10 // ns: Transmission time per bit on 100 Mbit/s network
|
||||
#define EPL_C_DLL_T_EPL_PDO_HEADER 10 // Byte: size of PReq and PRes EPL PDO message header
|
||||
#define EPL_C_DLL_T_ETH2_WRAPPER 18 // Byte: size of Ethernet type II wrapper consisting of header and checksum
|
||||
#define EPL_C_DLL_T_IFG 640 // ns: Ethernet Interframe Gap
|
||||
#define EPL_C_DLL_T_MIN_FRAME 5120 // ns: Size of minimum Ethernet frame (without preamble)
|
||||
#define EPL_C_DLL_T_PREAMBLE 960 // ns: Size of Ethernet frame preamble
|
||||
#define EPL_C_DLL_MIN_ASYNC_MTU 282 // Byte: minimum asynchronous payload in bytes.
|
||||
#define EPL_C_DLL_MIN_PAYL_OFFSET 45 // Byte: minimum offset of Ethernet frame payload
|
||||
#define EPL_C_DLL_MULTICAST_ASND 0x01111E000004LL // EPL ASnd multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_MULTICAST_PRES 0x01111E000002LL // EPL PRes multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_MULTICAST_SOA 0x01111E000003LL // EPL SoA multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_MULTICAST_SOC 0x01111E000001LL // EPL Soc multicast MAC address, canonical form
|
||||
#define EPL_C_DLL_PREOP1_START_CYCLES 10 // number of unassigning SoA frames at start of NMT_MS_PRE_OPERATIONAL_1
|
||||
#define EPL_C_DLL_T_BITTIME 10 // ns: Transmission time per bit on 100 Mbit/s network
|
||||
#define EPL_C_DLL_T_EPL_PDO_HEADER 10 // Byte: size of PReq and PRes EPL PDO message header
|
||||
#define EPL_C_DLL_T_ETH2_WRAPPER 18 // Byte: size of Ethernet type II wrapper consisting of header and checksum
|
||||
#define EPL_C_DLL_T_IFG 640 // ns: Ethernet Interframe Gap
|
||||
#define EPL_C_DLL_T_MIN_FRAME 5120 // ns: Size of minimum Ethernet frame (without preamble)
|
||||
#define EPL_C_DLL_T_PREAMBLE 960 // ns: Size of Ethernet frame preamble
|
||||
|
||||
#define EPL_C_DLL_MINSIZE_SOC 36 // minimum size of SoC without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_PREQ 60 // minimum size of PRec without CRC
|
||||
#define EPL_C_DLL_MINSIZE_PRES 60 // minimum size of PRes without CRC
|
||||
#define EPL_C_DLL_MINSIZE_SOA 24 // minimum size of SoA without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_IDENTRES 176 // minimum size of IdentResponse without CRC
|
||||
#define EPL_C_DLL_MINSIZE_STATUSRES 72 // minimum size of StatusResponse without CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTCMD 20 // minimum size of NmtCommand without CommandData, padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTCMDEXT 52 // minimum size of NmtCommand without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTREQ 20 // minimum size of NmtRequest without CommandData, padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTREQEXT 52 // minimum size of NmtRequest without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_SOC 36 // minimum size of SoC without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_PREQ 60 // minimum size of PRec without CRC
|
||||
#define EPL_C_DLL_MINSIZE_PRES 60 // minimum size of PRes without CRC
|
||||
#define EPL_C_DLL_MINSIZE_SOA 24 // minimum size of SoA without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_IDENTRES 176 // minimum size of IdentResponse without CRC
|
||||
#define EPL_C_DLL_MINSIZE_STATUSRES 72 // minimum size of StatusResponse without CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTCMD 20 // minimum size of NmtCommand without CommandData, padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTCMDEXT 52 // minimum size of NmtCommand without padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTREQ 20 // minimum size of NmtRequest without CommandData, padding and CRC
|
||||
#define EPL_C_DLL_MINSIZE_NMTREQEXT 52 // minimum size of NmtRequest without padding and CRC
|
||||
|
||||
#define EPL_C_ERR_MONITOR_DELAY 10 // Error monitoring start delay (not used in DS 1.0.0)
|
||||
#define EPL_C_IP_ADR_INVALID 0x00000000L // invalid IP address (0.0.0.0) used to indicate no change
|
||||
#define EPL_C_IP_INVALID_MTU 0 // Byte: invalid MTU size used to indicate no change
|
||||
#define EPL_C_IP_MAX_MTU 1518 // Byte: maximum size in bytes of the IP stack which must be processed.
|
||||
#define EPL_C_IP_MIN_MTU 300 // Byte: minimum size in bytes of the IP stack which must be processed.
|
||||
#define EPL_C_NMT_STATE_TOLERANCE 5 // Cycles: maximum reaction time to NMT state commands
|
||||
#define EPL_C_NMT_STATREQ_CYCLE 5 // sec: StatusRequest cycle time to be applied to AsyncOnly CNs
|
||||
#define EPL_C_ERR_MONITOR_DELAY 10 // Error monitoring start delay (not used in DS 1.0.0)
|
||||
#define EPL_C_IP_ADR_INVALID 0x00000000L // invalid IP address (0.0.0.0) used to indicate no change
|
||||
#define EPL_C_IP_INVALID_MTU 0 // Byte: invalid MTU size used to indicate no change
|
||||
#define EPL_C_IP_MAX_MTU 1518 // Byte: maximum size in bytes of the IP stack which must be processed.
|
||||
#define EPL_C_IP_MIN_MTU 300 // Byte: minimum size in bytes of the IP stack which must be processed.
|
||||
#define EPL_C_NMT_STATE_TOLERANCE 5 // Cycles: maximum reaction time to NMT state commands
|
||||
#define EPL_C_NMT_STATREQ_CYCLE 5 // sec: StatusRequest cycle time to be applied to AsyncOnly CNs
|
||||
#define EPL_C_SDO_EPL_PORT 3819
|
||||
|
||||
#define EPL_C_DLL_MAX_ASND_SERVICE_IDS 5 // see tEplDllAsndServiceId in EplDll.h
|
||||
|
||||
|
||||
#define EPL_C_DLL_MAX_ASND_SERVICE_IDS 5 // see tEplDllAsndServiceId in EplDll.h
|
||||
|
||||
// Default configuration
|
||||
// ======================
|
||||
|
||||
#ifndef EPL_D_PDO_Granularity_U8
|
||||
#define EPL_D_PDO_Granularity_U8 8 // minimum size of objects to be mapped in bits UNSIGNED8 O O 1 1
|
||||
#define EPL_D_PDO_Granularity_U8 8 // minimum size of objects to be mapped in bits UNSIGNED8 O O 1 1
|
||||
#endif
|
||||
|
||||
#ifndef EPL_NMT_MAX_NODE_ID
|
||||
#define EPL_NMT_MAX_NODE_ID 254 // maximum node-ID
|
||||
#define EPL_NMT_MAX_NODE_ID 254 // maximum node-ID
|
||||
#endif
|
||||
|
||||
#ifndef EPL_D_NMT_MaxCNNumber_U8
|
||||
#define EPL_D_NMT_MaxCNNumber_U8 239 // maximum number of supported regular CNs in the Node ID range 1 .. 239 UNSIGNED8 O O 239 239
|
||||
#define EPL_D_NMT_MaxCNNumber_U8 239 // maximum number of supported regular CNs in the Node ID range 1 .. 239 UNSIGNED8 O O 239 239
|
||||
#endif
|
||||
|
||||
// defines for EPL API layer static process image
|
||||
@@ -162,7 +158,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef EPL_OBD_MAX_STRING_SIZE
|
||||
#define EPL_OBD_MAX_STRING_SIZE 32 // is used for objects 0x1008/0x1009/0x100A
|
||||
#define EPL_OBD_MAX_STRING_SIZE 32 // is used for objects 0x1008/0x1009/0x100A
|
||||
#endif
|
||||
|
||||
#ifndef EPL_OBD_USE_STORE_RESTORE
|
||||
@@ -194,7 +190,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef EPL_VETH_NAME
|
||||
#define EPL_VETH_NAME "epl" // name of net device in Linux
|
||||
#define EPL_VETH_NAME "epl" // name of net device in Linux
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -303,60 +299,57 @@
|
||||
#define EPL_E_DLL_LOSS_SOA_TH 0x8244
|
||||
#define EPL_E_DLL_LOSS_SOC_TH 0x8245
|
||||
// 0x84xx BootUp Errors
|
||||
#define EPL_E_NMT_BA1 0x8410 // other MN in MsNotActive active
|
||||
#define EPL_E_NMT_BA1_NO_MN_SUPPORT 0x8411 // MN is not supported
|
||||
#define EPL_E_NMT_BPO1 0x8420 // mandatory CN was not found or failed in BootStep1
|
||||
#define EPL_E_NMT_BPO1_GET_IDENT 0x8421 // IdentRes was not received
|
||||
#define EPL_E_NMT_BPO1_DEVICE_TYPE 0x8422 // wrong device type
|
||||
#define EPL_E_NMT_BPO1_VENDOR_ID 0x8423 // wrong vendor ID
|
||||
#define EPL_E_NMT_BPO1_PRODUCT_CODE 0x8424 // wrong product code
|
||||
#define EPL_E_NMT_BPO1_REVISION_NO 0x8425 // wrong revision number
|
||||
#define EPL_E_NMT_BPO1_SERIAL_NO 0x8426 // wrong serial number
|
||||
#define EPL_E_NMT_BPO1_CF_VERIFY 0x8428 // verification of configuration failed
|
||||
#define EPL_E_NMT_BPO2 0x8430 // mandatory CN failed in BootStep2
|
||||
#define EPL_E_NMT_BRO 0x8440 // CheckCommunication failed for mandatory CN
|
||||
#define EPL_E_NMT_WRONG_STATE 0x8480 // mandatory CN has wrong NMT state
|
||||
#define EPL_E_NMT_BA1 0x8410 // other MN in MsNotActive active
|
||||
#define EPL_E_NMT_BA1_NO_MN_SUPPORT 0x8411 // MN is not supported
|
||||
#define EPL_E_NMT_BPO1 0x8420 // mandatory CN was not found or failed in BootStep1
|
||||
#define EPL_E_NMT_BPO1_GET_IDENT 0x8421 // IdentRes was not received
|
||||
#define EPL_E_NMT_BPO1_DEVICE_TYPE 0x8422 // wrong device type
|
||||
#define EPL_E_NMT_BPO1_VENDOR_ID 0x8423 // wrong vendor ID
|
||||
#define EPL_E_NMT_BPO1_PRODUCT_CODE 0x8424 // wrong product code
|
||||
#define EPL_E_NMT_BPO1_REVISION_NO 0x8425 // wrong revision number
|
||||
#define EPL_E_NMT_BPO1_SERIAL_NO 0x8426 // wrong serial number
|
||||
#define EPL_E_NMT_BPO1_CF_VERIFY 0x8428 // verification of configuration failed
|
||||
#define EPL_E_NMT_BPO2 0x8430 // mandatory CN failed in BootStep2
|
||||
#define EPL_E_NMT_BRO 0x8440 // CheckCommunication failed for mandatory CN
|
||||
#define EPL_E_NMT_WRONG_STATE 0x8480 // mandatory CN has wrong NMT state
|
||||
|
||||
// Defines for object 0x1F80 NMT_StartUp_U32
|
||||
// ==========================================
|
||||
#define EPL_NMTST_STARTALLNODES 0x00000002L // Bit 1
|
||||
#define EPL_NMTST_NO_AUTOSTART 0x00000004L // Bit 2
|
||||
#define EPL_NMTST_NO_STARTNODE 0x00000008L // Bit 3
|
||||
#define EPL_NMTST_RESETALL_MAND_CN 0x00000010L // Bit 4
|
||||
#define EPL_NMTST_STOPALL_MAND_CN 0x00000040L // Bit 6
|
||||
#define EPL_NMTST_NO_AUTOPREOP2 0x00000080L // Bit 7
|
||||
#define EPL_NMTST_NO_AUTOREADYTOOP 0x00000100L // Bit 8
|
||||
#define EPL_NMTST_EXT_CNIDENTCHECK 0x00000200L // Bit 9
|
||||
#define EPL_NMTST_SWVERSIONCHECK 0x00000400L // Bit 10
|
||||
#define EPL_NMTST_CONFCHECK 0x00000800L // Bit 11
|
||||
#define EPL_NMTST_NO_RETURN_PREOP1 0x00001000L // Bit 12
|
||||
#define EPL_NMTST_BASICETHERNET 0x00002000L // Bit 13
|
||||
#define EPL_NMTST_STARTALLNODES 0x00000002L // Bit 1
|
||||
#define EPL_NMTST_NO_AUTOSTART 0x00000004L // Bit 2
|
||||
#define EPL_NMTST_NO_STARTNODE 0x00000008L // Bit 3
|
||||
#define EPL_NMTST_RESETALL_MAND_CN 0x00000010L // Bit 4
|
||||
#define EPL_NMTST_STOPALL_MAND_CN 0x00000040L // Bit 6
|
||||
#define EPL_NMTST_NO_AUTOPREOP2 0x00000080L // Bit 7
|
||||
#define EPL_NMTST_NO_AUTOREADYTOOP 0x00000100L // Bit 8
|
||||
#define EPL_NMTST_EXT_CNIDENTCHECK 0x00000200L // Bit 9
|
||||
#define EPL_NMTST_SWVERSIONCHECK 0x00000400L // Bit 10
|
||||
#define EPL_NMTST_CONFCHECK 0x00000800L // Bit 11
|
||||
#define EPL_NMTST_NO_RETURN_PREOP1 0x00001000L // Bit 12
|
||||
#define EPL_NMTST_BASICETHERNET 0x00002000L // Bit 13
|
||||
|
||||
// Defines for object 0x1F81 NMT_NodeAssignment_AU32
|
||||
// ==================================================
|
||||
#define EPL_NODEASSIGN_NODE_EXISTS 0x00000001L // Bit 0
|
||||
#define EPL_NODEASSIGN_NODE_IS_CN 0x00000002L // Bit 1
|
||||
#define EPL_NODEASSIGN_START_CN 0x00000004L // Bit 2
|
||||
#define EPL_NODEASSIGN_MANDATORY_CN 0x00000008L // Bit 3
|
||||
#define EPL_NODEASSIGN_KEEPALIVE 0x00000010L //currently not used in EPL V2 standard
|
||||
#define EPL_NODEASSIGN_SWVERSIONCHECK 0x00000020L // Bit 5
|
||||
#define EPL_NODEASSIGN_SWUPDATE 0x00000040L // Bit 6
|
||||
#define EPL_NODEASSIGN_ASYNCONLY_NODE 0x00000100L // Bit 8
|
||||
#define EPL_NODEASSIGN_MULTIPLEXED_CN 0x00000200L // Bit 9
|
||||
#define EPL_NODEASSIGN_RT1 0x00000400L // Bit 10
|
||||
#define EPL_NODEASSIGN_RT2 0x00000800L // Bit 11
|
||||
#define EPL_NODEASSIGN_MN_PRES 0x00001000L // Bit 12
|
||||
#define EPL_NODEASSIGN_VALID 0x80000000L // Bit 31
|
||||
#define EPL_NODEASSIGN_NODE_EXISTS 0x00000001L // Bit 0
|
||||
#define EPL_NODEASSIGN_NODE_IS_CN 0x00000002L // Bit 1
|
||||
#define EPL_NODEASSIGN_START_CN 0x00000004L // Bit 2
|
||||
#define EPL_NODEASSIGN_MANDATORY_CN 0x00000008L // Bit 3
|
||||
#define EPL_NODEASSIGN_KEEPALIVE 0x00000010L //currently not used in EPL V2 standard
|
||||
#define EPL_NODEASSIGN_SWVERSIONCHECK 0x00000020L // Bit 5
|
||||
#define EPL_NODEASSIGN_SWUPDATE 0x00000040L // Bit 6
|
||||
#define EPL_NODEASSIGN_ASYNCONLY_NODE 0x00000100L // Bit 8
|
||||
#define EPL_NODEASSIGN_MULTIPLEXED_CN 0x00000200L // Bit 9
|
||||
#define EPL_NODEASSIGN_RT1 0x00000400L // Bit 10
|
||||
#define EPL_NODEASSIGN_RT2 0x00000800L // Bit 11
|
||||
#define EPL_NODEASSIGN_MN_PRES 0x00001000L // Bit 12
|
||||
#define EPL_NODEASSIGN_VALID 0x80000000L // Bit 31
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_DEF_H_
|
||||
#endif // #ifndef _EPL_DEF_H_
|
||||
|
||||
+88
-103
@@ -66,7 +66,6 @@
|
||||
|
||||
2006/06/08 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_DLL_H_
|
||||
@@ -79,133 +78,123 @@
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef EPL_DLL_MAX_ASND_SERVICE_ID
|
||||
#define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5
|
||||
#define EPL_DLL_MAX_ASND_SERVICE_ID (EPL_C_DLL_MAX_ASND_SERVICE_IDS + 1) // last is kEplDllAsndSdo == 5
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplDllAsndNotDefined = 0x00,
|
||||
kEplDllAsndIdentResponse = 0x01,
|
||||
kEplDllAsndStatusResponse = 0x02,
|
||||
kEplDllAsndNmtRequest = 0x03,
|
||||
kEplDllAsndNmtCommand = 0x04,
|
||||
kEplDllAsndSdo = 0x05
|
||||
|
||||
typedef enum {
|
||||
kEplDllAsndNotDefined = 0x00,
|
||||
kEplDllAsndIdentResponse = 0x01,
|
||||
kEplDllAsndStatusResponse = 0x02,
|
||||
kEplDllAsndNmtRequest = 0x03,
|
||||
kEplDllAsndNmtCommand = 0x04,
|
||||
kEplDllAsndSdo = 0x05
|
||||
} tEplDllAsndServiceId;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplDllAsndFilterNone = 0x00,
|
||||
kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID
|
||||
kEplDllAsndFilterAny = 0x02, // receive any ASnd frame
|
||||
typedef enum {
|
||||
kEplDllAsndFilterNone = 0x00,
|
||||
kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID
|
||||
kEplDllAsndFilterAny = 0x02, // receive any ASnd frame
|
||||
} tEplDllAsndFilter;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplDllReqServiceNo = 0x00,
|
||||
kEplDllReqServiceIdent = 0x01,
|
||||
kEplDllReqServiceStatus = 0x02,
|
||||
kEplDllReqServiceNmtRequest = 0x03,
|
||||
kEplDllReqServiceUnspecified= 0xFF,
|
||||
typedef enum {
|
||||
kEplDllReqServiceNo = 0x00,
|
||||
kEplDllReqServiceIdent = 0x01,
|
||||
kEplDllReqServiceStatus = 0x02,
|
||||
kEplDllReqServiceNmtRequest = 0x03,
|
||||
kEplDllReqServiceUnspecified = 0xFF,
|
||||
|
||||
} tEplDllReqServiceId;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST
|
||||
kEplDllAsyncReqPrio6 = 0x06,
|
||||
kEplDllAsyncReqPrio5 = 0x05,
|
||||
kEplDllAsyncReqPrio4 = 0x04,
|
||||
kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST
|
||||
kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC
|
||||
kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC
|
||||
kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST
|
||||
typedef enum {
|
||||
kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST
|
||||
kEplDllAsyncReqPrio6 = 0x06,
|
||||
kEplDllAsyncReqPrio5 = 0x05,
|
||||
kEplDllAsyncReqPrio4 = 0x04,
|
||||
kEplDllAsyncReqPrioGeneric = 0x03, // PRIO_GENERIC_REQUEST
|
||||
kEplDllAsyncReqPrio2 = 0x02, // till WSP 0.1.3: PRIO_ABOVE_GENERIC
|
||||
kEplDllAsyncReqPrio1 = 0x01, // till WSP 0.1.3: PRIO_BELOW_GENERIC
|
||||
kEplDllAsyncReqPrio0 = 0x00, // till WSP 0.1.3: PRIO_GENERIC_REQUEST
|
||||
|
||||
} tEplDllAsyncReqPriority;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiFrameSize;
|
||||
tEplFrame * m_pFrame;
|
||||
tEplNetTime m_NetTime;
|
||||
typedef struct {
|
||||
unsigned int m_uiFrameSize;
|
||||
tEplFrame *m_pFrame;
|
||||
tEplNetTime m_NetTime;
|
||||
|
||||
} tEplFrameInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiSizeOfStruct;
|
||||
BOOL m_fAsyncOnly; // do not need to register PRes-Frame
|
||||
unsigned int m_uiNodeId; // local node ID
|
||||
typedef struct {
|
||||
unsigned int m_uiSizeOfStruct;
|
||||
BOOL m_fAsyncOnly; // do not need to register PRes-Frame
|
||||
unsigned int m_uiNodeId; // local node ID
|
||||
|
||||
// 0x1F82: NMT_FeatureFlags_U32
|
||||
DWORD m_dwFeatureFlags;
|
||||
// Cycle Length (0x1006: NMT_CycleLen_U32) in [us]
|
||||
DWORD m_dwCycleLen; // required for error detection
|
||||
// 0x1F98: NMT_CycleTiming_REC
|
||||
// 0x1F98.1: IsochrTxMaxPayload_U16
|
||||
unsigned int m_uiIsochrTxMaxPayload; // const
|
||||
// 0x1F98.2: IsochrRxMaxPayload_U16
|
||||
unsigned int m_uiIsochrRxMaxPayload; // const
|
||||
// 0x1F98.3: PResMaxLatency_U32
|
||||
DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.4: PReqActPayloadLimit_U16
|
||||
unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes)
|
||||
// 0x1F98.5: PResActPayloadLimit_U16
|
||||
unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes)
|
||||
// 0x1F98.6: ASndMaxLatency_U32
|
||||
DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.7: MultiplCycleCnt_U8
|
||||
unsigned int m_uiMultiplCycleCnt; // required for error detection
|
||||
// 0x1F98.8: AsyncMTU_U16
|
||||
unsigned int m_uiAsyncMtu; // required to set up max frame size
|
||||
// $$$ 0x1F98.9: Prescaler_U16
|
||||
// $$$ Multiplexed Slot
|
||||
// 0x1F82: NMT_FeatureFlags_U32
|
||||
DWORD m_dwFeatureFlags;
|
||||
// Cycle Length (0x1006: NMT_CycleLen_U32) in [us]
|
||||
DWORD m_dwCycleLen; // required for error detection
|
||||
// 0x1F98: NMT_CycleTiming_REC
|
||||
// 0x1F98.1: IsochrTxMaxPayload_U16
|
||||
unsigned int m_uiIsochrTxMaxPayload; // const
|
||||
// 0x1F98.2: IsochrRxMaxPayload_U16
|
||||
unsigned int m_uiIsochrRxMaxPayload; // const
|
||||
// 0x1F98.3: PResMaxLatency_U32
|
||||
DWORD m_dwPresMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.4: PReqActPayloadLimit_U16
|
||||
unsigned int m_uiPreqActPayloadLimit; // required for initialisation (+24 bytes)
|
||||
// 0x1F98.5: PResActPayloadLimit_U16
|
||||
unsigned int m_uiPresActPayloadLimit; // required for initialisation of Pres frame (+24 bytes)
|
||||
// 0x1F98.6: ASndMaxLatency_U32
|
||||
DWORD m_dwAsndMaxLatency; // const in [ns], only required for IdentRes
|
||||
// 0x1F98.7: MultiplCycleCnt_U8
|
||||
unsigned int m_uiMultiplCycleCnt; // required for error detection
|
||||
// 0x1F98.8: AsyncMTU_U16
|
||||
unsigned int m_uiAsyncMtu; // required to set up max frame size
|
||||
// $$$ 0x1F98.9: Prescaler_U16
|
||||
// $$$ Multiplexed Slot
|
||||
|
||||
// 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns]
|
||||
DWORD m_dwLossOfFrameTolerance;
|
||||
// 0x1C14: DLL_LossOfFrameTolerance_U32 in [ns]
|
||||
DWORD m_dwLossOfFrameTolerance;
|
||||
|
||||
// 0x1F8A: NMT_MNCycleTiming_REC
|
||||
// 0x1F8A.1: WaitSoCPReq_U32 in [ns]
|
||||
DWORD m_dwWaitSocPreq;
|
||||
// 0x1F8A: NMT_MNCycleTiming_REC
|
||||
// 0x1F8A.1: WaitSoCPReq_U32 in [ns]
|
||||
DWORD m_dwWaitSocPreq;
|
||||
|
||||
// 0x1F8A.2: AsyncSlotTimeout_U32 in [ns]
|
||||
DWORD m_dwAsyncSlotTimeout;
|
||||
// 0x1F8A.2: AsyncSlotTimeout_U32 in [ns]
|
||||
DWORD m_dwAsyncSlotTimeout;
|
||||
|
||||
} tEplDllConfigParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiSizeOfStruct;
|
||||
DWORD m_dwDeviceType; // NMT_DeviceType_U32
|
||||
DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
|
||||
DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
|
||||
DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
|
||||
DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
|
||||
QWORD m_qwVendorSpecificExt1;
|
||||
DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
|
||||
DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
|
||||
DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwIpAddress;
|
||||
DWORD m_dwSubnetMask;
|
||||
DWORD m_dwDefaultGateway;
|
||||
BYTE m_sHostname[32];
|
||||
BYTE m_abVendorSpecificExt2[48];
|
||||
typedef struct {
|
||||
unsigned int m_uiSizeOfStruct;
|
||||
DWORD m_dwDeviceType; // NMT_DeviceType_U32
|
||||
DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
|
||||
DWORD m_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
|
||||
DWORD m_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
|
||||
DWORD m_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
|
||||
QWORD m_qwVendorSpecificExt1;
|
||||
DWORD m_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
|
||||
DWORD m_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
|
||||
DWORD m_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_dwIpAddress;
|
||||
DWORD m_dwSubnetMask;
|
||||
DWORD m_dwDefaultGateway;
|
||||
BYTE m_sHostname[32];
|
||||
BYTE m_abVendorSpecificExt2[48];
|
||||
|
||||
} tEplDllIdentParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiNodeId;
|
||||
WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16
|
||||
WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16
|
||||
DWORD m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32
|
||||
typedef struct {
|
||||
unsigned int m_uiNodeId;
|
||||
WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16
|
||||
WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16
|
||||
DWORD m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32
|
||||
|
||||
} tEplDllNodeInfo;
|
||||
|
||||
@@ -213,8 +202,4 @@ typedef struct
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_DLL_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_DLL_H_
|
||||
|
||||
@@ -66,13 +66,11 @@
|
||||
|
||||
2006/06/20 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_DLLCAL_H_
|
||||
#define _EPL_DLLCAL_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -105,18 +103,16 @@
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tEplDllAsndServiceId m_ServiceId;
|
||||
tEplDllAsndFilter m_Filter;
|
||||
typedef struct {
|
||||
tEplDllAsndServiceId m_ServiceId;
|
||||
tEplDllAsndFilter m_Filter;
|
||||
|
||||
} tEplDllCalAsndServiceIdFilter;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tEplDllReqServiceId m_Service;
|
||||
unsigned int m_uiNodeId;
|
||||
BYTE m_bSoaFlag1;
|
||||
typedef struct {
|
||||
tEplDllReqServiceId m_Service;
|
||||
unsigned int m_uiNodeId;
|
||||
BYTE m_bSoaFlag1;
|
||||
|
||||
} tEplDllCalIssueRequest;
|
||||
|
||||
@@ -124,8 +120,4 @@ typedef struct
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_DLLKCAL_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_DLLKCAL_H_
|
||||
|
||||
+123
-131
@@ -71,185 +71,179 @@
|
||||
#ifndef _EPL_ERRORDEF_H_
|
||||
#define _EPL_ERRORDEF_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// return codes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// area for generic errors 0x0000 - 0x000F
|
||||
kEplSuccessful = 0x0000, // no error/successful run
|
||||
kEplIllegalInstance = 0x0001, // the called Instanz does not exist
|
||||
kEplInvalidInstanceParam = 0x0002, //
|
||||
kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available
|
||||
kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011
|
||||
kEplInvalidOperation = 0x0005, // operation not allowed in this situation
|
||||
kEplInvalidNodeId = 0x0007, // invalid NodeId was specified
|
||||
kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...)
|
||||
kEplShutdown = 0x0009, // stack is shutting down
|
||||
kEplReject = 0x000A, // reject the subsequent command
|
||||
typedef enum {
|
||||
// area for generic errors 0x0000 - 0x000F
|
||||
kEplSuccessful = 0x0000, // no error/successful run
|
||||
kEplIllegalInstance = 0x0001, // the called Instanz does not exist
|
||||
kEplInvalidInstanceParam = 0x0002, //
|
||||
kEplNoFreeInstance = 0x0003, // XxxAddInstance was called but no free instance is available
|
||||
kEplWrongSignature = 0x0004, // wrong signature while writing to object 0x1010 or 0x1011
|
||||
kEplInvalidOperation = 0x0005, // operation not allowed in this situation
|
||||
kEplInvalidNodeId = 0x0007, // invalid NodeId was specified
|
||||
kEplNoResource = 0x0008, // resource could not be created (Windows, PxROS, ...)
|
||||
kEplShutdown = 0x0009, // stack is shutting down
|
||||
kEplReject = 0x000A, // reject the subsequent command
|
||||
|
||||
// area for EDRV module 0x0010 - 0x001F
|
||||
// area for EDRV module 0x0010 - 0x001F
|
||||
// kEplEdrvNoFrame = 0x0010, // no CAN message was received
|
||||
// kEplEdrvMsgHigh = 0x0011, // CAN message with high priority was received
|
||||
// kEplEdrvMsgLow = 0x0012, // CAN message with low priority was received
|
||||
kEplEdrvInitError = 0x0013, // initialisation error
|
||||
kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames
|
||||
kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist
|
||||
kEplEdrvInitError = 0x0013, // initialisation error
|
||||
kEplEdrvNoFreeBufEntry = 0x0014, // no free entry in internal buffer table for Tx frames
|
||||
kEplEdrvBufNotExisting = 0x0015, // specified Tx buffer does not exist
|
||||
// kEplEdrvNoFreeChannel = 0x0014, // CAN controller has not a free channel
|
||||
// kEplEdrvTxBuffHighOverrun = 0x0015, // buffer for high priority CAN transmit messages has overrun
|
||||
// kEplEdrvTxBuffLowOverrun = 0x0016, // buffer for low priority CAN transmit messages has overrun
|
||||
// kEplEdrvIllegalBdi = 0x0017, // unsupported baudrate within baudrate table
|
||||
// kEplEdrvBusy = 0x0018, // remote frame can not be updated because no bus contact or CAN
|
||||
// transmission is activ
|
||||
// transmission is activ
|
||||
// kEplEdrvInvalidDriverType = 0x0019, // (PC: Windows or Linux) invalid driver type
|
||||
// kEplEdrvDriverNotFound = 0x001A, // (PC: Windows or Linux) driver (DLL) could not be found
|
||||
// kEplEdrvInvalidBaseAddress = 0x001B, // (PC: Windows or Linux) driver could not found the CAN controller
|
||||
// kEplEdrvInvalidParam = 0x001C, // invalid param in function call
|
||||
|
||||
// area for COB module 0x0020 - 0x002F
|
||||
// area for COB module 0x0020 - 0x002F
|
||||
/* kEplCobNoFreeEntry = 0x0020, // no free entry in RX- or TX-COB table
|
||||
kEplCobAlreadyExist = 0x0021, // COB-ID already exists in RX- resp. TX-COB table
|
||||
*/
|
||||
kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed
|
||||
kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before
|
||||
kEplDllIllegalHdl = 0x0022, // illegal handle for a TxFrame was passed
|
||||
kEplDllCbAsyncRegistered = 0x0023, // handler for non-EPL frames was already registered before
|
||||
// kEplDllAsyncRxBufferFull = 0x0024, // receive buffer for asynchronous frames is full
|
||||
kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty
|
||||
kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full
|
||||
kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure
|
||||
kEplDllInvalidParam = 0x0028, // invalid parameters passed to function
|
||||
kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet
|
||||
kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist
|
||||
kEplDllAsyncTxBufferEmpty = 0x0025, // transmit buffer for asynchronous frames is empty
|
||||
kEplDllAsyncTxBufferFull = 0x0026, // transmit buffer for asynchronous frames is full
|
||||
kEplDllNoNodeInfo = 0x0027, // MN: too less space in the internal node info structure
|
||||
kEplDllInvalidParam = 0x0028, // invalid parameters passed to function
|
||||
kEplDllTxBufNotReady = 0x002E, // TxBuffer (e.g. for PReq) is not ready yet
|
||||
kEplDllTxFrameInvalid = 0x002F, // TxFrame (e.g. for PReq) is invalid or does not exist
|
||||
/* kEplCobIllegalCanId = 0x0023, // COB-ID is not allowed (like 0x000 is reserved for NMT, ...)
|
||||
kEplCobInvalidCanId = 0x0024, // COB-ID is switched off
|
||||
kEplCobCdrvStateSet = 0x0025, // at least one bit of CAN driver state is set
|
||||
kEplCobNoFreeEntryHighBuf = 0x0026, // no free entry in high priotity RX- or TX-COB table
|
||||
kEplCobOwnId = 0x0027, // COB-ID already exists in own module which calls CobDefine() or CobCheck()
|
||||
*/
|
||||
// area for OBD module 0x0030 - 0x003F
|
||||
kEplObdIllegalPart = 0x0030, // unknown OD part
|
||||
kEplObdIndexNotExist = 0x0031, // object index does not exist in OD
|
||||
kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index
|
||||
kEplObdReadViolation = 0x0033, // read access to a write-only object
|
||||
kEplObdWriteViolation = 0x0034, // write access to a read-only object
|
||||
kEplObdAccessViolation = 0x0035, // access not allowed
|
||||
kEplObdUnknownObjectType = 0x0036, // object type not defined/known
|
||||
kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure
|
||||
kEplObdValueTooLow = 0x0038, // value to write to an object is too low
|
||||
kEplObdValueTooHigh = 0x0039, // value to write to an object is too high
|
||||
kEplObdValueLengthError = 0x003A, // value to write is to long or to short
|
||||
// area for OBD module 0x0030 - 0x003F
|
||||
kEplObdIllegalPart = 0x0030, // unknown OD part
|
||||
kEplObdIndexNotExist = 0x0031, // object index does not exist in OD
|
||||
kEplObdSubindexNotExist = 0x0032, // subindex does not exist in object index
|
||||
kEplObdReadViolation = 0x0033, // read access to a write-only object
|
||||
kEplObdWriteViolation = 0x0034, // write access to a read-only object
|
||||
kEplObdAccessViolation = 0x0035, // access not allowed
|
||||
kEplObdUnknownObjectType = 0x0036, // object type not defined/known
|
||||
kEplObdVarEntryNotExist = 0x0037, // object does not contain VarEntry structure
|
||||
kEplObdValueTooLow = 0x0038, // value to write to an object is too low
|
||||
kEplObdValueTooHigh = 0x0039, // value to write to an object is too high
|
||||
kEplObdValueLengthError = 0x003A, // value to write is to long or to short
|
||||
// kEplObdIllegalFloat = 0x003B, // illegal float variable
|
||||
// kEplObdWrongOdBuilderKey = 0x003F, // OD was generated with demo version of tool ODBuilder
|
||||
|
||||
// area for NMT module 0x0040 - 0x004F
|
||||
kEplNmtUnknownCommand = 0x0040, // unknown NMT command
|
||||
kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid
|
||||
kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul
|
||||
kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine
|
||||
kEplNmtInvalidParam = 0x0044, // invalid parameters specified
|
||||
// area for NMT module 0x0040 - 0x004F
|
||||
kEplNmtUnknownCommand = 0x0040, // unknown NMT command
|
||||
kEplNmtInvalidFramePointer = 0x0041, // pointer to the frame is not valid
|
||||
kEplNmtInvalidEvent = 0x0042, // invalid event send to NMT-modul
|
||||
kEplNmtInvalidState = 0x0043, // unknown state in NMT-State-Maschine
|
||||
kEplNmtInvalidParam = 0x0044, // invalid parameters specified
|
||||
|
||||
// area for SDO/UDP module 0x0050 - 0x005F
|
||||
kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of
|
||||
// module
|
||||
kEplSdoUdpNoSocket = 0x0051, // error during init of socket
|
||||
kEplSdoUdpSocketError = 0x0052, // error during usage of socket
|
||||
kEplSdoUdpThreadError = 0x0053, // error during start of listen thread
|
||||
kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp
|
||||
kEplSdoUdpSendError = 0x0055, // Error during send of frame
|
||||
kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid
|
||||
// area for SDO/UDP module 0x0050 - 0x005F
|
||||
kEplSdoUdpMissCb = 0x0050, // missing callback-function pointer during inti of
|
||||
// module
|
||||
kEplSdoUdpNoSocket = 0x0051, // error during init of socket
|
||||
kEplSdoUdpSocketError = 0x0052, // error during usage of socket
|
||||
kEplSdoUdpThreadError = 0x0053, // error during start of listen thread
|
||||
kEplSdoUdpNoFreeHandle = 0x0054, // no free connection handle for Udp
|
||||
kEplSdoUdpSendError = 0x0055, // Error during send of frame
|
||||
kEplSdoUdpInvalidHdl = 0x0056, // the connection handle is invalid
|
||||
|
||||
// area for SDO Sequence layer module 0x0060 - 0x006F
|
||||
kEplSdoSeqMissCb = 0x0060, // no callback-function assign
|
||||
kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection
|
||||
kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer
|
||||
kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected
|
||||
kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history
|
||||
kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct
|
||||
kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full
|
||||
// and a ack request is needed
|
||||
kEplSdoSeqInvalidFrame = 0x0067, // frame not valid
|
||||
kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later
|
||||
kEplSdoSeqInvalidEvent = 0x0069, // invalid event received
|
||||
// area for SDO Sequence layer module 0x0060 - 0x006F
|
||||
kEplSdoSeqMissCb = 0x0060, // no callback-function assign
|
||||
kEplSdoSeqNoFreeHandle = 0x0061, // no free handle for connection
|
||||
kEplSdoSeqInvalidHdl = 0x0062, // invalid handle in SDO sequence layer
|
||||
kEplSdoSeqUnsupportedProt = 0x0063, // unsupported Protocol selected
|
||||
kEplSdoSeqNoFreeHistory = 0x0064, // no free entry in history
|
||||
kEplSdoSeqFrameSizeError = 0x0065, // the size of the frames is not correct
|
||||
kEplSdoSeqRequestAckNeeded = 0x0066, // indeicates that the history buffer is full
|
||||
// and a ack request is needed
|
||||
kEplSdoSeqInvalidFrame = 0x0067, // frame not valid
|
||||
kEplSdoSeqConnectionBusy = 0x0068, // connection is busy -> retry later
|
||||
kEplSdoSeqInvalidEvent = 0x0069, // invalid event received
|
||||
|
||||
// area for SDO Command Layer Module 0x0070 - 0x007F
|
||||
kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected
|
||||
kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection
|
||||
kEplSdoComInvalidServiceType= 0x0072, // invalid SDO service type specified
|
||||
kEplSdoComInvalidHandle = 0x0073, // handle invalid
|
||||
kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is
|
||||
// not possible
|
||||
kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is
|
||||
// not responsible for this event from sequence layer
|
||||
kEplSdoComHandleExists = 0x0076, // handle to same node already exists
|
||||
kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running
|
||||
kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function
|
||||
// area for SDO Command Layer Module 0x0070 - 0x007F
|
||||
kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected
|
||||
kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection
|
||||
kEplSdoComInvalidServiceType = 0x0072, // invalid SDO service type specified
|
||||
kEplSdoComInvalidHandle = 0x0073, // handle invalid
|
||||
kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is
|
||||
// not possible
|
||||
kEplSdoComNotResponsible = 0x0075, // internal error: command layer handle is
|
||||
// not responsible for this event from sequence layer
|
||||
kEplSdoComHandleExists = 0x0076, // handle to same node already exists
|
||||
kEplSdoComHandleBusy = 0x0077, // transfer via this handle is already running
|
||||
kEplSdoComInvalidParam = 0x0078, // invalid parameters passed to function
|
||||
|
||||
// area for EPL Event-Modul 0x0080 - 0x008F
|
||||
kEplEventUnknownSink = 0x0080, // unknown sink for event
|
||||
kEplEventPostError = 0x0081, // error during post of event
|
||||
// area for EPL Event-Modul 0x0080 - 0x008F
|
||||
kEplEventUnknownSink = 0x0080, // unknown sink for event
|
||||
kEplEventPostError = 0x0081, // error during post of event
|
||||
|
||||
// area for EPL Timer Modul 0x0090 - 0x009F
|
||||
kEplTimerInvalidHandle = 0x0090, // invalid handle for timer
|
||||
kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by
|
||||
// an error
|
||||
|
||||
// area for EPL SDO/Asnd Module 0x00A0 - 0x0AF
|
||||
kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid
|
||||
kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection
|
||||
kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid
|
||||
|
||||
// area for EPL Timer Modul 0x0090 - 0x009F
|
||||
kEplTimerInvalidHandle = 0x0090, // invalid handle for timer
|
||||
kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by
|
||||
// an error
|
||||
// area for PDO module 0x00B0 - 0x00BF
|
||||
kEplPdoNotExist = 0x00B0, // selected PDO does not exist
|
||||
kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis
|
||||
kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity
|
||||
kEplPdoInitError = 0x00B3, // error during initialisation of PDO module
|
||||
kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO
|
||||
kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO
|
||||
kEplPdoErrorSend = 0x00B6, // error during sending a PDO
|
||||
kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs
|
||||
kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping
|
||||
kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar()
|
||||
kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value
|
||||
kEplPdoWriteConstObject = 0x00BB, // constant object can not be written
|
||||
// (only TxType, Inhibit-, Event Time for CANopen Kit)
|
||||
|
||||
// area for EPL SDO/Asnd Module 0x00A0 - 0x0AF
|
||||
kEplSdoAsndInvalidNodeId = 0x00A0, //0 node id is invalid
|
||||
kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection
|
||||
kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid
|
||||
|
||||
|
||||
// area for PDO module 0x00B0 - 0x00BF
|
||||
kEplPdoNotExist = 0x00B0, // selected PDO does not exist
|
||||
kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis
|
||||
kEplPdoGranularityMismatch = 0x00B2, // configured PDO granularity is not equal to supported granularity
|
||||
kEplPdoInitError = 0x00B3, // error during initialisation of PDO module
|
||||
kEplPdoErrorPdoEncode = 0x00B4, // error during encoding a PDO
|
||||
kEplPdoErrorPdoDecode = 0x00B5, // error during decoding a PDO
|
||||
kEplPdoErrorSend = 0x00B6, // error during sending a PDO
|
||||
kEplPdoErrorSyncWin = 0x00B7, // the SYNC window runs out during sending SYNC-PDOs
|
||||
kEplPdoErrorMapp = 0x00B8, // invalid PDO mapping
|
||||
kEplPdoVarNotFound = 0x00B9, // variable was not found in function PdoSignalVar()
|
||||
kEplPdoErrorEmcyPdoLen = 0x00BA, // the length of a received PDO is unequal to the expected value
|
||||
kEplPdoWriteConstObject = 0x00BB, // constant object can not be written
|
||||
// (only TxType, Inhibit-, Event Time for CANopen Kit)
|
||||
|
||||
// area for LSS slave module
|
||||
// area for LSS slave module
|
||||
/* kEplLsssResetNode = 0x0080, // NMT command "reset node" has to be processed after LSS configuration
|
||||
// new of NodeId
|
||||
kEplLsssInvalidNodeId = 0x0081, // no valid NodeId is configured -> wait until it is configured with
|
||||
// LSS service before calling CcmConnectToNet()
|
||||
*/
|
||||
// area for emergency consumer module 0x0090 - 0x009F
|
||||
// area for emergency consumer module 0x0090 - 0x009F
|
||||
/* kEplEmccNoFreeProducerEntry = 0x0090, // no free entry to add a Emergency Producer
|
||||
kEplEmccNodeIdNotExist = 0x0091, // selected NodeId was never added
|
||||
kEplEmccNodeIdInvalid = 0x0092, // selected NodeId is outside of range (0x01 until 0x7F)
|
||||
kEplEmccNodeIdExist = 0x0093, // selected NodeId already exist
|
||||
*/
|
||||
// area for dynamic OD 0x00A0 - 0x00AF
|
||||
// area for dynamic OD 0x00A0 - 0x00AF
|
||||
/* kEplDynNoMemory = 0x00A0, // no memory available
|
||||
kEplDynInvalidConfig = 0x00A1, // invalid configuration in segment container
|
||||
*/
|
||||
// area for hertbeat consumer module 0x00B0 - 0x00BF
|
||||
// area for hertbeat consumer module 0x00B0 - 0x00BF
|
||||
/* kEplHbcEntryNotExist = 0x00B0, // Heartbeat Producer node not configured
|
||||
kEplHbcEntryAlreadyExist = 0x00B1, // NodeId was already defined in heartbeat consumer table (object 0x1016)
|
||||
*/
|
||||
// Configuration manager module 0x00C0 - 0x00CF
|
||||
kEplCfgMaConfigError = 0x00C0, // error in configuration manager
|
||||
kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout
|
||||
kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid
|
||||
kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format
|
||||
kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors
|
||||
kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry
|
||||
kEplCfgMaNoConfigData = 0x00C6, // no configuration data present
|
||||
kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf
|
||||
// -> this entry was not configured
|
||||
// Configuration manager module 0x00C0 - 0x00CF
|
||||
kEplCfgMaConfigError = 0x00C0, // error in configuration manager
|
||||
kEplCfgMaSdocTimeOutError = 0x00C1, // error in configuration manager, Sdo timeout
|
||||
kEplCfgMaInvalidDcf = 0x00C2, // configration file not valid
|
||||
kEplCfgMaUnsupportedDcf = 0x00C3, // unsupported Dcf format
|
||||
kEplCfgMaConfigWithErrors = 0x00C4, // configuration finished with errors
|
||||
kEplCfgMaNoFreeConfig = 0x00C5, // no free configuration entry
|
||||
kEplCfgMaNoConfigData = 0x00C6, // no configuration data present
|
||||
kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf
|
||||
// -> this entry was not configured
|
||||
|
||||
|
||||
// area for LSS master module 0x00D0 - 0x00DF
|
||||
// area for LSS master module 0x00D0 - 0x00DF
|
||||
/* kEplLssmIllegalMode = 0x00D0, // illegal LSS mode (operation / configuration)
|
||||
kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master
|
||||
kEplLssmBusy = 0x00D2, // LSS process is busy with an previous service
|
||||
@@ -257,11 +251,11 @@ typedef enum
|
||||
kEplLssmTimeout = 0x00D4, // LSS slave did not answer a LSS service
|
||||
kEplLssmErrorInConfirm = 0x00D5, // LSS slave replied an error code for a LSS service
|
||||
*/
|
||||
// area for CCM modules 0x00E0 - 0xEF
|
||||
// area for CCM modules 0x00E0 - 0xEF
|
||||
/* kEplCcmStoreUnvalidState = 0x00E0, // memory device not available due device state
|
||||
kEplCcmStoreHwError = 0x00E1, // hw error due device access
|
||||
*/
|
||||
// area for SRDO module 0x0100 - 0x011F
|
||||
// area for SRDO module 0x0100 - 0x011F
|
||||
/* kEplSrdoNotExist = 0x0100, // selected SRDO does not exist
|
||||
kEplSrdoGranularityMismatch = 0x0101, // configured SRDO granularity is not equal to supported granularity
|
||||
kEplSrdoCfgTimingError = 0x0102, // configuration is not ok (Timing)
|
||||
@@ -285,18 +279,16 @@ typedef enum
|
||||
kEplSrdoOverrun = 0x0114 // a RxSRDO was received but the pevious one was not else processed
|
||||
*/
|
||||
|
||||
kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished
|
||||
kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id)
|
||||
kEplApiTaskDeferred = 0x0140, // EPL performs task in background and informs the application (or vice-versa), when it is finished
|
||||
kEplApiInvalidParam = 0x0142, // passed invalid parameters to a function (e.g. invalid node id)
|
||||
|
||||
// area untill 0x07FF is reserved
|
||||
// area for user application from 0x0800 to 0x7FFF
|
||||
// area untill 0x07FF is reserved
|
||||
// area for user application from 0x0800 to 0x7FFF
|
||||
|
||||
} tEplKernel;
|
||||
|
||||
|
||||
#endif
|
||||
//EOF
|
||||
|
||||
// Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler
|
||||
// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
|
||||
|
||||
|
||||
+139
-163
@@ -66,7 +66,6 @@
|
||||
|
||||
2006/06/12 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_EVENT_H_
|
||||
@@ -82,222 +81,199 @@
|
||||
// name and size of event queues
|
||||
#define EPL_EVENT_NAME_SHB_KERNEL_TO_USER "ShbKernelToUser"
|
||||
#ifndef EPL_EVENT_SIZE_SHB_KERNEL_TO_USER
|
||||
#define EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 32768 // 32 kByte
|
||||
#define EPL_EVENT_SIZE_SHB_KERNEL_TO_USER 32768 // 32 kByte
|
||||
#endif
|
||||
|
||||
#define EPL_EVENT_NAME_SHB_USER_TO_KERNEL "ShbUserToKernel"
|
||||
#ifndef EPL_EVENT_SIZE_SHB_USER_TO_KERNEL
|
||||
#define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte
|
||||
#define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte
|
||||
#endif
|
||||
|
||||
|
||||
// max size of event argument
|
||||
#ifndef EPL_MAX_EVENT_ARG_SIZE
|
||||
#define EPL_MAX_EVENT_ARG_SIZE 256 // because of PDO
|
||||
#define EPL_MAX_EVENT_ARG_SIZE 256 // because of PDO
|
||||
#endif
|
||||
|
||||
#define EPL_DLL_ERR_MN_CRC 0x00000001L // object 0x1C00
|
||||
#define EPL_DLL_ERR_MN_COLLISION 0x00000002L // object 0x1C01
|
||||
#define EPL_DLL_ERR_MN_CYCTIMEEXCEED 0x00000004L // object 0x1C02
|
||||
#define EPL_DLL_ERR_MN_LOSS_LINK 0x00000008L // object 0x1C03
|
||||
#define EPL_DLL_ERR_MN_CN_LATE_PRES 0x00000010L // objects 0x1C04-0x1C06
|
||||
#define EPL_DLL_ERR_MN_CN_LOSS_PRES 0x00000080L // objects 0x1C07-0x1C09
|
||||
#define EPL_DLL_ERR_CN_COLLISION 0x00000400L // object 0x1C0A
|
||||
#define EPL_DLL_ERR_CN_LOSS_SOC 0x00000800L // object 0x1C0B
|
||||
#define EPL_DLL_ERR_CN_LOSS_SOA 0x00001000L // object 0x1C0C
|
||||
#define EPL_DLL_ERR_CN_LOSS_PREQ 0x00002000L // object 0x1C0D
|
||||
#define EPL_DLL_ERR_CN_RECVD_PREQ 0x00004000L // decrement object 0x1C0D/2
|
||||
#define EPL_DLL_ERR_CN_SOC_JITTER 0x00008000L // object 0x1C0E
|
||||
#define EPL_DLL_ERR_CN_CRC 0x00010000L // object 0x1C0F
|
||||
#define EPL_DLL_ERR_CN_LOSS_LINK 0x00020000L // object 0x1C10
|
||||
#define EPL_DLL_ERR_MN_LOSS_STATRES 0x00040000L // objects 0x1C15-0x1C17 (should be operated by NmtMnu module)
|
||||
#define EPL_DLL_ERR_BAD_PHYS_MODE 0x00080000L // no object
|
||||
#define EPL_DLL_ERR_MAC_BUFFER 0x00100000L // no object (NMT_GT6)
|
||||
#define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // no object (NMT_GT6)
|
||||
#define EPL_DLL_ERR_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration)
|
||||
|
||||
#define EPL_DLL_ERR_MN_CRC 0x00000001L // object 0x1C00
|
||||
#define EPL_DLL_ERR_MN_COLLISION 0x00000002L // object 0x1C01
|
||||
#define EPL_DLL_ERR_MN_CYCTIMEEXCEED 0x00000004L // object 0x1C02
|
||||
#define EPL_DLL_ERR_MN_LOSS_LINK 0x00000008L // object 0x1C03
|
||||
#define EPL_DLL_ERR_MN_CN_LATE_PRES 0x00000010L // objects 0x1C04-0x1C06
|
||||
#define EPL_DLL_ERR_MN_CN_LOSS_PRES 0x00000080L // objects 0x1C07-0x1C09
|
||||
#define EPL_DLL_ERR_CN_COLLISION 0x00000400L // object 0x1C0A
|
||||
#define EPL_DLL_ERR_CN_LOSS_SOC 0x00000800L // object 0x1C0B
|
||||
#define EPL_DLL_ERR_CN_LOSS_SOA 0x00001000L // object 0x1C0C
|
||||
#define EPL_DLL_ERR_CN_LOSS_PREQ 0x00002000L // object 0x1C0D
|
||||
#define EPL_DLL_ERR_CN_RECVD_PREQ 0x00004000L // decrement object 0x1C0D/2
|
||||
#define EPL_DLL_ERR_CN_SOC_JITTER 0x00008000L // object 0x1C0E
|
||||
#define EPL_DLL_ERR_CN_CRC 0x00010000L // object 0x1C0F
|
||||
#define EPL_DLL_ERR_CN_LOSS_LINK 0x00020000L // object 0x1C10
|
||||
#define EPL_DLL_ERR_MN_LOSS_STATRES 0x00040000L // objects 0x1C15-0x1C17 (should be operated by NmtMnu module)
|
||||
#define EPL_DLL_ERR_BAD_PHYS_MODE 0x00080000L // no object
|
||||
#define EPL_DLL_ERR_MAC_BUFFER 0x00100000L // no object (NMT_GT6)
|
||||
#define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // no object (NMT_GT6)
|
||||
#define EPL_DLL_ERR_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// EventType determines the argument of the event
|
||||
typedef enum
|
||||
{
|
||||
kEplEventTypeNmtEvent = 0x01, // NMT event
|
||||
// arg is pointer to tEplNmtEvent
|
||||
kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq)
|
||||
// arg is pointer to tEplFrame
|
||||
kEplEventTypePdoTx = 0x03, // PDO frame transmitted event (PRes/PReq)
|
||||
// arg is pointer to tEplFrameInfo
|
||||
kEplEventTypePdoSoa = 0x04, // SoA frame received event (isochronous phase completed)
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeSync = 0x05, // Sync event (e.g. SoC or anticipated SoC)
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeTimer = 0x06, // Timer event
|
||||
// arg is pointer to tEplTimerEventArg
|
||||
kEplEventTypeHeartbeat = 0x07, // Heartbeat event
|
||||
// arg is pointer to tEplHeartbeatEvent
|
||||
kEplEventTypeDllkCreate = 0x08, // DLL kernel create event
|
||||
// arg is pointer to the new tEplNmtState
|
||||
kEplEventTypeDllkDestroy = 0x09, // DLL kernel destroy event
|
||||
// arg is pointer to the old tEplNmtState
|
||||
kEplEventTypeDllkFillTx = 0x0A, // DLL kernel fill TxBuffer event
|
||||
// arg is pointer to tEplDllAsyncReqPriority
|
||||
kEplEventTypeDllkPresReady = 0x0B, // DLL kernel PRes ready event
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeError = 0x0C, // Error event for API layer
|
||||
// arg is pointer to tEplEventError
|
||||
kEplEventTypeNmtStateChange = 0x0D, // indicate change of NMT-State
|
||||
// arg is pointer to tEplEventNmtStateChange
|
||||
kEplEventTypeDllError = 0x0E, // DLL error event for Error handler
|
||||
// arg is pointer to tEplErrorHandlerkEvent
|
||||
kEplEventTypeAsndRx = 0x0F, // received ASnd frame for DLL user module
|
||||
// arg is pointer to tEplFrame
|
||||
kEplEventTypeDllkServFilter = 0x10, // configure ServiceIdFilter
|
||||
// arg is pointer to tEplDllCalServiceIdFilter
|
||||
kEplEventTypeDllkIdentity = 0x11, // configure Identity
|
||||
// arg is pointer to tEplDllIdentParam
|
||||
kEplEventTypeDllkConfig = 0x12, // configure ConfigParam
|
||||
// arg is pointer to tEplDllConfigParam
|
||||
kEplEventTypeDllkIssueReq = 0x13, // issue Ident/Status request
|
||||
// arg is pointer to tEplDllCalIssueRequest
|
||||
kEplEventTypeDllkAddNode = 0x14, // add node to isochronous phase
|
||||
// arg is pointer to tEplDllNodeInfo
|
||||
kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase
|
||||
// arg is pointer to unsigned int
|
||||
kEplEventTypeDllkSoftDelNode= 0x16, // remove node softly from isochronous phase
|
||||
// arg is pointer to unsigned int
|
||||
kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeNmtMnuNmtCmdSent = 0x18, // NMT command was actually sent
|
||||
// arg is pointer to tEplFrame
|
||||
typedef enum {
|
||||
kEplEventTypeNmtEvent = 0x01, // NMT event
|
||||
// arg is pointer to tEplNmtEvent
|
||||
kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq)
|
||||
// arg is pointer to tEplFrame
|
||||
kEplEventTypePdoTx = 0x03, // PDO frame transmitted event (PRes/PReq)
|
||||
// arg is pointer to tEplFrameInfo
|
||||
kEplEventTypePdoSoa = 0x04, // SoA frame received event (isochronous phase completed)
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeSync = 0x05, // Sync event (e.g. SoC or anticipated SoC)
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeTimer = 0x06, // Timer event
|
||||
// arg is pointer to tEplTimerEventArg
|
||||
kEplEventTypeHeartbeat = 0x07, // Heartbeat event
|
||||
// arg is pointer to tEplHeartbeatEvent
|
||||
kEplEventTypeDllkCreate = 0x08, // DLL kernel create event
|
||||
// arg is pointer to the new tEplNmtState
|
||||
kEplEventTypeDllkDestroy = 0x09, // DLL kernel destroy event
|
||||
// arg is pointer to the old tEplNmtState
|
||||
kEplEventTypeDllkFillTx = 0x0A, // DLL kernel fill TxBuffer event
|
||||
// arg is pointer to tEplDllAsyncReqPriority
|
||||
kEplEventTypeDllkPresReady = 0x0B, // DLL kernel PRes ready event
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeError = 0x0C, // Error event for API layer
|
||||
// arg is pointer to tEplEventError
|
||||
kEplEventTypeNmtStateChange = 0x0D, // indicate change of NMT-State
|
||||
// arg is pointer to tEplEventNmtStateChange
|
||||
kEplEventTypeDllError = 0x0E, // DLL error event for Error handler
|
||||
// arg is pointer to tEplErrorHandlerkEvent
|
||||
kEplEventTypeAsndRx = 0x0F, // received ASnd frame for DLL user module
|
||||
// arg is pointer to tEplFrame
|
||||
kEplEventTypeDllkServFilter = 0x10, // configure ServiceIdFilter
|
||||
// arg is pointer to tEplDllCalServiceIdFilter
|
||||
kEplEventTypeDllkIdentity = 0x11, // configure Identity
|
||||
// arg is pointer to tEplDllIdentParam
|
||||
kEplEventTypeDllkConfig = 0x12, // configure ConfigParam
|
||||
// arg is pointer to tEplDllConfigParam
|
||||
kEplEventTypeDllkIssueReq = 0x13, // issue Ident/Status request
|
||||
// arg is pointer to tEplDllCalIssueRequest
|
||||
kEplEventTypeDllkAddNode = 0x14, // add node to isochronous phase
|
||||
// arg is pointer to tEplDllNodeInfo
|
||||
kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase
|
||||
// arg is pointer to unsigned int
|
||||
kEplEventTypeDllkSoftDelNode = 0x16, // remove node softly from isochronous phase
|
||||
// arg is pointer to unsigned int
|
||||
kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN
|
||||
// arg is pointer to nothing
|
||||
kEplEventTypeNmtMnuNmtCmdSent = 0x18, // NMT command was actually sent
|
||||
// arg is pointer to tEplFrame
|
||||
|
||||
} tEplEventType;
|
||||
|
||||
|
||||
// EventSink determines the consumer of the event
|
||||
typedef enum
|
||||
{
|
||||
kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module
|
||||
kEplEventSinkNmtk = 0x01, // events for Nmtk module
|
||||
kEplEventSinkDllk = 0x02, // events for Dllk module
|
||||
kEplEventSinkDlluCal = 0x03, // events for DlluCal module
|
||||
kEplEventSinkDllkCal = 0x04, // events for DllkCal module
|
||||
kEplEventSinkPdok = 0x05, // events for Pdok module
|
||||
kEplEventSinkNmtu = 0x06, // events for Nmtu module
|
||||
kEplEventSinkErrk = 0x07, // events for Error handler module
|
||||
kEplEventSinkErru = 0x08, // events for Error signaling module
|
||||
kEplEventSinkSdoAsySeq = 0x09, // events for asyncronous SDO Sequence Layer module
|
||||
kEplEventSinkNmtMnu = 0x0A, // events for NmtMnu module
|
||||
kEplEventSinkLedu = 0x0B, // events for Ledu module
|
||||
kEplEventSinkApi = 0x0F, // events for API module
|
||||
typedef enum {
|
||||
kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module
|
||||
kEplEventSinkNmtk = 0x01, // events for Nmtk module
|
||||
kEplEventSinkDllk = 0x02, // events for Dllk module
|
||||
kEplEventSinkDlluCal = 0x03, // events for DlluCal module
|
||||
kEplEventSinkDllkCal = 0x04, // events for DllkCal module
|
||||
kEplEventSinkPdok = 0x05, // events for Pdok module
|
||||
kEplEventSinkNmtu = 0x06, // events for Nmtu module
|
||||
kEplEventSinkErrk = 0x07, // events for Error handler module
|
||||
kEplEventSinkErru = 0x08, // events for Error signaling module
|
||||
kEplEventSinkSdoAsySeq = 0x09, // events for asyncronous SDO Sequence Layer module
|
||||
kEplEventSinkNmtMnu = 0x0A, // events for NmtMnu module
|
||||
kEplEventSinkLedu = 0x0B, // events for Ledu module
|
||||
kEplEventSinkApi = 0x0F, // events for API module
|
||||
|
||||
} tEplEventSink;
|
||||
|
||||
|
||||
// EventSource determines the source of an errorevent
|
||||
typedef enum
|
||||
{
|
||||
// kernelspace modules
|
||||
kEplEventSourceDllk = 0x01, // Dllk module
|
||||
kEplEventSourceNmtk = 0x02, // Nmtk module
|
||||
kEplEventSourceObdk = 0x03, // Obdk module
|
||||
kEplEventSourcePdok = 0x04, // Pdok module
|
||||
kEplEventSourceTimerk = 0x05, // Timerk module
|
||||
kEplEventSourceEventk = 0x06, // Eventk module
|
||||
kEplEventSourceSyncCb = 0x07, // sync-Cb
|
||||
kEplEventSourceErrk = 0x08, // Error handler module
|
||||
typedef enum {
|
||||
// kernelspace modules
|
||||
kEplEventSourceDllk = 0x01, // Dllk module
|
||||
kEplEventSourceNmtk = 0x02, // Nmtk module
|
||||
kEplEventSourceObdk = 0x03, // Obdk module
|
||||
kEplEventSourcePdok = 0x04, // Pdok module
|
||||
kEplEventSourceTimerk = 0x05, // Timerk module
|
||||
kEplEventSourceEventk = 0x06, // Eventk module
|
||||
kEplEventSourceSyncCb = 0x07, // sync-Cb
|
||||
kEplEventSourceErrk = 0x08, // Error handler module
|
||||
|
||||
// userspace modules
|
||||
kEplEventSourceDllu = 0x10, // Dllu module
|
||||
kEplEventSourceNmtu = 0x11, // Nmtu module
|
||||
kEplEventSourceNmtCnu = 0x12, // NmtCnu module
|
||||
kEplEventSourceNmtMnu = 0x13, // NmtMnu module
|
||||
kEplEventSourceObdu = 0x14, // Obdu module
|
||||
kEplEventSourceSdoUdp = 0x15, // Sdo/Udp module
|
||||
kEplEventSourceSdoAsnd = 0x16, // Sdo/Asnd module
|
||||
kEplEventSourceSdoAsySeq = 0x17, // Sdo asynchronus Sequence Layer module
|
||||
kEplEventSourceSdoCom = 0x18, // Sdo command layer module
|
||||
kEplEventSourceTimeru = 0x19, // Timeru module
|
||||
kEplEventSourceCfgMau = 0x1A, // CfgMau module
|
||||
kEplEventSourceEventu = 0x1B, // Eventu module
|
||||
kEplEventSourceEplApi = 0x1C, // Api module
|
||||
kEplEventSourceLedu = 0x1D, // Ledu module
|
||||
// userspace modules
|
||||
kEplEventSourceDllu = 0x10, // Dllu module
|
||||
kEplEventSourceNmtu = 0x11, // Nmtu module
|
||||
kEplEventSourceNmtCnu = 0x12, // NmtCnu module
|
||||
kEplEventSourceNmtMnu = 0x13, // NmtMnu module
|
||||
kEplEventSourceObdu = 0x14, // Obdu module
|
||||
kEplEventSourceSdoUdp = 0x15, // Sdo/Udp module
|
||||
kEplEventSourceSdoAsnd = 0x16, // Sdo/Asnd module
|
||||
kEplEventSourceSdoAsySeq = 0x17, // Sdo asynchronus Sequence Layer module
|
||||
kEplEventSourceSdoCom = 0x18, // Sdo command layer module
|
||||
kEplEventSourceTimeru = 0x19, // Timeru module
|
||||
kEplEventSourceCfgMau = 0x1A, // CfgMau module
|
||||
kEplEventSourceEventu = 0x1B, // Eventu module
|
||||
kEplEventSourceEplApi = 0x1C, // Api module
|
||||
kEplEventSourceLedu = 0x1D, // Ledu module
|
||||
|
||||
} tEplEventSource;
|
||||
|
||||
|
||||
// structure of EPL event (element order must not be changed!)
|
||||
typedef struct
|
||||
{
|
||||
tEplEventType m_EventType /*:28*/; // event type
|
||||
tEplEventSink m_EventSink /*:4*/; // event sink
|
||||
tEplNetTime m_NetTime; // timestamp
|
||||
unsigned int m_uiSize; // size of argument
|
||||
void * m_pArg; // argument of event
|
||||
typedef struct {
|
||||
tEplEventType m_EventType /*:28 */ ; // event type
|
||||
tEplEventSink m_EventSink /*:4 */ ; // event sink
|
||||
tEplNetTime m_NetTime; // timestamp
|
||||
unsigned int m_uiSize; // size of argument
|
||||
void *m_pArg; // argument of event
|
||||
|
||||
} tEplEvent;
|
||||
|
||||
|
||||
// short structure of EPL event without argument and its size (element order must not be changed!)
|
||||
typedef struct
|
||||
{
|
||||
tEplEventType m_EventType /*:28*/; // event type
|
||||
tEplEventSink m_EventSink /*:4*/; // event sink
|
||||
tEplNetTime m_NetTime; // timestamp
|
||||
typedef struct {
|
||||
tEplEventType m_EventType /*:28 */ ; // event type
|
||||
tEplEventSink m_EventSink /*:4 */ ; // event sink
|
||||
tEplNetTime m_NetTime; // timestamp
|
||||
|
||||
} tEplEventShort;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiIndex;
|
||||
unsigned int m_uiSubIndex;
|
||||
typedef struct {
|
||||
unsigned int m_uiIndex;
|
||||
unsigned int m_uiSubIndex;
|
||||
|
||||
} tEplEventObdError;
|
||||
|
||||
|
||||
// structure for kEplEventTypeError
|
||||
typedef struct
|
||||
{
|
||||
tEplEventSource m_EventSource; // module which posted this error event
|
||||
tEplKernel m_EplError; // EPL error which occured
|
||||
union
|
||||
{
|
||||
BYTE m_bArg;
|
||||
DWORD m_dwArg;
|
||||
tEplEventSource m_EventSource; // from Eventk/u module (originating error source)
|
||||
tEplEventObdError m_ObdError; // from Obd module
|
||||
typedef struct {
|
||||
tEplEventSource m_EventSource; // module which posted this error event
|
||||
tEplKernel m_EplError; // EPL error which occured
|
||||
union {
|
||||
BYTE m_bArg;
|
||||
DWORD m_dwArg;
|
||||
tEplEventSource m_EventSource; // from Eventk/u module (originating error source)
|
||||
tEplEventObdError m_ObdError; // from Obd module
|
||||
// tEplErrHistoryEntry m_HistoryEntry; // from Nmtk/u module
|
||||
|
||||
} m_Arg;
|
||||
} m_Arg;
|
||||
|
||||
} tEplEventError;
|
||||
|
||||
|
||||
// structure for kEplEventTypeDllError
|
||||
typedef struct
|
||||
{
|
||||
unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_*
|
||||
unsigned int m_uiNodeId;
|
||||
tEplNmtState m_NmtState;
|
||||
typedef struct {
|
||||
unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_*
|
||||
unsigned int m_uiNodeId;
|
||||
tEplNmtState m_NmtState;
|
||||
|
||||
} tEplErrorHandlerkEvent;
|
||||
|
||||
|
||||
// callback function to get informed about sync event
|
||||
typedef tEplKernel (PUBLIC* tEplSyncCb) (void);
|
||||
typedef tEplKernel(PUBLIC * tEplSyncCb) (void);
|
||||
|
||||
// callback function for generic events
|
||||
typedef tEplKernel (PUBLIC* tEplProcessEventCb) (tEplEvent* pEplEvent_p);
|
||||
typedef tEplKernel(PUBLIC * tEplProcessEventCb) (tEplEvent * pEplEvent_p);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_EVENT_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_EVENT_H_
|
||||
|
||||
+178
-208
@@ -66,30 +66,27 @@
|
||||
|
||||
2006/05/22 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_FRAME_H_
|
||||
#define _EPL_FRAME_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
// defines for EplFrame.m_wFlag
|
||||
#define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes)
|
||||
#define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA)
|
||||
#define EPL_FRAME_FLAG1_EA 0x04 // exception acknowledge (error signalling) (PReq, SoA)
|
||||
#define EPL_FRAME_FLAG1_EC 0x08 // exception clear (error signalling) (StatusRes)
|
||||
#define EPL_FRAME_FLAG1_EN 0x10 // exception new (error signalling) (PRes, StatusRes)
|
||||
#define EPL_FRAME_FLAG1_MS 0x20 // multiplexed slot (PReq)
|
||||
#define EPL_FRAME_FLAG1_PS 0x40 // prescaled slot (SoC)
|
||||
#define EPL_FRAME_FLAG1_MC 0x80 // multiplexed cycle completed (SoC)
|
||||
#define EPL_FRAME_FLAG2_RS 0x07 // number of pending requests to send (PRes, StatusRes, IdentRes)
|
||||
#define EPL_FRAME_FLAG2_PR 0x38 // priority of requested asynch. frame (PRes, StatusRes, IdentRes)
|
||||
#define EPL_FRAME_FLAG2_PR_SHIFT 3 // shift of priority of requested asynch. frame
|
||||
#define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes)
|
||||
#define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA)
|
||||
#define EPL_FRAME_FLAG1_EA 0x04 // exception acknowledge (error signalling) (PReq, SoA)
|
||||
#define EPL_FRAME_FLAG1_EC 0x08 // exception clear (error signalling) (StatusRes)
|
||||
#define EPL_FRAME_FLAG1_EN 0x10 // exception new (error signalling) (PRes, StatusRes)
|
||||
#define EPL_FRAME_FLAG1_MS 0x20 // multiplexed slot (PReq)
|
||||
#define EPL_FRAME_FLAG1_PS 0x40 // prescaled slot (SoC)
|
||||
#define EPL_FRAME_FLAG1_MC 0x80 // multiplexed cycle completed (SoC)
|
||||
#define EPL_FRAME_FLAG2_RS 0x07 // number of pending requests to send (PRes, StatusRes, IdentRes)
|
||||
#define EPL_FRAME_FLAG2_PR 0x38 // priority of requested asynch. frame (PRes, StatusRes, IdentRes)
|
||||
#define EPL_FRAME_FLAG2_PR_SHIFT 3 // shift of priority of requested asynch. frame
|
||||
|
||||
// error history/status entry types
|
||||
#define EPL_ERR_ENTRYTYPE_STATUS 0x8000
|
||||
@@ -104,15 +101,13 @@
|
||||
#define EPL_ERR_ENTRYTYPE_PROF_MASK 0x0FFF
|
||||
|
||||
// defines for EPL version / PDO version
|
||||
#define EPL_VERSION_SUB 0x0F // sub version
|
||||
#define EPL_VERSION_MAIN 0xF0 // main version
|
||||
|
||||
#define EPL_VERSION_SUB 0x0F // sub version
|
||||
#define EPL_VERSION_MAIN 0xF0 // main version
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
// $$$ d.k.: move this definition to global.h
|
||||
// byte-align structures
|
||||
#ifdef _MSC_VER
|
||||
@@ -125,223 +120,205 @@
|
||||
# error you must byte-align these structures with the appropriate compiler directives
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 17
|
||||
BYTE m_le_bRes1; // reserved
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: MC, PS
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: res
|
||||
// Offset 20
|
||||
tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set
|
||||
// Offset 28
|
||||
QWORD m_le_RelativeTime; // in us (supported if D_NMT_RelativeTime_BOOL is set)
|
||||
typedef struct {
|
||||
// Offset 17
|
||||
BYTE m_le_bRes1; // reserved
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: MC, PS
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: res
|
||||
// Offset 20
|
||||
tEplNetTime m_le_NetTime; // supported if D_NMT_NetTimeIsRealTime_BOOL is set
|
||||
// Offset 28
|
||||
QWORD m_le_RelativeTime; // in us (supported if D_NMT_RelativeTime_BOOL is set)
|
||||
|
||||
} PACK_STRUCT tEplSocFrame;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 17
|
||||
BYTE m_le_bRes1; // reserved
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: MS, EA, RD
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: res
|
||||
// Offset 20
|
||||
BYTE m_le_bPdoVersion;
|
||||
// Offset 21
|
||||
BYTE m_le_bRes2; // reserved
|
||||
// Offset 22
|
||||
WORD m_le_wSize;
|
||||
// Offset 24
|
||||
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16*/];
|
||||
typedef struct {
|
||||
// Offset 17
|
||||
BYTE m_le_bRes1; // reserved
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: MS, EA, RD
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: res
|
||||
// Offset 20
|
||||
BYTE m_le_bPdoVersion;
|
||||
// Offset 21
|
||||
BYTE m_le_bRes2; // reserved
|
||||
// Offset 22
|
||||
WORD m_le_wSize;
|
||||
// Offset 24
|
||||
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ];
|
||||
|
||||
} PACK_STRUCT tEplPreqFrame;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 17
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: MS, EN, RD
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: PR, RS
|
||||
// Offset 20
|
||||
BYTE m_le_bPdoVersion;
|
||||
// Offset 21
|
||||
BYTE m_le_bRes2; // reserved
|
||||
// Offset 22
|
||||
WORD m_le_wSize;
|
||||
// Offset 24
|
||||
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16
|
||||
/ D_NMT_IsochrTxMaxPayload_U16*/];
|
||||
typedef struct {
|
||||
// Offset 17
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: MS, EN, RD
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: PR, RS
|
||||
// Offset 20
|
||||
BYTE m_le_bPdoVersion;
|
||||
// Offset 21
|
||||
BYTE m_le_bRes2; // reserved
|
||||
// Offset 22
|
||||
WORD m_le_wSize;
|
||||
// Offset 24
|
||||
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16
|
||||
/ D_NMT_IsochrTxMaxPayload_U16 */ ];
|
||||
|
||||
} PACK_STRUCT tEplPresFrame;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 17
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: EA, ER
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: res
|
||||
// Offset 20
|
||||
BYTE m_le_bReqServiceId;
|
||||
// Offset 21
|
||||
BYTE m_le_bReqServiceTarget;
|
||||
// Offset 22
|
||||
BYTE m_le_bEplVersion;
|
||||
typedef struct {
|
||||
// Offset 17
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: EA, ER
|
||||
// Offset 19
|
||||
BYTE m_le_bFlag2; // Flags: res
|
||||
// Offset 20
|
||||
BYTE m_le_bReqServiceId;
|
||||
// Offset 21
|
||||
BYTE m_le_bReqServiceTarget;
|
||||
// Offset 22
|
||||
BYTE m_le_bEplVersion;
|
||||
|
||||
} PACK_STRUCT tEplSoaFrame;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD m_wEntryType;
|
||||
WORD m_wErrorCode;
|
||||
tEplNetTime m_TimeStamp;
|
||||
BYTE m_abAddInfo[8];
|
||||
typedef struct {
|
||||
WORD m_wEntryType;
|
||||
WORD m_wErrorCode;
|
||||
tEplNetTime m_TimeStamp;
|
||||
BYTE m_abAddInfo[8];
|
||||
|
||||
} PACK_STRUCT tEplErrHistoryEntry;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: EN, EC
|
||||
BYTE m_le_bFlag2; // Flags: PR, RS
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
BYTE m_le_bRes1[3];
|
||||
QWORD m_le_qwStaticError; // static error bit field
|
||||
tEplErrHistoryEntry m_le_aErrHistoryEntry[14];
|
||||
typedef struct {
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: EN, EC
|
||||
BYTE m_le_bFlag2; // Flags: PR, RS
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
BYTE m_le_bRes1[3];
|
||||
QWORD m_le_qwStaticError; // static error bit field
|
||||
tEplErrHistoryEntry m_le_aErrHistoryEntry[14];
|
||||
|
||||
} PACK_STRUCT tEplStatusResponse;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: res
|
||||
BYTE m_le_bFlag2; // Flags: PR, RS
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
BYTE m_le_bIdentRespFlags; // Flags: FW
|
||||
BYTE m_le_bEplProfileVersion;
|
||||
BYTE m_le_bRes1;
|
||||
DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32
|
||||
WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU
|
||||
WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16
|
||||
WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16
|
||||
DWORD m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32
|
||||
WORD m_le_wRes2;
|
||||
DWORD m_le_dwDeviceType; // NMT_DeviceType_U32
|
||||
DWORD m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
|
||||
DWORD m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
|
||||
DWORD m_le_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
|
||||
DWORD m_le_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
|
||||
QWORD m_le_qwVendorSpecificExt1;
|
||||
DWORD m_le_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
|
||||
DWORD m_le_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
|
||||
DWORD m_le_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_le_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_le_dwIpAddress;
|
||||
DWORD m_le_dwSubnetMask;
|
||||
DWORD m_le_dwDefaultGateway;
|
||||
BYTE m_le_sHostname[32];
|
||||
BYTE m_le_abVendorSpecificExt2[48];
|
||||
typedef struct {
|
||||
// Offset 18
|
||||
BYTE m_le_bFlag1; // Flags: res
|
||||
BYTE m_le_bFlag2; // Flags: PR, RS
|
||||
BYTE m_le_bNmtStatus; // NMT state
|
||||
BYTE m_le_bIdentRespFlags; // Flags: FW
|
||||
BYTE m_le_bEplProfileVersion;
|
||||
BYTE m_le_bRes1;
|
||||
DWORD m_le_dwFeatureFlags; // NMT_FeatureFlags_U32
|
||||
WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU
|
||||
WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16
|
||||
WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16
|
||||
DWORD m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32
|
||||
WORD m_le_wRes2;
|
||||
DWORD m_le_dwDeviceType; // NMT_DeviceType_U32
|
||||
DWORD m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
|
||||
DWORD m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
|
||||
DWORD m_le_dwRevisionNumber; // NMT_IdentityObject_REC.RevisionNo_U32
|
||||
DWORD m_le_dwSerialNumber; // NMT_IdentityObject_REC.SerialNo_U32
|
||||
QWORD m_le_qwVendorSpecificExt1;
|
||||
DWORD m_le_dwVerifyConfigurationDate; // CFM_VerifyConfiguration_REC.ConfDate_U32
|
||||
DWORD m_le_dwVerifyConfigurationTime; // CFM_VerifyConfiguration_REC.ConfTime_U32
|
||||
DWORD m_le_dwApplicationSwDate; // PDL_LocVerApplSw_REC.ApplSwDate_U32 on programmable device or date portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_le_dwApplicationSwTime; // PDL_LocVerApplSw_REC.ApplSwTime_U32 on programmable device or time portion of NMT_ManufactSwVers_VS on non-programmable device
|
||||
DWORD m_le_dwIpAddress;
|
||||
DWORD m_le_dwSubnetMask;
|
||||
DWORD m_le_dwDefaultGateway;
|
||||
BYTE m_le_sHostname[32];
|
||||
BYTE m_le_abVendorSpecificExt2[48];
|
||||
|
||||
} PACK_STRUCT tEplIdentResponse;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 18
|
||||
BYTE m_le_bNmtCommandId;
|
||||
BYTE m_le_bRes1;
|
||||
BYTE m_le_abNmtCommandData[32];
|
||||
typedef struct {
|
||||
// Offset 18
|
||||
BYTE m_le_bNmtCommandId;
|
||||
BYTE m_le_bRes1;
|
||||
BYTE m_le_abNmtCommandData[32];
|
||||
|
||||
} PACK_STRUCT tEplNmtCommandService;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BYTE m_le_bReserved;
|
||||
BYTE m_le_bTransactionId;
|
||||
BYTE m_le_bFlags;
|
||||
BYTE m_le_bCommandId;
|
||||
WORD m_le_wSegmentSize;
|
||||
WORD m_le_wReserved;
|
||||
BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder
|
||||
|
||||
}PACK_STRUCT tEplAsySdoCom;
|
||||
typedef struct {
|
||||
BYTE m_le_bReserved;
|
||||
BYTE m_le_bTransactionId;
|
||||
BYTE m_le_bFlags;
|
||||
BYTE m_le_bCommandId;
|
||||
WORD m_le_wSegmentSize;
|
||||
WORD m_le_wReserved;
|
||||
BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder
|
||||
|
||||
} PACK_STRUCT tEplAsySdoCom;
|
||||
|
||||
// asynchronous SDO Sequence Header
|
||||
typedef struct
|
||||
{
|
||||
BYTE m_le_bRecSeqNumCon;
|
||||
BYTE m_le_bSendSeqNumCon;
|
||||
BYTE m_le_abReserved[2];
|
||||
tEplAsySdoCom m_le_abSdoSeqPayload;
|
||||
typedef struct {
|
||||
BYTE m_le_bRecSeqNumCon;
|
||||
BYTE m_le_bSendSeqNumCon;
|
||||
BYTE m_le_abReserved[2];
|
||||
tEplAsySdoCom m_le_abSdoSeqPayload;
|
||||
|
||||
} PACK_STRUCT tEplAsySdoSeq;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 18
|
||||
BYTE m_le_bNmtCommandId;
|
||||
BYTE m_le_bTargetNodeId;
|
||||
BYTE m_le_abNmtCommandData[32];
|
||||
typedef struct {
|
||||
// Offset 18
|
||||
BYTE m_le_bNmtCommandId;
|
||||
BYTE m_le_bTargetNodeId;
|
||||
BYTE m_le_abNmtCommandData[32];
|
||||
|
||||
} PACK_STRUCT tEplNmtRequestService;
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
// Offset 18
|
||||
tEplStatusResponse m_StatusResponse;
|
||||
tEplIdentResponse m_IdentResponse;
|
||||
tEplNmtCommandService m_NmtCommandService;
|
||||
tEplNmtRequestService m_NmtRequestService;
|
||||
tEplAsySdoSeq m_SdoSequenceFrame;
|
||||
BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16
|
||||
/ D_NMT_ASndRxMaxPayload_U16*/];
|
||||
typedef union {
|
||||
// Offset 18
|
||||
tEplStatusResponse m_StatusResponse;
|
||||
tEplIdentResponse m_IdentResponse;
|
||||
tEplNmtCommandService m_NmtCommandService;
|
||||
tEplNmtRequestService m_NmtRequestService;
|
||||
tEplAsySdoSeq m_SdoSequenceFrame;
|
||||
BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16
|
||||
/ D_NMT_ASndRxMaxPayload_U16 */ ];
|
||||
|
||||
} tEplAsndPayload;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 17
|
||||
BYTE m_le_bServiceId;
|
||||
// Offset 18
|
||||
tEplAsndPayload m_Payload;
|
||||
typedef struct {
|
||||
// Offset 17
|
||||
BYTE m_le_bServiceId;
|
||||
// Offset 18
|
||||
tEplAsndPayload m_Payload;
|
||||
|
||||
} PACK_STRUCT tEplAsndFrame;
|
||||
|
||||
typedef union
|
||||
{
|
||||
// Offset 17
|
||||
tEplSocFrame m_Soc;
|
||||
tEplPreqFrame m_Preq;
|
||||
tEplPresFrame m_Pres;
|
||||
tEplSoaFrame m_Soa;
|
||||
tEplAsndFrame m_Asnd;
|
||||
typedef union {
|
||||
// Offset 17
|
||||
tEplSocFrame m_Soc;
|
||||
tEplPreqFrame m_Preq;
|
||||
tEplPresFrame m_Pres;
|
||||
tEplSoaFrame m_Soa;
|
||||
tEplAsndFrame m_Asnd;
|
||||
|
||||
} tEplFrameData;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Offset 0
|
||||
BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes
|
||||
// Offset 6
|
||||
BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node
|
||||
// Offset 12
|
||||
WORD m_be_wEtherType; // Ethernet message type (big endian)
|
||||
// Offset 14
|
||||
BYTE m_le_bMessageType; // EPL message type
|
||||
// Offset 15
|
||||
BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes
|
||||
// Offset 16
|
||||
BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node
|
||||
// Offset 17
|
||||
tEplFrameData m_Data;
|
||||
typedef struct {
|
||||
// Offset 0
|
||||
BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes
|
||||
// Offset 6
|
||||
BYTE m_be_abSrcMac[6]; // MAC address of the transmitting node
|
||||
// Offset 12
|
||||
WORD m_be_wEtherType; // Ethernet message type (big endian)
|
||||
// Offset 14
|
||||
BYTE m_le_bMessageType; // EPL message type
|
||||
// Offset 15
|
||||
BYTE m_le_bDstNodeId; // EPL node ID of the addressed nodes
|
||||
// Offset 16
|
||||
BYTE m_le_bSrcNodeId; // EPL node ID of the transmitting node
|
||||
// Offset 17
|
||||
tEplFrameData m_Data;
|
||||
|
||||
} PACK_STRUCT tEplFrame;
|
||||
|
||||
@@ -350,25 +327,18 @@ typedef struct
|
||||
# pragma pack( pop, packing )
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplMsgTypeNonEpl = 0x00,
|
||||
kEplMsgTypeSoc = 0x01,
|
||||
kEplMsgTypePreq = 0x03,
|
||||
kEplMsgTypePres = 0x04,
|
||||
kEplMsgTypeSoa = 0x05,
|
||||
kEplMsgTypeAsnd = 0x06,
|
||||
typedef enum {
|
||||
kEplMsgTypeNonEpl = 0x00,
|
||||
kEplMsgTypeSoc = 0x01,
|
||||
kEplMsgTypePreq = 0x03,
|
||||
kEplMsgTypePres = 0x04,
|
||||
kEplMsgTypeSoa = 0x05,
|
||||
kEplMsgTypeAsnd = 0x06,
|
||||
|
||||
} tEplMsgType;
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_FRAME_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_FRAME_H_
|
||||
|
||||
+96
-109
@@ -66,7 +66,6 @@
|
||||
|
||||
2006/05/22 d.k.: start of the implementation, version 1.00
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPL_INC_H_
|
||||
@@ -77,28 +76,28 @@
|
||||
// ============================================================================
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
|
||||
#ifdef UNDER_RTSS
|
||||
// RTX header
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <rtapi.h>
|
||||
#ifdef UNDER_RTSS
|
||||
// RTX header
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <rtapi.h>
|
||||
|
||||
#elif __BORLANDC__
|
||||
// borland C header
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#elif __BORLANDC__
|
||||
// borland C header
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
#elif WINCE
|
||||
#include <windows.h>
|
||||
#elif WINCE
|
||||
#include <windows.h>
|
||||
|
||||
#else
|
||||
// MSVC needs to include windows.h at first
|
||||
// the following defines ar necessary for function prototypes for waitable timers
|
||||
#define _WIN32_WINDOWS 0x0401
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#endif
|
||||
#else
|
||||
// MSVC needs to include windows.h at first
|
||||
// the following defines ar necessary for function prototypes for waitable timers
|
||||
#define _WIN32_WINDOWS 0x0401
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -106,49 +105,47 @@
|
||||
// possible other include file needed
|
||||
// These constants defines modules which can be included in the Epl application.
|
||||
// Use this constants for define EPL_MODULE_INTEGRATION in file EplCfg.h.
|
||||
#define EPL_MODULE_OBDK 0x00000001L // OBD kernel part module
|
||||
#define EPL_MODULE_PDOK 0x00000002L // PDO kernel part module
|
||||
#define EPL_MODULE_NMT_MN 0x00000004L // NMT MN module
|
||||
#define EPL_MODULE_SDOS 0x00000008L // SDO Server module
|
||||
#define EPL_MODULE_SDOC 0x00000010L // SDO Client module
|
||||
#define EPL_MODULE_SDO_ASND 0x00000020L // SDO over Asnd module
|
||||
#define EPL_MODULE_SDO_UDP 0x00000040L // SDO over UDP module
|
||||
#define EPL_MODULE_SDO_PDO 0x00000080L // SDO in PDO module
|
||||
#define EPL_MODULE_NMT_CN 0x00000100L // NMT CN module
|
||||
#define EPL_MODULE_NMTU 0x00000200L // NMT user part module
|
||||
#define EPL_MODULE_NMTK 0x00000400L // NMT kernel part module
|
||||
#define EPL_MODULE_DLLK 0x00000800L // DLL kernel part module
|
||||
#define EPL_MODULE_DLLU 0x00001000L // DLL user part module
|
||||
#define EPL_MODULE_OBDU 0x00002000L // OBD user part module
|
||||
#define EPL_MODULE_CFGMA 0x00004000L // Configuartioan Manager module
|
||||
#define EPL_MODULE_VETH 0x00008000L // virtual ethernet driver module
|
||||
#define EPL_MODULE_PDOU 0x00010000L // PDO user part module
|
||||
#define EPL_MODULE_LEDU 0x00020000L // LED user part module
|
||||
#define EPL_MODULE_OBDK 0x00000001L // OBD kernel part module
|
||||
#define EPL_MODULE_PDOK 0x00000002L // PDO kernel part module
|
||||
#define EPL_MODULE_NMT_MN 0x00000004L // NMT MN module
|
||||
#define EPL_MODULE_SDOS 0x00000008L // SDO Server module
|
||||
#define EPL_MODULE_SDOC 0x00000010L // SDO Client module
|
||||
#define EPL_MODULE_SDO_ASND 0x00000020L // SDO over Asnd module
|
||||
#define EPL_MODULE_SDO_UDP 0x00000040L // SDO over UDP module
|
||||
#define EPL_MODULE_SDO_PDO 0x00000080L // SDO in PDO module
|
||||
#define EPL_MODULE_NMT_CN 0x00000100L // NMT CN module
|
||||
#define EPL_MODULE_NMTU 0x00000200L // NMT user part module
|
||||
#define EPL_MODULE_NMTK 0x00000400L // NMT kernel part module
|
||||
#define EPL_MODULE_DLLK 0x00000800L // DLL kernel part module
|
||||
#define EPL_MODULE_DLLU 0x00001000L // DLL user part module
|
||||
#define EPL_MODULE_OBDU 0x00002000L // OBD user part module
|
||||
#define EPL_MODULE_CFGMA 0x00004000L // Configuartioan Manager module
|
||||
#define EPL_MODULE_VETH 0x00008000L // virtual ethernet driver module
|
||||
#define EPL_MODULE_PDOU 0x00010000L // PDO user part module
|
||||
#define EPL_MODULE_LEDU 0x00020000L // LED user part module
|
||||
|
||||
#include "EplCfg.h" // EPL configuration file (configuration from application)
|
||||
#include "EplCfg.h" // EPL configuration file (configuration from application)
|
||||
|
||||
#include "global.h" // global definitions
|
||||
#include "global.h" // global definitions
|
||||
|
||||
#include "EplDef.h" // EPL configuration file (default configuration)
|
||||
#include "EplInstDef.h" // defines macros for instance types and table
|
||||
#include "Debug.h" // debug definitions
|
||||
#include "EplDef.h" // EPL configuration file (default configuration)
|
||||
#include "EplInstDef.h" // defines macros for instance types and table
|
||||
#include "Debug.h" // debug definitions
|
||||
|
||||
#include "EplErrDef.h" // EPL error codes for API funtions
|
||||
#include "EplErrDef.h" // EPL error codes for API funtions
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// IEEE 1588 conformant net time structure
|
||||
typedef struct
|
||||
{
|
||||
DWORD m_dwSec;
|
||||
DWORD m_dwNanoSec;
|
||||
typedef struct {
|
||||
DWORD m_dwSec;
|
||||
DWORD m_dwNanoSec;
|
||||
|
||||
} tEplNetTime;
|
||||
|
||||
|
||||
#include "EplTarget.h" // target specific functions and definitions
|
||||
#include "EplTarget.h" // target specific functions and definitions
|
||||
|
||||
#include "EplAmi.h"
|
||||
|
||||
@@ -156,7 +153,7 @@ typedef struct
|
||||
// macros
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
#define EPL_SPEC_VERSION 0x20 // ETHERNET Powerlink V. 2.0
|
||||
#define EPL_SPEC_VERSION 0x20 // ETHERNET Powerlink V. 2.0
|
||||
#define EPL_STACK_VERSION(ver,rev,rel) ((((DWORD)(ver)) & 0xFF)|((((DWORD)(rev))&0xFF)<<8)|(((DWORD)(rel))<<16))
|
||||
#define EPL_OBJ1018_VERSION(ver,rev,rel) ((((DWORD)(ver))<<16) |(((DWORD)(rev))&0xFFFF))
|
||||
#define EPL_STRING_VERSION(ver,rev,rel) "V" #ver "." #rev " r" #rel
|
||||
@@ -179,54 +176,53 @@ typedef struct
|
||||
#define EPL_FEATURE_RT1 0x00001000
|
||||
#define EPL_FEATURE_RT2 0x00002000
|
||||
|
||||
|
||||
// generate EPL NMT_FeatureFlags_U32
|
||||
#ifndef EPL_DEF_FEATURE_ISOCHR
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0)
|
||||
#define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_ISOCHR 0
|
||||
#endif
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0)
|
||||
#define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_ISOCHR 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EPL_DEF_FEATURE_SDO_ASND
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0)
|
||||
#define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_SDO_ASND 0
|
||||
#endif
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0)
|
||||
#define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_SDO_ASND 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EPL_DEF_FEATURE_SDO_UDP
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0)
|
||||
#define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_SDO_UDP 0
|
||||
#endif
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0)
|
||||
#define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_SDO_UDP 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EPL_DEF_FEATURE_SDO_PDO
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0)
|
||||
#define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_SDO_PDO 0
|
||||
#endif
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0)
|
||||
#define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_SDO_PDO 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EPL_DEF_FEATURE_PDO_DYN
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0)
|
||||
#define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_PDO_DYN 0
|
||||
#endif
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0)
|
||||
#define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_PDO_DYN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EPL_DEF_FEATURE_CFGMA
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0)
|
||||
#define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_CFGMA 0
|
||||
#endif
|
||||
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0)
|
||||
#define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA)
|
||||
#else
|
||||
#define EPL_DEF_FEATURE_CFGMA 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define EPL_DEF_FEATURE_FLAGS (EPL_DEF_FEATURE_ISOCHR \
|
||||
@@ -236,12 +232,10 @@ typedef struct
|
||||
| EPL_DEF_FEATURE_PDO_DYN \
|
||||
| EPL_DEF_FEATURE_CFGMA)
|
||||
|
||||
|
||||
#ifndef tabentries
|
||||
#define tabentries(a) (sizeof(a)/sizeof(*(a)))
|
||||
#endif
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -249,15 +243,14 @@ typedef struct
|
||||
// definitions for DLL export
|
||||
#if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB)
|
||||
|
||||
#define EPLDLLEXPORT __declspec (dllexport)
|
||||
#define EPLDLLEXPORT __declspec (dllexport)
|
||||
|
||||
#else
|
||||
|
||||
#define EPLDLLEXPORT
|
||||
#define EPLDLLEXPORT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// common debug macros
|
||||
// ============================================================================
|
||||
@@ -273,49 +266,49 @@ typedef struct
|
||||
// default level is defined in copdef.h
|
||||
|
||||
// debug-level and TRACE-macros // standard-level // flags for DEF_DEBUG_LVL
|
||||
#define EPL_DBGLVL_EDRV DEBUG_LVL_01 // 0x00000001L
|
||||
#define EPL_DBGLVL_EDRV DEBUG_LVL_01 // 0x00000001L
|
||||
#define EPL_DBGLVL_EDRV_TRACE0 DEBUG_LVL_01_TRACE0
|
||||
#define EPL_DBGLVL_EDRV_TRACE1 DEBUG_LVL_01_TRACE1
|
||||
#define EPL_DBGLVL_EDRV_TRACE2 DEBUG_LVL_01_TRACE2
|
||||
#define EPL_DBGLVL_EDRV_TRACE3 DEBUG_LVL_01_TRACE3
|
||||
#define EPL_DBGLVL_EDRV_TRACE4 DEBUG_LVL_01_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_DLL DEBUG_LVL_02 // 0x00000002L
|
||||
#define EPL_DBGLVL_DLL DEBUG_LVL_02 // 0x00000002L
|
||||
#define EPL_DBGLVL_DLL_TRACE0 DEBUG_LVL_02_TRACE0
|
||||
#define EPL_DBGLVL_DLL_TRACE1 DEBUG_LVL_02_TRACE1
|
||||
#define EPL_DBGLVL_DLL_TRACE2 DEBUG_LVL_02_TRACE2
|
||||
#define EPL_DBGLVL_DLL_TRACE3 DEBUG_LVL_02_TRACE3
|
||||
#define EPL_DBGLVL_DLL_TRACE4 DEBUG_LVL_02_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_OBD DEBUG_LVL_03 // 0x00000004L
|
||||
#define EPL_DBGLVL_OBD DEBUG_LVL_03 // 0x00000004L
|
||||
#define EPL_DBGLVL_OBD_TRACE0 DEBUG_LVL_03_TRACE0
|
||||
#define EPL_DBGLVL_OBD_TRACE1 DEBUG_LVL_03_TRACE1
|
||||
#define EPL_DBGLVL_OBD_TRACE2 DEBUG_LVL_03_TRACE2
|
||||
#define EPL_DBGLVL_OBD_TRACE3 DEBUG_LVL_03_TRACE3
|
||||
#define EPL_DBGLVL_OBD_TRACE4 DEBUG_LVL_03_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_NMTK DEBUG_LVL_04 // 0x00000008L
|
||||
#define EPL_DBGLVL_NMTK DEBUG_LVL_04 // 0x00000008L
|
||||
#define EPL_DBGLVL_NMTK_TRACE0 DEBUG_LVL_04_TRACE0
|
||||
#define EPL_DBGLVL_NMTK_TRACE1 DEBUG_LVL_04_TRACE1
|
||||
#define EPL_DBGLVL_NMTK_TRACE2 DEBUG_LVL_04_TRACE2
|
||||
#define EPL_DBGLVL_NMTK_TRACE3 DEBUG_LVL_04_TRACE3
|
||||
#define EPL_DBGLVL_NMTK_TRACE4 DEBUG_LVL_04_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_NMTCN DEBUG_LVL_05 // 0x00000010L
|
||||
#define EPL_DBGLVL_NMTCN DEBUG_LVL_05 // 0x00000010L
|
||||
#define EPL_DBGLVL_NMTCN_TRACE0 DEBUG_LVL_05_TRACE0
|
||||
#define EPL_DBGLVL_NMTCN_TRACE1 DEBUG_LVL_05_TRACE1
|
||||
#define EPL_DBGLVL_NMTCN_TRACE2 DEBUG_LVL_05_TRACE2
|
||||
#define EPL_DBGLVL_NMTCN_TRACE3 DEBUG_LVL_05_TRACE3
|
||||
#define EPL_DBGLVL_NMTCN_TRACE4 DEBUG_LVL_05_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_NMTU DEBUG_LVL_06 // 0x00000020L
|
||||
#define EPL_DBGLVL_NMTU DEBUG_LVL_06 // 0x00000020L
|
||||
#define EPL_DBGLVL_NMTU_TRACE0 DEBUG_LVL_06_TRACE0
|
||||
#define EPL_DBGLVL_NMTU_TRACE1 DEBUG_LVL_06_TRACE1
|
||||
#define EPL_DBGLVL_NMTU_TRACE2 DEBUG_LVL_06_TRACE2
|
||||
#define EPL_DBGLVL_NMTU_TRACE3 DEBUG_LVL_06_TRACE3
|
||||
#define EPL_DBGLVL_NMTU_TRACE4 DEBUG_LVL_06_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_NMTMN DEBUG_LVL_07 // 0x00000040L
|
||||
#define EPL_DBGLVL_NMTMN DEBUG_LVL_07 // 0x00000040L
|
||||
#define EPL_DBGLVL_NMTMN_TRACE0 DEBUG_LVL_07_TRACE0
|
||||
#define EPL_DBGLVL_NMTMN_TRACE1 DEBUG_LVL_07_TRACE1
|
||||
#define EPL_DBGLVL_NMTMN_TRACE2 DEBUG_LVL_07_TRACE2
|
||||
@@ -324,28 +317,28 @@ typedef struct
|
||||
|
||||
//...
|
||||
|
||||
#define EPL_DBGLVL_SDO DEBUG_LVL_25 // 0x01000000
|
||||
#define EPL_DBGLVL_SDO DEBUG_LVL_25 // 0x01000000
|
||||
#define EPL_DBGLVL_SDO_TRACE0 DEBUG_LVL_25_TRACE0
|
||||
#define EPL_DBGLVL_SDO_TRACE1 DEBUG_LVL_25_TRACE1
|
||||
#define EPL_DBGLVL_SDO_TRACE2 DEBUG_LVL_25_TRACE2
|
||||
#define EPL_DBGLVL_SDO_TRACE3 DEBUG_LVL_25_TRACE3
|
||||
#define EPL_DBGLVL_SDO_TRACE4 DEBUG_LVL_25_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_VETH DEBUG_LVL_26 // 0x02000000
|
||||
#define EPL_DBGLVL_VETH DEBUG_LVL_26 // 0x02000000
|
||||
#define EPL_DBGLVL_VETH_TRACE0 DEBUG_LVL_26_TRACE0
|
||||
#define EPL_DBGLVL_VETH_TRACE1 DEBUG_LVL_26_TRACE1
|
||||
#define EPL_DBGLVL_VETH_TRACE2 DEBUG_LVL_26_TRACE2
|
||||
#define EPL_DBGLVL_VETH_TRACE3 DEBUG_LVL_26_TRACE3
|
||||
#define EPL_DBGLVL_VETH_TRACE4 DEBUG_LVL_26_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_EVENTK DEBUG_LVL_27 // 0x04000000
|
||||
#define EPL_DBGLVL_EVENTK DEBUG_LVL_27 // 0x04000000
|
||||
#define EPL_DBGLVL_EVENTK_TRACE0 DEBUG_LVL_27_TRACE0
|
||||
#define EPL_DBGLVL_EVENTK_TRACE1 DEBUG_LVL_27_TRACE1
|
||||
#define EPL_DBGLVL_EVENTK_TRACE2 DEBUG_LVL_27_TRACE2
|
||||
#define EPL_DBGLVL_EVENTK_TRACE3 DEBUG_LVL_27_TRACE3
|
||||
#define EPL_DBGLVL_EVENTK_TRACE4 DEBUG_LVL_27_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_EVENTU DEBUG_LVL_28 // 0x08000000
|
||||
#define EPL_DBGLVL_EVENTU DEBUG_LVL_28 // 0x08000000
|
||||
#define EPL_DBGLVL_EVENTU_TRACE0 DEBUG_LVL_28_TRACE0
|
||||
#define EPL_DBGLVL_EVENTU_TRACE1 DEBUG_LVL_28_TRACE1
|
||||
#define EPL_DBGLVL_EVENTU_TRACE2 DEBUG_LVL_28_TRACE2
|
||||
@@ -353,46 +346,40 @@ typedef struct
|
||||
#define EPL_DBGLVL_EVENTU_TRACE4 DEBUG_LVL_28_TRACE4
|
||||
|
||||
// SharedBuff
|
||||
#define EPL_DBGLVL_SHB DEBUG_LVL_29 // 0x10000000
|
||||
#define EPL_DBGLVL_SHB DEBUG_LVL_29 // 0x10000000
|
||||
#define EPL_DBGLVL_SHB_TRACE0 DEBUG_LVL_29_TRACE0
|
||||
#define EPL_DBGLVL_SHB_TRACE1 DEBUG_LVL_29_TRACE1
|
||||
#define EPL_DBGLVL_SHB_TRACE2 DEBUG_LVL_29_TRACE2
|
||||
#define EPL_DBGLVL_SHB_TRACE3 DEBUG_LVL_29_TRACE3
|
||||
#define EPL_DBGLVL_SHB_TRACE4 DEBUG_LVL_29_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_ASSERT DEBUG_LVL_ASSERT // 0x20000000L
|
||||
#define EPL_DBGLVL_ASSERT DEBUG_LVL_ASSERT // 0x20000000L
|
||||
#define EPL_DBGLVL_ASSERT_TRACE0 DEBUG_LVL_ASSERT_TRACE0
|
||||
#define EPL_DBGLVL_ASSERT_TRACE1 DEBUG_LVL_ASSERT_TRACE1
|
||||
#define EPL_DBGLVL_ASSERT_TRACE2 DEBUG_LVL_ASSERT_TRACE2
|
||||
#define EPL_DBGLVL_ASSERT_TRACE3 DEBUG_LVL_ASSERT_TRACE3
|
||||
#define EPL_DBGLVL_ASSERT_TRACE4 DEBUG_LVL_ASSERT_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_ERROR DEBUG_LVL_ERROR // 0x40000000L
|
||||
#define EPL_DBGLVL_ERROR DEBUG_LVL_ERROR // 0x40000000L
|
||||
#define EPL_DBGLVL_ERROR_TRACE0 DEBUG_LVL_ERROR_TRACE0
|
||||
#define EPL_DBGLVL_ERROR_TRACE1 DEBUG_LVL_ERROR_TRACE1
|
||||
#define EPL_DBGLVL_ERROR_TRACE2 DEBUG_LVL_ERROR_TRACE2
|
||||
#define EPL_DBGLVL_ERROR_TRACE3 DEBUG_LVL_ERROR_TRACE3
|
||||
#define EPL_DBGLVL_ERROR_TRACE4 DEBUG_LVL_ERROR_TRACE4
|
||||
|
||||
#define EPL_DBGLVL_ALWAYS DEBUG_LVL_ALWAYS // 0x80000000L
|
||||
#define EPL_DBGLVL_ALWAYS DEBUG_LVL_ALWAYS // 0x80000000L
|
||||
#define EPL_DBGLVL_ALWAYS_TRACE0 DEBUG_LVL_ALWAYS_TRACE0
|
||||
#define EPL_DBGLVL_ALWAYS_TRACE1 DEBUG_LVL_ALWAYS_TRACE1
|
||||
#define EPL_DBGLVL_ALWAYS_TRACE2 DEBUG_LVL_ALWAYS_TRACE2
|
||||
#define EPL_DBGLVL_ALWAYS_TRACE3 DEBUG_LVL_ALWAYS_TRACE3
|
||||
#define EPL_DBGLVL_ALWAYS_TRACE4 DEBUG_LVL_ALWAYS_TRACE4
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_INC_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPL_INC_H_
|
||||
|
||||
+106
-115
@@ -71,23 +71,20 @@
|
||||
#ifndef _EPLINSTDEF_H_
|
||||
#define _EPLINSTDEF_H_
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// types and macros for generating instances
|
||||
// =========================================================================
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kStateUnused = 0,
|
||||
kStateDeleted = 1,
|
||||
kStateUsed = 0xFF
|
||||
|
||||
typedef enum {
|
||||
kStateUnused = 0,
|
||||
kStateDeleted = 1,
|
||||
kStateUsed = 0xFF
|
||||
} tInstState;
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
|
||||
typedef void MEM* tEplPtrInstance;
|
||||
typedef BYTE tEplInstanceHdl;
|
||||
typedef void MEM *tEplPtrInstance;
|
||||
typedef BYTE tEplInstanceHdl;
|
||||
|
||||
// define const for illegale values
|
||||
#define CCM_ILLINSTANCE NULL
|
||||
@@ -102,13 +99,12 @@ typedef BYTE tEplInstanceHdl;
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// memory attributes for instance table
|
||||
#define INST_NEAR // faster access to variables
|
||||
#define INST_FAR // variables wich have to located in xdata
|
||||
#define STATIC // prevent warnings for variables with same name
|
||||
|
||||
#define INSTANCE_TYPE_BEGIN typedef struct {
|
||||
#define INSTANCE_TYPE_END } tEplInstanceInfo;
|
||||
#define INST_NEAR // faster access to variables
|
||||
#define INST_FAR // variables wich have to located in xdata
|
||||
#define STATIC // prevent warnings for variables with same name
|
||||
|
||||
#define INSTANCE_TYPE_BEGIN typedef struct {
|
||||
#define INSTANCE_TYPE_END } tEplInstanceInfo;
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// macro definition for API interface
|
||||
@@ -117,53 +113,51 @@ typedef BYTE tEplInstanceHdl;
|
||||
// declaration:
|
||||
|
||||
// macros for declaration within function header or prototype of API functions
|
||||
#define CCM_DECL_INSTANCE_HDL tEplInstanceHdl InstanceHandle
|
||||
#define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle,
|
||||
#define CCM_DECL_INSTANCE_HDL tEplInstanceHdl InstanceHandle
|
||||
#define CCM_DECL_INSTANCE_HDL_ tEplInstanceHdl InstanceHandle,
|
||||
|
||||
// macros for declaration of pointer to instance handle within function header or prototype of API functions
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle,
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL tEplInstanceHdl MEM* pInstanceHandle
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL_ tEplInstanceHdl MEM* pInstanceHandle,
|
||||
|
||||
// macros for declaration instance as lokacl variable within functions
|
||||
#define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance;
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle;
|
||||
#define CCM_DECL_INSTANCE_PTR_LOCAL tCcmInstanceInfo MEM* pInstance;
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL_LOCAL tEplInstanceHdl MEM* pInstanceHandle;
|
||||
|
||||
// reference:
|
||||
|
||||
// macros for reference of instance handle for function parameters
|
||||
#define CCM_INSTANCE_HDL InstanceHandle
|
||||
#define CCM_INSTANCE_HDL_ InstanceHandle,
|
||||
#define CCM_INSTANCE_HDL InstanceHandle
|
||||
#define CCM_INSTANCE_HDL_ InstanceHandle,
|
||||
|
||||
// macros for reference of instance parameter for function parameters
|
||||
#define CCM_INSTANCE_PARAM(par) par
|
||||
#define CCM_INSTANCE_PARAM_(par) par,
|
||||
#define CCM_INSTANCE_PARAM(par) par
|
||||
#define CCM_INSTANCE_PARAM_(par) par,
|
||||
|
||||
// macros for reference of instance parameter for writing or reading values
|
||||
#define CCM_INST_ENTRY (*((tEplPtrInstance)pInstance))
|
||||
#define CCM_INST_ENTRY (*((tEplPtrInstance)pInstance))
|
||||
|
||||
// processing:
|
||||
|
||||
// macros for process instance handle
|
||||
#define CCM_CHECK_INSTANCE_HDL() if (InstanceHandle >= EPL_MAX_INSTANCES) \
|
||||
#define CCM_CHECK_INSTANCE_HDL() if (InstanceHandle >= EPL_MAX_INSTANCES) \
|
||||
{return (kEplIllegalInstance);}
|
||||
|
||||
|
||||
// macros for process pointer to instance handle
|
||||
#define CCM_CHECK_PTR_INSTANCE_HDL() if (pInstanceHandle == NULL) \
|
||||
#define CCM_CHECK_PTR_INSTANCE_HDL() if (pInstanceHandle == NULL) \
|
||||
{return (kEplInvalidInstanceParam);}
|
||||
|
||||
// This macro returned the handle and pointer to next free instance.
|
||||
#define CCM_GET_FREE_INSTANCE_AND_HDL() pInstance = CcmGetFreeInstanceAndHandle (pInstanceHandle); \
|
||||
#define CCM_GET_FREE_INSTANCE_AND_HDL() pInstance = CcmGetFreeInstanceAndHandle (pInstanceHandle); \
|
||||
ASSERT (*pInstanceHandle != CCM_ILLINSTANCE_HDL);
|
||||
|
||||
#define CCM_CHECK_INSTANCE_PTR() if (pInstance == CCM_ILLINSTANCE) \
|
||||
#define CCM_CHECK_INSTANCE_PTR() if (pInstance == CCM_ILLINSTANCE) \
|
||||
{return (kEplNoFreeInstance);}
|
||||
|
||||
#define CCM_GET_INSTANCE_PTR() pInstance = CcmGetInstancePtr (InstanceHandle);
|
||||
#define CCM_GET_FREE_INSTANCE_PTR() pInstance = GetFreeInstance (); \
|
||||
#define CCM_GET_INSTANCE_PTR() pInstance = CcmGetInstancePtr (InstanceHandle);
|
||||
#define CCM_GET_FREE_INSTANCE_PTR() pInstance = GetFreeInstance (); \
|
||||
ASSERT (pInstance != CCM_ILLINSTANCE);
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// macro definition for stack interface
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -171,52 +165,52 @@ typedef BYTE tEplInstanceHdl;
|
||||
// macros for declaration within the function header, prototype or local var list
|
||||
// Declaration of pointers within function paramater list must defined as void MEM*
|
||||
// pointer.
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance,
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance;
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR void MEM* pInstance
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_ void MEM* pInstance,
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL tEplPtrInstance pInstance;
|
||||
|
||||
// macros for reference of pointer to instance
|
||||
// These macros are used for parameter passing to called function.
|
||||
#define EPL_MCO_INSTANCE_PTR pInstance
|
||||
#define EPL_MCO_INSTANCE_PTR_ pInstance,
|
||||
#define EPL_MCO_ADDR_INSTANCE_PTR_ &pInstance,
|
||||
#define EPL_MCO_INSTANCE_PTR pInstance
|
||||
#define EPL_MCO_INSTANCE_PTR_ pInstance,
|
||||
#define EPL_MCO_ADDR_INSTANCE_PTR_ &pInstance,
|
||||
|
||||
// macro for access of struct members of one instance
|
||||
// An access to a member of instance table must be casted by the local
|
||||
// defined type of instance table.
|
||||
#define EPL_MCO_INST_ENTRY (*(tEplPtrInstance)pInstance)
|
||||
#define EPL_MCO_GLB_VAR(var) (((tEplPtrInstance)pInstance)->var)
|
||||
#define EPL_MCO_INST_ENTRY (*(tEplPtrInstance)pInstance)
|
||||
#define EPL_MCO_GLB_VAR(var) (((tEplPtrInstance)pInstance)->var)
|
||||
|
||||
// macros for process pointer to instance
|
||||
#define EPL_MCO_GET_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetInstancePtr (InstanceHandle);
|
||||
#define EPL_MCO_GET_FREE_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetFreeInstance (); \
|
||||
#define EPL_MCO_GET_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetInstancePtr (InstanceHandle);
|
||||
#define EPL_MCO_GET_FREE_INSTANCE_PTR() pInstance = (tEplPtrInstance) GetFreeInstance (); \
|
||||
ASSERT (pInstance != CCM_ILLINSTANCE);
|
||||
|
||||
// This macro should be used to check the passed pointer to an public function
|
||||
#define EPL_MCO_CHECK_INSTANCE_STATE() ASSERT (pInstance != NULL); \
|
||||
#define EPL_MCO_CHECK_INSTANCE_STATE() ASSERT (pInstance != NULL); \
|
||||
ASSERT (((tEplPtrInstance)pInstance)->m_InstState == kStateUsed);
|
||||
|
||||
// macros for declaration of pointer to instance pointer
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr,
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR void MEM* MEM* pInstancePtr
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_ void MEM* MEM* pInstancePtr,
|
||||
|
||||
// macros for reference of pointer to instance pointer
|
||||
// These macros are used for parameter passing to called function.
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR pInstancePtr
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR_ pInstancePtr,
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR pInstancePtr
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR_ pInstancePtr,
|
||||
|
||||
// macros for process pointer to instance pointer
|
||||
#define EPL_MCO_CHECK_PTR_INSTANCE_PTR() ASSERT (pInstancePtr != NULL);
|
||||
#define EPL_MCO_SET_PTR_INSTANCE_PTR() (*pInstancePtr = pInstance);
|
||||
#define EPL_MCO_CHECK_PTR_INSTANCE_PTR() ASSERT (pInstancePtr != NULL);
|
||||
#define EPL_MCO_SET_PTR_INSTANCE_PTR() (*pInstancePtr = pInstance);
|
||||
|
||||
#define EPL_MCO_INSTANCE_PARAM(a) (a)
|
||||
#define EPL_MCO_INSTANCE_PARAM_(a) (a),
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_WRITE_INSTANCE_STATE(a) EPL_MCO_GLB_VAR (m_InstState) = a;
|
||||
#define EPL_MCO_INSTANCE_PARAM(a) (a)
|
||||
#define EPL_MCO_INSTANCE_PARAM_(a) (a),
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_WRITE_INSTANCE_STATE(a) EPL_MCO_GLB_VAR (m_InstState) = a;
|
||||
|
||||
// this macro deletes all instance entries as unused
|
||||
#define EPL_MCO_DELETE_INSTANCE_TABLE() \
|
||||
#define EPL_MCO_DELETE_INSTANCE_TABLE() \
|
||||
{ \
|
||||
tEplInstanceInfo MEM* pInstance = &aEplInstanceTable_g[0]; \
|
||||
tFastByte InstNumber = 0; \
|
||||
@@ -229,10 +223,10 @@ typedef BYTE tEplInstanceHdl;
|
||||
}
|
||||
|
||||
// definition of functions which has to be defined in each module of CANopen stack
|
||||
#define EPL_MCO_DEFINE_INSTANCE_FCT() \
|
||||
#define EPL_MCO_DEFINE_INSTANCE_FCT() \
|
||||
static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p); \
|
||||
static tEplPtrInstance GetFreeInstance (void);
|
||||
#define EPL_MCO_DECL_INSTANCE_FCT() \
|
||||
#define EPL_MCO_DECL_INSTANCE_FCT() \
|
||||
static tEplPtrInstance GetInstancePtr (tEplInstanceHdl InstHandle_p) { \
|
||||
return &aEplInstanceTable_g[InstHandle_p]; } \
|
||||
static tEplPtrInstance GetFreeInstance (void) { \
|
||||
@@ -245,27 +239,27 @@ typedef BYTE tEplInstanceHdl;
|
||||
return CCM_ILLINSTANCE; }
|
||||
|
||||
// this macro defines the instance table. Each entry is reserved for an instance of CANopen.
|
||||
#define EPL_MCO_DECL_INSTANCE_VAR() \
|
||||
#define EPL_MCO_DECL_INSTANCE_VAR() \
|
||||
static tEplInstanceInfo MEM aEplInstanceTable_g [EPL_MAX_INSTANCES];
|
||||
|
||||
// this macro defines member variables in instance table which are needed in
|
||||
// all modules of Epl stack
|
||||
#define EPL_MCO_DECL_INSTANCE_MEMBER() \
|
||||
#define EPL_MCO_DECL_INSTANCE_MEMBER() \
|
||||
STATIC BYTE m_InstState; \
|
||||
STATIC BYTE m_bInstIndex;
|
||||
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX_() EPL_MCO_INSTANCE_PARAM_ (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX() EPL_MCO_INSTANCE_PARAM (EPL_MCO_GLB_VAR (m_bInstIndex))
|
||||
|
||||
#else // only one instance is used
|
||||
#else // only one instance is used
|
||||
|
||||
// Memory attributes for instance table.
|
||||
#define INST_NEAR NEAR // faster access to variables
|
||||
#define INST_FAR MEM // variables wich have to located in xdata
|
||||
#define STATIC static // prevent warnings for variables with same name
|
||||
#define INST_NEAR NEAR // faster access to variables
|
||||
#define INST_FAR MEM // variables wich have to located in xdata
|
||||
#define STATIC static // prevent warnings for variables with same name
|
||||
|
||||
#define INSTANCE_TYPE_BEGIN
|
||||
#define INSTANCE_TYPE_END
|
||||
#define INSTANCE_TYPE_BEGIN
|
||||
#define INSTANCE_TYPE_END
|
||||
|
||||
// macros for declaration, initializing and member access for instance handle
|
||||
// This class of macros are used by API function to inform CCM-modul which
|
||||
@@ -273,99 +267,98 @@ typedef BYTE tEplInstanceHdl;
|
||||
|
||||
// macros for reference of instance handle
|
||||
// These macros are used for parameter passing to CANopen API function.
|
||||
#define CCM_INSTANCE_HDL
|
||||
#define CCM_INSTANCE_HDL_
|
||||
#define CCM_INSTANCE_HDL
|
||||
#define CCM_INSTANCE_HDL_
|
||||
|
||||
#define CCM_DECL_INSTANCE_PTR_LOCAL
|
||||
#define CCM_DECL_INSTANCE_PTR_LOCAL
|
||||
|
||||
// macros for declaration within the function header or prototype
|
||||
#define CCM_DECL_INSTANCE_HDL void
|
||||
#define CCM_DECL_INSTANCE_HDL_
|
||||
#define CCM_DECL_INSTANCE_HDL void
|
||||
#define CCM_DECL_INSTANCE_HDL_
|
||||
|
||||
// macros for process instance handle
|
||||
#define CCM_CHECK_INSTANCE_HDL()
|
||||
#define CCM_CHECK_INSTANCE_HDL()
|
||||
|
||||
// macros for declaration of pointer to instance handle
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL void
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL_
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL void
|
||||
#define CCM_DECL_PTR_INSTANCE_HDL_
|
||||
|
||||
// macros for process pointer to instance handle
|
||||
#define CCM_CHECK_PTR_INSTANCE_HDL()
|
||||
#define CCM_CHECK_PTR_INSTANCE_HDL()
|
||||
|
||||
// This macro returned the handle and pointer to next free instance.
|
||||
#define CCM_GET_FREE_INSTANCE_AND_HDL()
|
||||
#define CCM_GET_FREE_INSTANCE_AND_HDL()
|
||||
|
||||
#define CCM_CHECK_INSTANCE_PTR()
|
||||
#define CCM_CHECK_INSTANCE_PTR()
|
||||
|
||||
#define CCM_GET_INSTANCE_PTR()
|
||||
#define CCM_GET_FREE_INSTANCE_PTR()
|
||||
#define CCM_GET_INSTANCE_PTR()
|
||||
#define CCM_GET_FREE_INSTANCE_PTR()
|
||||
|
||||
#define CCM_INSTANCE_PARAM(par)
|
||||
#define CCM_INSTANCE_PARAM_(par)
|
||||
#define CCM_INSTANCE_PARAM(par)
|
||||
#define CCM_INSTANCE_PARAM_(par)
|
||||
|
||||
#define CCM_INST_ENTRY aCcmInstanceTable_g[0]
|
||||
#define CCM_INST_ENTRY aCcmInstanceTable_g[0]
|
||||
|
||||
// macros for declaration, initializing and member access for instance pointer
|
||||
// This class of macros are used by CANopen internal function to point to one instance.
|
||||
|
||||
// macros for declaration within the function header, prototype or local var list
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR void
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR void
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_
|
||||
#define EPL_MCO_DECL_INSTANCE_PTR_LOCAL
|
||||
|
||||
// macros for reference of pointer to instance
|
||||
// These macros are used for parameter passing to called function.
|
||||
#define EPL_MCO_INSTANCE_PTR
|
||||
#define EPL_MCO_INSTANCE_PTR_
|
||||
#define EPL_MCO_ADDR_INSTANCE_PTR_
|
||||
#define EPL_MCO_INSTANCE_PTR
|
||||
#define EPL_MCO_INSTANCE_PTR_
|
||||
#define EPL_MCO_ADDR_INSTANCE_PTR_
|
||||
|
||||
// macros for process pointer to instance
|
||||
#define EPL_MCO_GET_INSTANCE_PTR()
|
||||
#define EPL_MCO_GET_FREE_INSTANCE_PTR()
|
||||
#define EPL_MCO_GET_INSTANCE_PTR()
|
||||
#define EPL_MCO_GET_FREE_INSTANCE_PTR()
|
||||
|
||||
// This macro should be used to check the passed pointer to an public function
|
||||
#define EPL_MCO_CHECK_INSTANCE_STATE()
|
||||
#define EPL_MCO_CHECK_INSTANCE_STATE()
|
||||
|
||||
// macros for declaration of pointer to instance pointer
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR void
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR void
|
||||
#define EPL_MCO_DECL_PTR_INSTANCE_PTR_
|
||||
|
||||
// macros for reference of pointer to instance pointer
|
||||
// These macros are used for parameter passing to called function.
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR_
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR
|
||||
#define EPL_MCO_PTR_INSTANCE_PTR_
|
||||
|
||||
// macros for process pointer to instance pointer
|
||||
#define EPL_MCO_CHECK_PTR_INSTANCE_PTR()
|
||||
#define EPL_MCO_SET_PTR_INSTANCE_PTR()
|
||||
#define EPL_MCO_CHECK_PTR_INSTANCE_PTR()
|
||||
#define EPL_MCO_SET_PTR_INSTANCE_PTR()
|
||||
|
||||
#define EPL_MCO_INSTANCE_PARAM(a)
|
||||
#define EPL_MCO_INSTANCE_PARAM_(a)
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX_()
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX()
|
||||
#define EPL_MCO_INSTANCE_PARAM(a)
|
||||
#define EPL_MCO_INSTANCE_PARAM_(a)
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX_()
|
||||
#define EPL_MCO_INSTANCE_PARAM_IDX()
|
||||
|
||||
// macro for access of struct members of one instance
|
||||
#define EPL_MCO_INST_ENTRY aEplInstanceTable_g[0]
|
||||
#define EPL_MCO_GLB_VAR(var) (var)
|
||||
#define EPL_MCO_WRITE_INSTANCE_STATE(a)
|
||||
#define EPL_MCO_INST_ENTRY aEplInstanceTable_g[0]
|
||||
#define EPL_MCO_GLB_VAR(var) (var)
|
||||
#define EPL_MCO_WRITE_INSTANCE_STATE(a)
|
||||
|
||||
// this macro deletes all instance entries as unused
|
||||
#define EPL_MCO_DELETE_INSTANCE_TABLE()
|
||||
#define EPL_MCO_DELETE_INSTANCE_TABLE()
|
||||
|
||||
// definition of functions which has to be defined in each module of CANopen stack
|
||||
#define EPL_MCO_DEFINE_INSTANCE_FCT()
|
||||
#define EPL_MCO_DECL_INSTANCE_FCT()
|
||||
#define EPL_MCO_DEFINE_INSTANCE_FCT()
|
||||
#define EPL_MCO_DECL_INSTANCE_FCT()
|
||||
|
||||
// this macro defines the instance table. Each entry is reserved for an instance of CANopen.
|
||||
#define EPL_MCO_DECL_INSTANCE_VAR()
|
||||
#define EPL_MCO_DECL_INSTANCE_VAR()
|
||||
|
||||
// this macro defines member variables in instance table which are needed in
|
||||
// all modules of CANopen stack
|
||||
#define EPL_MCO_DECL_INSTANCE_MEMBER()
|
||||
#define EPL_MCO_DECL_INSTANCE_MEMBER()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
#if (CDRV_MAX_INSTANCES > 1)
|
||||
|
||||
@@ -378,9 +371,7 @@ typedef BYTE tEplInstanceHdl;
|
||||
#endif
|
||||
*/
|
||||
|
||||
|
||||
#endif // _EPLINSTDEF_H_
|
||||
|
||||
// Die letzte Zeile muß unbedingt eine leere Zeile sein, weil manche Compiler
|
||||
// damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
|
||||
|
||||
|
||||
@@ -66,39 +66,27 @@
|
||||
|
||||
2008/11/17 d.k.: start of the implementation
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef _EPLLED_H_
|
||||
#define _EPLLED_H_
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// const defines
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplLedTypeStatus = 0x00,
|
||||
kEplLedTypeError = 0x01,
|
||||
typedef enum {
|
||||
kEplLedTypeStatus = 0x00,
|
||||
kEplLedTypeError = 0x01,
|
||||
|
||||
} tEplLedType;
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // #ifndef _EPLLED_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPLLED_H_
|
||||
|
||||
+101
-119
@@ -66,7 +66,6 @@
|
||||
|
||||
2006/06/09 k.t.: start of the implementation
|
||||
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _EPLNMT_H_
|
||||
@@ -79,18 +78,18 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// define super-states and masks to identify a super-state
|
||||
#define EPL_NMT_GS_POWERED 0x0008 // super state
|
||||
#define EPL_NMT_GS_INITIALISATION 0x0009 // super state
|
||||
#define EPL_NMT_GS_COMMUNICATING 0x000C // super state
|
||||
#define EPL_NMT_CS_EPLMODE 0x000D // super state
|
||||
#define EPL_NMT_MS_EPLMODE 0x000D // super state
|
||||
#define EPL_NMT_GS_POWERED 0x0008 // super state
|
||||
#define EPL_NMT_GS_INITIALISATION 0x0009 // super state
|
||||
#define EPL_NMT_GS_COMMUNICATING 0x000C // super state
|
||||
#define EPL_NMT_CS_EPLMODE 0x000D // super state
|
||||
#define EPL_NMT_MS_EPLMODE 0x000D // super state
|
||||
|
||||
#define EPL_NMT_SUPERSTATE_MASK 0x000F // mask to select state
|
||||
#define EPL_NMT_SUPERSTATE_MASK 0x000F // mask to select state
|
||||
|
||||
#define EPL_NMT_TYPE_UNDEFINED 0x0000 // type of NMT state is still undefined
|
||||
#define EPL_NMT_TYPE_CS 0x0100 // CS type of NMT state
|
||||
#define EPL_NMT_TYPE_MS 0x0200 // MS type of NMT state
|
||||
#define EPL_NMT_TYPE_MASK 0x0300 // mask to select type of NMT state (i.e. CS or MS)
|
||||
#define EPL_NMT_TYPE_UNDEFINED 0x0000 // type of NMT state is still undefined
|
||||
#define EPL_NMT_TYPE_CS 0x0100 // CS type of NMT state
|
||||
#define EPL_NMT_TYPE_MS 0x0200 // MS type of NMT state
|
||||
#define EPL_NMT_TYPE_MASK 0x0300 // mask to select type of NMT state (i.e. CS or MS)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// typedef
|
||||
@@ -106,143 +105,126 @@
|
||||
// --> there are masks defined to indentify the
|
||||
// super-states
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplNmtGsOff = 0x0000,
|
||||
kEplNmtGsInitialising = 0x0019,
|
||||
kEplNmtGsResetApplication = 0x0029,
|
||||
kEplNmtGsResetCommunication = 0x0039,
|
||||
kEplNmtGsResetConfiguration = 0x0079,
|
||||
kEplNmtCsNotActive = 0x011C,
|
||||
kEplNmtCsPreOperational1 = 0x011D,
|
||||
kEplNmtCsStopped = 0x014D,
|
||||
kEplNmtCsPreOperational2 = 0x015D,
|
||||
kEplNmtCsReadyToOperate = 0x016D,
|
||||
kEplNmtCsOperational = 0x01FD,
|
||||
kEplNmtCsBasicEthernet = 0x011E,
|
||||
kEplNmtMsNotActive = 0x021C,
|
||||
kEplNmtMsPreOperational1 = 0x021D,
|
||||
kEplNmtMsPreOperational2 = 0x025D,
|
||||
kEplNmtMsReadyToOperate = 0x026D,
|
||||
kEplNmtMsOperational = 0x02FD,
|
||||
kEplNmtMsBasicEthernet = 0x021E
|
||||
|
||||
typedef enum {
|
||||
kEplNmtGsOff = 0x0000,
|
||||
kEplNmtGsInitialising = 0x0019,
|
||||
kEplNmtGsResetApplication = 0x0029,
|
||||
kEplNmtGsResetCommunication = 0x0039,
|
||||
kEplNmtGsResetConfiguration = 0x0079,
|
||||
kEplNmtCsNotActive = 0x011C,
|
||||
kEplNmtCsPreOperational1 = 0x011D,
|
||||
kEplNmtCsStopped = 0x014D,
|
||||
kEplNmtCsPreOperational2 = 0x015D,
|
||||
kEplNmtCsReadyToOperate = 0x016D,
|
||||
kEplNmtCsOperational = 0x01FD,
|
||||
kEplNmtCsBasicEthernet = 0x011E,
|
||||
kEplNmtMsNotActive = 0x021C,
|
||||
kEplNmtMsPreOperational1 = 0x021D,
|
||||
kEplNmtMsPreOperational2 = 0x025D,
|
||||
kEplNmtMsReadyToOperate = 0x026D,
|
||||
kEplNmtMsOperational = 0x02FD,
|
||||
kEplNmtMsBasicEthernet = 0x021E
|
||||
} tEplNmtState;
|
||||
|
||||
// NMT-events
|
||||
typedef enum
|
||||
{
|
||||
// Events from DLL
|
||||
// Events defined by EPL V2 specification
|
||||
kEplNmtEventNoEvent = 0x00,
|
||||
typedef enum {
|
||||
// Events from DLL
|
||||
// Events defined by EPL V2 specification
|
||||
kEplNmtEventNoEvent = 0x00,
|
||||
// kEplNmtEventDllMePres = 0x01,
|
||||
kEplNmtEventDllMePresTimeout = 0x02,
|
||||
kEplNmtEventDllMePresTimeout = 0x02,
|
||||
// kEplNmtEventDllMeAsnd = 0x03,
|
||||
// kEplNmtEventDllMeAsndTimeout = 0x04,
|
||||
kEplNmtEventDllMeSoaSent = 0x04,
|
||||
kEplNmtEventDllMeSocTrig = 0x05,
|
||||
kEplNmtEventDllMeSoaTrig = 0x06,
|
||||
kEplNmtEventDllCeSoc = 0x07,
|
||||
kEplNmtEventDllCePreq = 0x08,
|
||||
kEplNmtEventDllCePres = 0x09,
|
||||
kEplNmtEventDllCeSoa = 0x0A,
|
||||
kEplNmtEventDllCeAsnd = 0x0B,
|
||||
kEplNmtEventDllCeFrameTimeout = 0x0C,
|
||||
kEplNmtEventDllMeSoaSent = 0x04,
|
||||
kEplNmtEventDllMeSocTrig = 0x05,
|
||||
kEplNmtEventDllMeSoaTrig = 0x06,
|
||||
kEplNmtEventDllCeSoc = 0x07,
|
||||
kEplNmtEventDllCePreq = 0x08,
|
||||
kEplNmtEventDllCePres = 0x09,
|
||||
kEplNmtEventDllCeSoa = 0x0A,
|
||||
kEplNmtEventDllCeAsnd = 0x0B,
|
||||
kEplNmtEventDllCeFrameTimeout = 0x0C,
|
||||
|
||||
// Events triggered by NMT-Commands
|
||||
kEplNmtEventSwReset = 0x10, // NMT_GT1, NMT_GT2, NMT_GT8
|
||||
kEplNmtEventResetNode = 0x11,
|
||||
kEplNmtEventResetCom = 0x12,
|
||||
kEplNmtEventResetConfig = 0x13,
|
||||
kEplNmtEventEnterPreOperational2= 0x14,
|
||||
kEplNmtEventEnableReadyToOperate= 0x15,
|
||||
kEplNmtEventStartNode = 0x16, // NMT_CT7
|
||||
kEplNmtEventStopNode = 0x17,
|
||||
// Events triggered by NMT-Commands
|
||||
kEplNmtEventSwReset = 0x10, // NMT_GT1, NMT_GT2, NMT_GT8
|
||||
kEplNmtEventResetNode = 0x11,
|
||||
kEplNmtEventResetCom = 0x12,
|
||||
kEplNmtEventResetConfig = 0x13,
|
||||
kEplNmtEventEnterPreOperational2 = 0x14,
|
||||
kEplNmtEventEnableReadyToOperate = 0x15,
|
||||
kEplNmtEventStartNode = 0x16, // NMT_CT7
|
||||
kEplNmtEventStopNode = 0x17,
|
||||
|
||||
// Events triggered by higher layer
|
||||
kEplNmtEventEnterResetApp = 0x20,
|
||||
kEplNmtEventEnterResetCom = 0x21,
|
||||
kEplNmtEventInternComError = 0x22, // NMT_GT6, internal communication error -> enter ResetCommunication
|
||||
kEplNmtEventEnterResetConfig = 0x23,
|
||||
kEplNmtEventEnterCsNotActive = 0x24,
|
||||
kEplNmtEventEnterMsNotActive = 0x25,
|
||||
kEplNmtEventTimerBasicEthernet = 0x26, // NMT_CT3; timer triggered state change (NotActive -> BasicEth)
|
||||
kEplNmtEventTimerMsPreOp1 = 0x27, // enter PreOp1 on MN (NotActive -> MsPreOp1)
|
||||
kEplNmtEventNmtCycleError = 0x28, // NMT_CT11, NMT_MT6; error during cycle -> enter PreOp1
|
||||
kEplNmtEventTimerMsPreOp2 = 0x29, // enter PreOp2 on MN (MsPreOp1 -> MsPreOp2 if kEplNmtEventAllMandatoryCNIdent)
|
||||
kEplNmtEventAllMandatoryCNIdent = 0x2A, // enter PreOp2 on MN if kEplNmtEventTimerMsPreOp2
|
||||
kEplNmtEventEnterReadyToOperate = 0x2B, // application ready for the state ReadyToOp
|
||||
kEplNmtEventEnterMsOperational = 0x2C, // enter Operational on MN
|
||||
kEplNmtEventSwitchOff = 0x2D, // enter state Off
|
||||
kEplNmtEventCriticalError = 0x2E, // enter state Off because of critical error
|
||||
// Events triggered by higher layer
|
||||
kEplNmtEventEnterResetApp = 0x20,
|
||||
kEplNmtEventEnterResetCom = 0x21,
|
||||
kEplNmtEventInternComError = 0x22, // NMT_GT6, internal communication error -> enter ResetCommunication
|
||||
kEplNmtEventEnterResetConfig = 0x23,
|
||||
kEplNmtEventEnterCsNotActive = 0x24,
|
||||
kEplNmtEventEnterMsNotActive = 0x25,
|
||||
kEplNmtEventTimerBasicEthernet = 0x26, // NMT_CT3; timer triggered state change (NotActive -> BasicEth)
|
||||
kEplNmtEventTimerMsPreOp1 = 0x27, // enter PreOp1 on MN (NotActive -> MsPreOp1)
|
||||
kEplNmtEventNmtCycleError = 0x28, // NMT_CT11, NMT_MT6; error during cycle -> enter PreOp1
|
||||
kEplNmtEventTimerMsPreOp2 = 0x29, // enter PreOp2 on MN (MsPreOp1 -> MsPreOp2 if kEplNmtEventAllMandatoryCNIdent)
|
||||
kEplNmtEventAllMandatoryCNIdent = 0x2A, // enter PreOp2 on MN if kEplNmtEventTimerMsPreOp2
|
||||
kEplNmtEventEnterReadyToOperate = 0x2B, // application ready for the state ReadyToOp
|
||||
kEplNmtEventEnterMsOperational = 0x2C, // enter Operational on MN
|
||||
kEplNmtEventSwitchOff = 0x2D, // enter state Off
|
||||
kEplNmtEventCriticalError = 0x2E, // enter state Off because of critical error
|
||||
|
||||
} tEplNmtEvent;
|
||||
|
||||
|
||||
// type for argument of event kEplEventTypeNmtStateChange
|
||||
typedef struct
|
||||
{
|
||||
tEplNmtState m_NewNmtState;
|
||||
tEplNmtEvent m_NmtEvent;
|
||||
typedef struct {
|
||||
tEplNmtState m_NewNmtState;
|
||||
tEplNmtEvent m_NmtEvent;
|
||||
|
||||
} tEplEventNmtStateChange;
|
||||
|
||||
|
||||
// structure for kEplEventTypeHeartbeat
|
||||
typedef struct
|
||||
{
|
||||
unsigned int m_uiNodeId; // NodeId
|
||||
tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN)
|
||||
WORD m_wErrorCode; // EPL error code in case of NMT state NotActive
|
||||
typedef struct {
|
||||
unsigned int m_uiNodeId; // NodeId
|
||||
tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN)
|
||||
WORD m_wErrorCode; // EPL error code in case of NMT state NotActive
|
||||
|
||||
} tEplHeartbeatEvent;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplNmtNodeEventFound = 0x00,
|
||||
kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN
|
||||
kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration on CN
|
||||
kEplNmtNodeEventUpdateConf = 0x03, // application / Configuration Manager shall update configuration on CN (check was done by NmtMn module)
|
||||
kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN
|
||||
kEplNmtNodeEventReadyToStart= 0x05, // issued if EPL_NMTST_NO_STARTNODE set
|
||||
// application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually
|
||||
kEplNmtNodeEventNmtState = 0x06,
|
||||
kEplNmtNodeEventError = 0x07, // NMT error of CN
|
||||
typedef enum {
|
||||
kEplNmtNodeEventFound = 0x00,
|
||||
kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN
|
||||
kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration on CN
|
||||
kEplNmtNodeEventUpdateConf = 0x03, // application / Configuration Manager shall update configuration on CN (check was done by NmtMn module)
|
||||
kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN
|
||||
kEplNmtNodeEventReadyToStart = 0x05, // issued if EPL_NMTST_NO_STARTNODE set
|
||||
// application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually
|
||||
kEplNmtNodeEventNmtState = 0x06,
|
||||
kEplNmtNodeEventError = 0x07, // NMT error of CN
|
||||
|
||||
} tEplNmtNodeEvent;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound
|
||||
kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully
|
||||
kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully
|
||||
kEplNmtNodeCommandConfOk = 0x04, // application / Configuration Manager has updated configuration on CN successfully
|
||||
kEplNmtNodeCommandConfReset = 0x05, // application / Configuration Manager has updated configuration on CN successfully
|
||||
// and CN needs ResetConf so that the configuration gets actived
|
||||
kEplNmtNodeCommandConfErr = 0x06, // application / Configuration Manager failed on updating configuration on CN
|
||||
kEplNmtNodeCommandStart = 0x07, // if EPL_NMTST_NO_STARTNODE set it must be issued after kEplNmtNodeEventReadyToStart
|
||||
typedef enum {
|
||||
kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound
|
||||
kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully
|
||||
kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully
|
||||
kEplNmtNodeCommandConfOk = 0x04, // application / Configuration Manager has updated configuration on CN successfully
|
||||
kEplNmtNodeCommandConfReset = 0x05, // application / Configuration Manager has updated configuration on CN successfully
|
||||
// and CN needs ResetConf so that the configuration gets actived
|
||||
kEplNmtNodeCommandConfErr = 0x06, // application / Configuration Manager failed on updating configuration on CN
|
||||
kEplNmtNodeCommandStart = 0x07, // if EPL_NMTST_NO_STARTNODE set it must be issued after kEplNmtNodeEventReadyToStart
|
||||
|
||||
} tEplNmtNodeCommand;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible
|
||||
kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible
|
||||
kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible
|
||||
kEplNmtBootEventOperational = 0x03, // all mandatory CNs are Operational
|
||||
kEplNmtBootEventError = 0x04, // boot process halted because of an error
|
||||
typedef enum {
|
||||
kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible
|
||||
kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible
|
||||
kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible
|
||||
kEplNmtBootEventOperational = 0x03, // all mandatory CNs are Operational
|
||||
kEplNmtBootEventError = 0x04, // boot process halted because of an error
|
||||
|
||||
} tEplNmtBootEvent;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif // #ifndef _EPLNMT_H_
|
||||
|
||||
|
||||
#endif // #ifndef _EPLNMT_H_
|
||||
|
||||
+181
-221
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user