POK
/home/jaouen/pok_official/pok/trunk/libpok/arinc653/blackboard.c
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 #include <arinc653/types.h>
00021 #include <arinc653/blackboard.h>
00022 #include <middleware/blackboard.h>
00023 
00024  
00025 void CREATE_BLACKBOARD ( 
00026        /*in */ BLACKBOARD_NAME_TYPE     BLACKBOARD_NAME, 
00027        /*in */ MESSAGE_SIZE_TYPE        MAX_MESSAGE_SIZE, 
00028        /*out*/ BLACKBOARD_ID_TYPE       *BLACKBOARD_ID, 
00029        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE )
00030 {
00031    pok_blackboard_id_t  core_id;
00032    pok_ret_t            core_ret;
00033 
00034    core_ret = pok_blackboard_create (BLACKBOARD_NAME, MAX_MESSAGE_SIZE, &core_id);
00035    *RETURN_CODE = core_ret;
00036 }
00037  
00038 void DISPLAY_BLACKBOARD ( 
00039        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00040        /*in */ MESSAGE_ADDR_TYPE        MESSAGE_ADDR,       /* by reference */ 
00041        /*in */ MESSAGE_SIZE_TYPE        LENGTH, 
00042        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE )
00043 {
00044    pok_ret_t core_ret;
00045    core_ret = pok_blackboard_display (BLACKBOARD_ID, MESSAGE_ADDR, LENGTH);
00046    *RETURN_CODE = core_ret;
00047 }
00048  
00049 void READ_BLACKBOARD ( 
00050        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00051        /*in */ SYSTEM_TIME_TYPE         TIME_OUT, 
00052        /*out*/ MESSAGE_ADDR_TYPE        MESSAGE_ADDR, 
00053        /*out*/ MESSAGE_SIZE_TYPE        *LENGTH, 
00054        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE )
00055 {
00056    pok_ret_t core_ret;
00057    core_ret = pok_blackboard_read (BLACKBOARD_ID, TIME_OUT, MESSAGE_ADDR, LENGTH);
00058    *RETURN_CODE = core_ret;
00059 }
00060  
00061 void CLEAR_BLACKBOARD ( 
00062        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00063        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE )
00064 {
00065    (void) BLACKBOARD_ID;
00066    *RETURN_CODE = NOT_AVAILABLE;
00067 }
00068  
00069 void GET_BLACKBOARD_ID ( 
00070        /*in */ BLACKBOARD_NAME_TYPE     BLACKBOARD_NAME, 
00071        /*out*/ BLACKBOARD_ID_TYPE       *BLACKBOARD_ID, 
00072        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE )
00073 {
00074    (void) BLACKBOARD_NAME;
00075    (void) BLACKBOARD_ID;
00076    *RETURN_CODE = NOT_AVAILABLE;
00077 }
00078  
00079 void GET_BLACKBOARD_STATUS ( 
00080        /*in */ BLACKBOARD_ID_TYPE       BLACKBOARD_ID, 
00081        /*out*/ BLACKBOARD_STATUS_TYPE   *BLACKBOARD_STATUS, 
00082        /*out*/ RETURN_CODE_TYPE         *RETURN_CODE )
00083 {
00084    (void) BLACKBOARD_ID;
00085    (void) BLACKBOARD_STATUS;
00086    *RETURN_CODE = NOT_AVAILABLE;
00087 }
00088 #endif