コード例 #1
0
        public bool SetVoltageDivision(THantekChannelNumber channelNumber, THantekVoltDivision voltDiv)
        {
            m_voltDiv = voltDiv;
            switch (channelNumber)
            {
            case THantekChannelNumber.CH1:
                m_voltDivCH1 = voltDiv;
                break;

            case THantekChannelNumber.CH2:
                m_voltDivCH2 = voltDiv;
                break;
            }
            return(dsoSetVoltDIV(m_deviceIndex, (int)channelNumber, (int)voltDiv) == 1);
        }
コード例 #2
0
 public bool SetVoltageDivision(THantekChannelNumber channelNumber, THantekVoltDivision voltDiv)
 {
     m_voltDiv = voltDiv;
     switch (channelNumber) {
         case THantekChannelNumber.CH1:
             m_voltDivCH1 = voltDiv;
             break;
         case THantekChannelNumber.CH2:
             m_voltDivCH2 = voltDiv;
             break;
     }
     return dsoSetVoltDIV(m_deviceIndex, (int)channelNumber, (int)voltDiv) == 1;
 }
コード例 #3
0
        public bool ReadHardData(out short[] bufferCH1, out short[] bufferCH2, uint nReadLine, short[] level, THantekTrigSweep trigSweep, THantekChannelNumber trigSource, short trigLevel, THantekTriggerSlope trigSlope, short HTrigPosition, uint drawLength, out uint trigPoint, THantekInsertMode insertMode)
        {
            bool readSuccess = false;

            bufferCH1 = new short[nReadLine];
            bufferCH2 = new short[nReadLine];

            unsafe {
                uint trigPt = 0;
                fixed (short* pBufferCH1 = bufferCH1)
                fixed (short* pBufferCH2 = bufferCH2)
                fixed (short* pLevel = level) {
                    readSuccess = dsoReadHardData(m_deviceIndex, pBufferCH1, pBufferCH2, nReadLine, pLevel, (int)m_voltDivCH1, (int)m_voltDivCH2, (short)trigSweep, (short)trigSource, trigLevel, (short)trigSlope, (int)m_timeDiv, HTrigPosition, drawLength, &trigPt, (short)insertMode) != -1;
                }
                trigPoint = trigPt;
            }

            return readSuccess;
        }
コード例 #4
0
        public bool ReadHardData(out short[] bufferCH1, out short[] bufferCH2, uint nReadLine, short[] level, THantekTrigSweep trigSweep, THantekChannelNumber trigSource, short trigLevel, THantekTriggerSlope trigSlope, short HTrigPosition, uint drawLength, out uint trigPoint, THantekInsertMode insertMode)
        {
            bool readSuccess = false;

            bufferCH1 = new short[nReadLine];
            bufferCH2 = new short[nReadLine];

            unsafe {
                uint trigPt = 0;
                fixed(short *pBufferCH1 = bufferCH1)
                fixed(short *pBufferCH2 = bufferCH2)
                fixed(short *pLevel     = level)
                {
                    readSuccess = dsoReadHardData(m_deviceIndex, pBufferCH1, pBufferCH2, nReadLine, pLevel, (int)m_voltDivCH1, (int)m_voltDivCH2, (short)trigSweep, (short)trigSource, trigLevel, (short)trigSlope, (int)m_timeDiv, HTrigPosition, drawLength, &trigPt, (short)insertMode) != -1;
                }
                trigPoint = trigPt;
            }

            return(readSuccess);
        }