libuavcan passive mode support

This commit is contained in:
Pavel Kirienko
2014-07-12 16:52:17 +04:00
parent 93f861ad60
commit c9c9a16e94
6 changed files with 47 additions and 4 deletions
+1
View File
@@ -26,6 +26,7 @@ const int16_t ErrInvalidTransferListener = 7;
const int16_t ErrNotInited = 8;
const int16_t ErrRecursiveCall = 9;
const int16_t ErrLogic = 10;
const int16_t ErrPassiveMode = 11;
}
@@ -34,6 +34,8 @@ public:
return getScheduler().getDispatcher().setNodeID(nid);
}
bool isPassiveMode() const { return getScheduler().getDispatcher().isPassiveMode(); }
int spin(MonotonicTime deadline)
{
return getScheduler().spin(deadline);
@@ -141,6 +141,8 @@ public:
NodeID getNodeID() const { return self_node_id_; }
bool setNodeID(NodeID nid);
bool isPassiveMode() const { return !getNodeID().isUnicast(); }
const ISystemClock& getSystemClock() const { return sysclock_; }
ISystemClock& getSystemClock() { return sysclock_; }