mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 07:49:10 +08:00
Added RxCanFrame::toString()
This commit is contained in:
parent
d81a96beb2
commit
69fa8643d4
@ -28,6 +28,8 @@ struct CanRxFrame : public CanFrame
|
||||
, ts_utc(0)
|
||||
, iface_index(0)
|
||||
{ }
|
||||
|
||||
std::string toString(StringRepresentation mode = STR_TIGHT) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -4,12 +4,24 @@
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
#include <uavcan/internal/transport/can_io.hpp>
|
||||
#include <uavcan/internal/debug.hpp>
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
/*
|
||||
* CanRxFrame
|
||||
*/
|
||||
std::string CanRxFrame::toString(StringRepresentation mode) const
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << CanFrame::toString(mode)
|
||||
<< " ts_m=" << ts_monotonic << " ts_utc=" << ts_utc << " iface=" << int(iface_index);
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/*
|
||||
* CanTxQueue::Entry
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user