TSP: The Transport Sample Protocol



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

tsp_consumer.c File Reference

#include "tsp_sys_headers.h"
#include "tsp_consumer.h"
#include "tsp_client.h"
#include "tsp_group.h"
#include "tsp_data_receiver.h"
#include "tsp_sample_ringbuf.h"
#include "tsp_datastruct.h"

Go to the source code of this file.

Defines

#define TSP_CHECK_SESSION(session, ret)
 Quick check for a session validity.


Functions

int TSP_consumer_init (int *argc, char **argv[])
 Initialisation for TSP library.

void TSP_consumer_end (void)
 End of TSP library use call this function when you are done with the librairy.

TSP_provider_tTSP_consumer_connect_url (const char *url)
void TSP_consumer_disconnect_one (TSP_provider_t provider)
 Disconnect one given provider.

void TSP_consumer_connect_all (const char *host_name, TSP_provider_t **providers, int *nb_providers)
 Connects to all found providers on the given host.

void TSP_consumer_disconnect_all (TSP_provider_t providers[])
 Disconnected all found providers.

const char * TSP_consumer_get_connected_name (TSP_provider_t provider)
 Request provider name.

int TSP_consumer_request_open (TSP_provider_t provider, int custom_argc, char *custom_argv[])
 Ask the provider for a new consumer session.

int TSP_consumer_request_close (TSP_provider_t provider)
 Close the session.

int TSP_consumer_request_information (TSP_provider_t provider)
 Request provider information.

const TSP_consumer_information_tTSP_consumer_get_information (TSP_provider_t provider)
 Retrieve the provider list.

int TSP_consumer_request_sample (TSP_provider_t provider, TSP_consumer_symbol_requested_list_t *symbols)
 Ask the provider for a list of symbols.

const TSP_consumer_symbol_requested_list_t * TSP_consumer_get_requested_sample (TSP_provider_t provider)
 Retrieve the symbols requested list.

int TSP_consumer_request_sample_init (TSP_provider_t provider, TSP_sample_callback_t callback, void *user_data)
 Prepare and start the sampling sequence.

int TSP_consumer_request_sample_destroy (TSP_provider_t provider)
 Stop and destroy the sampling sequence.

int TSP_consumer_read_sample (TSP_provider_t provider, TSP_sample_t *sample, int *new_sample)
 Read a sample symbol.


Detailed Description

Header
/cvsroot/tsp/tsp/src/core/driver/tsp_consumer.c,v 1.30 2004/10/06 09:44:38 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.eads.net Component : Consumer

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

Purpose : Main implementation for the TSP consumer library

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

Definition in file tsp_consumer.c.


Define Documentation

#define TSP_CHECK_SESSION session,
ret   ) 
 

Value:

{ \
                if (0 == session) \
                {  \
                        STRACE_ERROR(("The session object is NULL !")) \
                        return (ret); \
                } \
                if( UNDEFINED_CHANNEL_ID == session->channel_id) \
                {  \
                        STRACE_ERROR(("No Channel Id available, the session need to be opened first !")) \
                        return (ret); \
                } \
        }
Quick check for a session validity.

Definition at line 54 of file tsp_consumer.c.

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

Framework Home Page.


Beware !! TSP wave is coming...