예제 #1
0
        //Searches from right to left for a comment in the record starting at (but not including) position rightPos and ending at (and including) leftPos.
        //The channel parameter is ignored if the flags parameter has kSearchAnyChannel set.
        //[helpstring("method GetRightMostCommentInRange: searches back from rightPos for the first comment to the left of rightPos.")]
        //   HRESULT GetRightMostCommentInRange([in]EnumCommentFlags searchFlags, [in]ADIPosition leftPos, [in]ADIPosition rightPos, [in]TChanIndex chan, [out]IADIComment **icmt) const;
        public IADIComment RightMostCommentInRange(EnumCommentFlags searchFlags, ADIPosition leftPos, ADIPosition rightPos, int chan)
        {
            IADIComment comment;

            mADIData.GetRightMostCommentInRange(searchFlags, leftPos, rightPos, chan, out comment);
            return(comment);
        }
예제 #2
0
        public CommentIter CommentIterator(ADIPosition startPos, int stopTick)
        {
            IEnumADIComment enumComments;

            mADIData.CreateEnumComment(EnumCommentFlags.kSearchAnyChannel, 0, startPos, stopTick, 0, out enumComments);
            return(new CommentIter(enumComments));
        }
예제 #3
0
        //Creates a object to enumerate comments in the record from left to right starting at position start and ending at (but not including) stop.
        //If the parameter stopTick is set to ADIPosition.kRecordEndOffset, the enumerator will continue to return comments until the last comment in the record is reached.
        //The chan parameter is ignored if the searchFlags parameter has kSearchAnyChannel set.
        public CommentIter CommentIterator(EnumCommentFlags searchFlags, int chan, ADIPosition startPos, int stopTick)
        {
            IEnumADIComment enumComments;

            mADIData.CreateEnumComment(searchFlags, chan, startPos, stopTick, 0, out enumComments);
            return(new CommentIter(enumComments));
        }
예제 #4
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));
        }
예제 #5
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);
        }