* This function implements the main thread loop and enough decision logic so that it knows which device to take messages from and which device to send the messages to.\r
* \r
*/\r
* This function implements the main thread loop and enough decision logic so that it knows which device to take messages from and which device to send the messages to.\r