TSP: The Transport Sample Protocol



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

tsp_const_def.h File Reference

#include "tsp_abs_types.h"

Go to the source code of this file.

Data Structures

struct  TSP_otsp_server_info_t
 Server information struct. More...


Defines

#define TSP_VERSION   1
 TSP Version.

#define TSP_CONSUMER_RINGBUF_SIZE   (1000 * 100) * 10
 Size of ringbuf receiver ex : 1000*100*10 = 10 sec depth for 1000 symbols 100Hz FIXME : calculate the ringbuf depth using the base frequency.

#define TSP_MAX_PERIOD   100000
 Max period that can be asked by a consumer, for a symbol.

#define TSP_DATA_STREAM_SOCKET_FIFO_SIZE   (1024*48)
 Socket in and out fifo depth for Write and Read operations.

#define TSP_STREAM_SENDER_RINGBUF_SIZE   10
 Duration of stream sender fifo in secondes.

#define TSP_DATA_STREAM_MAX_HEADER_SIZE   1024
 used to calculate the socket buffer size

#define TSP_DATA_RECEIVER_BUFFER_SIZE   (1024*512)
 Size of buffer used to receive the data FIXME : autocalculate this with max group size and TSP_DATA_STREAM_MAX_BUFFER_SIZE, for now, we use a huge value :(.

#define TSP_RESERVED_GROUP_EOF   0xFFFFFFFF
 Control messages that can come from a provider, included in the data stream.

#define TSP_RESERVED_GROUP_ASYNCHRONE   0xFFFFFFFE
 FIXME : reserved for futur implementation of async symbols.

#define UNDEFINED_CHANNEL_ID   (-1)
 Init values.

#define XDR_DATA_TYPE_RAW   (1 << (16 + 0))
 FIXME : XDR types.

#define TSP_DATA_TYPE_SYNC   (1 << 0)
 FIXME : Symbol types.

#define TSP_RPC_PROGID_BASE_COUNT   0x31230010
 base RPC PROG_ID that will be used to calculate the PROG ID for each server

#define TSP_RPC_CONNECT_TIMEOUT   60
 Time out for client connection to server (secondes) ) FIXME : not used yet.

#define TSP_MAXHOSTNAMELEN   255
 SUSv2 guarantees that `Host names are limited to 255 bytes, but linux define MAXHOSTNAMELEN to be 64.

#define TSP_ENCODE_DOUBLE_TO_UINT64(val)   (TSP_UINT64_TO_BE (*(uint64_t*)val))
 some macro used to respect indianity between consumer and producer.


Enumerations

enum  TSP_msg_ctrl_t { TSP_MSG_CTRL_EOF, TSP_MSG_CTRL_RECONF, TSP_MSG_CTRL_GLU_DATA_LOST, TSP_MSG_CTRL_CONSUMER_DATA_LOST }
 Control messages that can come from a provider, included in the data stream. More...


Detailed Description

Header
/cvsroot/tsp/tsp/src/core/include/tsp_const_def.h,v 1.24 2004/09/23 16:11:57 tractobob 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 / Provider

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

Purpose : definitions and const that must have a program wide scope -----------------------------------------------------------------------

Definition in file tsp_const_def.h.


Define Documentation

#define TSP_CONSUMER_RINGBUF_SIZE   (1000 * 100) * 10
 

Size of ringbuf receiver ex : 1000*100*10 = 10 sec depth for 1000 symbols 100Hz FIXME : calculate the ringbuf depth using the base frequency.

Definition at line 53 of file tsp_const_def.h.

Referenced by TSP_consumer_request_sample_init().

#define TSP_DATA_RECEIVER_BUFFER_SIZE   (1024*512)
 

Size of buffer used to receive the data FIXME : autocalculate this with max group size and TSP_DATA_STREAM_MAX_BUFFER_SIZE, for now, we use a huge value :(.

Definition at line 99 of file tsp_const_def.h.

Referenced by TSP_data_receiver_create().

#define TSP_DATA_STREAM_MAX_HEADER_SIZE   1024
 

used to calculate the socket buffer size

Definition at line 86 of file tsp_const_def.h.

#define TSP_DATA_STREAM_SOCKET_FIFO_SIZE   (1024*48)
 

Socket in and out fifo depth for Write and Read operations.

Definition at line 75 of file tsp_const_def.h.

Referenced by TSP_stream_receiver_create(), and TSP_stream_sender_create().

#define TSP_DATA_TYPE_SYNC   (1 << 0)
 

FIXME : Symbol types.

Will be used when the consumer will be able to chose sync symbols and async symbols (not implemented). For now only sync implemented

Definition at line 200 of file tsp_const_def.h.

#define TSP_ENCODE_DOUBLE_TO_UINT64 val   )     (TSP_UINT64_TO_BE (*(uint64_t*)val))
 

some macro used to respect indianity between consumer and producer.

FIXME : the default endianity used by the producer should be its endianity so as to be CPU friendly for the producer. At least this should be the default behaviour. Then, a lazy consumer should be able to tell a producer that it wants to receive the data in the its endianity FIXME: Erk: look at Corba CDR-encoding fashion to handle endianity. FIXEM which may be instructive.

Definition at line 296 of file tsp_const_def.h.

#define TSP_MAX_PERIOD   100000
 

Max period that can be asked by a consumer, for a symbol.

Definition at line 66 of file tsp_const_def.h.

#define TSP_MAXHOSTNAMELEN   255
 

SUSv2 guarantees that `Host names are limited to 255 bytes, but linux define MAXHOSTNAMELEN to be 64.

Definition at line 245 of file tsp_const_def.h.

Referenced by TSP_stream_sender_create().

#define TSP_RESERVED_GROUP_ASYNCHRONE   0xFFFFFFFE
 

FIXME : reserved for futur implementation of async symbols.

Definition at line 138 of file tsp_const_def.h.

#define TSP_RESERVED_GROUP_EOF   0xFFFFFFFF
 

Control messages that can come from a provider, included in the data stream.

TSP protocol level. See TSP_msg_ctrl_t

Definition at line 135 of file tsp_const_def.h.

Referenced by TSP_data_sender_send_msg_ctrl().

#define TSP_RPC_CONNECT_TIMEOUT   60
 

Time out for client connection to server (secondes) ) FIXME : not used yet.

Definition at line 238 of file tsp_const_def.h.

#define TSP_RPC_PROGID_BASE_COUNT   0x31230010
 

base RPC PROG_ID that will be used to calculate the PROG ID for each server

Definition at line 233 of file tsp_const_def.h.

#define TSP_STREAM_SENDER_RINGBUF_SIZE   10
 

Duration of stream sender fifo in secondes.

Definition at line 81 of file tsp_const_def.h.

Referenced by TSP_session_create_data_sender_by_channel().

#define TSP_VERSION   1
 

TSP Version.

Definition at line 42 of file tsp_const_def.h.

Referenced by TSP_consumer_request_close(), TSP_consumer_request_information(), TSP_consumer_request_open(), TSP_consumer_request_sample(), TSP_consumer_request_sample_destroy(), and TSP_consumer_request_sample_init().

#define UNDEFINED_CHANNEL_ID   (-1)
 

Init values.

Definition at line 155 of file tsp_const_def.h.

Referenced by TSP_add_session().

#define XDR_DATA_TYPE_RAW   (1 << (16 + 0))
 

FIXME : XDR types.

Will be used when the consumer will be able to chose several symbol types : double, string, raw ...For now only doubles (USER) implemented

Definition at line 190 of file tsp_const_def.h.


Enumeration Type Documentation

enum TSP_msg_ctrl_t
 

Control messages that can come from a provider, included in the data stream.

Program level.

Enumeration values:
TSP_MSG_CTRL_EOF  Message control, end of stream.
TSP_MSG_CTRL_RECONF  Message control, end of stream and list of symbols changed.
TSP_MSG_CTRL_GLU_DATA_LOST  data were lost for all consumers by the GLU (ex : provider too slow)
TSP_MSG_CTRL_CONSUMER_DATA_LOST  data were lost for a consumer (ex : consumer too slow)

Definition at line 108 of file tsp_const_def.h.

Framework Home Page.


Beware !! TSP wave is coming...