public static void Send_OnStringReceived(ExciteOMeter.DataType type, float timestamp, string message, MarkerLabel label = MarkerLabel.CUSTOM_MARKER)
 {
     if (OnStringReceived != null)
     {
         OnStringReceived(type, timestamp, message, label);
     }
 }
 public static void Send_OnStreamDisconnected(ExciteOMeter.DataType dataType)
 {
     if (OnStreamDisconnected != null)
     {
         OnStreamDisconnected(dataType);
     }
 }
 public static void Send_OnDataReceived(ExciteOMeter.DataType dataType, float timestamp, float value)
 {
     if (OnDataReceived != null)
     {
         OnDataReceived(dataType, timestamp, value);
     }
 }
Example #4
0
        private void AddToBuffer(ExciteOMeter.DataType type, float timestamp, float value)
        {
            if (type == incomingDataType)
            {
                timestamps.Add(timestamp);
                dataBuffer.Add(value);

                // Increase counter of samples
                elapsedSamples = dataBuffer.Count;
            }
        }
Example #5
0
        private void ExciteOMeterDataReceived(ExciteOMeter.DataType type, float timestamp, float value)
        {
            // Only process data when a file is configured
            if (!isConfigured)
            {
                return;
            }

            Values.timeseries[type].timestamp.Add(timestamp);
            Values.timeseries[type].value.Add(value);
        }
        void ProcessStringLog(ExciteOMeter.DataType type, float timestamp, string message, MarkerLabel label)
        {
            bool written = LoggerController.instance.WriteLine(LogName.EventsAndMarkers,
                                                               ExciteOMeterManager.ConvertFloatToString(timestamp) + "," +
                                                               type.ToString() + "," +
                                                               message + "," +
                                                               label.ToString());

            if (!written)
            {
                Debug.LogWarning("The Logger Controller has not been setup to store strings. Please setup a file with LogID EventsAndMarkers.");
            }
        }
Example #7
0
        public static void Send_OnDataArrayReceived(ExciteOMeter.DataType dataType, float timestamp, float[] array)
        {
            if (OnDataArrayReceived != null)
            {
                OnDataArrayReceived(dataType, timestamp, array);
            }
            //{

            //    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEMP
            //    if (dataType == DataType.Headset_array)
            //    {
            //        string t = ", |" + array[7].ToString("f0") + ";" + array[8].ToString("f0") + ";" + array[9].ToString("F0");

            //        Debug.Log("EVENT OnDataArrayReceived: " + t);
            //    }
            //    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEMP
            //}
        }
        private void ExciteOMeterDataReceived(ExciteOMeter.DataType type, float timestamp, float value)
        {
            // Only process data when a file is configured
            if (!isConfigured)
            {
                return;
            }

            try
            {
                Values.timeseries[type].timestamp.Add(timestamp);
                Values.timeseries[type].value.Add(value);
            }
            catch (Exception)
            {
                Debug.Log("Omitted data point > Data Type: " + type.ToString() + " - Timestamp: " + timestamp + " - Value: " + value);
            }
        }
        private void AddToBufferArray(ExciteOMeter.DataType type, float timestamp, float[] values)
        {
            if (type == incomingDataType)
            {
                timestamps.Add(timestamp);
                dataBufferArray.Add((float[])values.Clone());   // If I don't make a copy, it refers to the same position in memory.

                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEMP
                //if (type == DataType.Headset_array)
                //{
                //    string t = "";
                //    foreach (float[] d in dataBufferArray)
                //        t += ", |" + d[7].ToString("f0") + ";" + d[8].ToString("f0") + ";" + d[9].ToString("F0");

                //    Debug.Log("feature logname: " + logIdentifier + "headset_array data: " + t);
                //}
                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEMP

                // Increase counter of samples
                elapsedSamples = dataBufferArray.Count;
            }
        }