[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tsp-devel] EIF TSP: tsp_consumer_request_sample_destroy
From: |
Eric Noulard |
Subject: |
Re: [Tsp-devel] EIF TSP: tsp_consumer_request_sample_destroy |
Date: |
Wed, 28 Feb 2007 18:48:13 +0100 |
2007/2/28, ZXOPESOGE001, Ext <address@hidden>:
Hello,
Hi Sarah,
[..]
Finally, i would like to launch a new acquisition cycle (without
disconnection to provider).
To do this, I programm the following steps:
1. connection to provider
TSP_consumer_connect_url()
TSP_consumer_request_open(_provider, 0, NULL)
TSP_consumer_request_information(_provider)
information = TSP_consumer_get_information(_provider) (to have tle list of
available symbols)
2.user builds the list of parameters he wants to acquired
--> the list of symbols : _symbols
TSP_consumer_request_sample(_provider,&_symbols);
3.start sampling sequence
TSP_consumer_request_sample_init(_provider, 0, 0)
4.read sample (loop)
tsp_consumer_read_sample()
5.reset the list of parameters he wants to acquired
tsp_consumer_request_sample_destroy(_provider)
6.user builds a new list of parameters and start sampling sequence
TSP_consumer_request_sample(_provider,&_symbols);
TSP_consumer_request_sample_init(_provider, 0, 0);
tsp_consumer_read_sample();
This is the correct TSP request sequence, for what you want to do
and it should work as you expected.
My TSP problem:
When i tell the provider to stop sending sample on calling
tsp_consumer_request_sample_destroy, i have the following stracedebug():
/tsp_stream_sender.c##TSP_streamer_sender_thread_sender##200: End of fifo
thread stream sender
/tsp_session.c##TSP_get_session##117: Channel_id = <0> is session Idx <0>
/tsp_session.c##TSP_get_session##117: Channel_id = <0> is session Idx <0>
/tsp_session.c##TSP_get_session##117: Channel_id = <0> is session Idx <0>
/tsp_session.c##TSP_session_close_session##164: Request Closing session
channel_id = 0
/tsp_session.c##TSP_get_session##117: Channel_id = <0> is session Idx <0>
/tsp_session.c##TSP_session_close_session##173: X_session_nb now = 0.
In this way, it's impossible to ask a new cycle of sampling because the
session is closed.
What kind of tsp requests can I use to stop a sampling acquisition cyle without
close the connection and then restart a new acquisition?
You should use tsp_consumer_request_sample_destroy :))
This looks like a bug in the session state handling on the provider side :((
You should open a bug on the tracker:
https://savannah.nongnu.org/bugs/?group=tsp
Nevertheless could tell us what version of TSP you use?
Moreover could you put STRACE_DEBUG to 3 or 7 on the provider side
and send us the full trace.
This kind of trace should show explicit Session state change like:
"Session was in state <2> goes to <1>"
Numeric value are:
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,
TSP_SESSION_STATE_CLOSE_ON_EOF = 8,
Thanks
Sarah Montigaud
--
Erk