mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 05:13:34 +08:00
IncomingTransfer implements ITransferBuffer, which is necessary for message codec
This commit is contained in:
@@ -19,7 +19,7 @@ namespace uavcan
|
||||
/**
|
||||
* Container for received transfer.
|
||||
*/
|
||||
class IncomingTransfer
|
||||
class IncomingTransfer : public ITransferBuffer
|
||||
{
|
||||
uint64_t ts_monotonic_;
|
||||
uint64_t ts_utc_;
|
||||
@@ -27,6 +27,9 @@ class IncomingTransfer
|
||||
TransferID transfer_id_;
|
||||
NodeID src_node_id_;
|
||||
|
||||
/// That's a no-op, asserts in debug builds
|
||||
int write(unsigned int offset, const uint8_t* data, unsigned int len);
|
||||
|
||||
protected:
|
||||
IncomingTransfer(uint64_t ts_monotonic, uint64_t ts_utc, TransferType transfer_type,
|
||||
TransferID transfer_id, NodeID source_node_id)
|
||||
@@ -38,13 +41,6 @@ protected:
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual ~IncomingTransfer() { }
|
||||
|
||||
/**
|
||||
* Read pure payload, no service fields are included (e.g. Target Node ID, Transfer CRC)
|
||||
*/
|
||||
virtual int read(unsigned int offset, uint8_t* data, unsigned int len) const = 0;
|
||||
|
||||
/**
|
||||
* Dispose the payload buffer. Further calls to read() will not be possible.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user