mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 07:23:34 +08:00
getIface() constants added
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
#include <set>
|
||||
#include <queue>
|
||||
#include "../transport/can/can.hpp"
|
||||
|
||||
#include <uavcan/util/method_binder.hpp>
|
||||
#include <uavcan/node/subscriber.hpp>
|
||||
|
||||
struct TestNode : public uavcan::INode
|
||||
{
|
||||
@@ -74,6 +75,15 @@ struct PairableCanDriver : public uavcan::ICanDriver, public uavcan::ICanIface
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual const uavcan::ICanIface* getIface(uavcan::uint8_t iface_index) const
|
||||
{
|
||||
if (iface_index == 0)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual uavcan::uint8_t getNumIfaces() const { return 1; }
|
||||
|
||||
virtual uavcan::int16_t select(uavcan::CanSelectMasks& inout_masks, uavcan::MonotonicTime blocking_deadline)
|
||||
|
||||
Reference in New Issue
Block a user