Пример #1
0
        protected Ticks GetRelativeFrameTime(FieldMapping fieldMapping)
        {
            IEnumerable <FieldMapping> signalMappings = m_mappingCompiler.TraverseSignalMappings(fieldMapping);

            MeasurementKey[] keys = signalMappings.SelectMany(mapping => SignalLookup.GetMeasurementKeys(mapping.Expression)).ToArray();
            AlignmentCoordinator.SampleWindow sampleWindow = CreateSampleWindow(fieldMapping);
            return(sampleWindow.GetTimestamps(CurrentFrameTime).FirstOrDefault());
        }
Пример #2
0
        protected int GetArrayMeasurementCount(ArrayMapping arrayMapping)
        {
            MeasurementKey[] keys = m_keys[m_keyIndex++];

            if (arrayMapping.WindowSize != 0.0M)
            {
                AlignmentCoordinator.SampleWindow sampleWindow = CreateSampleWindow(arrayMapping);
                return(sampleWindow.GetTimestamps(m_currentFrameTime).Count);
            }

            return(keys.Length);
        }
Пример #3
0
 protected void PushWindowFrameTime(ArrayMapping arrayMapping)
 {
     if (arrayMapping.WindowSize != 0.0M)
     {
         AlignmentCoordinator.SampleWindow sampleWindow = CreateSampleWindow(arrayMapping);
         m_lastKeyIndex     = m_keyIndex;
         m_cachedFrameTime  = CurrentFrameTime;
         m_cachedFrameTimes = sampleWindow.GetTimestamps(m_currentFrameTime).ToArray();
         m_cachedMapping    = GetTypeMapping(arrayMapping);
     }
     else if (arrayMapping.RelativeTime != 0.0M)
     {
         m_cachedFrameTime = CurrentFrameTime;
         CurrentFrameTime  = GetRelativeFrameTime(arrayMapping);
         m_cachedMappings  = m_mappingCompiler.EnumerateTypeMappings(arrayMapping.Expression).ToArray();
     }
     else
     {
         m_cachedMappings = m_mappingCompiler.EnumerateTypeMappings(arrayMapping.Expression).ToArray();
     }
 }