Fixed time synchronization master: publishing to all ifaces with the same Transfer ID

This commit is contained in:
Pavel Kirienko
2014-04-01 23:01:34 +04:00
parent 943b50bdf0
commit 53c870a950
2 changed files with 64 additions and 28 deletions
@@ -37,16 +37,19 @@ class GlobalTimeSyncMaster : protected LoopbackFrameListenerBase
void setTxTimestamp(UtcTime ts);
int publish();
int publish(TransferID tid, MonotonicTime current_time);
};
INode& node_;
LazyConstructor<IfaceMaster> iface_masters_[MaxCanIfaces];
MonotonicTime prev_pub_mono_;
DataTypeID dtid_;
bool initialized_;
void handleLoopbackFrame(const RxFrame& frame);
int getNextTransferID(TransferID& tid);
public:
explicit GlobalTimeSyncMaster(INode& node)
: LoopbackFrameListenerBase(node.getDispatcher())