mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
MPI
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user