JackTrip
|
Prototype of the worker class that will be cloned through sending threads to the Thread Pool. More...
#include <JackTripWorker.h>
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 | |
UdpMasterListener * | mUdpMasterListener |
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. |
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.
JackTripWorker::JackTripWorker | ( | UdpMasterListener * | udpmasterlistener | ) |
The class constructor.
|
virtual |
The class destructor.
bool JackTripWorker::isSpawning | ( | ) |
Check if the Thread is Spawning.
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.
id | ID number |
address |
|
inlineprivateslot |
|
private |
Client Address.
|
private |
Client Outgoing Port. By convention, the receving port will be mClientPort -1
|
private |
ID thread number.
|
private |
Mutex to protect mSpawning.
|
private |
Number of Channels.
|
private |
Server Ephemeral Incomming Port to use with Client.
|
private |
Thread spawning internal lock. If true, the prototype is working on creating (spawning) a new thread
|
private |
Master Listener Socket.