mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 09:37:21 +02:00
20 lines
508 B
C++
20 lines
508 B
C++
#include "CommunicationRouter.h"
|
|
|
|
#include <iostream>
|
|
|
|
CommunicationRouter::~CommunicationRouter() {
|
|
vQueueDelete(m_tcp_rx_queue);
|
|
}
|
|
|
|
[[noreturn]] void CommunicationRouter::router_thread(void *args) {
|
|
const auto that = static_cast<CommunicationRouter *>(args);
|
|
|
|
// todo: change to queue set
|
|
char buffer[512];
|
|
while (true) {
|
|
xQueueReceive(that->m_tcp_rx_queue, buffer, portMAX_DELAY);
|
|
that->m_rx_callback(buffer, 512);
|
|
std::cout << "callback" << std::endl;
|
|
}
|
|
}
|