Example #1
0
 void SetSamplingFrequency(LJV7IF_FREQUENCY lJSamplingFrequency)
 {
     try
     {
         LJSetting.SetTriggerFreq(_currentDeviceId, lJSamplingFrequency);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
 void SetTriggerType(LJV7IF_TRIGGER_MODE lJTriggerType)
 {
     try
     {
         LJSetting.SetTriggerMode(_currentDeviceId, lJTriggerType);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #3
0
 public double GetSamplePeriodMs()
 {
     try
     {
         var triggerFreq = LJSetting.GetTriggerFreq(_currentDeviceId);
         var tf          = freqDictionary[triggerFreq];
         return(tf.Period_ms);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #4
0
        public DataLib.CartData GetSingleProfile()
        {
            try
            {
                var data = new DataLib.CartData();
                if (_connected)
                {
                    _sendCommand = SendCommand.GetProfileAdvance;
                    _deviceData.ProfileData.Clear();
                    _deviceData.MeasureData.Clear();
                    _measureDatas.Clear();
                    LJSetting.SetOpMode(_currentDeviceId, LJV7IF_OP_MODE.ADVANCED);
                    Thread.Sleep(50);
                    // Set the command function
                    LJV7IF_PROFILE_INFO profileInfo = new LJV7IF_PROFILE_INFO();
                    uint  dataSize    = GetOneProfileDataSize();
                    int[] profileData = new int[dataSize / Marshal.SizeOf(typeof(int))];
                    LJV7IF_MEASURE_DATA[] measureData = new LJV7IF_MEASURE_DATA[NativeMethods.MeasurementDataCount];

                    using (PinnedObject pin = new PinnedObject(profileData))
                    {
                        // Send the command
                        rc = (Rc)NativeMethods.LJV7IF_GetProfileAdvance(_currentDeviceId, ref profileInfo, pin.Pointer, dataSize, measureData);
                        CheckReturnValue(rc);

                        // Response data display
                        _measureDatas.Add(new MeasureData(0, measureData));
                        ExtractProfileData(1, ref profileInfo, profileData);
                    }
                }
                return(_deviceData.ProfileData[0].GetCartData(_scalingMultiplier));
            }
            catch (Exception)
            {
                throw;
            }
        }