JackTrip: JackTripWorker Class Reference

JackTrip

Signals | Public Member Functions | 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>`

Inheritance diagram for JackTripWorker:
[legend]
Collaboration diagram for JackTripWorker:
[legend]

## Signals
void | signalRemoveThread ()

## Public Member Functions
| JackTripWorker (UdpMasterListener *udpmasterlistener)
| The class constructor. More...
virtual | ~JackTripWorker ()
| The class destructor. More...
void | run ()
| Implements the Thread Loop. To start the thread, call start() ( DO NOT CALL run() ). More...
bool | isSpawning ()
| Check if the Thread is Spawning. More...
void | setJackTrip (int id, uint32_t client_address, uint16_t server_port, uint16_t client_port, int num_channels)
| Sets the JackTripWorker properties. More...
void | stopThread ()
| Stop and remove thread from pool. More...
int | getID ()

## 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::JackTripWorker | ( | UdpMasterListener * | udpmasterlistener | ) |

The class constructor.

## ◆ ~JackTripWorker()

JackTripWorker::~JackTripWorker | ( |  | ) |
| virtual

The class destructor.

## Member Function Documentation

## ◆ getID()

int JackTripWorker::getID | ( |  | ) |
| inline

## ◆ isSpawning()

bool JackTripWorker::isSpawning | ( |  | ) |

Check if the Thread is Spawning.

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

## ◆ run()

void JackTripWorker::run | ( |  | ) |

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

## ◆ setJackTrip()

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 |

## ◆ signalRemoveThread

void JackTripWorker::signalRemoveThread | ( |  | ) |
| signal

## ◆ stopThread()

void JackTripWorker::stopThread | ( |  | ) |

Stop and remove thread from pool.

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

- src/JackTripWorker.h
- src/JackTripWorker.cpp
- src/release/moc_JackTripWorker.cpp