TSP: The Transport Sample Protocol



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

bb_core.h File Reference

#include <stdio.h>
#include <sys/sem.h>

Go to the source code of this file.

Data Structures

struct  S_BB
 BlackBoard definition. More...

struct  S_BB_DATADESC
 BlackBoard data descriptor. More...

struct  S_BB_MSG
 BlackBoard message definition. More...


Typedefs

typedef S_BB_DATADESC S_BB_DATADESC_T
 BlackBoard data descriptor.

typedef S_BB_MSG S_BB_MSG_T
 BlackBoard message definition.

typedef S_BB S_BB_T
 BlackBoard definition.


Enumerations

enum  E_BB_TYPE_T
 BlackBoard publishable data type. More...


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_create (S_BB_T **bb, const char *pc_bb_name, int n_data, int data_size)
 Create a blackboard.

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 *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 *filedesc)
 Dump a blackboard to a file stream.

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

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

int 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.h,v 1.5 2004/10/18 20:36:56 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.h. Framework Home Page.


Beware !! TSP wave is coming...