TSP: The Transport Sample Protocol



Datapool Library
[Provider Core Library]

Collaboration diagram for Datapool Library:The datapool library is an internal provider-side TSP API which is used by the GLU in order to push sample data to the Provider Core Library. More...

Functions

void TSP_datapool_delete (TSP_datapool_t **pthis)
 Destroy a datapool.
int32_t TSP_datapool_finalize (TSP_datapool_t *cthis)
 Initialize datapool with provided GLU.
BEGIN_C_DECLS _EXPORT_TSP_PROVIDER
void 
TSP_datapool_get_reverse_list (TSP_datapool_t *cthis, int *nb, int **list)
 Get the reverse list of global_index wanted by some consumers.
void * TSP_datapool_get_symbol_value (TSP_datapool_t *cthis, int provider_global_index)
 Get the address of a value in the datapool.
int32_t TSP_datapool_initialize (TSP_datapool_t *cthis, GLU_handle_t *glu)
 Initialize datapool with provided GLU.
TSP_datapool_t * TSP_datapool_instantiate (GLU_handle_t *glu)
 Get the datapool instance for this GLU.
TSP_datapool_t * TSP_datapool_new (GLU_handle_t *glu)
 Allocation of a datapool.
_EXPORT_TSP_PROVIDER int TSP_datapool_push_commit (TSP_datapool_t *cthis, time_stamp_t time_stamp, GLU_get_state_t state)
 End of push, we commit the whole.
_EXPORT_TSP_PROVIDER int TSP_datapool_push_next_item (TSP_datapool_t *cthis, glu_item_t *item)
 Push GLU data into datapool.


Detailed Description

The datapool library is an internal provider-side TSP API which is used by the GLU in order to push sample data to the Provider Core Library.


Function Documentation

void TSP_datapool_delete ( TSP_datapool_t **  pthis  ) 

Destroy a datapool.

Only used when the sample server is a passive one.

Precondition:
pthis != NULL

(*pthis) != NULL

Parameters:
[in,out] pthis Pointer to the datapool object to be destroyed. The pointee will be nullified on return.
Postcondition:
(*pthis) == NULL.

int32_t TSP_datapool_finalize ( TSP_datapool_t *  cthis  ) 

Initialize datapool with provided GLU.

Parameters:
[in,out] cthis the datapool to be finalized
Returns:
TSP_STATUS_OK on success.

BEGIN_C_DECLS _EXPORT_TSP_PROVIDER void TSP_datapool_get_reverse_list ( TSP_datapool_t *  cthis,
int *  nb,
int **  list 
)

Get the reverse list of global_index wanted by some consumers.

Parameters:
[in] cthis the datapool object
[in] nb pointer on where to store the number of items
[out] list pointer on list of global_index

void* TSP_datapool_get_symbol_value ( TSP_datapool_t *  cthis,
int  provider_global_index 
)

Get the address of a value in the datapool.

Parameters:
cthis The datapool handle
provider_global_index The index of the symbol that is searched
Returns:
The data address

int32_t TSP_datapool_initialize ( TSP_datapool_t *  cthis,
GLU_handle_t glu 
)

Initialize datapool with provided GLU.

This function will allocate internal datapool structure. After this datapool is ready to be used by the refered GLU.

Parameters:
[in,out] cthis the datapool to be initialized
[in,out] glu the GLU to be linked with the datapool
Returns:
TSP_STATUS_OK on success.

TSP_datapool_t* TSP_datapool_instantiate ( GLU_handle_t glu  ) 

Get the datapool instance for this GLU.

When the sample server is an active one, this function work as a singleton. If the global datapool does not exist or was destroyed, a new datapool is created.
Parameters:
[in,out] glu the GLU object. On return the datapool member of the GLU is updated with the retrieved datapool.
Returns:
The datapool handle

TSP_datapool_t* TSP_datapool_new ( GLU_handle_t glu  ) 

Allocation of a datapool.

Parameters:
[in] glu Handle for the GLU that must be linked to this datapool datapool size will be GLU provided number of symbol(s).
Returns:
The datapool object created on success, NULL on failure.

_EXPORT_TSP_PROVIDER int TSP_datapool_push_commit ( TSP_datapool_t *  cthis,
time_stamp_t  time_stamp,
GLU_get_state_t  state 
)

End of push, we commit the whole.

Parameters:
[in,out] cthis the datapool object to commit in.
[in] time_stamp date of datapool items
[in] state ok or error (reconf,eof, ...)

_EXPORT_TSP_PROVIDER int TSP_datapool_push_next_item ( TSP_datapool_t *  cthis,
glu_item_t item 
)

Push GLU data into datapool.

Parameters:
[in,out] cthis the datapool object
[in] item the GLU item to push in the datapool. The item is copied and may be re-used on return.

Framework Home Page.


Beware !! TSP wave is coming...