TSP: The Transport Sample Protocol



The BB Simple Library
[BlackBoard (BB)]

Collaboration diagram for The BB Simple Library:A simple way to use blackboard which may be simplier than The BB Core Library. More...

Defines

#define BB_SIMPLE_MSGID_SYNCHRO_COPY   1
 Message id used by an application to notify BB tsp provider to shadow copy the blackboard.
#define BB_SIMPLE_MSGID_SYNCHRO_COPY_ACK   2
 Message id used by BB tsp provider (or even a specialized tsp consumer) in order to notify the application that sampled symbols has been processed.

Functions

void * bb_simple_alias_publish (S_BB_T *bb_simple, const char *var_name, const char *target_var_name, const char *module_name, const int module_instance, E_BB_TYPE_T bb_type, int type_size, int dimension, unsigned long offset)
 Publish an alias in a simple BB.
BEGIN_C_DECLS void * bb_simple_publish (S_BB_T *bb_simple, const char *var_name, const char *module_name, const int module_instance, E_BB_TYPE_T bb_type, int type_size, int dimension)
 Publish data in a simple BB.
void * bb_simple_subscribe (S_BB_T *bb_simple, const char *var_name, const char *module_name, const int module_instance, E_BB_TYPE_T *bb_type, int *type_size, int *dimension)
 Subscribe to a data in simple BB.
int32_t bb_simple_synchro_config (int synchro_type)
 Configure synchronization type (thread or process).
int32_t bb_simple_synchro_go (S_BB_T *bb_simple, int msg_type)
 Send a simple synchro message through the BB message queue.
int32_t bb_simple_synchro_verify (S_BB_T *bb_simple)
 Verification de la synchronisation SIMPLE.
int32_t bb_simple_synchro_wait (S_BB_T *bb_simple, int type_msg)
 Attente d'un message de deblocage de synchronisation SIMPLE.
int32_t bb_simple_thread_synchro_go (int type_msg)
 Envoi d'un message de déblocage de synchronisation SIMPLE (version thread).
int32_t bb_simple_thread_synchro_wait (int type_msg)
 Attente d'un message de déblocage de synchronisation SIMPLE (version thread).


Detailed Description

A simple way to use blackboard which may be simplier than The BB Core Library.

The simple blackboard API is an easy to use publish subscribe interface using simple synchronization primitives.


Define Documentation

#define BB_SIMPLE_MSGID_SYNCHRO_COPY   1

Message id used by an application to notify BB tsp provider to shadow copy the blackboard.

#define BB_SIMPLE_MSGID_SYNCHRO_COPY_ACK   2

Message id used by BB tsp provider (or even a specialized tsp consumer) in order to notify the application that sampled symbols has been processed.

This is an ACKnowlegde message of Synchro COPY. This should not be used by stringent realtime application.


Function Documentation

void* bb_simple_alias_publish ( S_BB_T bb_simple,
const char *  var_name,
const char *  target_var_name,
const char *  module_name,
const int  module_instance,
E_BB_TYPE_T  bb_type,
int  type_size,
int  dimension,
unsigned long  offset 
)

Publish an alias in a simple BB.

This is a normal BB publish operation with an added automatic subscribe facility. If the to be published data already exists in BB then the publish operation automatically triggers the corresponding subscribe operation. If first publish, the data is initialized to 0 if automatically subscribed the data is not initialized by the call and one obtain the previously set value. The name of the variable to be published is mangled using 3 field:

BEGIN_C_DECLS void* bb_simple_publish ( S_BB_T bb_simple,
const char *  var_name,
const char *  module_name,
const int  module_instance,
E_BB_TYPE_T  bb_type,
int  type_size,
int  dimension 
)

Publish data in a simple BB.

This is a normal BB publish operation with an added automatic subscribe facility. If the to be published data already exists in BB then the publish operation automatically triggers the corresponding subscribe operation. If first publish, the data is initialized to 0 if automatically subscribed the data is not initialized by the call and one obtain the previously set value. The name of the variable to be published is mangled using 3 field:

void* bb_simple_subscribe ( S_BB_T bb_simple,
const char *  var_name,
const char *  module_name,
const int  module_instance,
E_BB_TYPE_T bb_type,
int *  type_size,
int *  dimension 
)

Subscribe to a data in simple BB.

This a normal BB subscribe with name mangling just the same as

See also:
bb_simple_publish.
Parameters:
[in] bb_simple a pointer to a valid BB.
[in] var_name the variable name
[in] module_name the name of the module who has published the data
[in] module_instance module instance (-1 if no instance)
[in,out] bb_type en entrée le type de donnée attendu en sortie le type de la donnée trouvée dans le BB.
[out] type_size taille du type récupéré en octet
[in,out] dimension en entrée la taille attendue en sortie la taille effective de la donnée.
Returns:
adresse de la donnée allouée, NULL si allocation impossible.

int32_t bb_simple_synchro_config ( int  synchro_type  ) 

Configure synchronization type (thread or process).

Parameters:
[in] synchro_type 
  • BB_SIMPLE_SYNCHRO_THREAD for POSIX thread synchro
  • BB_SIMPLE_SYNCHRO_PROCESS for Sys V synchro
Returns:
E_OK on success, E_NOK on failure.

int32_t bb_simple_synchro_go ( S_BB_T bb_simple,
int  msg_type 
)

Send a simple synchro message through the BB message queue.

Parameters:
[in,out] bb_simple a pointer to a valid BB.
[in] msg_type le type de message à envoyer pour la synchro
Returns:
E_OK si tout se passe bien

int32_t bb_simple_synchro_verify ( S_BB_T bb_simple  ) 

Verification de la synchronisation SIMPLE.

Parameters:
[in,out] bb_simple a pointer to a valid BB.
Returns:
E_OK si tous les messages de synchro ont ete consommes, E_NOK sinon.

int32_t bb_simple_synchro_wait ( S_BB_T bb_simple,
int  type_msg 
)

Attente d'un message de deblocage de synchronisation SIMPLE.

Parameters:
[in,out] bb_simple a pointer to a valid BB.
[in] type_msg le type de message à recevoir pour la synchro
Returns:
E_OK si tout se passe bien

int32_t bb_simple_thread_synchro_go ( int  type_msg  ) 

Envoi d'un message de déblocage de synchronisation SIMPLE (version thread).

Parameters:
[in] type_msg le type de message à envoyer pour la synchro
Returns:
E_OK si tout se passe bien

int32_t bb_simple_thread_synchro_wait ( int  type_msg  ) 

Attente d'un message de déblocage de synchronisation SIMPLE (version thread).

Parameters:
[in] type_msg le type de message à recevoir pour la synchro
Returns:
E_OK si tout se passe bien

Framework Home Page.


Beware !! TSP wave is coming...