AcsBulkdata::StreamerThread

NAME
SYNOPSIS
Constructor & Destructor Documentation
Member Function Documentation
Member Data Documentation
Author

NAME

AcsBulkdata::StreamerThread −

SYNOPSIS

#include <bulkDataNTGenStreamerThread.h>

Inherits ACS::Thread.

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) constructor.

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 () Stop flow.

StreamerThread& AcsBulkdata::StreamerThread::operator= (const StreamerThread & src) [private] 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) Send data.

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

std::list< std::pair<uint8_t *, size_t> > AcsBulkdata::StreamerThread::data_buffers [private]

sem_t AcsBulkdata::StreamerThread::m_abortReadySem [private] Abort method waits for thread completion by means of this semaphore.

pthread_mutex_t AcsBulkdata::StreamerThread::m_accessMutex [private] Data pointers are kept in a container that must be accessed (insert or remove) only while holding this mutex.

const ACS::TimeInterval AcsBulkdata::StreamerThread::m_accessTimeout = 50000000LLU [static, private] Timeout for guarded access operations.

double AcsBulkdata::StreamerThread::m_ACKTimeout [private]

std::list< std::pair<uint8_t *, size_t> > AcsBulkdata::StreamerThread::m_data [private] 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.

sem_t AcsBulkdata::StreamerThread::m_dataReadySem [private] Data available for retrieval every time this semaphore is available.

bool AcsBulkdata::StreamerThread::m_isAbort [private] Use this flag to signal that the data flow is being aborted.

bool AcsBulkdata::StreamerThread::m_isThreadRunning [private] 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.

std::string AcsBulkdata::StreamerThread::m_qosLib [private]

BulkDataNTSenderStream* AcsBulkdata::StreamerThread::m_senderStream [private]

BulkDataNTSenderFlow* AcsBulkdata::StreamerThread::m_sendFlow [private]

std::string AcsBulkdata::StreamerThread::m_sendFlowName [private]

double AcsBulkdata::StreamerThread::m_sendTimeout [private]

std::string AcsBulkdata::StreamerThread::m_streamName [private]

double AcsBulkdata::StreamerThread::m_throttling [private]

Author

Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code.