JackTrip
Public Member Functions | Private Slots | Private Attributes | List of all members
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]

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

bool JackTripWorker::isSpawning ( )

Check if the Thread is Spawning.

Returns
true is it is spawning, false if it's already running
void JackTripWorker::run ( )

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

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
idID number
address
void JackTripWorker::slotTest ( )
inlineprivateslot

Member Data Documentation

QHostAddress JackTripWorker::mClientAddress
private

Client Address.

uint16_t JackTripWorker::mClientPort
private

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

int JackTripWorker::mID
private

ID thread number.

QMutex JackTripWorker::mMutex
private

Mutex to protect mSpawning.

int JackTripWorker::mNumChans
private

Number of Channels.

uint16_t JackTripWorker::mServerPort
private

Server Ephemeral Incomming Port to use with Client.

volatile bool JackTripWorker::mSpawning
private

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

UdpMasterListener* JackTripWorker::mUdpMasterListener
private

Master Listener Socket.


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