123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- using System.Collections;
- using System.Collections.Generic;
- using CSVReader;
- namespace Processor
- {
- public interface IProcessor
- {
- /// <summary>
- /// Starts streaming on the CSV file or Networkstream.
- /// </summary>
- /// <returns>
- /// Returns a bool that indicates wether starting the stream was successful.
- /// </returns>
- /// <param name="foreward">Initial direction of the stream.</param>
- bool StartStreaming(int samplerate = 4, bool foreward = true);
- /// <summary>
- /// Jump to a timestamp of the underlying stream.
- /// </summary>
- /// <returns>
- /// Returns a bool that indicates wether the jump was successful.
- /// </returns>
- /// <param name="timestamp">The time to jump too.</param>
- bool JumpToTimestamp(double timestamp, out double actualTimestamp);
- /// <summary>
- /// Reads or returns the next set of values.
- /// </summary>
- /// <remarks>
- /// The values returned are all values buffered since the last read.
- /// </remarks>
- /// <returns>
- /// Returns a list with the objects.
- /// </returns>
- List<InputObject> ReadNextValues();
- /// <summary>
- /// Get the newest Timestamp.
- /// </summary>
- /// <returns>
- /// Returns the newest timestamp of the File.
- /// </returns>
- double GetNewestTimeStamp();
- /// <summary>
- /// Get the oldest Timestamp.
- /// </summary>
- /// <returns>
- /// Returns the oldest timestamp of the File.
- /// </returns>
- double GetOldestTimeStamp();
- ///<summary>
- ///Get the first timestamp in the timechunk
- ///</summary>
- ///<returns>
- ///Returns the first Timestamp in the timechunk.
- ///NaN if starttimestamp is not set.
- ///</returns>
- double GetChunkStarttimestamp();
-
- ///<summary>
- ///Get the last timestamp in the timechunk
- ///</summary>
- ///<returns>
- ///Returns the last timestamp in the timechunk.
- ///NaN if endtimestamp is not set.
- ///</returns>
- double GetChunkEndtimestamp();
- ///<summary>
- ///Set the first timestamp in the timechunk
- ///</summary>
- void SetChunkStarttimestamp(double time);
- ///<summary>
- ///Set the last timestamp in the timechunk
- ///</summary>
- void SetChunkEndtimestamp(double time);
- /// <summary>
- /// Reverses the reading direction on the file.
- /// </summary>
- /// <remarks>
- /// This call also clears the current buffer of any content.
- /// </remarks>
- void ReverseTime();
- /// <summary>
- /// Changes the samplerate of the Processor.
- /// </summary>
- void ChangeSamplerate(int newSamplerate);
- /// <summary>
- /// Stops the Streaming thread.
- /// </summary>
- /// <remarks>
- /// This call resets the Processor. It has to be restarted with <see cref="StartStreaming(double ,bool)"/>
- /// </remarks>
- void StopStreaming();
- }
- }
|