mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 17:23:33 +08:00
ostream operator for ReceivedDataStructure<>
This commit is contained in:
@@ -55,6 +55,16 @@ public:
|
||||
NodeID getSrcNodeID() const { return safeget<NodeID, &IncomingTransfer::getSrcNodeID>(); }
|
||||
};
|
||||
|
||||
template <typename Stream, typename DataType>
|
||||
static Stream& operator<<(Stream& s, const ReceivedDataStructure<DataType>& rds)
|
||||
{
|
||||
s << "# Received struct ts_m=" << rds.getMonotonicTimestamp()
|
||||
<< " ts_utc=" << rds.getUtcTimestamp()
|
||||
<< " snid=" << int(rds.getSrcNodeID().get()) << "\n";
|
||||
s << static_cast<const DataType&>(rds);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
template <typename DataStruct_, unsigned int NumStaticReceivers_, unsigned int NumStaticBufs_>
|
||||
class TransferListenerInstantiationHelper
|
||||
|
||||
Reference in New Issue
Block a user