POK
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Thu Jan 15 23:34:13 2009 00015 */ 00016 00017 00018 #ifdef POK_NEEDS_ARINC653_EVENT 00019 00020 #ifndef APEX_EVENT 00021 #define APEX_EVENT 00022 00023 00024 #ifndef POK_NEEDS_ARINC653_PROCESS 00025 #define POK_NEEDS_ARINC653_PROCESS 1 00026 #endif 00027 00028 #include <arinc653/process.h> 00029 00030 /*----------------------------------------------------------------------*/ 00031 /* */ 00032 /* EVENT constant definitions */ 00033 /* */ 00034 /*----------------------------------------------------------------------*/ 00035 /* implementation dependent */ 00036 /* these values are given as example */ 00037 /*------------------------------*/ 00038 /* max nb of events */ 00039 /*------------------------------*/ 00040 #define MAX_NUMBER_OF_EVENTS 63 00041 /*----------------------------------------------------------------------*/ 00042 /* */ 00043 /* EVENT type definitions */ 00044 /* */ 00045 /*----------------------------------------------------------------------*/ 00046 /*------------------------------*/ 00047 /* event ident type */ 00048 /*------------------------------*/ 00049 typedef APEX_INTEGER EVENT_ID_TYPE; 00050 /*------------------------------*/ 00051 /* event state type */ 00052 /*------------------------------*/ 00053 enum EVENT_STATE_VALUE_TYPE { UP, DOWN }; 00054 00055 typedef enum EVENT_STATE_VALUE_TYPE EVENT_STATE_TYPE; 00056 00057 /*------------------------------*/ 00058 /* event name type */ 00059 /*------------------------------*/ 00060 typedef NAME_TYPE EVENT_NAME_TYPE; 00061 /*------------------------------*/ 00062 /* event status type */ 00063 /*------------------------------*/ 00064 typedef struct { 00065 EVENT_STATE_TYPE EVENT_STATE; 00066 WAITING_RANGE_TYPE WAITING_PROCESSES; 00067 } EVENT_STATUS_TYPE; 00068 00069 /*----------------------------------------------------------------------*/ 00070 /* */ 00071 /* event management services */ 00072 /* */ 00073 /*----------------------------------------------------------------------*/ 00074 /*----------------------------------------------------------------------*/ 00075 extern void CREATE_EVENT ( 00076 /*IN */ EVENT_NAME_TYPE EVENT_NAME, 00077 /*OUT*/ EVENT_ID_TYPE *EVENT_ID, 00078 /*OUT*/ RETURN_CODE_TYPE *RETURN_CODE ); 00079 /*----------------------------------------------------------------------*/ 00080 extern void SET_EVENT ( 00081 /*IN */ EVENT_ID_TYPE EVENT_ID, 00082 /*OUT*/ RETURN_CODE_TYPE *RETURN_CODE ); 00083 /*----------------------------------------------------------------------*/ 00084 extern void RESET_EVENT ( 00085 /*IN */ EVENT_ID_TYPE EVENT_ID, 00086 /*OUT*/ RETURN_CODE_TYPE *RETURN_CODE ); 00087 /*----------------------------------------------------------------------*/ 00088 extern void WAIT_EVENT ( 00089 /*IN */ EVENT_ID_TYPE EVENT_ID, 00090 /*IN */ SYSTEM_TIME_TYPE TIME_OUT, 00091 /*OUT*/ RETURN_CODE_TYPE *RETURN_CODE ); 00092 /*----------------------------------------------------------------------*/ 00093 extern void GET_EVENT_ID ( 00094 /*IN */ EVENT_NAME_TYPE EVENT_NAME, 00095 /*OUT*/ EVENT_ID_TYPE *EVENT_ID, 00096 /*OUT*/ RETURN_CODE_TYPE *RETURN_CODE ); 00097 /*----------------------------------------------------------------------*/ 00098 extern void GET_EVENT_STATUS ( 00099 /*IN */ EVENT_ID_TYPE EVENT_ID, 00100 /*OUT*/ EVENT_STATUS_TYPE *EVENT_STATUS , 00101 /*OUT*/ RETURN_CODE_TYPE *RETURN_CODE ); 00102 /*----------------------------------------------------------------------*/ 00103 #endif 00104 #endif