POK
/home/jaouen/pok_official/pok/trunk/libpok/include/arinc653/blackboard.h
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_BLACKBOARD
00019 
00020 /*-------------------------------------------------------------------*/ 
00021 /*                                                                   */ 
00022 /* BLACKBOARD constant and type definitions and management services  */ 
00023 /*                                                                   */ 
00024 /*-------------------------------------------------------------------*/ 
00025  
00026 #ifndef APEX_BLACKBOARD 
00027 #define APEX_BLACKBOARD 
00028 
00029 #ifndef POK_NEEDS_ARINC653_PROCESS
00030 #define POK_NEEDS_ARINC653_PROCESS
00031 #endif
00032 
00033 #include <arinc653/types.h>
00034 #include <arinc653/process.h>
00035  
00036 #define  MAX_NUMBER_OF_BLACKBOARDS      SYSTEM_LIMIT_NUMBER_OF_BLACKBOARDS 
00037  
00038 typedef  NAME_TYPE       BLACKBOARD_NAME_TYPE; 
00039  
00040 typedef  APEX_INTEGER    BLACKBOARD_ID_TYPE; 
00041  
00042 typedef  enum { EMPTY = 0, OCCUPIED = 1 } EMPTY_INDICATOR_TYPE; 
00043  
00044 typedef struct { 
00045    EMPTY_INDICATOR_TYPE  EMPTY_INDICATOR; 
00046    MESSAGE_SIZE_TYPE     MAX_MESSAGE_SIZE; 
00047    WAITING_RANGE_TYPE    WAITING_PROCESSES; 
00048 } BLACKBOARD_STATUS_TYPE; 
00049  
00050 extern void CREATE_BLACKBOARD ( 
00051        /*in */ BLACKBOARD_NAME_TYPE     BLACKBOARD_NAME, 
00052        /*in */ MESSAGE_SIZE_TYPE        MAX_MESSAGE_SIZE, 
00053        /*out*/ BLACKBOARD_ID_TYPE       *BLACKBOARD_ID, 
00054        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE ); 
00055  
00056 extern void DISPLAY_BLACKBOARD ( 
00057        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00058        /*in */ MESSAGE_ADDR_TYPE        MESSAGE_ADDR,       /* by reference */ 
00059        /*in */ MESSAGE_SIZE_TYPE        LENGTH, 
00060        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE ); 
00061  
00062 extern void READ_BLACKBOARD ( 
00063        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00064        /*in */ SYSTEM_TIME_TYPE         TIME_OUT, 
00065        /*out*/ MESSAGE_ADDR_TYPE        MESSAGE_ADDR, 
00066        /*out*/ MESSAGE_SIZE_TYPE        *LENGTH, 
00067        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE ); 
00068  
00069 extern void CLEAR_BLACKBOARD ( 
00070        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00071        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE ); 
00072  
00073 extern void GET_BLACKBOARD_ID ( 
00074        /*in */ BLACKBOARD_NAME_TYPE     BLACKBOARD_NAME, 
00075        /*out*/ BLACKBOARD_ID_TYPE       *BLACKBOARD_ID, 
00076        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE ); 
00077  
00078 extern void GET_BLACKBOARD_STATUS ( 
00079        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00080        /*out*/ BLACKBOARD_STATUS_TYPE   *BLACKBOARD_STATUS, 
00081        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE ); 
00082  
00083 #endif 
00084 
00085 #endif