示例#1
0
 public IDictionary <Guid, SignalDataBase> GetQueryResult(DateTime startTime, DateTime endTime, int zoomLevel, IEnumerable <ISignalCalculation> signals)
 {
     using (ClientDatabaseBase <HistorianKey, HistorianValue> db = m_historian.GetDatabase <HistorianKey, HistorianValue>("PPA"))
     {
         //var db = m_historian.ConnectToDatabase("Full Resolution Synchrophasor");
         PeriodicScanner scanner = new PeriodicScanner(m_samplesPerSecond);
         SeekFilterBase <HistorianKey>      timestamps = scanner.GetParser(startTime, endTime, 1500u);
         SortedTreeEngineReaderOptions      options    = new SortedTreeEngineReaderOptions(TimeSpan.FromSeconds(1));
         IDictionary <Guid, SignalDataBase> results    = db.GetSignalsWithCalculations(timestamps, signals, options);
         return(results);
     }
 }
示例#2
0
 public static IDictionary <Guid, SignalDataBase> GetSignalsWithCalculations(this ClientDatabaseBase <HistorianKey, HistorianValue> database, ulong startTime, ulong endTime, IEnumerable <ISignalCalculation> signals)
 {
     return(database.GetSignalsWithCalculations(TimestampSeekFilter.CreateFromRange <HistorianKey>(startTime, endTime), signals, SortedTreeEngineReaderOptions.Default));
 }