TSP: The Transport Sample Protocol



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

tsp_stream_receiver.h File Reference

#include "tsp_prjcfg.h"

Go to the source code of this file.

Typedefs

typedef void * TSP_stream_receiver_t
 The receiver handle.


Functions

TSP_stream_receiver_t TSP_stream_receiver_create (const char *data_address)
 Creation of a stream receiver object.

void TSP_stream_receiver_destroy (TSP_stream_receiver_t receiver)
 Destroy a stream receiver object.

void TSP_stream_receiver_prepare_stop (TSP_stream_receiver_t receiver)
 Prepare the receiver to stop.

void TSP_stream_receiver_stop (TSP_stream_receiver_t receiver)
 Stop receiving data.

int TSP_stream_receiver_is_stopped (TSP_stream_receiver_t receiver)
 Tell if a receiver was stopped.

int TSP_stream_receiver_receive (TSP_stream_receiver_t receiver, char *buffer, int bufferLen)
 Receiver a data packet.


Detailed Description

Header
/cvsroot/tsp/tsp/src/core/driver/tsp_stream_receiver.h,v 1.4 2002/12/24 14:14:25 tntdev 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 : Interface for the functions that receive the data stream from the producer for the asked symbols. This layer is the network layer and uses sockets -----------------------------------------------------------------------

Definition in file tsp_stream_receiver.h.


Typedef Documentation

typedef void* TSP_stream_receiver_t
 

The receiver handle.

Definition at line 44 of file tsp_stream_receiver.h.

Referenced by TSP_stream_receiver_create(), TSP_stream_receiver_destroy(), TSP_stream_receiver_is_stopped(), TSP_stream_receiver_prepare_stop(), TSP_stream_receiver_receive(), and TSP_stream_receiver_stop().


Function Documentation

TSP_stream_receiver_t TSP_stream_receiver_create const char *  data_address  ) 
 

Creation of a stream receiver object.

Parameters:
data_address The data adresse encoder by the stream_sender on the provider side (actually this string is 'hostname:port', but could be anything else whith an other protocol)
Returns:
The receiver handle. O when an error occured.

<For strtok_r

Definition at line 61 of file tsp_stream_receiver.c.

References TSP_DATA_STREAM_SOCKET_FIFO_SIZE, and TSP_stream_receiver_t.

Referenced by TSP_data_receiver_create().

void TSP_stream_receiver_destroy TSP_stream_receiver_t  receiver  ) 
 

Destroy a stream receiver object.

Parameters:
receiver handle that must be destroyed

Definition at line 226 of file tsp_stream_receiver.c.

References TSP_stream_receiver_t.

Referenced by TSP_data_receiver_destroy().

int TSP_stream_receiver_is_stopped TSP_stream_receiver_t  receiver  ) 
 

Tell if a receiver was stopped.

Parameters:
receiver handle
Returns:
TRUE of FALSE. TRUE = receiver stopped

Definition at line 240 of file tsp_stream_receiver.c.

References TSP_stream_receiver_t.

Referenced by TSP_data_receiver_receive().

void TSP_stream_receiver_prepare_stop TSP_stream_receiver_t  receiver  ) 
 

Prepare the receiver to stop.

This function set the receiver in a state, where the it does not complain if the socket is broken by the provider stream sender.

Parameters:
receiver handle

Definition at line 195 of file tsp_stream_receiver.c.

References TSP_stream_receiver_t.

Referenced by TSP_data_receiver_prepare_stop().

int TSP_stream_receiver_receive TSP_stream_receiver_t  receiver,
char *  buffer,
int  bufferLen
 

Receiver a data packet.

Parameters:
receiver handle
buffer The data reception buffer
bufferLen The length of data (in bytes) in the buffer
Returns:
TRUE of FALSE. TRUE = OK.

Definition at line 249 of file tsp_stream_receiver.c.

References TSP_stream_receiver_t.

Referenced by TSP_data_receiver_receive().

void TSP_stream_receiver_stop TSP_stream_receiver_t  receiver  ) 
 

Stop receiving data.

Parameters:
receiver handle

Definition at line 210 of file tsp_stream_receiver.c.

References TSP_stream_receiver_t.

Referenced by TSP_data_receiver_stop().

Framework Home Page.


Beware !! TSP wave is coming...