/****************************************************************************** * * Title : primFunc_stopEventTrapping.c * Version 0.0, * * Description: Stop event trapping primitive function. * Related files: * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ /****************************************************************************** * Header files * ******************************************************************************/ #include #include "primFunc_stopEventTrapping.h" #include "fileUtility.h" #include "globalDefinitions.h" #include "uirUtility.h" #include "primParamsUir.h" #include "mainUir.h" #include #include "primFunctionInit.h" /****************************************************************************** * Global functions * ******************************************************************************/ /*============================================================================= * primFunction_stopEventTrapping() *============================================================================= * * * */ ERROR_ID primFunction_stopEventTrapping(PRIM_FUNC_OPTION funcOption, struct PRIM_TABLE *primTable, void *primitive, UINT32 inputParameter, UINT8 slotNumber){ FILE *file; struct MSG_HEAD* primHeader=(struct MSG_HEAD*) primitive; UINT32 *primDataPtr=(UINT32*)((UINT32)primHeader+sizeof(struct MSG_HEAD)); ERROR_ID errorId=SUCCESS; char errorMessage[200]; int status; UINT32 primBodyLength; UINT32 primitiveId; const int panel=global.panel.primEdit[getPrimArrayId(STOP_EVENT_TRAPPING)]; UINT32 i; UINT32 dataLength; char textMessage[200]; char errorText[100]; UINT32 listIndex; int ringIndex; if(R_STOP_EVENT_TRAPPING!=R_STOP_EVENT_TRAPPING_HOST){ ERROR_CHECK(PROGRAM_ERROR, primitive STOP_EVENT_TRAPPING - wrong revision number); return(PROGRAM_ERROR); } switch(funcOption){ case PRIM_PANEL_TO_TABLE: /* NO BREAK HERE!!!*/ case PRIM_PARAMS_TO_TABLE: /* add table headers - don't set indexes!!! */ primTable->inPrimHeader.length=SIZEOF(struct MSG_HEAD); primTable->inPrimHeader.id=STOP_EVENT_TRAPPING; primTable->inPrimHeader.primRevision=R_STOP_EVENT_TRAPPING; primTable->replyLength=0; break; case PRIM_TABLE_TO_PANEL: if(primTable->inPrimHeader.primRevision!=R_STOP_EVENT_TRAPPING){ ERROR_CHECK(PROGRAM_ERROR, primitive STOP_EVENT_TRAPPING - wrong revision number); return(PROGRAM_ERROR); } break; case PRIM_BUILD: /* no input params */ break; case REP_DATA_PROCESS: /* no reply */ break; case WRITE_TO_FILE: file=(FILE*)inputParameter; break; case READ_FROM_FILE: file=(FILE*)inputParameter; break; default: ;//error } return(SUCCESS); } /******************************************************************************/