mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 07:33:33 +08:00
TransferBufferManager: using TransferBufferManagerKey instead of plain Node ID, this allows to distinguish transfers of different type from the same Node ID, which is necessary for message broadcasting/unicasting
This commit is contained in:
@@ -4,10 +4,22 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <uavcan/internal/transport/transfer_buffer.hpp>
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
/*
|
||||
* TransferBufferManagerKey
|
||||
*/
|
||||
std::string TransferBufferManagerKey::toString() const
|
||||
{
|
||||
char buf[24];
|
||||
std::snprintf(buf, sizeof(buf), "nid:%i tt:%i", int(node_id_), int(transfer_type_));
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* DynamicTransferBuffer::Block
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user