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:
Pavel Kirienko
2014-02-11 12:21:25 +04:00
parent 149ac87a54
commit 78ff31f9ad
6 changed files with 150 additions and 90 deletions
@@ -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
*/