TSP: The Transport Sample Protocol



The TSP Abstract API
[TSP Core Libraries]

Collaboration diagram for The TSP Abstract API:The TSP API module is the one which define the TSP global API for both consumer and provider. More...

Data Structures

struct  TSP_answer_extended_information_t
 Answer to TSP_request_extended_information_t. More...
struct  TSP_answer_feature_t
 TSP Answer feature. More...
struct  TSP_answer_open_t
 The TSP answer open is the answer from a TSP request open. More...
struct  TSP_answer_sample_destroy_t
 TSP Answer sample destroy. More...
struct  TSP_answer_sample_init_t
 TSP Answer sample initialisation. More...
struct  TSP_answer_sample_t
 TSP Sample Answer. More...
struct  TSP_async_sample_t
 TSP asynchronous sample definition. More...
struct  TSP_exec_feature_t
 TSP Exec Feature. More...
struct  TSP_extended_info_t
 The TSP extended information structure which is a simple pair of key/value. More...
struct  TSP_request_close_t
 TSP Request close. More...
struct  TSP_request_extended_information_t
 TSP Request Extended Informations. More...
struct  TSP_request_feature_t
 TSP Request feature. More...
struct  TSP_request_information_t
 TSP Request Informations. More...
struct  TSP_request_open_t
 TSP request open. More...
struct  TSP_request_sample_destroy_t
 TSP Request sample destroy. More...
struct  TSP_request_sample_init_t
 TSP Request sample initialisation. More...
struct  TSP_request_sample_t
 TSP Request Sample. More...
struct  TSP_sample_symbol_extended_info_t
 TSP Sample Extended Information. More...
struct  TSP_sample_symbol_info_t
 TSP Sample Information. More...

Typedefs

typedef TSP_extended_info_t TSP_extended_info_list_t
 List of TSP_extended_info_t.
typedef TSP_sample_symbol_extended_info_t TSP_sample_symbol_extended_info_list_t
 List of TSP_sample_symbol_extended_info_t.
typedef TSP_sample_symbol_info_t TSP_sample_symbol_info_list_t
 List of TSP_sample_symbol_info_t.

Enumerations

enum  TSP_datatype_t {
  TSP_TYPE_UNKNOWN = 0, TSP_TYPE_DOUBLE = 1, TSP_TYPE_FLOAT = 2, TSP_TYPE_INT8 = 3,
  TSP_TYPE_INT16 = 4, TSP_TYPE_INT32 = 5, TSP_TYPE_INT64 = 6, TSP_TYPE_UINT8 = 7,
  TSP_TYPE_UINT16 = 8, TSP_TYPE_UINT32 = 9, TSP_TYPE_UINT64 = 10, TSP_TYPE_CHAR = 11,
  TSP_TYPE_UCHAR = 12, TSP_TYPE_RAW = 13
}
 TSP Symbols basic types. More...
enum  TSP_session_state_t {
  TSP_SESSION_STATE_UNKNOWN = 0, TSP_SESSION_STATE_OPENED = 1, TSP_SESSION_STATE_CLOSED = 2, TSP_SESSION_STATE_REQUEST_SAMPLE_OK = 3,
  TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK = 4, TSP_SESSION_STATE_SAMPLING = 5, TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK = 6, TSP_SESSION_STATE_BROKEN_LINK = 7
}
 The different status of a TSP session. More...
enum  TSP_status_t {
  TSP_STATUS_OK = 0, TSP_STATUS_NOK = 1, TSP_STATUS_ERROR_PROVIDER_UNREACHABLE = 2, TSP_STATUS_ERROR_UNKNOWN = 3,
  TSP_STATUS_ERROR_SEE_STRING = 4, TSP_STATUS_ERROR_VERSION = 5, TSP_STATUS_ERROR_SYMBOLS = 6, TSP_STATUS_ERROR_SYMBOL_FILTER = 7,
  TSP_STATUS_ERROR_NOT_SUPPORTED = 8, TSP_STATUS_ERROR_NOT_IMPLEMENTED = 9, TSP_STATUS_ERROR_PGI_UNKNOWN = 10, TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED = 11,
  TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED = 12, TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED = 13, TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED = 14, TSP_STATUS_ERROR_MEMORY_ALLOCATION = 15,
  TSP_STATUS_ERROR_INVALID_CHANNEL_ID = 16, TSP_STATUS_ERROR_NO_MORE_GLU = 17, TSP_STATUS_ERROR_NO_MORE_SESSION = 18, TSP_STATUS_ERROR_GLU_START = 19,
  TSP_STATUS_ERROR_GLU_INITIALIZE = 20, TSP_STATUS_ERROR_BAD_REQUEST_ORDER = 21, TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE = 22, TSP_STATUS_ERROR_THREAD_CREATE = 23 ,
  TSP_STATUS_ERROR_INVALID_REQUEST = 25, TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE = 26, TSP_STATUS_ERROR_CUSTOM_BEGIN = 16384
}
 Status for all functions. More...


Detailed Description

The TSP API module is the one which define the TSP global API for both consumer and provider.

For now this is done through the RPC IDL of the RPC Request Handler, but this should be replaced by a request handler neutral API which will be called by each request handler. The TSP Abstract API directly comes from TSP Specifications, it contains the definition of:

Todo:
Use TSP_status_t ENUM where possible

Add channel id to async_read/write


Typedef Documentation

typedef TSP_extended_info_t TSP_extended_info_list_t

List of TSP_extended_info_t.

typedef TSP_sample_symbol_extended_info_t TSP_sample_symbol_extended_info_list_t

List of TSP_sample_symbol_extended_info_t.

typedef TSP_sample_symbol_info_t TSP_sample_symbol_info_list_t

List of TSP_sample_symbol_info_t.


Enumeration Type Documentation

enum TSP_datatype_t

TSP Symbols basic types.

Enumerator:
TSP_TYPE_UNKNOWN  Unknown is used when type is unknown.

Consumer may use it in its request sample when he does not know the exact type of the symbol (he may only known its name). Provider may use it in answer sample when requested type does not match the one found on provider side.

TSP_TYPE_DOUBLE  An IEEE double precision floating point
TSP_TYPE_FLOAT  An IEEE simple precision floating point
TSP_TYPE_INT8  An 8bit signed integer
TSP_TYPE_INT16  A 16bit signed integer
TSP_TYPE_INT32  A 32bit signed integer
TSP_TYPE_INT64  A 64bit signed integer
TSP_TYPE_UINT8  An 8bit unsigned integer
TSP_TYPE_UINT16  A 16bit unsigned integer
TSP_TYPE_UINT32  A 32bit unsigned integer
TSP_TYPE_UINT64  A 64bit unsigned integer
TSP_TYPE_CHAR  An 8bit signed character
TSP_TYPE_UCHAR  An 8bit unsigned character
TSP_TYPE_RAW  Any type of 8bit size.

For this type no encoding will be done before sending it and no decode will be done on receive. Beware endianity problem when using this.

enum TSP_session_state_t

The different status of a TSP session.

A TSP session is a link between one consumer and one provider.

Enumerator:
TSP_SESSION_STATE_UNKNOWN  This session is probably not initialized.
TSP_SESSION_STATE_OPENED  This session has accepted a valid request open.
TSP_SESSION_STATE_CLOSED  This session has received a valid request close.
TSP_SESSION_STATE_REQUEST_SAMPLE_OK  This session has accepted a valid request sample.
TSP_SESSION_STATE_REQUEST_SAMPLE_INIT_OK  This session has accepted a valid request sample init but sampling did not began (yet) because consumer is not connected yet.
TSP_SESSION_STATE_SAMPLING  Consumer connected and provdier is sending sampling for this session.
TSP_SESSION_STATE_REQUEST_SAMPLE_DESTROY_OK  This session has accepted a valid request sample destroy.
TSP_SESSION_STATE_BROKEN_LINK  Was in sampling state but link goes to broken.

May be a network failure or either party (provider or consumer) crashed or terminate itself without sending request sample destroy and/or request close.

enum TSP_status_t

Status for all functions.

Enumerator:
TSP_STATUS_OK  OK.
TSP_STATUS_NOK  NOK but not an error.
TSP_STATUS_ERROR_PROVIDER_UNREACHABLE  Provider unreachable.

The provider may be stopped or dead.

TSP_STATUS_ERROR_UNKNOWN  Fatal error.
TSP_STATUS_ERROR_SEE_STRING  Means that a detailed error string is provided by the function, and the details of the error are in this string.
TSP_STATUS_ERROR_VERSION  The requested version for the protocol does not match.
TSP_STATUS_ERROR_SYMBOLS  Error with the symbols (asked or returned).
TSP_STATUS_ERROR_SYMBOL_FILTER  The requested symbols filter is ill-formed.
TSP_STATUS_ERROR_NOT_SUPPORTED  The requested feature is not supported (by this particular consumer/provider).
TSP_STATUS_ERROR_NOT_IMPLEMENTED  The requested feature is not implemented.
TSP_STATUS_ERROR_PGI_UNKNOWN  The requested PGI (provider global index is unknown).
TSP_STATUS_ERROR_ASYNC_READ_NOT_ALLOWED  Asynchronous read is not allowed.
TSP_STATUS_ERROR_ASYNC_WRITE_NOT_ALLOWED  Asynchronous write is not allowed.
TSP_STATUS_ERROR_ASYNC_READ_NOT_SUPPORTED  Asynchronous read is not supported.
TSP_STATUS_ERROR_ASYNC_WRITE_NOT_SUPPORTED  Asynchronous write is not supported.
TSP_STATUS_ERROR_MEMORY_ALLOCATION  Memory Allocation error.
TSP_STATUS_ERROR_INVALID_CHANNEL_ID  Provided channel Id is invalid.
TSP_STATUS_ERROR_NO_MORE_GLU  Cannot instantiate a new GLU.
TSP_STATUS_ERROR_NO_MORE_SESSION  Cannot create new TSP Session Maximum reached.
TSP_STATUS_ERROR_GLU_START  Cannot start the GLU.
TSP_STATUS_ERROR_GLU_INITIALIZE  Cannot initialize GLU.
TSP_STATUS_ERROR_BAD_REQUEST_ORDER  The logical ordering of TSP Request was not respected.

E.g. Request Sample Initialize before Request Sample.

TSP_STATUS_ERROR_DATAPOOL_INSTANTIATE  Cannot instantiate new Datapool.
TSP_STATUS_ERROR_THREAD_CREATE  Cannot create new thread.
TSP_STATUS_ERROR_INVALID_REQUEST  The TSP Request content is invalid.
TSP_STATUS_ERROR_EMPTY_REQUEST_SAMPLE  The TSP Request sample is empty.

i.e. no symbol requested.

TSP_STATUS_ERROR_CUSTOM_BEGIN  Value greater than TSP_STATUS_ERROR_CUSTOM_BEGIN may be used by custom TSP providers of consumers without core TSP_STATUS_ERROR_ collision.

Framework Home Page.


Beware !! TSP wave is coming...