Added slave time sync suppression, which allows to use slave and master on the same node. Shall be documented later.

This commit is contained in:
Pavel Kirienko
2014-04-01 17:35:32 +04:00
parent 2dc8525823
commit e2fa613917
3 changed files with 45 additions and 1 deletions
@@ -30,6 +30,7 @@ class GlobalTimeSyncSlave : Noncopyable
NodeID master_nid_;
TransferID prev_tid_;
uint8_t prev_iface_index_;
bool suppressed_;
ISystemClock& getSystemClock() const { return sub_.getNode().getSystemClock(); }
@@ -46,10 +47,14 @@ public:
: sub_(node)
, state_(Update)
, prev_iface_index_(0xFF)
, suppressed_(false)
{ }
int start();
void suppress(bool suppressed) { suppressed_ = suppressed; }
bool isSuppressed() const { return suppressed_; }
bool isActive() const;
NodeID getMasterNodeID() const;