private void StartAlgorithmProcessing() { try { AlgorithmHostingEnvironment.Start(); Framework framework = AlgorithmHostingEnvironment.Framework; m_concentrator = framework.Concentrator; m_subscriber = framework.Subscriber; m_concentrator.ProcessException += ProcessExceptionHandler; m_concentrator.FramesPerSecond = SystemSettings.FramesPerSecond; m_concentrator.LagTime = SystemSettings.LagTime; m_concentrator.LeadTime = SystemSettings.LeadTime; m_concentrator.RoundToNearestTimestamp = true; m_concentrator.Start(); m_subscriber.StatusMessage += StatusMessageHandler; m_subscriber.ProcessException += ProcessExceptionHandler; m_subscriber.Start(); } catch (Exception ex) { HandleException(new InvalidOperationException($"Exception while creating framework for algorithm hosting environment: {ex.Message}", ex)); } }
public void Start() { m_concentrator.ProcessException += Concentrator_ProcessException; m_concentrator.FramesPerSecond = SystemSettings.FramesPerSecond; m_concentrator.LagTime = SystemSettings.LagTime; m_concentrator.LeadTime = SystemSettings.LeadTime; m_concentrator.RoundToNearestTimestamp = true; m_concentrator.Start(); m_subscriber.StatusMessage += Subscriber_StatusMessage; m_subscriber.ProcessException += Subscriber_ProcessException; m_subscriber.Start(); new Action(UpdateStatus).DelayAndExecute(1000); }