#include <bulkDataNTGenStreamerThread.h>
List of all members.
Public Member Functions |
| StreamerThread (const char *threadName, const std::string &streamName, const std::string &sendFlowName, const std::string &qosLib, const double &throttling, const double &sendTimeout, const double &ACKTimeout) |
| ~StreamerThread () |
void | send (uint8_t *data, size_t size) |
void | abort () |
void | wait (const char *uid, const ACS::TimeInterval timeout) |
void | run () |
Private Member Functions |
| StreamerThread (const StreamerThread &src) |
StreamerThread & | operator= (const StreamerThread &src) |
Private Attributes |
bool | m_isThreadRunning |
bool | m_isAbort |
std::list< std::pair< uint8_t
*, size_t > > | data_buffers |
std::list< std::pair< uint8_t
*, size_t > > | m_data |
sem_t | m_dataReadySem |
sem_t | m_abortReadySem |
pthread_mutex_t | m_accessMutex |
std::string | m_streamName |
std::string | m_sendFlowName |
std::string | m_qosLib |
BulkDataNTSenderStream * | m_senderStream |
BulkDataNTSenderFlow * | m_sendFlow |
double | m_throttling |
double | m_sendTimeout |
double | m_ACKTimeout |
Static Private Attributes |
static const ACS::TimeInterval | m_accessTimeout = 50000000LLU |
Constructor & Destructor Documentation
AcsBulkdata::StreamerThread::StreamerThread |
( |
const char * |
threadName, |
|
|
const std::string & |
streamName, |
|
|
const std::string & |
sendFlowName, |
|
|
const std::string & |
qosLib, |
|
|
const double & |
throttling, |
|
|
const double & |
sendTimeout, |
|
|
const double & |
ACKTimeout | |
|
) |
| | |
AcsBulkdata::StreamerThread::~StreamerThread |
( |
|
) |
|
Destructor flushes remaining data and stops the thread.
AcsBulkdata::StreamerThread::StreamerThread |
( |
const StreamerThread & |
src |
) |
[private] |
Copy constructor is private, it does not make sense to 'copy' one of these threads.
Member Function Documentation
void AcsBulkdata::StreamerThread::abort |
( |
|
) |
|
Assigment operator is private, it does not make sense to make one of these threads the same as a second one.
void AcsBulkdata::StreamerThread::run |
( |
|
) |
[virtual] |
Get flow number. worker function that handles the incoming data.
Reimplemented from ACS::Thread.
void AcsBulkdata::StreamerThread::send |
( |
uint8_t * |
data, |
|
|
size_t |
size | |
|
) |
| | |
void AcsBulkdata::StreamerThread::wait |
( |
const char * |
uid, |
|
|
const ACS::TimeInterval |
timeout | |
|
) |
| | [inline] |
Waits until a given blob is completed or aborted, it simply invokes wait() on base Streamer class which is actually private.
Member Data Documentation
Abort method waits for thread completion by means of this semaphore.
Data pointers are kept in a container that must be accessed (insert or remove) only while holding this mutex.
Timeout for guarded access operations.
Data to send is kept as a list of pointers to stl vectors. The order in the list is the order in which data should be streamed out.
Data available for retrieval every time this semaphore is available.
Use this flag to signal that the data flow is being aborted.
Use this flag to signal that the thread is being commanded to terminate. Once this flag is unset and the thread gets once more the data-ready semaphore the thread will break its main while-loop.
The documentation for this class was generated from the following file: