TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

bb_core.c File Reference

#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
#include <assert.h>
#include <ctype.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <bb_core.h>
#include <bb_utils.h>
#include "tsp_abs_types.h"

Go to the source code of this file.

Functions

int32_t bb_size (const int32_t n_data, const int32_t data_size)
 Return the size of a blackboard with n_data publishable elements with a data zone of size data_size byte.

int32_t bb_find (volatile S_BB_T *bb, const char *var_name)
 Search a variable within a BlackBoard.

S_BB_DATADESC_Tbb_data_desc (volatile S_BB_T *bb)
 Return a pointer to the beginning of the data descriptor array of the specified BB.

void * bb_data (volatile S_BB_T *bb)
 Return a pointer to the beginning of the data array of the specified BB.

double bb_double_of (void *value, E_BB_TYPE_T bbtype)
 Return a double value from the pointer value considered as the bbtype.

int32_t bb_data_initialise (volatile S_BB_T *bb, S_BB_DATADESC_T *data_desc, void *default_value)
 Initialise a freshly created structure to a default value.

int32_t bb_data_print (volatile S_BB_T *bb, S_BB_DATADESC_T data_desc, FILE *pf)
 Print the content of a data descriptor.

int32_t bb_destroy (S_BB_T **bb)
 Destroy a blackboard.

int32_t bb_lock (volatile S_BB_T *bb)
 Lock blackboard.

int32_t bb_unlock (volatile S_BB_T *bb)
 Unlock blackboard.

int32_t bb_attach (S_BB_T **bb, const char *pc_bb_name)
 Attach to an existing blackboard.=.

int32_t bb_detach (S_BB_T **bb)
 Detach from blackboard.

void * bb_publish (volatile S_BB_T *bb, S_BB_DATADESC_T *data_desc)
 Publish a data in a blackboard.

void * bb_subscribe (volatile S_BB_T *bb, S_BB_DATADESC_T *data_desc)
 Subscribe to blackboard data.

int32_t bb_dump (volatile S_BB_T *bb, FILE *p_filedesc)
 Dump a blackboard to a file stream.

int32_t bb_get_nb_max_item (volatile S_BB_T *bb)
 Return the maximum number of data that could be published in blackboard.

int32_t bb_get_nb_item (volatile S_BB_T *bb)
 Return the number of data that are currently published in blackboard.

int32_t bb_get_mem_size (volatile S_BB_T *bb)
 Return the memory occupation (in byte) of a blackboard.

int32_t bb_shadow_get (S_BB_T *bb_shadow, volatile S_BB_T *bb_src)
 Ask for a shadow blackboard creation.

int32_t bb_shadow_update_data (S_BB_T *bb_shadow, volatile S_BB_T *bb_src)
 Update the data zone of a shadow blackboard.

int32_t bb_msg_id (volatile S_BB_T *bb)
 Return the BB message queue identifier.

int32_t bb_snd_msg (volatile S_BB_T *bb, S_BB_MSG_T *msg)
 Send message through BB msg queue.

int32_t bb_rcv_msg (volatile S_BB_T *bb, S_BB_MSG_T *msg)
 Receive a message on the BB message queue.


Detailed Description

Header
/cvsroot/tsp/tsp/src/util/libbb/bb_core.c,v 1.7 2004/11/02 19:31:30 erk Exp

-----------------------------------------------------------------------

TSP Library - core components for a generic Transport Sampling Protocol.

Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-----------------------------------------------------------------------

Project : TSP Maintainer : tsp@astrium-space.com Component : Consumer

-----------------------------------------------------------------------

Purpose : Blackboard Idiom implementation

-----------------------------------------------------------------------

Definition in file bb_core.c. Framework Home Page.


Beware !! TSP wave is coming...