private static AcquisitionStateReply.Types.AcquisitionStateEnum ConvertToAcquisitionStateEnum(
            AcquisitionState acquisitionState)
        {
            var acquisitionStateEnum = (AcquisitionStateReply.Types.AcquisitionStateEnum)Enum.Parse(
                typeof(AcquisitionStateReply.Types.AcquisitionStateEnum),
                acquisitionState.ToString());

            return(acquisitionStateEnum);
        }
コード例 #2
0
 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";
 }
コード例 #3
0
ファイル: ManagerBITalino.cs プロジェクト: jh0nny1/Prototipo8
 /// <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);
     }
 }
コード例 #4
0
ファイル: ManagerBITalino.cs プロジェクト: jh0nny1/Prototipo8
 /// <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);
     }
 }
コード例 #5
0
ファイル: BitalinoManager.cs プロジェクト: oszust002/MgrGame
 /// <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);
     }
 }
コード例 #6
0
        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;
        }
コード例 #7
0
        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();
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: apis/grpc-client-server
 private static void PrintAcquisitionState(AcquisitionState acquisitionState)
 {
     Console.WriteLine("AcquisitionState => {0}", acquisitionState);
 }
コード例 #9
0
ファイル: ManagerBITalino.cs プロジェクト: mara172/GitXIM
 /// <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 );
     }
 }
コード例 #10
0
ファイル: ManagerBITalino.cs プロジェクト: mara172/GitXIM
    /// <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);
        }
    }
コード例 #11
0
ファイル: ManagerBITalino.cs プロジェクト: mara172/GitXIM
 /// <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);
     }
 }
コード例 #12
0
 private void OnDriverConnected(object sender, EventArgs args)
 {
     m_IsAcquisitionOn       = false;
     ChannelAcquisitionState = AcquisitionState.Idle;
 }
コード例 #13
0
 private void SendAcquisitionStateToHubAsync(AcquisitionState acquisitionState)
 {
     SendToHubAsync("AcquisitionState", acquisitionState.ToString());
 }
コード例 #14
0
 private void SendAcquisitionStateToCloud(AcquisitionState acquisitionState)
 {
     SendValueToCloud("AcquisitionState", acquisitionState.ToString());
 }