JackTripWorker Class Reference

Prototype of the worker class that will be cloned through sending threads to the Thread Pool. More...

#include <JackTripWorker.h>

Collaboration diagram for JackTripWorker:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 JackTripWorker (UdpMasterListener *udpmasterlistener)
 The class constructor.
virtual ~JackTripWorker ()
 The class destructor.
void run ()
 Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() ).
bool isSpawning ()
 Check if the Thread is Spawning.
void setJackTrip (int id, uint32_t client_address, uint16_t server_port, uint16_t client_port, int num_channels)
 Sets the JackTripWorker properties.

Private Slots

void slotTest ()

Private Attributes

UdpMasterListenermUdpMasterListener
 Master Listener Socket.
QHostAddress mClientAddress
 Client Address.
uint16_t mServerPort
 Server Ephemeral Incomming Port to use with Client.
uint16_t mClientPort
 Client Outgoing Port. By convention, the receving port will be mClientPort -1.
volatile bool mSpawning
QMutex mMutex
 Mutex to protect mSpawning.
int mID
 ID thread number.
int mNumChans
 Number of Channels.


Detailed Description

Prototype of the worker class that will be cloned through sending threads to the Thread Pool.

This class can be send to the ThreadPool using the start() method. Each time it is sent, it'll became "independent" of the prototype, which means that the prototype state can be changed, and used to send and start another thread into the pool. setAutoDelete must be set to false in order for this to work.


Constructor & Destructor Documentation

JackTripWorker::JackTripWorker ( UdpMasterListener udpmasterlistener  ) 

The class constructor.

JackTripWorker::~JackTripWorker (  )  [virtual]

The class destructor.


Member Function Documentation

void JackTripWorker::run (  ) 

Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() ).

bool JackTripWorker::isSpawning (  ) 

Check if the Thread is Spawning.

Returns:
true is it is spawning, false if it's already running

void JackTripWorker::setJackTrip ( int  id,
uint32_t  client_address,
uint16_t  server_port,
uint16_t  client_port,
int  num_channels 
)

Sets the JackTripWorker properties.

Parameters:
id ID number
address 

void JackTripWorker::slotTest (  )  [inline, private, slot]


Member Data Documentation

Master Listener Socket.

QHostAddress JackTripWorker::mClientAddress [private]

Client Address.

Server Ephemeral Incomming Port to use with Client.

Client Outgoing Port. By convention, the receving port will be mClientPort -1.

volatile bool JackTripWorker::mSpawning [private]

Thread spawning internal lock. If true, the prototype is working on creating (spawning) a new thread

QMutex JackTripWorker::mMutex [private]

Mutex to protect mSpawning.

int JackTripWorker::mID [private]

ID thread number.

Number of Channels.


The documentation for this class was generated from the following files: