private static AcquisitionStateReply.Types.AcquisitionStateEnum ConvertToAcquisitionStateEnum( AcquisitionState acquisitionState) { var acquisitionStateEnum = (AcquisitionStateReply.Types.AcquisitionStateEnum)Enum.Parse( typeof(AcquisitionStateReply.Types.AcquisitionStateEnum), acquisitionState.ToString()); return(acquisitionStateEnum); }
private void StartAcquisition() { _aTimer.Start(); _manager.Start(); _acquisitionState = AcquisitionState.On; AcquisitionStateCircle.Fill = new SolidColorBrush(Colors.Green); AcquisitionStateCircle.Stroke = new SolidColorBrush(Colors.Green); AcquisitionStatusLabel.Text = "Acquisition ON"; }
/// <summary> /// Stop the acquisition /// </summary> public void StopAcquisition() { try { device.StopAcquisition( ); acquisitionState = AcquisitionState.NotRun; WriteLog("DONE acquisition stopped"); } catch (Exception ex) { WriteLog("Error stopping the acquisition: " + ex.Message); } }
/// <summary> /// Stop the connection with the BITalino /// </summary> public void Deconnection( ) { try { device.Deconnection( ); acquisitionState = AcquisitionState.NotRun; WriteLog("Done, Deconnection"); } catch (Exception ex) { WriteLog("Error on deconnection" + ex.Message); } }
/// <summary> /// Start the acquisition /// </summary> public void StartAcquisition() { try { device.SamplingRate = SamplingFrequency; device.AnalogChannels = convertChannels(); device.StartAcquisition(); acquisitionState = AcquisitionState.Run; WriteLog("Done, acquisition started"); } catch (Exception ex) { WriteLog("Error acquisition: " + ex.Message); } }
public MainWindow() { // Window initialization InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; CultureInfo customCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone(); customCulture.NumberFormat.NumberDecimalSeparator = "."; Thread.CurrentThread.CurrentCulture = customCulture; // Timer _aTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(20) }; _aTimer.Tick += _timer_Tick; // Photons DictPhoton = new Dictionary <string, PhotonGUI>(); // Computed data //ComputedData = new Dictionary<string, string>(); // Other items to display on map MovingEntities = new List <MovingEntity>(); // Photon manager _manager = new PhotonManager(); _manager.DataReceived += ManagerDataReceived; _acquisitionState = AcquisitionState.Off; // Calibration state initialised to false _isCalibrating = false; // Read conf from local json file ReadConfFromJson(); RefreshManagerPhotons(); UpdateUI(); // Window events Loaded += MainWindow_Loaded; SizeChanged += MainWindow_Resized; StateChanged += MainWindow_StateChanged; Closing += MainWindow_Closing; }
private void StopAcquisition() { _aTimer.Stop(); _manager.Stop(); _acquisitionState = AcquisitionState.Off; AcquisitionStateCircle.Fill = new SolidColorBrush(Colors.Red); AcquisitionStateCircle.Stroke = new SolidColorBrush(Colors.Red); AcquisitionStatusLabel.Text = "Acquisition OFF"; foreach (PhotonGUI photon in DictPhoton.Values) { foreach (Sensor sensor in photon.Sensors) { sensor.SignalLength = 0; } } UpdateUI(); }
private static void PrintAcquisitionState(AcquisitionState acquisitionState) { Console.WriteLine("AcquisitionState => {0}", acquisitionState); }
/// <summary> /// Stop the acquisition /// </summary> public void StopAcquisition() { try { device.StopAcquisition ( ); acquisitionState = AcquisitionState.NotRun; WriteLog("DONE acquisition stopped"); } catch ( Exception ex ) { WriteLog( "Error stopping the acquisition: " + ex.Message ); } }
/// <summary> /// Start the acquisition /// </summary> public void StartAcquisition() { try { device.SamplingRate = SamplingRate; Array.Sort(AnalogChannels); device.AnalogChannels = convertChannels(); device.StartAcquisition (); acquisitionState = AcquisitionState.Run; WriteLog("Done, acquisition started"); } catch ( Exception ex ) { WriteLog("Error acquisition: " + ex.Message); } }
/// <summary> /// Stop the connection with the BITalino /// </summary> public void Deconnection( ) { try { device.Deconnection ( ); acquisitionState = AcquisitionState.NotRun; WriteLog("Done, Deconnection"); } catch ( Exception ex ) { WriteLog("Error on deconnection" + ex.Message); } }
private void OnDriverConnected(object sender, EventArgs args) { m_IsAcquisitionOn = false; ChannelAcquisitionState = AcquisitionState.Idle; }
private void SendAcquisitionStateToHubAsync(AcquisitionState acquisitionState) { SendToHubAsync("AcquisitionState", acquisitionState.ToString()); }
private void SendAcquisitionStateToCloud(AcquisitionState acquisitionState) { SendValueToCloud("AcquisitionState", acquisitionState.ToString()); }