]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - apps/tidep0079.git/blob - EC_Master_SysBios_Am572x/Examples/EcMasterDemo/ATEMDemo.h
EC-Mater + TTS (PDK1.0.6 PSDK3.3.0.4)
[apps/tidep0079.git] / EC_Master_SysBios_Am572x / Examples / EcMasterDemo / ATEMDemo.h
1 /*-----------------------------------------------------------------------------
2  * ATEMDemo.h
3  * Copyright                acontis technologies GmbH, Weingarten, Germany
4  * Response                 Stefan Zintgraf
5  * Description              EtherCAT Master demo header
6  *---------------------------------------------------------------------------*/
8 /*-INCLUDES------------------------------------------------------------------*/
9 #include "ATEMDemoConfig.h"
10 #include "ecatNotification.h"
11 #include "ecatDemoCommon.h"
12 #ifdef VXWORKS
13 #include "wvLib.h"
14 #endif
16 /*-MACROS--------------------------------------------------------------------*/
18 /*-DEFINES-------------------------------------------------------------------*/
19 #define MAX_LINKLAYER 5
21 #if (defined EC_SOCKET_SUPPORTED)
22 /* the RAS server is necessary to support the EC-Engineer or other remote applications */
23   #define ATEMRAS_SERVER
24 #endif
25 #define REMOTE_WD_TO_LIMIT          10000
26 #define REMOTE_CYCLE_TIME           2
28 /*-FORWARD DECLARATIONS------------------------------------------------------*/
29 EC_T_DWORD ATEMDemo(
30      CAtEmLogging*       poLog
31     ,EC_T_CNF_TYPE       eCnfType
32     ,EC_T_PBYTE          pbyCnfData
33     ,EC_T_DWORD          dwCnfDataLen
34     ,EC_T_DWORD          dwBusCycleTimeUsec
35     ,EC_T_INT            nVerbose
36     ,EC_T_DWORD          dwDuration
37     ,EC_T_LINK_PARMS*    poLinkParms
38     ,EC_T_VOID*          pvTimingEvent
39     ,EC_T_DWORD          dwCpuIndex
40     ,EC_T_BOOL           bEnaPerfJobs
41 #ifdef ATEMRAS_SERVER 
42     ,EC_T_WORD           wServerPort
43 #endif
44     ,EC_T_LINK_PARMS* poLinkParmsRed
45     );
47 /*--------------------------------------------------------------------------*/
48 /* Performance measurements of jobs                                         */
49 /* This is only available on CPUs with TSC support                          */
50 /*--------------------------------------------------------------------------*/
52 #define JOB_ProcessAllRxFrames  0
53 #define JOB_SendAllCycFrames    1
54 #define JOB_MasterTimer         2
55 #define JOB_SendAcycFrames      3
56 #define PERF_CycleTime          4
57 #define PERF_myAppWorkpd        5
58 #define MAX_JOB_NUM             6
60 #define PERF_MEASURE_JOBS_INIT(msgcb)   ecatPerfMeasInit(&S_TscMeasDesc,0,MAX_JOB_NUM,msgcb);ecatPerfMeasEnable(&S_TscMeasDesc)
61 #define PERF_MEASURE_JOBS_DEINIT()      ecatPerfMeasDeinit(&S_TscMeasDesc)
62 #define PERF_MEASURE_JOBS_SHOW()        ecatPerfMeasShow(&S_TscMeasDesc,0xFFFFFFFF,S_aszMeasInfo)
63 #define PERF_JOB_START(nJobIndex)       ecatPerfMeasStart(&S_TscMeasDesc,(EC_T_DWORD)(nJobIndex))
64 #define PERF_JOB_END(nJobIndex)         ecatPerfMeasEnd(&S_TscMeasDesc,(EC_T_DWORD)(nJobIndex))
66 /*-END OF SOURCE FILE--------------------------------------------------------*/