Esempio n. 1
0
        //      public System.Collections.IEnumerable RecordIterator(ADIDataFlags dataFlags, int chan, ADIPosition pos)
        //      public IEnumerator<float> RecordIterator(ADIDataFlags dataFlags, int chan, ADIPosition pos)

        //Creates a object to enumerate samples in the record from left to right starting at position pos and ending at the sample before endOffset.
        //If the parameter endOffset is set to ADIPosition.kRecordEndOffset, the enumerator will continue to return samples until the last sample in the record is reached.
        public FloatIter RecordIterator(ADIDataFlags dataFlags, int chan, ADIPosition pos, int endOffset)
        {
            ADIScaling   scaling = new ADIScaling(1); //identity scaling
            IEnumFloatEx enumFloat;

            mADIData.GetEnumFloat(dataFlags, new ADIChannelId(chan), pos, endOffset, ref scaling, out enumFloat); //(ADIScaling*)IntPtr.Zero);
            return(new FloatIter(enumFloat));
        }
Esempio n. 2
0
        //Returns a single data value. This not an efficient way to access ranges of samples, for which
        //RecordIterator() should be used.
        //If the specified channel and record is empty the value returned will be
        //a nan (0x7ff8700000000000LL). If pos.mRecordOffset is beyond the end of the specified record an exception
        //(E_INVALIDARG) will be thrown.
        public double GetValue(ADIDataFlags dataFlags, int chan, ADIPosition pos)
        {
            ADIScaling scaling = new ADIScaling(1);                                             //identity scaling

            return(mADIData.GetValDouble(dataFlags, new ADIChannelId(chan), pos, ref scaling)); //(ADIScaling*)IntPtr.Zero);
        }