EtherCAT Slave
 
Loading...
Searching...
No Matches
ecSlvSimple.h

EtherCAT® Slave Example interface.

EtherCAT® Slave Example interface.

Author
KUNBUS GmbH

Copyright (c) 2024 KUNBUS GmbH.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer./
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#if !(defined PROTECT_ECSLVSIMPLE_H)
#define PROTECT_ECSLVSIMPLE_H 1
#include <osal.h>
#include "ecSlvApi.h"
#include <ESL_os.h>
/*-----------------------------------------------------------------------------------------
------
------ Includes
------
-----------------------------------------------------------------------------------------*/
{
/* Threads */
#if (defined OSAL_FREERTOS) /* hard to resolve this OS dependency, keep it here */
TaskP_Object mainThreadHandle;
TaskP_Params mainThreadParam;
#elif (defined OSAL_FREERTOS_JACINTO)
TaskP_Handle mainThreadHandle;
TaskP_Params mainThreadParam;
#else
#endif
/* Resources */
void* gpioHandle;
void* remoteHandle;
#if (defined OSAL_LINUX)
struct stat buffer;
uint8_t foeValue;
#endif
#if (defined OSAL_LINUX)
void *pEoEThread;
void *pVnetInterface;
bool eoeConfigured;
#endif
int32_t msec;
int32_t trigger;
uint8_t state;
uint8_t rsvd[3]; /* better be uint32_t aligned */
clock_t prev;
clock_t diff;
uint8_t pdBuffer[128];
#if (defined __cplusplus)
extern "C" {
#endif
#if (defined __cplusplus)
}
#endif
#endif /* PROTECT_ECSLVSIMPLE_H */
void EC_SLV_APP_SS_registerStacklessBoardFunctions(EC_SLV_APP_SS_Application_t *pAppInstance_p)
Register board related functions, which do not use stack handle.
Definition ecSlvSimple.c:2867
void EC_SLV_APP_SS_applicationInit(EC_SLV_APP_SS_Application_t *pAppInstance_p)
Initialize application.
Definition ecSlvSimple.c:3244
void EC_SLV_APP_SS_initBoardFunctions(EC_SLV_APP_SS_Application_t *pAppInstance_p)
Initialize board related functions.
Definition ecSlvSimple.c:2801
Definition ecSlvApiInternal.h:144
Definition ecSlvApiInternal.h:329
Definition ecSlvApiInternal.h:173
uint8_t state
Definition ecSlvSimple.h:90
EC_API_SLV_SCoE_Object_t * pt200FRecObj
Definition ecSlvSimple.h:98
clock_t diff
Definition ecSlvSimple.h:93
void * loopThreadHandle
Definition ecSlvSimple.h:71
EC_API_SLV_SCoE_Object_t * pt0800EnumObj
Definition ecSlvSimple.h:100
EC_API_SLV_Pdo_t * ptRxPdo1600
Definition ecSlvSimple.h:102
uint8_t pdBuffer[128]
Definition ecSlvSimple.h:109
EC_API_SLV_SCoE_Object_t * pt2007RecObj
Definition ecSlvSimple.h:97
void * mainThreadHandle
Definition ecSlvSimple.h:69
EC_API_SLV_Pdo_t * ptRxPdo1601
Definition ecSlvSimple.h:103
void * gpioHandle
Definition ecSlvSimple.h:74
int32_t trigger
Definition ecSlvSimple.h:88
EC_API_SLV_Pdo_t * ptTxPdo1A01
Definition ecSlvSimple.h:105
uint8_t rsvd[3]
Definition ecSlvSimple.h:91
void * ioexpLedHandle
Definition ecSlvSimple.h:76
EC_API_SLV_SCoE_Object_t * pt2002RecObj
Definition ecSlvSimple.h:96
uint32_t selectedPruInstance
Definition ecSlvSimple.h:59
EC_API_SLV_Pdo_t * ptTxPdo1A00
Definition ecSlvSimple.h:104
EC_API_SLV_SHandle_t * ptEcSlvApi
Definition ecSlvSimple.h:107
void * remoteHandle
Definition ecSlvSimple.h:75
EC_API_SLV_SCoE_Object_t * ptRecObjOut
Definition ecSlvSimple.h:95
int32_t msec
Definition ecSlvSimple.h:87
clock_t prev
Definition ecSlvSimple.h:92
EC_API_SLV_SCoE_Object_t * ptA000RecObj
Definition ecSlvSimple.h:99
Definition ecSlvSimple.h:58