getIface() constants added

This commit is contained in:
ilia-sheremet
2015-06-13 20:15:45 +02:00
parent 3784484b16
commit bad7123b7d
6 changed files with 39 additions and 4 deletions
+11 -1
View File
@@ -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)