Public Member Functions | |
def | __init__ |
Constructor of communicatorThread. | |
def | initSocket |
Creates and binds to a new UDP socket. | |
def | processAnswer |
This function is triggered whenever thread socket receives a packet. | |
def | triggerTimeout |
This function is triggered whenever thread timeouts. | |
Public Attributes | |
peachHost | |
Peach communicator host. | |
peachPort | |
Peach communicator port. | |
timeout | |
Timeout. | |
socket | |
Socket used for connections. | |
Static Public Attributes | |
int | iterationNumberID = 2 |
Communicator iteration number request ID. | |
int | killAllID = 3 |
Communicator kill all request ID. | |
int | pauseID = 4 |
Communicator pause request ID. | |
int | unPauseID = 5 |
Communicator unpause request ID. |
"abstract" communicator thread class, which serves as ancestor for all thread classes, which actually do something.
It contains communicator protocol command IDs and some function which are common for all children classes
def udpcommunicator::communicatorThread::__init__ | ( | self, | ||
host = QHostAddress.LocalHost , |
||||
port = 12559 , |
||||
timeout = 2000 , |
||||
parent = None | ||||
) |
Constructor of communicatorThread.
self | The object pointer. | |
host | Host where peach is listening (uint, not some string represented value) | |
port | Port on which peach is listening | |
timeout | after which thread stops waiting for response and quits | |
parent | parent component (intentionally set as None by default since error may occur when main window instance is used) |
def udpcommunicator::communicatorThread::initSocket | ( | self | ) |
Creates and binds to a new UDP socket.
self | The object pointer. |
def udpcommunicator::communicatorThread::processAnswer | ( | self | ) |
This function is triggered whenever thread socket receives a packet.
After thread finishes emitting retval signal. It exits with status 2, which can be processed later.
self | The object pointer. |
def udpcommunicator::communicatorThread::triggerTimeout | ( | self | ) |
This function is triggered whenever thread timeouts.
It exits with status 1, which can be processed later.
self | The object pointer. |
int udpcommunicator::communicatorThread::iterationNumberID = 2 [static] |
Communicator iteration number request ID.
int udpcommunicator::communicatorThread::killAllID = 3 [static] |
Communicator kill all request ID.
int udpcommunicator::communicatorThread::pauseID = 4 [static] |
Communicator pause request ID.
Peach communicator host.
Peach communicator port.
Socket used for connections.
int udpcommunicator::communicatorThread::unPauseID = 5 [static] |
Communicator unpause request ID.