/****************************************************************************** * * Title : RccExtControl.h * Version 0.0 * * Description: * Related files: * * Changes: * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ #ifndef RCC_EXT_CONTROL_H /* multiple-inclusion protection */ #define RCC_EXT_CONTROL_H /****************************************************************************** * Header files * ******************************************************************************/ #include /****************************************************************************** * Definitions * ******************************************************************************/ #define SHARED_MEMORY_NAME "RodTestStand" #define DSP_BUFF_SIZE_BYTES 0x40000 #define FILE_NAME_LEN 300 /* description of the shared memory between TestStand and external application */ typedef enum{ CMD_LIST_FILE =1, MLIST_FILE =2, RAW_PRIM_LIST =3, } LIST_TYPE; struct SHARED_MEM{ int slotNumber; /* 5 to 21, except 13 (TIM) */ volatile int executingFlag; /* synchronization flag between TestStand server (clears when list processed) and ext process (sets when input list ready) */ LIST_TYPE listType; char listFileName[FILE_NAME_LEN]; /* CmdList or MList file name */ int numRepetitions; /* numRepetitions==0 means that list is executed once, 1 - twice etc. */ int returnStatus; /* if !=0 execution failed (value returned by TestStand) */ int primBuff[DSP_BUFF_SIZE_BYTES/4]; /* primBuffer copy */ int replyBuff[DSP_BUFF_SIZE_BYTES/4]; /* replyBuffer copy */ }; /****************************************************************************** * Global Variables * ******************************************************************************/ extern struct SHARED_MEM *sharedMemPtr; /****************************************************************************** * Global Function Declarations * ******************************************************************************/ int sharedMemoryOpen(void); int sharedMemoryClose(void); #ifndef I_AM_TEST_STAND /* numRepetitions==0 means that list is executed once, 1 - twice etc. */ int executeMlistFile(int slotNumber, char mlistFileName[], int numRepetitions, double timeoutInSec); int executeCmdListFile(int slotNumber, char cmdListFileName[], int numRepetitions, double timeoutInSec); int executeRawPrimList(int slotNumber, int numRepetitions, double timeoutInSec); #endif /* I_AM_TEST_STAND */ /******************************************************************************/ #endif /* RCC_EXT_CONTROL_H */