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 #ifndef __POK_USER_BLACKBOARD_H__ 00019 #define __POK_USER_BLACKBOARD_H__ 00020 00021 #ifdef POK_NEEDS_MIDDLEWARE 00022 #ifdef POK_NEEDS_BLACKBOARDS 00023 00024 #include <types.h> 00025 #include <errno.h> 00026 00027 typedef struct 00028 { 00029 pok_size_t size; 00030 pok_bool_t empty; 00031 pok_range_t waiting_processes; 00032 pok_size_t index; 00033 pok_bool_t ready; 00034 pok_event_id_t lock; 00035 }pok_blackboard_t; 00036 00037 typedef struct 00038 { 00039 pok_port_size_t msg_size; 00040 pok_bool_t empty; 00041 pok_range_t waiting_processes; 00042 }pok_blackboard_status_t; 00043 00044 00045 pok_ret_t pok_blackboard_create (char* name, 00046 const pok_size_t msg_size, 00047 pok_blackboard_id_t* id); 00048 00049 pok_ret_t pok_blackboard_read (const pok_blackboard_id_t id, 00050 const uint64_t timeout, 00051 void* data, 00052 pok_port_size_t* len); 00053 00054 pok_ret_t pok_blackboard_display (const pok_blackboard_id_t id, 00055 const void* message, 00056 const pok_port_size_t len); 00057 00058 pok_ret_t pok_blackboard_clear (const pok_blackboard_id_t id); 00059 00060 pok_ret_t pok_blackboard_id (char* name, 00061 pok_blackboard_id_t* id); 00062 00063 pok_ret_t pok_blackboard_status (const pok_blackboard_id_t id, 00064 pok_blackboard_status_t* status); 00065 #endif 00066 #endif 00067 #endif 00068