Commit e0ca0595 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bd5cd82d
This diff is collapsed.
This diff is collapsed.
...@@ -73,40 +73,32 @@ ...@@ -73,40 +73,32 @@
#ifndef _EDRVFEC_H_ #ifndef _EDRVFEC_H_
#define _EDRVFEC_H_ #define _EDRVFEC_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// do this in config header // do this in config header
#define TARGET_HARDWARE TGTHW_SPLC_CF54 #define TARGET_HARDWARE TGTHW_SPLC_CF54
// base addresses // base addresses
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
#elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485) #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485)
#else #else
#error 'ERROR: Target was never implemented!' #error 'ERROR: Target was never implemented!'
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// types // types
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Rx and Tx buffer descriptor format // Rx and Tx buffer descriptor format
typedef struct typedef struct {
{
WORD m_wStatus; // control / status --- used by edrv, do not change in application WORD m_wStatus; // control / status --- used by edrv, do not change in application
WORD m_wLength; // transfer length WORD m_wLength; // transfer length
BYTE * m_pbData; // buffer address BYTE *m_pbData; // buffer address
} tBufferDescr; } tBufferDescr;
#if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
...@@ -119,8 +111,4 @@ typedef struct ...@@ -119,8 +111,4 @@ typedef struct
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EDRV_FEC_H_ #endif // #ifndef _EDRV_FEC_H_
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
#ifndef _EDRVFEC_H_ #ifndef _EDRVFEC_H_
#define _EDRVFEC_H_ #define _EDRVFEC_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -315,11 +314,10 @@ ...@@ -315,11 +314,10 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Rx and Tx buffer descriptor format // Rx and Tx buffer descriptor format
typedef struct typedef struct {
{
WORD m_wStatus; // control / status --- used by edrv, do not change in application WORD m_wStatus; // control / status --- used by edrv, do not change in application
WORD m_wLength; // transfer length WORD m_wLength; // transfer length
BYTE * m_pbData; // buffer address BYTE *m_pbData; // buffer address
} tBufferDescr; } tBufferDescr;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -327,21 +325,16 @@ typedef struct ...@@ -327,21 +325,16 @@ typedef struct
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#if (NO_OF_INSTANCES > 1) #if (NO_OF_INSTANCES > 1)
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val) #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[off]) = val)
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[off])) #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 #else
#if (EDRV_USED_ETH_CTRL == 0) #define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]) = val)
#define ECI_WRITE_DW_REG(off,val) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off]) = val) #define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC1_ADDR+off]))
#define ECI_READ_DW_REG(off) (*(DWORD *)(void *)(&__IPSBAR[FEC0_ADDR+off])) #endif
#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
#endif // #ifndef _EDRV_FEC_H_ #endif // #ifndef _EDRV_FEC_H_
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
#ifndef _EDRVSIM_H_ #ifndef _EDRVSIM_H_
#define _EDRVSIM_H_ #define _EDRVSIM_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -80,15 +79,11 @@ ...@@ -80,15 +79,11 @@
// types // types
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void EdrvRxInterruptHandler (BYTE bBufferInFrame_p, BYTE * pbEthernetData_p, WORD wDataLen_p); void EdrvRxInterruptHandler(BYTE bBufferInFrame_p, BYTE * pbEthernetData_p,
WORD wDataLen_p);
#endif // #ifndef _EDRVSIM_H_ #endif // #ifndef _EDRVSIM_H_
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/05/22 d.k.: start of the implementation, version 1.00 2006/05/22 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_API_H_ #ifndef _EPL_API_H_
...@@ -82,14 +81,11 @@ ...@@ -82,14 +81,11 @@
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef struct {
typedef struct
{
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
tEplNmtState m_NmtState; tEplNmtState m_NmtState;
tEplNmtNodeEvent m_NodeEvent; tEplNmtNodeEvent m_NodeEvent;
...@@ -98,26 +94,20 @@ typedef struct ...@@ -98,26 +94,20 @@ typedef struct
} tEplApiEventNode; } tEplApiEventNode;
typedef struct {
typedef struct
{
tEplNmtState m_NmtState; // local NMT state tEplNmtState m_NmtState; // local NMT state
tEplNmtBootEvent m_BootEvent; tEplNmtBootEvent m_BootEvent;
WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError
} tEplApiEventBoot; } tEplApiEventBoot;
typedef struct {
typedef struct
{
tEplLedType m_LedType; // type of the LED (e.g. Status or Error) tEplLedType m_LedType; // type of the LED (e.g. Status or Error)
BOOL m_fOn; // state of the LED (e.g. on or off) BOOL m_fOn; // state of the LED (e.g. on or off)
} tEplApiEventLed; } tEplApiEventLed;
typedef enum {
typedef enum
{
kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange kEplApiEventNmtStateChange = 0x10, // m_NmtStateChange
// kEplApiEventRequestNmt = 0x11, // m_bNmtCmd // kEplApiEventRequestNmt = 0x11, // m_bNmtCmd
kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted kEplApiEventCriticalError = 0x12, // m_InternalError, Stack halted
...@@ -130,9 +120,7 @@ typedef enum ...@@ -130,9 +120,7 @@ typedef enum
} tEplApiEventType; } tEplApiEventType;
typedef union {
typedef union
{
tEplEventNmtStateChange m_NmtStateChange; tEplEventNmtStateChange m_NmtStateChange;
tEplEventError m_InternalError; tEplEventError m_InternalError;
tEplSdoComFinished m_Sdo; tEplSdoComFinished m_Sdo;
...@@ -143,15 +131,11 @@ typedef union ...@@ -143,15 +131,11 @@ typedef union
} tEplApiEventArg; } 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) ( typedef struct {
tEplApiEventType EventType_p, // IN: event type (enum)
tEplApiEventArg* pEventArg_p, // IN: event argument (union)
void GENERIC* pUserArg_p);
typedef struct
{
unsigned int m_uiSizeOfStruct; unsigned int m_uiSizeOfStruct;
BOOL m_fAsyncOnly; // do not need to register PRes BOOL m_fAsyncOnly; // do not need to register PRes
unsigned int m_uiNodeId; // local node ID unsigned int m_uiNodeId; // local node ID
...@@ -208,97 +192,82 @@ typedef struct ...@@ -208,97 +192,82 @@ typedef struct
BYTE m_sHostname[32]; BYTE m_sHostname[32];
BYTE m_abVendorSpecificExt2[48]; BYTE m_abVendorSpecificExt2[48];
char* m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD) char *m_pszDevName; // NMT_ManufactDevName_VS (0x1008/0 local OD)
char* m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD) char *m_pszHwVersion; // NMT_ManufactHwVers_VS (0x1009/0 local OD)
char* m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD) char *m_pszSwVersion; // NMT_ManufactSwVers_VS (0x100A/0 local OD)
tEplApiCbEvent m_pfnCbEvent; tEplApiCbEvent m_pfnCbEvent;
void* m_pEventUserArg; void *m_pEventUserArg;
tEplSyncCb m_pfnCbSync; tEplSyncCb m_pfnCbSync;
} tEplApiInitParam; } tEplApiInitParam;
typedef struct {
typedef struct void *m_pImage;
{
void* m_pImage;
unsigned int m_uiSize; unsigned int m_uiSize;
} tEplApiProcessImage; } tEplApiProcessImage;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam* pInitParam_p); tEplKernel PUBLIC EplApiInitialize(tEplApiInitParam * pInitParam_p);
tEplKernel PUBLIC EplApiShutdown(void); tEplKernel PUBLIC EplApiShutdown(void);
tEplKernel PUBLIC EplApiReadObject( tEplKernel PUBLIC EplApiReadObject(tEplSdoComConHdl * pSdoComConHdl_p,
tEplSdoComConHdl* pSdoComConHdl_p,
unsigned int uiNodeId_p, unsigned int uiNodeId_p,
unsigned int uiIndex_p, unsigned int uiIndex_p,
unsigned int uiSubindex_p, unsigned int uiSubindex_p,
void* pDstData_le_p, void *pDstData_le_p,
unsigned int* puiSize_p, unsigned int *puiSize_p,
tEplSdoType SdoType_p, tEplSdoType SdoType_p, void *pUserArg_p);
void* pUserArg_p);
tEplKernel PUBLIC EplApiWriteObject( tEplKernel PUBLIC EplApiWriteObject(tEplSdoComConHdl * pSdoComConHdl_p,
tEplSdoComConHdl* pSdoComConHdl_p,
unsigned int uiNodeId_p, unsigned int uiNodeId_p,
unsigned int uiIndex_p, unsigned int uiIndex_p,
unsigned int uiSubindex_p, unsigned int uiSubindex_p,
void* pSrcData_le_p, void *pSrcData_le_p,
unsigned int uiSize_p, unsigned int uiSize_p,
tEplSdoType SdoType_p, tEplSdoType SdoType_p, void *pUserArg_p);
void* pUserArg_p);
tEplKernel PUBLIC EplApiFreeSdoChannel( tEplKernel PUBLIC EplApiFreeSdoChannel(tEplSdoComConHdl SdoComConHdl_p);
tEplSdoComConHdl SdoComConHdl_p);
tEplKernel PUBLIC EplApiReadLocalObject( tEplKernel PUBLIC EplApiReadLocalObject(unsigned int uiIndex_p,
unsigned int uiIndex_p,
unsigned int uiSubindex_p, unsigned int uiSubindex_p,
void* pDstData_p, void *pDstData_p,
unsigned int* puiSize_p); unsigned int *puiSize_p);
tEplKernel PUBLIC EplApiWriteLocalObject( tEplKernel PUBLIC EplApiWriteLocalObject(unsigned int uiIndex_p,
unsigned int uiIndex_p,
unsigned int uiSubindex_p, unsigned int uiSubindex_p,
void* pSrcData_p, void *pSrcData_p,
unsigned int uiSize_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, tEplKernel PUBLIC EplApiLinkObject(unsigned int uiObjIndex_p,
void* pVar_p, void *pVar_p,
unsigned int* puiVarEntries_p, unsigned int *puiVarEntries_p,
tEplObdSize* pEntrySize_p, tEplObdSize * pEntrySize_p,
unsigned int uiFirstSubindex_p); unsigned int uiFirstSubindex_p);
tEplKernel PUBLIC EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p); tEplKernel PUBLIC EplApiExecNmtCommand(tEplNmtEvent NmtEvent_p);
tEplKernel PUBLIC EplApiProcess(void); tEplKernel PUBLIC EplApiProcess(void);
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_NMT_MN)) != 0)
tEplKernel PUBLIC EplApiMnTriggerStateChange(unsigned int uiNodeId_p, tEplKernel PUBLIC EplApiMnTriggerStateChange(unsigned int uiNodeId_p,
tEplNmtNodeCommand NodeCommand_p); tEplNmtNodeCommand NodeCommand_p);
#endif #endif
tEplKernel PUBLIC EplApiGetIdentResponse( tEplKernel PUBLIC EplApiGetIdentResponse(unsigned int uiNodeId_p,
unsigned int uiNodeId_p, tEplIdentResponse **
tEplIdentResponse** ppIdentResponse_p); ppIdentResponse_p);
// functions for process image will be implemented in separate file // functions for process image will be implemented in separate file
tEplKernel PUBLIC EplApiProcessImageSetup(void); tEplKernel PUBLIC EplApiProcessImageSetup(void);
tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage* pPI_p); tEplKernel PUBLIC EplApiProcessImageExchangeIn(tEplApiProcessImage * pPI_p);
tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage* pPI_p); tEplKernel PUBLIC EplApiProcessImageExchangeOut(tEplApiProcessImage * pPI_p);
#endif // #ifndef _EPL_API_H_ #endif // #ifndef _EPL_API_H_
...@@ -86,46 +86,43 @@ ...@@ -86,46 +86,43 @@
#ifndef _EPLAMI_H_ #ifndef _EPLAMI_H_
#define _EPLAMI_H_ #define _EPLAMI_H_
#if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0) #if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0)
// #ifdef USE_VAR64 // #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
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// types // types
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Prototypen // Prototypen
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if (TARGET_SYSTEM == _WIN32_) #if (TARGET_SYSTEM == _WIN32_)
#if defined(INLINE_FUNCTION_DEF) #if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION #undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF #define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define INLINE_ENABLED TRUE #define INLINE_ENABLED TRUE
#define EPL_AMI_INLINED #define EPL_AMI_INLINED
#include "../EplStack/amix86.c" #include "../EplStack/amix86.c"
#endif #endif
#elif (TARGET_SYSTEM == _LINUX_) #elif (TARGET_SYSTEM == _LINUX_)
#if defined(__m68k__) // it is an big endian machine #if defined(__m68k__) // it is an big endian machine
#if defined(INLINE_FUNCTION_DEF) #if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION #undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF #define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define INLINE_ENABLED TRUE #define INLINE_ENABLED TRUE
#define EPL_AMI_INLINED #define EPL_AMI_INLINED
#include "../EplStack/amibe.c" #include "../EplStack/amibe.c"
#endif #endif
#endif #endif
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -140,13 +137,12 @@ ...@@ -140,13 +137,12 @@
#define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);} #define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(BYTE FAR*)(pAddr_p) = (bByteVal_p);}
#if !defined(INLINE_ENABLED) #if !defined(INLINE_ENABLED)
void PUBLIC AmiSetWordToBe (void FAR* pAddr_p, WORD wWordVal_p); void PUBLIC AmiSetWordToBe(void FAR * pAddr_p, WORD wWordVal_p);
void PUBLIC AmiSetDwordToBe (void FAR* pAddr_p, DWORD dwDwordVal_p); void PUBLIC AmiSetDwordToBe(void FAR * pAddr_p, DWORD dwDwordVal_p);
void PUBLIC AmiSetWordToLe (void FAR* pAddr_p, WORD wWordVal_p); void PUBLIC AmiSetWordToLe(void FAR * pAddr_p, WORD wWordVal_p);
void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); void PUBLIC AmiSetDwordToLe(void FAR * pAddr_p, DWORD dwDwordVal_p);
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// read functions // read functions
...@@ -160,10 +156,10 @@ void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p); ...@@ -160,10 +156,10 @@ void PUBLIC AmiSetDwordToLe (void FAR* pAddr_p, DWORD dwDwordVal_p);
#if !defined(INLINE_ENABLED) #if !defined(INLINE_ENABLED)
WORD PUBLIC AmiGetWordFromBe (void FAR* pAddr_p); WORD PUBLIC AmiGetWordFromBe(void FAR * pAddr_p);
DWORD PUBLIC AmiGetDwordFromBe (void FAR* pAddr_p); DWORD PUBLIC AmiGetDwordFromBe(void FAR * pAddr_p);
WORD PUBLIC AmiGetWordFromLe (void FAR* pAddr_p); WORD PUBLIC AmiGetWordFromLe(void FAR * pAddr_p);
DWORD PUBLIC AmiGetDwordFromLe (void FAR* pAddr_p); DWORD PUBLIC AmiGetDwordFromLe(void FAR * pAddr_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -178,9 +174,8 @@ 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 AmiSetDword24ToBe(void FAR * pAddr_p, DWORD dwDwordVal_p);
void PUBLIC AmiSetDword24ToLe (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); ...@@ -194,9 +189,8 @@ void PUBLIC AmiSetDword24ToLe (void FAR* pAddr_p, DWORD dwDwordVal_p);
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DWORD PUBLIC AmiGetDword24FromBe (void FAR* pAddr_p); DWORD PUBLIC AmiGetDword24FromBe(void FAR * pAddr_p);
DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p); DWORD PUBLIC AmiGetDword24FromLe(void FAR * pAddr_p);
//#ifdef USE_VAR64 //#ifdef USE_VAR64
...@@ -213,9 +207,8 @@ DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p); ...@@ -213,9 +207,8 @@ DWORD PUBLIC AmiGetDword24FromLe (void FAR* pAddr_p);
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void PUBLIC AmiSetQword40ToBe (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); void PUBLIC AmiSetQword40ToLe(void FAR * pAddr_p, QWORD qwQwordVal_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -229,9 +222,8 @@ 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 AmiGetQword40FromBe(void FAR * pAddr_p);
QWORD PUBLIC AmiGetQword40FromLe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword40FromLe(void FAR * pAddr_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -246,9 +238,8 @@ 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 AmiSetQword48ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
void PUBLIC AmiSetQword48ToLe (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); ...@@ -262,9 +253,8 @@ void PUBLIC AmiSetQword48ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
QWORD PUBLIC AmiGetQword48FromBe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword48FromBe(void FAR * pAddr_p);
QWORD PUBLIC AmiGetQword48FromLe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword48FromLe(void FAR * pAddr_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -279,9 +269,8 @@ 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 AmiSetQword56ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
void PUBLIC AmiSetQword56ToLe (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); ...@@ -295,9 +284,8 @@ void PUBLIC AmiSetQword56ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
QWORD PUBLIC AmiGetQword56FromBe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword56FromBe(void FAR * pAddr_p);
QWORD PUBLIC AmiGetQword56FromLe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword56FromLe(void FAR * pAddr_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -312,9 +300,8 @@ 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 AmiSetQword64ToBe(void FAR * pAddr_p, QWORD qwQwordVal_p);
void PUBLIC AmiSetQword64ToLe (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); ...@@ -328,9 +315,8 @@ void PUBLIC AmiSetQword64ToLe (void FAR* pAddr_p, QWORD qwQwordVal_p);
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
QWORD PUBLIC AmiGetQword64FromBe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword64FromBe(void FAR * pAddr_p);
QWORD PUBLIC AmiGetQword64FromLe (void FAR* pAddr_p); QWORD PUBLIC AmiGetQword64FromLe(void FAR * pAddr_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
...@@ -345,8 +331,8 @@ 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); ...@@ -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 #endif
#undef INLINE_ENABLED // disable actual inlining of functions #undef INLINE_ENABLED // disable actual inlining of functions
#define EPL_AMI_INCLUDED #define EPL_AMI_INCLUDED
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // ifndef _EPLAMI_H_ #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).
// 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,20 +66,17 @@ ...@@ -66,20 +66,17 @@
2006/10/11 d.k.: start of the implementation, version 1.00 2006/10/11 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_API_LINUX_H_ #ifndef _EPL_API_LINUX_H_
#define _EPL_API_LINUX_H_ #define _EPL_API_LINUX_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // 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> // Commands for <ioctl>
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -98,45 +95,40 @@ ...@@ -98,45 +95,40 @@
#define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0 #define EPLLIN_CMD_PI_SETUP 11 // ulArg_p ~ 0
#define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0 #define EPLLIN_CMD_SHUTDOWN 12 // ulArg_p ~ 0
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef struct typedef struct {
{
unsigned int m_uiEventArgSize; unsigned int m_uiEventArgSize;
tEplApiEventArg* m_pEventArg; tEplApiEventArg *m_pEventArg;
tEplApiEventType* m_pEventType; tEplApiEventType *m_pEventType;
tEplKernel m_RetCbEvent; tEplKernel m_RetCbEvent;
} tEplLinEvent; } tEplLinEvent;
typedef struct typedef struct {
{
tEplSdoComConHdl m_SdoComConHdl; tEplSdoComConHdl m_SdoComConHdl;
BOOL m_fValidSdoComConHdl; BOOL m_fValidSdoComConHdl;
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
unsigned int m_uiIndex; unsigned int m_uiIndex;
unsigned int m_uiSubindex; unsigned int m_uiSubindex;
void* m_le_pData; void *m_le_pData;
unsigned int m_uiSize; unsigned int m_uiSize;
tEplSdoType m_SdoType; tEplSdoType m_SdoType;
void* m_pUserArg; void *m_pUserArg;
} tEplLinSdoObject; } tEplLinSdoObject;
typedef struct typedef struct {
{
unsigned int m_uiIndex; unsigned int m_uiIndex;
unsigned int m_uiSubindex; unsigned int m_uiSubindex;
void* m_pData; void *m_pData;
unsigned int m_uiSize; unsigned int m_uiSize;
} tEplLinLocalObject; } tEplLinLocalObject;
typedef struct typedef struct {
{
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
tEplNmtNodeCommand m_NodeCommand; tEplNmtNodeCommand m_NodeCommand;
...@@ -146,8 +138,4 @@ typedef struct ...@@ -146,8 +138,4 @@ typedef struct
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_API_LINUX_H_ #endif // #ifndef _EPL_API_LINUX_H_
...@@ -71,9 +71,6 @@ ...@@ -71,9 +71,6 @@
#ifndef _EPLCFG_H_ #ifndef _EPLCFG_H_
#define _EPLCFG_H_ #define _EPLCFG_H_
// ========================================================================= // =========================================================================
// generic defines which for whole EPL Stack // generic defines which for whole EPL Stack
// ========================================================================= // =========================================================================
...@@ -113,7 +110,6 @@ ...@@ -113,7 +110,6 @@
// * EPL_DBGLVL_ERROR = 0x40000000L // * EPL_DBGLVL_ERROR = 0x40000000L
// * EPL_DBGLVL_ALWAYS = 0x80000000L // * EPL_DBGLVL_ALWAYS = 0x80000000L
// EPL_MODULE_INTEGRATION defines all modules which are included in // EPL_MODULE_INTEGRATION defines all modules which are included in
// EPL application. Please add or delete modules for your application. // EPL application. Please add or delete modules for your application.
#define EPL_MODULE_INTEGRATION EPL_MODULE_OBDK \ #define EPL_MODULE_INTEGRATION EPL_MODULE_OBDK \
...@@ -155,7 +151,6 @@ ...@@ -155,7 +151,6 @@
// number of used ethernet controller // number of used ethernet controller
//#define EDRV_USED_ETH_CTRL 1 //#define EDRV_USED_ETH_CTRL 1
// ========================================================================= // =========================================================================
// Data Link Layer (DLL) specific defines // Data Link Layer (DLL) specific defines
// ========================================================================= // =========================================================================
...@@ -170,7 +165,6 @@ ...@@ -170,7 +165,6 @@
#define EPL_DLL_PRES_READY_AFTER_SOA FALSE #define EPL_DLL_PRES_READY_AFTER_SOA FALSE
//#define EPL_DLL_PRES_READY_AFTER_SOA TRUE //#define EPL_DLL_PRES_READY_AFTER_SOA TRUE
// ========================================================================= // =========================================================================
// OBD specific defines // OBD specific defines
// ========================================================================= // =========================================================================
...@@ -188,7 +182,6 @@ ...@@ -188,7 +182,6 @@
#define EPL_OBD_USE_VARIABLE_SUBINDEX_TAB TRUE #define EPL_OBD_USE_VARIABLE_SUBINDEX_TAB TRUE
// ========================================================================= // =========================================================================
// Timer module specific defines // Timer module specific defines
// ========================================================================= // =========================================================================
...@@ -200,8 +193,4 @@ ...@@ -200,8 +193,4 @@
#define EPL_TIMER_USE_HIGHRES TRUE #define EPL_TIMER_USE_HIGHRES TRUE
//#define EPL_TIMER_USE_HIGHRES FALSE //#define EPL_TIMER_USE_HIGHRES FALSE
#endif //_EPLCFG_H_ #endif //_EPLCFG_H_
...@@ -66,13 +66,11 @@ ...@@ -66,13 +66,11 @@
2006/05/22 d.k.: start of the implementation, version 1.00 2006/05/22 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_DEF_H_ #ifndef _EPL_DEF_H_
#define _EPL_DEF_H_ #define _EPL_DEF_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -126,8 +124,6 @@ ...@@ -126,8 +124,6 @@
#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 // Default configuration
// ====================== // ======================
...@@ -352,11 +348,8 @@ ...@@ -352,11 +348,8 @@
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_DEF_H_ #endif // #ifndef _EPL_DEF_H_
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/06/08 d.k.: start of the implementation, version 1.00 2006/06/08 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_DLL_H_ #ifndef _EPL_DLL_H_
...@@ -79,7 +78,6 @@ ...@@ -79,7 +78,6 @@
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#ifndef EPL_DLL_MAX_ASND_SERVICE_ID #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 #endif
...@@ -88,36 +86,31 @@ ...@@ -88,36 +86,31 @@
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef enum typedef enum {
{
kEplDllAsndNotDefined = 0x00, kEplDllAsndNotDefined = 0x00,
kEplDllAsndIdentResponse = 0x01, kEplDllAsndIdentResponse = 0x01,
kEplDllAsndStatusResponse = 0x02, kEplDllAsndStatusResponse = 0x02,
kEplDllAsndNmtRequest = 0x03, kEplDllAsndNmtRequest = 0x03,
kEplDllAsndNmtCommand = 0x04, kEplDllAsndNmtCommand = 0x04,
kEplDllAsndSdo = 0x05 kEplDllAsndSdo = 0x05
} tEplDllAsndServiceId; } tEplDllAsndServiceId;
typedef enum typedef enum {
{
kEplDllAsndFilterNone = 0x00, kEplDllAsndFilterNone = 0x00,
kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID kEplDllAsndFilterLocal = 0x01, // receive only ASnd frames with local or broadcast node ID
kEplDllAsndFilterAny = 0x02, // receive any ASnd frame kEplDllAsndFilterAny = 0x02, // receive any ASnd frame
} tEplDllAsndFilter; } tEplDllAsndFilter;
typedef enum typedef enum {
{
kEplDllReqServiceNo = 0x00, kEplDllReqServiceNo = 0x00,
kEplDllReqServiceIdent = 0x01, kEplDllReqServiceIdent = 0x01,
kEplDllReqServiceStatus = 0x02, kEplDllReqServiceStatus = 0x02,
kEplDllReqServiceNmtRequest = 0x03, kEplDllReqServiceNmtRequest = 0x03,
kEplDllReqServiceUnspecified= 0xFF, kEplDllReqServiceUnspecified = 0xFF,
} tEplDllReqServiceId; } tEplDllReqServiceId;
typedef enum typedef enum {
{
kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST kEplDllAsyncReqPrioNmt = 0x07, // PRIO_NMT_REQUEST
kEplDllAsyncReqPrio6 = 0x06, kEplDllAsyncReqPrio6 = 0x06,
kEplDllAsyncReqPrio5 = 0x05, kEplDllAsyncReqPrio5 = 0x05,
...@@ -129,16 +122,14 @@ typedef enum ...@@ -129,16 +122,14 @@ typedef enum
} tEplDllAsyncReqPriority; } tEplDllAsyncReqPriority;
typedef struct typedef struct {
{
unsigned int m_uiFrameSize; unsigned int m_uiFrameSize;
tEplFrame * m_pFrame; tEplFrame *m_pFrame;
tEplNetTime m_NetTime; tEplNetTime m_NetTime;
} tEplFrameInfo; } tEplFrameInfo;
typedef struct typedef struct {
{
unsigned int m_uiSizeOfStruct; unsigned int m_uiSizeOfStruct;
BOOL m_fAsyncOnly; // do not need to register PRes-Frame BOOL m_fAsyncOnly; // do not need to register PRes-Frame
unsigned int m_uiNodeId; // local node ID unsigned int m_uiNodeId; // local node ID
...@@ -179,8 +170,7 @@ typedef struct ...@@ -179,8 +170,7 @@ typedef struct
} tEplDllConfigParam; } tEplDllConfigParam;
typedef struct typedef struct {
{
unsigned int m_uiSizeOfStruct; unsigned int m_uiSizeOfStruct;
DWORD m_dwDeviceType; // NMT_DeviceType_U32 DWORD m_dwDeviceType; // NMT_DeviceType_U32
DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32 DWORD m_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
...@@ -200,8 +190,7 @@ typedef struct ...@@ -200,8 +190,7 @@ typedef struct
} tEplDllIdentParam; } tEplDllIdentParam;
typedef struct typedef struct {
{
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16 WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16
WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16 WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16
...@@ -213,8 +202,4 @@ typedef struct ...@@ -213,8 +202,4 @@ typedef struct
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_DLL_H_ #endif // #ifndef _EPL_DLL_H_
...@@ -66,13 +66,11 @@ ...@@ -66,13 +66,11 @@
2006/06/20 d.k.: start of the implementation, version 1.00 2006/06/20 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_DLLCAL_H_ #ifndef _EPL_DLLCAL_H_
#define _EPL_DLLCAL_H_ #define _EPL_DLLCAL_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -105,15 +103,13 @@ ...@@ -105,15 +103,13 @@
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef struct typedef struct {
{
tEplDllAsndServiceId m_ServiceId; tEplDllAsndServiceId m_ServiceId;
tEplDllAsndFilter m_Filter; tEplDllAsndFilter m_Filter;
} tEplDllCalAsndServiceIdFilter; } tEplDllCalAsndServiceIdFilter;
typedef struct typedef struct {
{
tEplDllReqServiceId m_Service; tEplDllReqServiceId m_Service;
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
BYTE m_bSoaFlag1; BYTE m_bSoaFlag1;
...@@ -124,8 +120,4 @@ typedef struct ...@@ -124,8 +120,4 @@ typedef struct
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_DLLKCAL_H_ #endif // #ifndef _EPL_DLLKCAL_H_
...@@ -71,13 +71,11 @@ ...@@ -71,13 +71,11 @@
#ifndef _EPL_ERRORDEF_H_ #ifndef _EPL_ERRORDEF_H_
#define _EPL_ERRORDEF_H_ #define _EPL_ERRORDEF_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// return codes // return codes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef enum typedef enum {
{
// area for generic errors 0x0000 - 0x000F // area for generic errors 0x0000 - 0x000F
kEplSuccessful = 0x0000, // no error/successful run kEplSuccessful = 0x0000, // no error/successful run
kEplIllegalInstance = 0x0001, // the called Instanz does not exist kEplIllegalInstance = 0x0001, // the called Instanz does not exist
...@@ -175,7 +173,7 @@ typedef enum ...@@ -175,7 +173,7 @@ typedef enum
// area for SDO Command Layer Module 0x0070 - 0x007F // area for SDO Command Layer Module 0x0070 - 0x007F
kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected kEplSdoComUnsupportedProt = 0x0070, // unsupported Protocol selected
kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection kEplSdoComNoFreeHandle = 0x0071, // no free handle for connection
kEplSdoComInvalidServiceType= 0x0072, // invalid SDO service type specified kEplSdoComInvalidServiceType = 0x0072, // invalid SDO service type specified
kEplSdoComInvalidHandle = 0x0073, // handle invalid kEplSdoComInvalidHandle = 0x0073, // handle invalid
kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is kEplSdoComInvalidSendType = 0x0074, // the stated to of frame to send is
// not possible // not possible
...@@ -189,8 +187,6 @@ typedef enum ...@@ -189,8 +187,6 @@ typedef enum
kEplEventUnknownSink = 0x0080, // unknown sink for event kEplEventUnknownSink = 0x0080, // unknown sink for event
kEplEventPostError = 0x0081, // error during post of event kEplEventPostError = 0x0081, // error during post of event
// area for EPL Timer Modul 0x0090 - 0x009F // area for EPL Timer Modul 0x0090 - 0x009F
kEplTimerInvalidHandle = 0x0090, // invalid handle for timer kEplTimerInvalidHandle = 0x0090, // invalid handle for timer
kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by kEplTimerNoTimerCreated = 0x0091, // no timer was created caused by
...@@ -201,7 +197,6 @@ typedef enum ...@@ -201,7 +197,6 @@ typedef enum
kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection kEplSdoAsndNoFreeHandle = 0x00A1, // no free handle for connection
kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid kEplSdoAsndInvalidHandle = 0x00A2, // handle for connection is invalid
// area for PDO module 0x00B0 - 0x00BF // area for PDO module 0x00B0 - 0x00BF
kEplPdoNotExist = 0x00B0, // selected PDO does not exist kEplPdoNotExist = 0x00B0, // selected PDO does not exist
kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis kEplPdoLengthExceeded = 0x00B1, // length of PDO mapping exceedes 64 bis
...@@ -248,7 +243,6 @@ typedef enum ...@@ -248,7 +243,6 @@ typedef enum
kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf kEplCfgMaUnsuppDatatypeDcf = 0x00C7, // unsupported datatype found in dcf
// -> this entry was not configured // -> 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) /* kEplLssmIllegalMode = 0x00D0, // illegal LSS mode (operation / configuration)
kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master kEplLssmIllegalState = 0x00D1, // function was called in illegal state of LSS master
...@@ -293,10 +287,8 @@ typedef enum ...@@ -293,10 +287,8 @@ typedef enum
} tEplKernel; } tEplKernel;
#endif #endif
//EOF //EOF
// Die letzte Zeile mu unbedingt eine leere Zeile sein, weil manche Compiler // 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). // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/06/12 d.k.: start of the implementation, version 1.00 2006/06/12 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_EVENT_H_ #ifndef _EPL_EVENT_H_
...@@ -90,7 +89,6 @@ ...@@ -90,7 +89,6 @@
#define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte #define EPL_EVENT_SIZE_SHB_USER_TO_KERNEL 32768 // 32 kByte
#endif #endif
// max size of event argument // max size of event argument
#ifndef EPL_MAX_EVENT_ARG_SIZE #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
...@@ -116,14 +114,12 @@ ...@@ -116,14 +114,12 @@
#define EPL_DLL_ERR_INVALID_FORMAT 0x00200000L // 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_ADDRESS_CONFLICT 0x00400000L // no object (remove CN from configuration)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// EventType determines the argument of the event // EventType determines the argument of the event
typedef enum typedef enum {
{
kEplEventTypeNmtEvent = 0x01, // NMT event kEplEventTypeNmtEvent = 0x01, // NMT event
// arg is pointer to tEplNmtEvent // arg is pointer to tEplNmtEvent
kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq) kEplEventTypePdoRx = 0x02, // PDO frame received event (PRes/PReq)
...@@ -166,7 +162,7 @@ typedef enum ...@@ -166,7 +162,7 @@ typedef enum
// arg is pointer to tEplDllNodeInfo // arg is pointer to tEplDllNodeInfo
kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase kEplEventTypeDllkDelNode = 0x15, // remove node from isochronous phase
// arg is pointer to unsigned int // arg is pointer to unsigned int
kEplEventTypeDllkSoftDelNode= 0x16, // remove node softly from isochronous phase kEplEventTypeDllkSoftDelNode = 0x16, // remove node softly from isochronous phase
// arg is pointer to unsigned int // arg is pointer to unsigned int
kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN kEplEventTypeDllkStartReducedCycle = 0x17, // start reduced EPL cycle on MN
// arg is pointer to nothing // arg is pointer to nothing
...@@ -175,10 +171,8 @@ typedef enum ...@@ -175,10 +171,8 @@ typedef enum
} tEplEventType; } tEplEventType;
// EventSink determines the consumer of the event // EventSink determines the consumer of the event
typedef enum typedef enum {
{
kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module kEplEventSinkSync = 0x00, // Sync event for application or kernel EPL module
kEplEventSinkNmtk = 0x01, // events for Nmtk module kEplEventSinkNmtk = 0x01, // events for Nmtk module
kEplEventSinkDllk = 0x02, // events for Dllk module kEplEventSinkDllk = 0x02, // events for Dllk module
...@@ -195,10 +189,8 @@ typedef enum ...@@ -195,10 +189,8 @@ typedef enum
} tEplEventSink; } tEplEventSink;
// EventSource determines the source of an errorevent // EventSource determines the source of an errorevent
typedef enum typedef enum {
{
// kernelspace modules // kernelspace modules
kEplEventSourceDllk = 0x01, // Dllk module kEplEventSourceDllk = 0x01, // Dllk module
kEplEventSourceNmtk = 0x02, // Nmtk module kEplEventSourceNmtk = 0x02, // Nmtk module
...@@ -227,44 +219,35 @@ typedef enum ...@@ -227,44 +219,35 @@ typedef enum
} tEplEventSource; } tEplEventSource;
// structure of EPL event (element order must not be changed!) // structure of EPL event (element order must not be changed!)
typedef struct typedef struct {
{ tEplEventType m_EventType /*:28 */ ; // event type
tEplEventType m_EventType /*:28*/; // event type tEplEventSink m_EventSink /*:4 */ ; // event sink
tEplEventSink m_EventSink /*:4*/; // event sink
tEplNetTime m_NetTime; // timestamp tEplNetTime m_NetTime; // timestamp
unsigned int m_uiSize; // size of argument unsigned int m_uiSize; // size of argument
void * m_pArg; // argument of event void *m_pArg; // argument of event
} tEplEvent; } tEplEvent;
// short structure of EPL event without argument and its size (element order must not be changed!) // short structure of EPL event without argument and its size (element order must not be changed!)
typedef struct typedef struct {
{ tEplEventType m_EventType /*:28 */ ; // event type
tEplEventType m_EventType /*:28*/; // event type tEplEventSink m_EventSink /*:4 */ ; // event sink
tEplEventSink m_EventSink /*:4*/; // event sink
tEplNetTime m_NetTime; // timestamp tEplNetTime m_NetTime; // timestamp
} tEplEventShort; } tEplEventShort;
typedef struct {
typedef struct
{
unsigned int m_uiIndex; unsigned int m_uiIndex;
unsigned int m_uiSubIndex; unsigned int m_uiSubIndex;
} tEplEventObdError; } tEplEventObdError;
// structure for kEplEventTypeError // structure for kEplEventTypeError
typedef struct typedef struct {
{
tEplEventSource m_EventSource; // module which posted this error event tEplEventSource m_EventSource; // module which posted this error event
tEplKernel m_EplError; // EPL error which occured tEplKernel m_EplError; // EPL error which occured
union union {
{
BYTE m_bArg; BYTE m_bArg;
DWORD m_dwArg; DWORD m_dwArg;
tEplEventSource m_EventSource; // from Eventk/u module (originating error source) tEplEventSource m_EventSource; // from Eventk/u module (originating error source)
...@@ -275,29 +258,22 @@ typedef struct ...@@ -275,29 +258,22 @@ typedef struct
} tEplEventError; } tEplEventError;
// structure for kEplEventTypeDllError // structure for kEplEventTypeDllError
typedef struct typedef struct {
{
unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_* unsigned long m_ulDllErrorEvents; // EPL_DLL_ERR_*
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
tEplNmtState m_NmtState; tEplNmtState m_NmtState;
} tEplErrorHandlerkEvent; } tEplErrorHandlerkEvent;
// callback function to get informed about sync event // callback function to get informed about sync event
typedef tEplKernel (PUBLIC* tEplSyncCb) (void); typedef tEplKernel(PUBLIC * tEplSyncCb) (void);
// callback function for generic events // callback function for generic events
typedef tEplKernel (PUBLIC* tEplProcessEventCb) (tEplEvent* pEplEvent_p); typedef tEplKernel(PUBLIC * tEplProcessEventCb) (tEplEvent * pEplEvent_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_EVENT_H_ #endif // #ifndef _EPL_EVENT_H_
...@@ -66,18 +66,15 @@ ...@@ -66,18 +66,15 @@
2006/05/22 d.k.: start of the implementation, version 1.00 2006/05/22 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_FRAME_H_ #ifndef _EPL_FRAME_H_
#define _EPL_FRAME_H_ #define _EPL_FRAME_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// defines for EplFrame.m_wFlag // defines for EplFrame.m_wFlag
#define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes) #define EPL_FRAME_FLAG1_RD 0x01 // ready (PReq, PRes)
#define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA) #define EPL_FRAME_FLAG1_ER 0x02 // exception reset (error signalling) (SoA)
...@@ -107,12 +104,10 @@ ...@@ -107,12 +104,10 @@
#define EPL_VERSION_SUB 0x0F // sub version #define EPL_VERSION_SUB 0x0F // sub version
#define EPL_VERSION_MAIN 0xF0 // main version #define EPL_VERSION_MAIN 0xF0 // main version
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// $$$ d.k.: move this definition to global.h // $$$ d.k.: move this definition to global.h
// byte-align structures // byte-align structures
#ifdef _MSC_VER #ifdef _MSC_VER
...@@ -125,9 +120,7 @@ ...@@ -125,9 +120,7 @@
# error you must byte-align these structures with the appropriate compiler directives # error you must byte-align these structures with the appropriate compiler directives
#endif #endif
typedef struct {
typedef struct
{
// Offset 17 // Offset 17
BYTE m_le_bRes1; // reserved BYTE m_le_bRes1; // reserved
// Offset 18 // Offset 18
...@@ -141,8 +134,7 @@ typedef struct ...@@ -141,8 +134,7 @@ typedef struct
} PACK_STRUCT tEplSocFrame; } PACK_STRUCT tEplSocFrame;
typedef struct typedef struct {
{
// Offset 17 // Offset 17
BYTE m_le_bRes1; // reserved BYTE m_le_bRes1; // reserved
// Offset 18 // Offset 18
...@@ -156,12 +148,11 @@ typedef struct ...@@ -156,12 +148,11 @@ typedef struct
// Offset 22 // Offset 22
WORD m_le_wSize; WORD m_le_wSize;
// Offset 24 // Offset 24
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16*/]; BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ];
} PACK_STRUCT tEplPreqFrame; } PACK_STRUCT tEplPreqFrame;
typedef struct typedef struct {
{
// Offset 17 // Offset 17
BYTE m_le_bNmtStatus; // NMT state BYTE m_le_bNmtStatus; // NMT state
// Offset 18 // Offset 18
...@@ -176,12 +167,11 @@ typedef struct ...@@ -176,12 +167,11 @@ typedef struct
WORD m_le_wSize; WORD m_le_wSize;
// Offset 24 // Offset 24
BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 BYTE m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16
/ D_NMT_IsochrTxMaxPayload_U16*/]; / D_NMT_IsochrTxMaxPayload_U16 */ ];
} PACK_STRUCT tEplPresFrame; } PACK_STRUCT tEplPresFrame;
typedef struct typedef struct {
{
// Offset 17 // Offset 17
BYTE m_le_bNmtStatus; // NMT state BYTE m_le_bNmtStatus; // NMT state
// Offset 18 // Offset 18
...@@ -197,8 +187,7 @@ typedef struct ...@@ -197,8 +187,7 @@ typedef struct
} PACK_STRUCT tEplSoaFrame; } PACK_STRUCT tEplSoaFrame;
typedef struct typedef struct {
{
WORD m_wEntryType; WORD m_wEntryType;
WORD m_wErrorCode; WORD m_wErrorCode;
tEplNetTime m_TimeStamp; tEplNetTime m_TimeStamp;
...@@ -206,8 +195,7 @@ typedef struct ...@@ -206,8 +195,7 @@ typedef struct
} PACK_STRUCT tEplErrHistoryEntry; } PACK_STRUCT tEplErrHistoryEntry;
typedef struct typedef struct {
{
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: EN, EC BYTE m_le_bFlag1; // Flags: EN, EC
BYTE m_le_bFlag2; // Flags: PR, RS BYTE m_le_bFlag2; // Flags: PR, RS
...@@ -218,8 +206,7 @@ typedef struct ...@@ -218,8 +206,7 @@ typedef struct
} PACK_STRUCT tEplStatusResponse; } PACK_STRUCT tEplStatusResponse;
typedef struct typedef struct {
{
// Offset 18 // Offset 18
BYTE m_le_bFlag1; // Flags: res BYTE m_le_bFlag1; // Flags: res
BYTE m_le_bFlag2; // Flags: PR, RS BYTE m_le_bFlag2; // Flags: PR, RS
...@@ -251,8 +238,7 @@ typedef struct ...@@ -251,8 +238,7 @@ typedef struct
} PACK_STRUCT tEplIdentResponse; } PACK_STRUCT tEplIdentResponse;
typedef struct typedef struct {
{
// Offset 18 // Offset 18
BYTE m_le_bNmtCommandId; BYTE m_le_bNmtCommandId;
BYTE m_le_bRes1; BYTE m_le_bRes1;
...@@ -260,8 +246,7 @@ typedef struct ...@@ -260,8 +246,7 @@ typedef struct
} PACK_STRUCT tEplNmtCommandService; } PACK_STRUCT tEplNmtCommandService;
typedef struct typedef struct {
{
BYTE m_le_bReserved; BYTE m_le_bReserved;
BYTE m_le_bTransactionId; BYTE m_le_bTransactionId;
BYTE m_le_bFlags; BYTE m_le_bFlags;
...@@ -270,12 +255,10 @@ typedef struct ...@@ -270,12 +255,10 @@ typedef struct
WORD m_le_wReserved; WORD m_le_wReserved;
BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder BYTE m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder
}PACK_STRUCT tEplAsySdoCom; } PACK_STRUCT tEplAsySdoCom;
// asynchronous SDO Sequence Header // asynchronous SDO Sequence Header
typedef struct typedef struct {
{
BYTE m_le_bRecSeqNumCon; BYTE m_le_bRecSeqNumCon;
BYTE m_le_bSendSeqNumCon; BYTE m_le_bSendSeqNumCon;
BYTE m_le_abReserved[2]; BYTE m_le_abReserved[2];
...@@ -283,8 +266,7 @@ typedef struct ...@@ -283,8 +266,7 @@ typedef struct
} PACK_STRUCT tEplAsySdoSeq; } PACK_STRUCT tEplAsySdoSeq;
typedef struct typedef struct {
{
// Offset 18 // Offset 18
BYTE m_le_bNmtCommandId; BYTE m_le_bNmtCommandId;
BYTE m_le_bTargetNodeId; BYTE m_le_bTargetNodeId;
...@@ -292,9 +274,7 @@ typedef struct ...@@ -292,9 +274,7 @@ typedef struct
} PACK_STRUCT tEplNmtRequestService; } PACK_STRUCT tEplNmtRequestService;
typedef union {
typedef union
{
// Offset 18 // Offset 18
tEplStatusResponse m_StatusResponse; tEplStatusResponse m_StatusResponse;
tEplIdentResponse m_IdentResponse; tEplIdentResponse m_IdentResponse;
...@@ -302,12 +282,11 @@ typedef union ...@@ -302,12 +282,11 @@ typedef union
tEplNmtRequestService m_NmtRequestService; tEplNmtRequestService m_NmtRequestService;
tEplAsySdoSeq m_SdoSequenceFrame; tEplAsySdoSeq m_SdoSequenceFrame;
BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16 BYTE m_le_abPayload[256 /*D_NMT_ASndTxMaxPayload_U16
/ D_NMT_ASndRxMaxPayload_U16*/]; / D_NMT_ASndRxMaxPayload_U16 */ ];
} tEplAsndPayload; } tEplAsndPayload;
typedef struct typedef struct {
{
// Offset 17 // Offset 17
BYTE m_le_bServiceId; BYTE m_le_bServiceId;
// Offset 18 // Offset 18
...@@ -315,8 +294,7 @@ typedef struct ...@@ -315,8 +294,7 @@ typedef struct
} PACK_STRUCT tEplAsndFrame; } PACK_STRUCT tEplAsndFrame;
typedef union typedef union {
{
// Offset 17 // Offset 17
tEplSocFrame m_Soc; tEplSocFrame m_Soc;
tEplPreqFrame m_Preq; tEplPreqFrame m_Preq;
...@@ -326,8 +304,7 @@ typedef union ...@@ -326,8 +304,7 @@ typedef union
} tEplFrameData; } tEplFrameData;
typedef struct typedef struct {
{
// Offset 0 // Offset 0
BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes BYTE m_be_abDstMac[6]; // MAC address of the addressed nodes
// Offset 6 // Offset 6
...@@ -350,9 +327,7 @@ typedef struct ...@@ -350,9 +327,7 @@ typedef struct
# pragma pack( pop, packing ) # pragma pack( pop, packing )
#endif #endif
typedef enum {
typedef enum
{
kEplMsgTypeNonEpl = 0x00, kEplMsgTypeNonEpl = 0x00,
kEplMsgTypeSoc = 0x01, kEplMsgTypeSoc = 0x01,
kEplMsgTypePreq = 0x03, kEplMsgTypePreq = 0x03,
...@@ -362,13 +337,8 @@ typedef enum ...@@ -362,13 +337,8 @@ typedef enum
} tEplMsgType; } tEplMsgType;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_FRAME_H_ #endif // #ifndef _EPL_FRAME_H_
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/05/22 d.k.: start of the implementation, version 1.00 2006/05/22 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_INC_H_ #ifndef _EPL_INC_H_
...@@ -77,28 +76,28 @@ ...@@ -77,28 +76,28 @@
// ============================================================================ // ============================================================================
#if defined(WIN32) || defined(_WIN32) #if defined(WIN32) || defined(_WIN32)
#ifdef UNDER_RTSS #ifdef UNDER_RTSS
// RTX header // RTX header
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
#include <rtapi.h> #include <rtapi.h>
#elif __BORLANDC__ #elif __BORLANDC__
// borland C header // borland C header
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
#elif WINCE #elif WINCE
#include <windows.h> #include <windows.h>
#else #else
// MSVC needs to include windows.h at first // MSVC needs to include windows.h at first
// the following defines ar necessary for function prototypes for waitable timers // the following defines ar necessary for function prototypes for waitable timers
#define _WIN32_WINDOWS 0x0401 #define _WIN32_WINDOWS 0x0401
#define _WIN32_WINNT 0x0400 #define _WIN32_WINNT 0x0400
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
#endif #endif
#endif #endif
...@@ -140,14 +139,12 @@ ...@@ -140,14 +139,12 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// IEEE 1588 conformant net time structure // IEEE 1588 conformant net time structure
typedef struct typedef struct {
{
DWORD m_dwSec; DWORD m_dwSec;
DWORD m_dwNanoSec; DWORD m_dwNanoSec;
} tEplNetTime; } tEplNetTime;
#include "EplTarget.h" // target specific functions and definitions #include "EplTarget.h" // target specific functions and definitions
#include "EplAmi.h" #include "EplAmi.h"
...@@ -179,54 +176,53 @@ typedef struct ...@@ -179,54 +176,53 @@ typedef struct
#define EPL_FEATURE_RT1 0x00001000 #define EPL_FEATURE_RT1 0x00001000
#define EPL_FEATURE_RT2 0x00002000 #define EPL_FEATURE_RT2 0x00002000
// generate EPL NMT_FeatureFlags_U32 // generate EPL NMT_FeatureFlags_U32
#ifndef EPL_DEF_FEATURE_ISOCHR #ifndef EPL_DEF_FEATURE_ISOCHR
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) != 0)
#define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR) #define EPL_DEF_FEATURE_ISOCHR (EPL_FEATURE_ISOCHR)
#else #else
#define EPL_DEF_FEATURE_ISOCHR 0 #define EPL_DEF_FEATURE_ISOCHR 0
#endif #endif
#endif #endif
#ifndef EPL_DEF_FEATURE_SDO_ASND #ifndef EPL_DEF_FEATURE_SDO_ASND
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_ASND)) != 0)
#define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND) #define EPL_DEF_FEATURE_SDO_ASND (EPL_FEATURE_SDO_ASND)
#else #else
#define EPL_DEF_FEATURE_SDO_ASND 0 #define EPL_DEF_FEATURE_SDO_ASND 0
#endif #endif
#endif #endif
#ifndef EPL_DEF_FEATURE_SDO_UDP #ifndef EPL_DEF_FEATURE_SDO_UDP
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_UDP)) != 0)
#define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP) #define EPL_DEF_FEATURE_SDO_UDP (EPL_FEATURE_SDO_UDP)
#else #else
#define EPL_DEF_FEATURE_SDO_UDP 0 #define EPL_DEF_FEATURE_SDO_UDP 0
#endif #endif
#endif #endif
#ifndef EPL_DEF_FEATURE_SDO_PDO #ifndef EPL_DEF_FEATURE_SDO_PDO
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_SDO_PDO)) != 0)
#define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO) #define EPL_DEF_FEATURE_SDO_PDO (EPL_FEATURE_SDO_PDO)
#else #else
#define EPL_DEF_FEATURE_SDO_PDO 0 #define EPL_DEF_FEATURE_SDO_PDO 0
#endif #endif
#endif #endif
#ifndef EPL_DEF_FEATURE_PDO_DYN #ifndef EPL_DEF_FEATURE_PDO_DYN
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0)
#define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN) #define EPL_DEF_FEATURE_PDO_DYN (EPL_FEATURE_PDO_DYN)
#else #else
#define EPL_DEF_FEATURE_PDO_DYN 0 #define EPL_DEF_FEATURE_PDO_DYN 0
#endif #endif
#endif #endif
#ifndef EPL_DEF_FEATURE_CFGMA #ifndef EPL_DEF_FEATURE_CFGMA
#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_CFGMA)) != 0)
#define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA) #define EPL_DEF_FEATURE_CFGMA (EPL_FEATURE_CFGMA)
#else #else
#define EPL_DEF_FEATURE_CFGMA 0 #define EPL_DEF_FEATURE_CFGMA 0
#endif #endif
#endif #endif
#define EPL_DEF_FEATURE_FLAGS (EPL_DEF_FEATURE_ISOCHR \ #define EPL_DEF_FEATURE_FLAGS (EPL_DEF_FEATURE_ISOCHR \
...@@ -236,12 +232,10 @@ typedef struct ...@@ -236,12 +232,10 @@ typedef struct
| EPL_DEF_FEATURE_PDO_DYN \ | EPL_DEF_FEATURE_PDO_DYN \
| EPL_DEF_FEATURE_CFGMA) | EPL_DEF_FEATURE_CFGMA)
#ifndef tabentries #ifndef tabentries
#define tabentries(a) (sizeof(a)/sizeof(*(a))) #define tabentries(a) (sizeof(a)/sizeof(*(a)))
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -249,15 +243,14 @@ typedef struct ...@@ -249,15 +243,14 @@ typedef struct
// definitions for DLL export // definitions for DLL export
#if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB) #if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB)
#define EPLDLLEXPORT __declspec (dllexport) #define EPLDLLEXPORT __declspec (dllexport)
#else #else
#define EPLDLLEXPORT #define EPLDLLEXPORT
#endif #endif
// ============================================================================ // ============================================================================
// common debug macros // common debug macros
// ============================================================================ // ============================================================================
...@@ -381,18 +374,12 @@ typedef struct ...@@ -381,18 +374,12 @@ typedef struct
#define EPL_DBGLVL_ALWAYS_TRACE3 DEBUG_LVL_ALWAYS_TRACE3 #define EPL_DBGLVL_ALWAYS_TRACE3 DEBUG_LVL_ALWAYS_TRACE3
#define EPL_DBGLVL_ALWAYS_TRACE4 DEBUG_LVL_ALWAYS_TRACE4 #define EPL_DBGLVL_ALWAYS_TRACE4 DEBUG_LVL_ALWAYS_TRACE4
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_INC_H_ #endif // #ifndef _EPL_INC_H_
This diff is collapsed.
...@@ -66,39 +66,27 @@ ...@@ -66,39 +66,27 @@
2008/11/17 d.k.: start of the implementation 2008/11/17 d.k.: start of the implementation
****************************************************************************/ ****************************************************************************/
#ifndef _EPLLED_H_ #ifndef _EPLLED_H_
#define _EPLLED_H_ #define _EPLLED_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef enum {
typedef enum
{
kEplLedTypeStatus = 0x00, kEplLedTypeStatus = 0x00,
kEplLedTypeError = 0x01, kEplLedTypeError = 0x01,
} tEplLedType; } tEplLedType;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPLLED_H_ #endif // #ifndef _EPLLED_H_
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/06/09 k.t.: start of the implementation 2006/06/09 k.t.: start of the implementation
****************************************************************************/ ****************************************************************************/
#ifndef _EPLNMT_H_ #ifndef _EPLNMT_H_
...@@ -106,8 +105,7 @@ ...@@ -106,8 +105,7 @@
// --> there are masks defined to indentify the // --> there are masks defined to indentify the
// super-states // super-states
typedef enum typedef enum {
{
kEplNmtGsOff = 0x0000, kEplNmtGsOff = 0x0000,
kEplNmtGsInitialising = 0x0019, kEplNmtGsInitialising = 0x0019,
kEplNmtGsResetApplication = 0x0029, kEplNmtGsResetApplication = 0x0029,
...@@ -126,12 +124,10 @@ typedef enum ...@@ -126,12 +124,10 @@ typedef enum
kEplNmtMsReadyToOperate = 0x026D, kEplNmtMsReadyToOperate = 0x026D,
kEplNmtMsOperational = 0x02FD, kEplNmtMsOperational = 0x02FD,
kEplNmtMsBasicEthernet = 0x021E kEplNmtMsBasicEthernet = 0x021E
} tEplNmtState; } tEplNmtState;
// NMT-events // NMT-events
typedef enum typedef enum {
{
// Events from DLL // Events from DLL
// Events defined by EPL V2 specification // Events defined by EPL V2 specification
kEplNmtEventNoEvent = 0x00, kEplNmtEventNoEvent = 0x00,
...@@ -154,8 +150,8 @@ typedef enum ...@@ -154,8 +150,8 @@ typedef enum
kEplNmtEventResetNode = 0x11, kEplNmtEventResetNode = 0x11,
kEplNmtEventResetCom = 0x12, kEplNmtEventResetCom = 0x12,
kEplNmtEventResetConfig = 0x13, kEplNmtEventResetConfig = 0x13,
kEplNmtEventEnterPreOperational2= 0x14, kEplNmtEventEnterPreOperational2 = 0x14,
kEplNmtEventEnableReadyToOperate= 0x15, kEplNmtEventEnableReadyToOperate = 0x15,
kEplNmtEventStartNode = 0x16, // NMT_CT7 kEplNmtEventStartNode = 0x16, // NMT_CT7
kEplNmtEventStopNode = 0x17, kEplNmtEventStopNode = 0x17,
...@@ -178,43 +174,35 @@ typedef enum ...@@ -178,43 +174,35 @@ typedef enum
} tEplNmtEvent; } tEplNmtEvent;
// type for argument of event kEplEventTypeNmtStateChange // type for argument of event kEplEventTypeNmtStateChange
typedef struct typedef struct {
{
tEplNmtState m_NewNmtState; tEplNmtState m_NewNmtState;
tEplNmtEvent m_NmtEvent; tEplNmtEvent m_NmtEvent;
} tEplEventNmtStateChange; } tEplEventNmtStateChange;
// structure for kEplEventTypeHeartbeat // structure for kEplEventTypeHeartbeat
typedef struct typedef struct {
{
unsigned int m_uiNodeId; // NodeId unsigned int m_uiNodeId; // NodeId
tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN) tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN)
WORD m_wErrorCode; // EPL error code in case of NMT state NotActive WORD m_wErrorCode; // EPL error code in case of NMT state NotActive
} tEplHeartbeatEvent; } tEplHeartbeatEvent;
typedef enum {
typedef enum
{
kEplNmtNodeEventFound = 0x00, kEplNmtNodeEventFound = 0x00,
kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN kEplNmtNodeEventUpdateSw = 0x01, // application shall update software on CN
kEplNmtNodeEventCheckConf = 0x02, // application / Configuration Manager shall check and update configuration 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) 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 kEplNmtNodeEventVerifyConf = 0x04, // application / Configuration Manager shall verify configuration of CN
kEplNmtNodeEventReadyToStart= 0x05, // issued if EPL_NMTST_NO_STARTNODE set kEplNmtNodeEventReadyToStart = 0x05, // issued if EPL_NMTST_NO_STARTNODE set
// application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually // application must call EplNmtMnuSendNmtCommand(kEplNmtCmdStartNode) manually
kEplNmtNodeEventNmtState = 0x06, kEplNmtNodeEventNmtState = 0x06,
kEplNmtNodeEventError = 0x07, // NMT error of CN kEplNmtNodeEventError = 0x07, // NMT error of CN
} tEplNmtNodeEvent; } tEplNmtNodeEvent;
typedef enum {
typedef enum
{
kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound kEplNmtNodeCommandBoot = 0x01, // if EPL_NODEASSIGN_START_CN not set it must be issued after kEplNmtNodeEventFound
kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully kEplNmtNodeCommandSwOk = 0x02, // application updated software on CN successfully
kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully kEplNmtNodeCommandSwUpdated = 0x03, // application updated software on CN successfully
...@@ -226,9 +214,7 @@ typedef enum ...@@ -226,9 +214,7 @@ typedef enum
} tEplNmtNodeCommand; } tEplNmtNodeCommand;
typedef enum {
typedef enum
{
kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible kEplNmtBootEventBootStep1Finish = 0x00, // PreOp2 is possible
kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible kEplNmtBootEventBootStep2Finish = 0x01, // ReadyToOp is possible
kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible kEplNmtBootEventCheckComFinish = 0x02, // Operational is possible
...@@ -237,12 +223,8 @@ typedef enum ...@@ -237,12 +223,8 @@ typedef enum
} tEplNmtBootEvent; } tEplNmtBootEvent;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPLNMT_H_ #endif // #ifndef _EPLNMT_H_
This diff is collapsed.
This diff is collapsed.
...@@ -71,48 +71,43 @@ ...@@ -71,48 +71,43 @@
#ifndef _EPLOBJDEF_H_ #ifndef _EPLOBJDEF_H_
#define _EPLOBJDEF_H_ #define _EPLOBJDEF_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// security checks // security checks
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// macros to help building OD // macros to help building OD
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#if (defined (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB) && (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB != FALSE)) #if (defined (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB) && (EPL_OBD_USE_VARIABLE_SUBINDEX_TAB != FALSE))
#define CCM_SUBINDEX_RAM_ONLY(a) a; #define CCM_SUBINDEX_RAM_ONLY(a) a;
#define CCM_SUBINDEX_RAM_ONEOF(a,b) a #define CCM_SUBINDEX_RAM_ONEOF(a,b) a
#else #else
#define CCM_SUBINDEX_RAM_ONLY(a) #define CCM_SUBINDEX_RAM_ONLY(a)
#define CCM_SUBINDEX_RAM_ONEOF(a,b) b #define CCM_SUBINDEX_RAM_ONEOF(a,b) b
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// To prevent unused memory in subindex tables we need this macro. // To prevent unused memory in subindex tables we need this macro.
// But not all compilers support to preset the last struct value followed by a comma. // But not all compilers support to preset the last struct value followed by a comma.
// Compilers which does not support a comma after last struct value has to place in a dummy subindex. // Compilers which does not support a comma after last struct value has to place in a dummy subindex.
#if ((DEV_SYSTEM & _DEV_COMMA_EXT_) != 0) #if ((DEV_SYSTEM & _DEV_COMMA_EXT_) != 0)
#define EPL_OBD_END_SUBINDEX() #define EPL_OBD_END_SUBINDEX()
#define EPL_OBD_MAX_ARRAY_SUBENTRIES 2 #define EPL_OBD_MAX_ARRAY_SUBENTRIES 2
#else #else
#define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL} #define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL}
#define EPL_OBD_MAX_ARRAY_SUBENTRIES 3 #define EPL_OBD_MAX_ARRAY_SUBENTRIES 3
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// globale vars // globale vars
...@@ -123,37 +118,33 @@ ...@@ -123,37 +118,33 @@
// creation of data in ROM memory // creation of data in ROM memory
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
#define EPL_OBD_CREATE_ROM_DATA #define EPL_OBD_CREATE_ROM_DATA
#include "objdict.h" #include "objdict.h"
#undef EPL_OBD_CREATE_ROM_DATA #undef EPL_OBD_CREATE_ROM_DATA
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// creation of data in RAM memory // creation of data in RAM memory
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
#define EPL_OBD_CREATE_RAM_DATA #define EPL_OBD_CREATE_RAM_DATA
#include "objdict.h" #include "objdict.h"
#undef EPL_OBD_CREATE_RAM_DATA #undef EPL_OBD_CREATE_RAM_DATA
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// creation of subindex tables in ROM and RAM // creation of subindex tables in ROM and RAM
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
#define EPL_OBD_CREATE_SUBINDEX_TAB #define EPL_OBD_CREATE_SUBINDEX_TAB
#include "objdict.h" #include "objdict.h"
#undef EPL_OBD_CREATE_SUBINDEX_TAB #undef EPL_OBD_CREATE_SUBINDEX_TAB
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// creation of index tables for generic, manufacturer and device part // creation of index tables for generic, manufacturer and device part
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
#define EPL_OBD_CREATE_INDEX_TAB #define EPL_OBD_CREATE_INDEX_TAB
#include "objdict.h" #include "objdict.h"
#undef EPL_OBD_CREATE_INDEX_TAB #undef EPL_OBD_CREATE_INDEX_TAB
//=========================================================================// //=========================================================================//
// // // //
// P U B L I C F U N C T I O N S // // P U B L I C F U N C T I O N S //
...@@ -174,47 +165,44 @@ ...@@ -174,47 +165,44 @@
// //
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
EPLDLLEXPORT tEplKernel PUBLIC EPL_OBD_INIT_RAM_NAME (tEplObdInitParam MEM* pInitParam_p) EPLDLLEXPORT tEplKernel PUBLIC EPL_OBD_INIT_RAM_NAME(tEplObdInitParam MEM *
pInitParam_p)
{ {
tEplObdInitParam MEM* pInitParam = pInitParam_p; tEplObdInitParam MEM *pInitParam = pInitParam_p;
// check if pointer to parameter structure is valid // check if pointer to parameter structure is valid
// if not then only copy subindex tables below // if not then only copy subindex tables below
if (pInitParam != NULL) if (pInitParam != NULL) {
{
// at first delete all parameters (all pointers will be set zu NULL) // at first delete all parameters (all pointers will be set zu NULL)
EPL_MEMSET (pInitParam, 0, sizeof (tEplObdInitParam)); EPL_MEMSET(pInitParam, 0, sizeof(tEplObdInitParam));
#define EPL_OBD_CREATE_INIT_FUNCTION #define EPL_OBD_CREATE_INIT_FUNCTION
{ {
// inserts code to init pointer to index tables // inserts code to init pointer to index tables
#include "objdict.h" #include "objdict.h"
} }
#undef EPL_OBD_CREATE_INIT_FUNCTION #undef EPL_OBD_CREATE_INIT_FUNCTION
#if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE)) #if (defined (EPL_OBD_USER_OD) && (EPL_OBD_USER_OD != FALSE))
{ {
// to begin no user OD is defined // to begin no user OD is defined
pInitParam_p->m_pUserPart = NULL; pInitParam_p->m_pUserPart = NULL;
} }
#endif #endif
} }
#define EPL_OBD_CREATE_INIT_SUBINDEX
#define EPL_OBD_CREATE_INIT_SUBINDEX
{ {
// inserts code to copy subindex tables // inserts code to copy subindex tables
#include "objdict.h" #include "objdict.h"
} }
#undef EPL_OBD_CREATE_INIT_SUBINDEX #undef EPL_OBD_CREATE_INIT_SUBINDEX
return kEplSuccessful; return kEplSuccessful;
} }
#endif // _EPLOBJDEF_H_ #endif // _EPLOBJDEF_H_
// Die letzte Zeile mu unbedingt eine leere Zeile sein, weil manche Compiler // 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). // damit ein Problem haben, wenn das nicht so ist (z.B. GNU oder Borland C++ Builder).
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/05/22 d.k.: start of the implementation, version 1.00 2006/05/22 d.k.: start of the implementation, version 1.00
****************************************************************************/ ****************************************************************************/
#ifndef _EPL_PDO_H_ #ifndef _EPL_PDO_H_
...@@ -85,22 +84,19 @@ ...@@ -85,22 +84,19 @@
// NodeId for PRes TPDO // NodeId for PRes TPDO
#define EPL_PDO_PRES_NODE_ID 0x00 #define EPL_PDO_PRES_NODE_ID 0x00
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef struct typedef struct {
{ void *m_pVar;
void* m_pVar;
WORD m_wOffset; // in Bits WORD m_wOffset; // in Bits
WORD m_wSize; // in Bits WORD m_wSize; // in Bits
BOOL m_fNumeric; // numeric value -> use AMI functions BOOL m_fNumeric; // numeric value -> use AMI functions
} tEplPdoMapping; } tEplPdoMapping;
typedef struct typedef struct {
{
unsigned int m_uiSizeOfStruct; unsigned int m_uiSizeOfStruct;
unsigned int m_uiPdoId; unsigned int m_uiPdoId;
unsigned int m_uiNodeId; unsigned int m_uiNodeId;
...@@ -114,13 +110,8 @@ typedef struct ...@@ -114,13 +110,8 @@ typedef struct
} tEplPdoParam; } tEplPdoParam;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPL_PDO_H_ #endif // #ifndef _EPL_PDO_H_
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/06/26 k.t.: start of the implementation 2006/06/26 k.t.: start of the implementation
****************************************************************************/ ****************************************************************************/
#include "EplInc.h" #include "EplInc.h"
...@@ -76,7 +75,6 @@ ...@@ -76,7 +75,6 @@
#ifndef _EPLSDO_H_ #ifndef _EPLSDO_H_
#define _EPLSDO_H_ #define _EPLSDO_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -118,9 +116,9 @@ typedef unsigned int tEplSdoConHdl; ...@@ -118,9 +116,9 @@ typedef unsigned int tEplSdoConHdl;
// callback function pointer for Protocol Abstraction Layer to call // callback function pointer for Protocol Abstraction Layer to call
// asynchronuus SDO Sequence Layer // asynchronuus SDO Sequence Layer
typedef tEplKernel (PUBLIC* tEplSequLayerReceiveCb ) ( typedef tEplKernel(PUBLIC * tEplSequLayerReceiveCb) (tEplSdoConHdl ConHdl_p,
tEplSdoConHdl ConHdl_p, tEplAsySdoSeq *
tEplAsySdoSeq* pSdoSeqData_p, pSdoSeqData_p,
unsigned int uiDataSize_p); unsigned int uiDataSize_p);
// handle between asynchronuus SDO Sequence Layer and SDO Command layer // handle between asynchronuus SDO Sequence Layer and SDO Command layer
...@@ -128,51 +126,45 @@ typedef unsigned int tEplSdoSeqConHdl; ...@@ -128,51 +126,45 @@ typedef unsigned int tEplSdoSeqConHdl;
// callback function pointer for asynchronuus SDO Sequence Layer to call // callback function pointer for asynchronuus SDO Sequence Layer to call
// SDO Command layer for received data // SDO Command layer for received data
typedef tEplKernel (PUBLIC* tEplSdoComReceiveCb) ( typedef tEplKernel(PUBLIC *
tEplSdoSeqConHdl SdoSeqConHdl_p, tEplSdoComReceiveCb) (tEplSdoSeqConHdl SdoSeqConHdl_p,
tEplAsySdoCom* pAsySdoCom_p, tEplAsySdoCom * pAsySdoCom_p,
unsigned int uiDataSize_p); unsigned int uiDataSize_p);
// status of connection // status of connection
typedef enum typedef enum {
{
kAsySdoConStateConnected = 0x00, kAsySdoConStateConnected = 0x00,
kAsySdoConStateInitError = 0x01, kAsySdoConStateInitError = 0x01,
kAsySdoConStateConClosed = 0x02, kAsySdoConStateConClosed = 0x02,
kAsySdoConStateAckReceived = 0x03, kAsySdoConStateAckReceived = 0x03,
kAsySdoConStateFrameSended = 0x04, kAsySdoConStateFrameSended = 0x04,
kAsySdoConStateTimeout = 0x05 kAsySdoConStateTimeout = 0x05
} tEplAsySdoConState;
}tEplAsySdoConState;
// callback function pointer for asynchronuus SDO Sequence Layer to call // callback function pointer for asynchronuus SDO Sequence Layer to call
// SDO Command layer for connection status // SDO Command layer for connection status
typedef tEplKernel (PUBLIC* tEplSdoComConCb) ( typedef tEplKernel(PUBLIC * tEplSdoComConCb) (tEplSdoSeqConHdl SdoSeqConHdl_p,
tEplSdoSeqConHdl SdoSeqConHdl_p, tEplAsySdoConState
tEplAsySdoConState AsySdoConState_p); AsySdoConState_p);
// handle between SDO Command layer and application // handle between SDO Command layer and application
typedef unsigned int tEplSdoComConHdl; typedef unsigned int tEplSdoComConHdl;
// status of connection // status of connection
typedef enum typedef enum {
{
kEplSdoComTransferNotActive = 0x00, kEplSdoComTransferNotActive = 0x00,
kEplSdoComTransferRunning = 0x01, kEplSdoComTransferRunning = 0x01,
kEplSdoComTransferTxAborted = 0x02, kEplSdoComTransferTxAborted = 0x02,
kEplSdoComTransferRxAborted = 0x03, kEplSdoComTransferRxAborted = 0x03,
kEplSdoComTransferFinished = 0x04, kEplSdoComTransferFinished = 0x04,
kEplSdoComTransferLowerLayerAbort = 0x05 kEplSdoComTransferLowerLayerAbort = 0x05
} tEplSdoComConState; } tEplSdoComConState;
// SDO Services and Command-Ids from DS 1.0.0 p.152 // SDO Services and Command-Ids from DS 1.0.0 p.152
typedef enum typedef enum {
{
kEplSdoServiceNIL = 0x00, kEplSdoServiceNIL = 0x00,
kEplSdoServiceWriteByIndex = 0x01, kEplSdoServiceWriteByIndex = 0x01,
kEplSdoServiceReadByIndex = 0x02 kEplSdoServiceReadByIndex = 0x02
//-------------------------------- //--------------------------------
// the following services are optional and // the following services are optional and
// not supported now // not supported now
...@@ -196,35 +188,26 @@ typedef enum ...@@ -196,35 +188,26 @@ typedef enum
} tEplSdoServiceType; } tEplSdoServiceType;
// describes if read or write access // describes if read or write access
typedef enum typedef enum {
{
kEplSdoAccessTypeRead = 0x00, kEplSdoAccessTypeRead = 0x00,
kEplSdoAccessTypeWrite = 0x01 kEplSdoAccessTypeWrite = 0x01
} tEplSdoAccessType; } tEplSdoAccessType;
typedef enum typedef enum {
{
kEplSdoTypeAuto = 0x00, kEplSdoTypeAuto = 0x00,
kEplSdoTypeUdp = 0x01, kEplSdoTypeUdp = 0x01,
kEplSdoTypeAsnd = 0x02, kEplSdoTypeAsnd = 0x02,
kEplSdoTypePdo = 0x03 kEplSdoTypePdo = 0x03
} tEplSdoType;
}tEplSdoType; typedef enum {
typedef enum
{
kEplSdoTransAuto = 0x00, kEplSdoTransAuto = 0x00,
kEplSdoTransExpedited = 0x01, kEplSdoTransExpedited = 0x01,
kEplSdoTransSegmented = 0x02 kEplSdoTransSegmented = 0x02
} tEplSdoTransType; } tEplSdoTransType;
// structure to inform application about finish of SDO transfer // structure to inform application about finish of SDO transfer
typedef struct typedef struct {
{
tEplSdoComConHdl m_SdoComConHdl; tEplSdoComConHdl m_SdoComConHdl;
tEplSdoComConState m_SdoComConState; tEplSdoComConState m_SdoComConState;
DWORD m_dwAbortCode; DWORD m_dwAbortCode;
...@@ -233,39 +216,30 @@ typedef struct ...@@ -233,39 +216,30 @@ typedef struct
unsigned int m_uiTargetIndex; // index which was accessed unsigned int m_uiTargetIndex; // index which was accessed
unsigned int m_uiTargetSubIndex; // subindex which was accessed unsigned int m_uiTargetSubIndex; // subindex which was accessed
unsigned int m_uiTransferredByte; // number of bytes transferred unsigned int m_uiTransferredByte; // number of bytes transferred
void* m_pUserArg; // user definable argument pointer void *m_pUserArg; // user definable argument pointer
} tEplSdoComFinished; } tEplSdoComFinished;
// callback function pointer to inform application about connection // callback function pointer to inform application about connection
typedef tEplKernel (PUBLIC* tEplSdoFinishedCb) ( typedef tEplKernel(PUBLIC * tEplSdoFinishedCb) (tEplSdoComFinished *
tEplSdoComFinished* pSdoComFinished_p); pSdoComFinished_p);
// structure to init SDO transfer to Read or Write by Index // structure to init SDO transfer to Read or Write by Index
typedef struct typedef struct {
{
tEplSdoComConHdl m_SdoComConHdl; tEplSdoComConHdl m_SdoComConHdl;
unsigned int m_uiIndex; unsigned int m_uiIndex;
unsigned int m_uiSubindex; unsigned int m_uiSubindex;
void* m_pData; void *m_pData;
unsigned int m_uiDataSize; unsigned int m_uiDataSize;
unsigned int m_uiTimeout; // not used in this version unsigned int m_uiTimeout; // not used in this version
tEplSdoAccessType m_SdoAccessType; tEplSdoAccessType m_SdoAccessType;
tEplSdoFinishedCb m_pfnSdoFinishedCb; tEplSdoFinishedCb m_pfnSdoFinishedCb;
void* m_pUserArg; // user definable argument pointer void *m_pUserArg; // user definable argument pointer
} tEplSdoComTransParamByIndex; } tEplSdoComTransParamByIndex;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPLSDO_H_ #endif // #ifndef _EPLSDO_H_
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
#ifndef _EPLSDOAC_H_ #ifndef _EPLSDOAC_H_
#define _EPLSDOAC_H_ #define _EPLSDOAC_H_
// ========================================================================= // =========================================================================
// SDO abort codes // SDO abort codes
// ========================================================================= // =========================================================================
...@@ -106,7 +105,6 @@ ...@@ -106,7 +105,6 @@
#define EPL_SDOAC_OBJECT_DICTIONARY_NOT_EXIST 0x08000023L #define EPL_SDOAC_OBJECT_DICTIONARY_NOT_EXIST 0x08000023L
#define EPL_SDOAC_CONFIG_DATA_EMPTY 0x08000024L #define EPL_SDOAC_CONFIG_DATA_EMPTY 0x08000024L
#endif // _EPLSDOAC_H_ #endif // _EPLSDOAC_H_
// Die letzte Zeile mu unbedingt eine leere Zeile sein, weil manche Compiler // Die letzte Zeile mu unbedingt eine leere Zeile sein, weil manche Compiler
......
This diff is collapsed.
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
2006/07/06 k.t.: start of the implementation 2006/07/06 k.t.: start of the implementation
****************************************************************************/ ****************************************************************************/
#include "EplInc.h" #include "EplInc.h"
...@@ -75,12 +74,10 @@ ...@@ -75,12 +74,10 @@
#ifndef _EPLTIMER_H_ #ifndef _EPLTIMER_H_
#define _EPLTIMER_H_ #define _EPLTIMER_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// typedef // typedef
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -88,8 +85,7 @@ ...@@ -88,8 +85,7 @@
// type for timer handle // type for timer handle
typedef unsigned long tEplTimerHdl; typedef unsigned long tEplTimerHdl;
typedef struct typedef struct {
{
tEplEventSink m_EventSink; tEplEventSink m_EventSink;
unsigned long m_ulArg; // d.k.: converted to unsigned long because unsigned long m_ulArg; // d.k.: converted to unsigned long because
// it is never accessed as a pointer by the // it is never accessed as a pointer by the
...@@ -101,8 +97,7 @@ typedef struct ...@@ -101,8 +97,7 @@ typedef struct
} tEplTimerArg; } tEplTimerArg;
typedef struct typedef struct {
{
tEplTimerHdl m_TimerHdl; tEplTimerHdl m_TimerHdl;
unsigned long m_ulArg; // d.k.: converted to unsigned long because unsigned long m_ulArg; // d.k.: converted to unsigned long because
// it is never accessed as a pointer by the // it is never accessed as a pointer by the
...@@ -112,14 +107,11 @@ typedef struct ...@@ -112,14 +107,11 @@ typedef struct
} tEplTimerEventArg; } tEplTimerEventArg;
typedef tEplKernel (PUBLIC * tEplTimerkCallback) ( typedef tEplKernel(PUBLIC * tEplTimerkCallback) (tEplTimerEventArg *
tEplTimerEventArg* pEventArg_p); pEventArg_p);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#endif // #ifndef _EPLTIMER_H_ #endif // #ifndef _EPLTIMER_H_
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
#ifndef _EPL_VERSION_H_ #ifndef _EPL_VERSION_H_
#define _EPL_VERSION_H_ #define _EPL_VERSION_H_
// NOTE: // NOTE:
// All version macros should contain the same version number. But do not use // All version macros should contain the same version number. But do not use
// defines instead of the numbers. Because the macro EPL_STRING_VERSION() can not // defines instead of the numbers. Because the macro EPL_STRING_VERSION() can not
...@@ -85,14 +84,13 @@ ...@@ -85,14 +84,13 @@
#define DEFINED_OBJ1018_VERSION EPL_OBJ1018_VERSION (1, 3, 0) #define DEFINED_OBJ1018_VERSION EPL_OBJ1018_VERSION (1, 3, 0)
#define DEFINED_STRING_VERSION EPL_STRING_VERSION (1, 3, 0) #define DEFINED_STRING_VERSION EPL_STRING_VERSION (1, 3, 0)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#define EPL_PRODUCT_NAME "EPL V2" #define EPL_PRODUCT_NAME "EPL V2"
#define EPL_PRODUCT_VERSION DEFINED_STRING_VERSION #define EPL_PRODUCT_VERSION DEFINED_STRING_VERSION
#define EPL_PRODUCT_MANUFACTURER "SYS TEC electronic GmbH" #define EPL_PRODUCT_MANUFACTURER "SYS TEC electronic GmbH"
#define EPL_PRODUCT_KEY "SO-1083" #define EPL_PRODUCT_KEY "SO-1083"
#define EPL_PRODUCT_DESCRIPTION "openPOWERLINK Protocol Stack Source" #define EPL_PRODUCT_DESCRIPTION "openPOWERLINK Protocol Stack Source"
#endif // _EPL_VERSION_H_ #endif // _EPL_VERSION_H_
......
This diff is collapsed.
...@@ -57,59 +57,65 @@ ...@@ -57,59 +57,65 @@
#ifndef _SHBIPC_H_ #ifndef _SHBIPC_H_
#define _SHBIPC_H_ #define _SHBIPC_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Type definitions // Type definitions
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p); typedef int (*tSigHndlrNewData) (tShbInstance pShbInstance_p);
typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p, unsigned int fTimeOut_p); typedef void (*tSigHndlrJobReady) (tShbInstance pShbInstance_p,
unsigned int fTimeOut_p);
#if (TARGET_SYSTEM == _WIN32_) #if (TARGET_SYSTEM == _WIN32_)
#if defined(INLINE_FUNCTION_DEF) #if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION #undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF #define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define SHBIPC_INLINE_ENABLED TRUE #define SHBIPC_INLINE_ENABLED TRUE
#define SHBIPC_INLINED #define SHBIPC_INLINED
#include "ShbIpc-Win32.c" #include "ShbIpc-Win32.c"
#endif #endif
#elif (TARGET_SYSTEM == _LINUX_) #elif (TARGET_SYSTEM == _LINUX_)
#if defined(INLINE_FUNCTION_DEF) #if defined(INLINE_FUNCTION_DEF)
#undef INLINE_FUNCTION #undef INLINE_FUNCTION
#define INLINE_FUNCTION INLINE_FUNCTION_DEF #define INLINE_FUNCTION INLINE_FUNCTION_DEF
#define SHBIPC_INLINE_ENABLED TRUE #define SHBIPC_INLINE_ENABLED TRUE
#define SHBIPC_INLINED #define SHBIPC_INLINED
#include "ShbIpc-LinuxKernel.c" #include "ShbIpc-LinuxKernel.c"
#endif #endif
#endif #endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Prototypes // Prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
tShbError ShbIpcInit (void); tShbError ShbIpcInit(void);
tShbError ShbIpcExit (void); tShbError ShbIpcExit(void);
tShbError ShbIpcAllocBuffer (unsigned long ulBufferSize_p, const char* pszBufferID_p, tShbInstance* ppShbInstance_p, unsigned int* pfShbNewCreated_p); tShbError ShbIpcAllocBuffer(unsigned long ulBufferSize_p,
tShbError ShbIpcReleaseBuffer (tShbInstance pShbInstance_p); const char *pszBufferID_p,
tShbInstance * ppShbInstance_p,
unsigned int *pfShbNewCreated_p);
tShbError ShbIpcReleaseBuffer(tShbInstance pShbInstance_p);
#if !defined(SHBIPC_INLINE_ENABLED) #if !defined(SHBIPC_INLINE_ENABLED)
tShbError ShbIpcEnterAtomicSection (tShbInstance pShbInstance_p); tShbError ShbIpcEnterAtomicSection(tShbInstance pShbInstance_p);
tShbError ShbIpcLeaveAtomicSection (tShbInstance pShbInstance_p); tShbError ShbIpcLeaveAtomicSection(tShbInstance pShbInstance_p);
tShbError ShbIpcStartSignalingNewData (tShbInstance pShbInstance_p, tSigHndlrNewData pfnSignalHandlerNewData_p, tShbPriority ShbPriority_p); tShbError ShbIpcStartSignalingNewData(tShbInstance pShbInstance_p,
tShbError ShbIpcStopSignalingNewData (tShbInstance pShbInstance_p); tSigHndlrNewData
tShbError ShbIpcSignalNewData (tShbInstance pShbInstance_p); pfnSignalHandlerNewData_p,
tShbPriority ShbPriority_p);
tShbError ShbIpcStopSignalingNewData(tShbInstance pShbInstance_p);
tShbError ShbIpcSignalNewData(tShbInstance pShbInstance_p);
tShbError ShbIpcStartSignalingJobReady (tShbInstance pShbInstance_p, unsigned long ulTimeOut_p, tSigHndlrJobReady pfnSignalHandlerJobReady_p); tShbError ShbIpcStartSignalingJobReady(tShbInstance pShbInstance_p,
tShbError ShbIpcSignalJobReady (tShbInstance pShbInstance_p); unsigned long ulTimeOut_p,
tSigHndlrJobReady
pfnSignalHandlerJobReady_p);
tShbError ShbIpcSignalJobReady(tShbInstance pShbInstance_p);
void* ShbIpcGetShMemPtr (tShbInstance pShbInstance_p); void *ShbIpcGetShMemPtr(tShbInstance pShbInstance_p);
#endif #endif
#undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions #undef SHBIPC_INLINE_ENABLED // disable actual inlining of functions
...@@ -117,4 +123,3 @@ void* ShbIpcGetShMemPtr (tShbInstance pShbInstance_p); ...@@ -117,4 +123,3 @@ void* ShbIpcGetShMemPtr (tShbInstance pShbInstance_p);
#define INLINE_FUNCTION // define INLINE_FUNCTION to nothing #define INLINE_FUNCTION // define INLINE_FUNCTION to nothing
#endif // #ifndef _SHBIPC_H_ #endif // #ifndef _SHBIPC_H_
...@@ -57,9 +57,9 @@ ...@@ -57,9 +57,9 @@
#ifndef _SHBLINUXKERNEL_H_ #ifndef _SHBLINUXKERNEL_H_
#define _SHBLINUXKERNEL_H_ #define _SHBLINUXKERNEL_H_
struct sShbMemTable{ struct sShbMemTable {
int m_iBufferId; int m_iBufferId;
void* m_pBuffer; void *m_pBuffer;
struct sShbMemTable *m_psNextMemTableElement; struct sShbMemTable *m_psNextMemTableElement;
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
#ifndef _EPLPROCFS_H_ #ifndef _EPLPROCFS_H_
#define _EPLPROCFS_H_ #define _EPLPROCFS_H_
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// const defines // const defines
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -80,7 +79,6 @@ ...@@ -80,7 +79,6 @@
// types // types
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// function prototypes // function prototypes
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -88,7 +86,4 @@ ...@@ -88,7 +86,4 @@
tEplKernel EplLinProcInit(void); tEplKernel EplLinProcInit(void);
tEplKernel EplLinProcFree(void); tEplKernel EplLinProcFree(void);
#endif // #ifndef _EPLPROCFS_H_ #endif // #ifndef _EPLPROCFS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment