protected override void Loop(CancellationToken token) { while (token.IsCancellationRequested == false) { if (_navdataAcquisition.IsAlive == false) { _navdataAcquisition.Start(); } else if (_navdataAcquisition.IsAcquiring) { if (_commandSender.IsAlive == false) { _commandSender.Start(); } if (_videoAcquisition.IsAlive == false) { _videoAcquisition.Start(); } } Thread.Sleep(10); } _navdataAcquisition.Stop(); _commandSender.Stop(); _videoAcquisition.Stop(); }
private void OnNavdataAcquisitionStarted() { if (_commandSender.IsAlive == false && _isCommand) { _commandSender.Start(); } if (_videoAcquisition.IsAlive == false && _isVideo) { _videoAcquisition.Start(); } }