#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. |
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.
JackTripWorker::~JackTripWorker | ( | ) | [virtual] |
The class destructor.
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.
void JackTripWorker::slotTest | ( | ) | [inline, private, slot] |
Master Listener Socket.
QHostAddress JackTripWorker::mClientAddress [private] |
Client Address.
uint16_t JackTripWorker::mServerPort [private] |
Server Ephemeral Incomming Port to use with Client.
uint16_t JackTripWorker::mClientPort [private] |
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.
int JackTripWorker::mNumChans [private] |
Number of Channels.