NEESit logo

Background and Intro

The Creare Data Turbine has a method called Request that allows you to get a single sample or range of data. However, the documentation on this API is difficult to understand, so Terry Weymouth at UMich investigated and these are his results.

Revision History

  • V1.0 Initial posting April 19 2005

    The Definition

    Request(channelMap, time, duration, mode)
    
    Where...
        recTime is the time stamp on record,
        lastTime is the greatest time ring buffer for a channel,
        firstTime is the smallest time in the ring buffer for a channel,
        maxLastTime is the greatest lastTime over all channels,
        minFirstTime is the smallest firstTime over all channels
        (for all duration >= 0 is required)
    
    absolute
        return records for which time <= recTime <= time+duration
        duration=0 is a special case, returns the single record with
        recTime <= time
    
    newest
        return records for which lastTime-(time+duration) <= recTime <=
    lastTime-time; duration = 0 is a special case, returns the single closest
    record to lastTime-time such that recTime <= lastTime-time
    
    oldest
        return records for which firstTime+time <= recTime <=
    firstTime+time+duration; duration = 0 is a special case, returns the single
    closest record to firstTime+time such that firstTime+time <= recTime
     
    aligned (e.g. newestAlligned)
        return records for which maxLastTime-(time+duration) <= recTime <=
    maxLastTime-time
    
        [did you-all ever consider oldestAlligned that is: minFirstTime+time <=
    recTime <= minFirstTime+time+duration???]
    
    after
        given baseTime is the max of lastTime-duration and time
        return records such that baseTime <= recTime <= baseTime+duration
        
    modified
        if time < lastTime, compute baseTime is lastTime-duration
        return records such that baseTime <= recTime <= baseTime+duration
        if time >= lastTime no data is returned
    
    next
        given that baseTime is the least recTime such that time <= baseTime
        return records for which baseTime <= recTime <= bastTime+duration
    
    previous
        given that baseTime is the greatest recTime such that baseTime <= time
        return records for which baseTime-duration <= recTime <= baseTime
    

    The Test Program

    The test program, TestTimeRefInteractive generates data into two channes, on localhost, and then allows you to interactivly query the two channels using Request.

    The generated data are all at all the points between 100 and 600 (including 100, but not including 600, i.e. 100 <= time < 600), such that

  • channel0 contains points with times on the "whole numbers" (100.0, 101.0, 102.0, etc.)
  • channel1 contains points with times on the 0.25 and 0.75 offsets (100.25, 100.74, 101.25, 101.75, 102.25, 102.75, etc)

  • These times were chosen because they are reprecented exactly in floating point numbers (thus permitting test for equality).

    The interactive query gives you the opportunity to submit test queries against the data in the ring buffer. For exampel a query of:
    absolute, 104, 2
    returns

    For: time = 104.0; duration = 2.0; request type = Absolute
        --> data on both channels
        Times on Channel 0: 104.00 105.00 106.00 
        Times on Channel 1: 104.25 104.75 105.25 105.75 
    

    Anomalies

    'Next' with time < minFirstTime, duration > 0
    and
    'Previous' with maxLastTime < time, duration >0
    both return a list an array of times/data with duplicates in each position but the first and the last

    'Previos' with time <= maxListTime and duration = 0 only returned data on channel 0

    I had one repeatable case where absolute only returned data on channel 0, but I have not been able to duplicate it with the interactive version of the test program, I'm still working on that one.

    Conclusion

    At any rate, I think that the descriptions at the head of this message will serve you well. Please let me (us) know if you discover problems with them. I'll pass refinements on to this list.

    Navigation links

  • The source code for the test program
  • RBNB applications page
  • Units in the RBNB
  • Back to NEESit page
  • Back to home page
  • Support

    This work was supported primarily by the George E. Brown, Jr. Network for Earthquake Engineering Simulation (NEES) Program of the National Science Foundation under Award Number CMS-0117853.