mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 09:37:21 +02:00
Add a cache to data link layer for control frames with hash
This commit is contained in:
@@ -41,7 +41,8 @@ MessagingInterface::~MessagingInterface() {
|
||||
|
||||
int MessagingInterface::send(uint8_t* buffer, const size_t size, const uint8_t destination, const uint8_t tag, const bool durable) {
|
||||
Flatbuffers::MPIMessageBuilder builder;
|
||||
const auto [mpi_buffer, mpi_size] = builder.build_mpi_message(Messaging::MessageType_PTP, m_config_manager.get_module_id(), destination, m_sequence_number++, durable, tag, std::vector<uint8_t>(buffer, buffer + size));
|
||||
const auto [mpi_buffer, mpi_size] = builder.build_mpi_message(Messaging::MessageType_PTP, m_config_manager.get_module_id(), destination, 0, durable, tag, std::vector<uint8_t>(buffer, buffer + size));
|
||||
// Intentionally set sequence_number = 0 so that the messages can get cached
|
||||
|
||||
m_router->send_msg((uint8_t *)mpi_buffer, mpi_size);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user