public bool GetMarkerCount(CHANNEL channel, MEASUREMENT measurement, out int markerCount) { markerCount = -1; try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } markerCount = chMeasurement.Markers.Count; return(true); } catch (Exception) { return(false); } }
public bool GetMarkerStimulus(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, out double stimulus) { stimulus = 0; try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } stimulus = chMeasurement.Markers.Item[getMarker(marker)].Stimulus; return(true); } catch (Exception) { return(false); } }
string GetChannelName(CHANNEL channel) { switch (channel) { case CHANNEL.CHANNEL1: return("Channel1"); case CHANNEL.CHANNEL2: return("Channel2"); case CHANNEL.CHANNEL3: return("Channel3"); case CHANNEL.CHANNEL4: return("Channel4"); case CHANNEL.CHANNEL5: return("Channel5"); case CHANNEL.CHANNEL6: return("Channel6"); case CHANNEL.CHANNEL7: return("Channel7"); case CHANNEL.CHANNEL8: return("Channel8"); } throw (new SystemException("Invalid channel")); }
public void SelectDiffrentialChannel(CHANNEL chPlus, CHANNEL chMinus) { m_cmdReg.SD = 0; if (chPlus == CHANNEL.CH0 && chMinus == CHANNEL.CH1) { m_cmdReg.C0 = 0; m_cmdReg.C1 = 0; m_cmdReg.C2 = 0; return; } if (chPlus == CHANNEL.CH2 && chMinus == CHANNEL.CH3) { m_cmdReg.C0 = 1; m_cmdReg.C1 = 0; m_cmdReg.C2 = 0; return; } if (chPlus == CHANNEL.CH4 && chMinus == CHANNEL.CH5) { m_cmdReg.C0 = 0; m_cmdReg.C1 = 1; m_cmdReg.C2 = 0; return; } // Complete here //http://www.ti.com/lit/ds/symlink/ads7828.pdf m_i2c.Write(m_slaveAddress, m_cmdReg.ToUInt8()); }
public bool GetMarkerTargetValue(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, out double targetValue, out string outMessage) { targetValue = 0; outMessage = string.Empty; try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } targetValue = chMeasurement.Markers.Item[getMarker(marker)].TargetValue; return(true); } catch (Exception err) { outMessage = err.Message; return(false); } }
public bool MarkerQueryBandwidth(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, ref double pBandWidthVal, ref double pCenterFreqVal, ref double pQVal, ref double pLossVal) { try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } chMeasurement.Markers.Item[getMarker(marker)].QueryBandwidth(ref pBandWidthVal, ref pCenterFreqVal, ref pQVal, ref pLossVal); return(true); } catch (Exception) { return(false); } }
public void CreateChannel(SPARAMS sp, CHANNEL channel, WINDOW window, MEASUREMENT measurement) { Tuple <CHANNEL, MEASUREMENT> t = new Tuple <CHANNEL, MEASUREMENT>(channel, measurement); if (m_measureChannelDic.ContainsKey(t) == true) { return; } driver.Channels.AddMeasurement("Standard", SparamName[(int)sp], (int)channel, (int)window); // Setup convineient pointers to Channels and Measurements agNAChannel[(int)channel - 1] = driver.Channels.get_Item(GetChannelName(channel)); IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); m_measureChannelDic.Add(new Tuple <CHANNEL, MEASUREMENT>(channel, measurement), sp); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); m_measureChannelDic.Add(new Tuple <CHANNEL, MEASUREMENT>(channel, (MEASUREMENT)channel), sp); } }
public void MeasureSparam(CHANNEL channel, out float[] data, out double[] freq, out int points, MEASUREMENT measurement, bool autoScale = true) { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } agNAChannel[(int)channel - 1].TriggerSweep(2000); // Take sweep and wait up to 2 seconds for sweep to complete if (autoScale) { chMeasurement.Trace.AutoScale(); } // Read and output data data = chMeasurement.FetchFormatted(); freq = chMeasurement.FetchX(); points = data.Length; }
public bool GetMarkerNames(CHANNEL channel, MEASUREMENT measurement, out string [] names, out string outMessage) { names = null; outMessage = string.Empty; try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } int markerCount = chMeasurement.Markers.Count; names = new string[markerCount]; for (int i = 0; i < markerCount; i++) { names[i] = chMeasurement.Markers.Name[i]; } return(true); } catch (Exception err) { outMessage = err.Message; return(false); } }
/// <summary> /// Sets the volume of a channel, if left to nothing, sets all channels. /// </summary> /// <param name="volume"> The volume to set the channel to.</param> /// <param name="channel"> The channel to channel</param> /// <param name="fadetime"> Time to fade out</param> public void SetVolume(float volume, CHANNEL channel, float fadetime = 0) { getChannel[channel].SetVolume(volume, fadetime); //If you turn down music, you want background stuff off aswell. /*if (channel == CHANNEL.MUSIC) * getChannel[CHANNEL.BACKGROUND_SOUNDS].SetVolume(volume, fadetime);*/ }
public bool GetOutputState(CHANNEL channel) { string strCmd = ""; strCmd = string.Format(":OUTP? {0}", channel.ToString()); string strRet = Query(strCmd).ToString(); return(strRet.Contains("ON")); }
public bool SetOutput(CHANNEL channel, bool bEnable) { string strCmd = ""; bool bRet = false; strCmd = string.Format(":OUTP {0},{1}", channel.ToString(), bEnable?"ON":"OFF"); bRet = (bool)Excute(strCmd); return(bRet); }
public double ReadTemperature(CHANNEL channel) { double temperature; int status = FLIReadTemperature(dev, channel, out temperature); if (0 != status) { throw new Win32Exception(-status); } return(temperature); }
public AgNAMeasurementFormatEnum GetMeasureFormat(CHANNEL channel, MEASUREMENT measurement) { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } return(chMeasurement.Format); }
/// <summary> /// 取得设置的通道电压值 /// </summary> /// <param name="nChannel"></param> /// <returns></returns> public double GetVoltLevel(CHANNEL nChannel) { //[:SOURce[<n>]]:VOLTage[:LEVel][:IMMediate][:AMPLitude]? string strCmd = ""; strCmd = string.Format(":SOUR{0}:VOLT?", nChannel.ToString()); string strRet = Query(strCmd).ToString(); double fValue = 0.0f; if (double.TryParse(strRet, out fValue)) { return(fValue); } return(0.0f); }
public void SetMeasureFormat(AgNAMeasurementFormatEnum measureFormat, CHANNEL channel, MEASUREMENT measurement) { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } chMeasurement.Format = measureFormat; }
public string LimitChannelVoltage(CHANNEL channel, ushort lowLimit, ushort highLimit) { try { highLimit &= 0x0FFF; // must containe zero at D12 - D15 lowLimit &= 0x0FFF; // must containe zero at D12 - D15 SetRegisterValue((byte)(AD7291_REG_LIMIT_BASE + (byte)channel), highLimit); SetRegisterValue((byte)(AD7291_REG_LIMIT_BASE + (byte)channel + 1), highLimit); return("ok"); } catch (Exception err) { return(err.Message); } }
public void AutoScale(CHANNEL channel, MEASUREMENT measurement) { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } chMeasurement.Trace.AutoScale(); }
/// <summary> /// 设置通道电压值 /// </summary> /// <param name="nChannel"></param> /// <param name="fValue"></param> /// <returns></returns> public bool SetVoltLevel(CHANNEL nChannel, double fValue) { //[:SOURce[<n>]]:VOLTage[:LEVel] if (fValue < 0.0f) { fValue = 0.0f; } if (fValue > 30.0f) { fValue = 30.0f; } string strCmd = ""; strCmd = string.Format(":SOUR{0}:VOLT {1}", ((int)nChannel).ToString(), fValue.ToString("F6")); return((bool)Excute(strCmd)); }
/// <summary> /// 设置通道电流值 /// </summary> /// <param name="nChannel"></param> /// <param name="fValue"></param> /// <returns></returns> public bool SetCurrentLevel(CHANNEL nChannel, double fValue) { //[:SOURce[<n>]]:CURRent[:LEVel] if (fValue < 0.0f) { fValue = 0.0f; } if (fValue > 3.0f) { fValue = 3.0f; } string strCmd = ""; strCmd = string.Format(":SOUR{0}:CURR {1}", nChannel.ToString(), fValue.ToString("F6")); return((bool)Excute(strCmd)); }
public static void trace(string msg, CHANNEL channel = CHANNEL.NORMAL) { bool active = false; for (int i = 0; i < ACTIVE_CHANNEL.Length; ++i) { if (ACTIVE_CHANNEL[i] == channel) { active = true; break; } } if (active) { Debug.Log("[" + channel + "]\t" + msg); } }
public void ContinuousEnabled(CHANNEL channel, bool e) { var ChannelA = (KtRFPowerMeterChannel)driver.Channels.get_Item("A"); var ChannelB = (KtRFPowerMeterChannel)driver.Channels.get_Item("B"); var Measurement = driver.Measurements2.get_Item2("1"); if (channel == CHANNEL.CHANNELA) { // Select Channel A and set INIT:CONT OFF ChannelA.Trigger.ContinuousEnabled = e; } if (channel == CHANNEL.CHANNELB) { // Select Channel A and set INIT:CONT OFF ChannelB.Trigger.ContinuousEnabled = e; } m_continues = e; }
public void ClearMux(CHANNEL channel) { byte val = 0; switch (channel) { case CHANNEL.CHANNEL0: m_cmdReg.MuxCH7 = val; break; case CHANNEL.CHANNEL1: m_cmdReg.MuxCH6 = val; break; case CHANNEL.CHANNEL2: m_cmdReg.MuxCH5 = val; break; case CHANNEL.CHANNEL3: m_cmdReg.MuxCH4 = val; break; case CHANNEL.CHANNEL4: m_cmdReg.MuxCH3 = val; break; case CHANNEL.CHANNEL5: m_cmdReg.MuxCH2 = val; break; case CHANNEL.CHANNEL6: m_cmdReg.MuxCH1 = val; break; case CHANNEL.CHANNEL7: m_cmdReg.MuxCH0 = val; break; } ushort data = (ushort)(PrimitiveConversion.ToLong(m_cmdReg)); SetCommandRegister(data); }
/// <summary> /// 设置输出模式 /// OUTP: CVCC? CH1 /// </summary> /// <param name="nChannel"></param> /// <param name="Mode"></param> /// <returns></returns> public OUTPUTMODE GetOutputMode(CHANNEL nChannel) { string strCmd = ""; string strRet = ""; strCmd = string.Format("OUTP:MODE? {0}", nChannel.ToString()); strRet = Query(strCmd).ToString(); if (strRet.ToUpper().Contains("CV")) { return(OUTPUTMODE.CV); } else if (strRet.ToUpper().Contains("CC")) { return(OUTPUTMODE.CC); } else { return(OUTPUTMODE.UR); } }
public void SetPower(StationsInfo Info) { if (Info == null) { return; } this.SceneID = Info.m_SceneID; this.Shape = Info.m_Shape; this.m_Camp = Info.m_Camp; if (Info.m_StaionsDeep == 0) { this.Deep = CHANNEL.ONE; } else if (Info.m_StaionsDeep == 1) { this.Deep = CHANNEL.TWO; } else { this.Deep = CHANNEL.DEFAULT; } }
void SelectSingleEnddedChannel(CHANNEL channel, bool Enable) { byte Prehumble = 0x80; byte SG = 0; byte ODD_SIGN = 0; byte A2, A1, A0; byte dataToWrite = 0; byte enable = (byte)(Enable == true ? 0x20 : 0); SG = m_seMux[channel].Item1; ODD_SIGN = m_seMux[channel].Item2; A2 = m_seMux[channel].Item3; A1 = m_seMux[channel].Item4; A0 = m_seMux[channel].Item5; dataToWrite = (byte)(Prehumble | enable | SG << 4 | ODD_SIGN << 3 | A2 << 2 | A1 << 1 | A0); //see table here: http://www.analog.com/media/en/technical-documentation/data-sheets/2497fb.pdf m_i2c.Write(m_slaveAddress, dataToWrite); }
public bool SetMarkerBandwidthThreshold(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, double t) { try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } chMeasurement.Markers.Item[getMarker(marker)].BandwidthThreshold = t; return(true); } catch (Exception) { return(false); } }
public bool SetMarkerTrackEnabled(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, bool te) { try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } chMeasurement.Markers.Item[getMarker(marker)].MarkerTrackEnabled = te; return(true); } catch (Exception) { return(false); } }
public bool MarkerSearch(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, AgNAMarkerSearchTypeEnum s) { try { IAgNAMeasurement chMeasurement; if (measurement != MEASUREMENT.LIKE_CHANNEL) { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement); } else { chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel); } chMeasurement.Markers.Item[getMarker(marker)].Search(s); return(true); } catch (Exception) { return(false); } }
public string GetVoltageConversionResults(CHANNEL channel, out double data) { lock (this) { try { data = 0; string res; byte count = 0; if ((res = GetVoltageConversionResults(out count, m_voltageConData)) != "ok") { return(res); } if (channel == CHANNEL.CHANNEL0) { if (m_voltageConData[(byte)channel] > maxVal) { maxVal = m_voltageConData[(byte)channel]; } if (m_voltageConData[(byte)channel] < minVal) { minVal = m_voltageConData[(byte)channel]; } Console.WriteLine("{0} ,{1} , {2}", m_voltageConData[(byte)channel], maxVal, minVal); } data = m_voltageConData[(byte)channel] * LSB_Volatage; return("ok"); } catch (Exception err) { throw (new SystemException(err.Message)); } } }
// inputs // // jpegs from hardware devices // bitmaps from hardware devices // GPS from stored data or hardware devices // Camera name source info from stored configuration // video files on disk // still images on disk // outputs // // bitmaps to LPR, with source, time and GPS // jpegs to DVR, with source, time and GPS // // // // public FrameGenerator( APPLICATION_DATA appData,bool AsService) { try { m_AppData = appData; m_AppData.AddOnClosing(OnClose, APPLICATION_DATA.CLOSE_ORDER.MIDDLE); m_Log = (ErrorLog)m_AppData.Logger; m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_FrameCnt].Peak.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_FrameCnt].PerSecond.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_FrameCnt].RunningAverage.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_FrameCnt].Snapshot.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_MotionDetectionPendingQ].Peak.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_MotionDetectionPendingQ].PerSecond.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_MotionDetectionPendingQ].RunningAverage.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_MotionDetectionPendingQ].Snapshot.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_NonMotionFramePushQ].Peak.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_NonMotionFramePushQ].PerSecond.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_NonMotionFramePushQ].RunningAverage.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_NonMotionFramePushQ].Snapshot.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.FRAME_GENERATOR.FrameGen_GPSLocation].StatString.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.MOTION_DETECTION.MotionDetector_DroppedFrames].Accumulator.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.MOTION_DETECTION.MotionDetector_FrameCnt].Accumulator.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.MOTION_DETECTION.MotionDetector_FramesDetected].Accumulator.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.MOTION_DETECTION.MotionDetector_ProcessQCnt].Snapshot.RegisterForUse(true); m_AppData.HealthStatistics[(int)APPLICATION_DATA.HEALTH_STATISTICS.MOTION_DETECTION.MotionDetector_ProcessQCnt].Peak.RegisterForUse(true); m_EabledChannelArray = new bool[m_AppData.MAX_PHYSICAL_CHANNELS];// used tell the 2255 device which of its channels are enabled m_LastJPEGReceived = new LAST_JPEG_RECEIVED[m_AppData.MAX_PHYSICAL_CHANNELS]; m_Channels = new CHANNEL[m_AppData.MAX_PHYSICAL_CHANNELS]; for (int c = 0; c < m_AppData.MAX_PHYSICAL_CHANNELS; c++) { m_LastJPEGReceived[c] = new LAST_JPEG_RECEIVED(); m_Channels[c] = new CHANNEL(c); } LoadChannelNames(); m_ConsumerIDs = new CONSUMER_ID(); m_CurrentGPSPosition = m_NoPositionAvailable; m_MotionDetectionQ = new ThreadSafeQueue<FRAME>(m_MotionDetectionQueLevel, "QueueOverruns_FG_MotionDetectionQ", m_AppData); m_AppData.MotionDetectionGettingBehind = false; ////////////////////////////////////// // // start the thread that pushes new frames to the registered consumers m_AllFramesConsumerPushQ = new ThreadSafeQueue<CONSUMER_PUSH>(240, "QueueOverruns_FG_AllFramesConsumerPushQ", m_AppData); m_MotionDetectedConsumerPushQ = new ThreadSafeQueue<CONSUMER_PUSH>(240, "QueueOverruns_FG_MotionDetectedConsumerPushQ", m_AppData); //120 PushThread = new Thread(PushLoop); PushThread.Priority = ThreadPriority.AboveNormal; PushThread.Start(); m_MotionDetectionThread = new Thread(MotionDetectionLoop); m_MotionDetectionThread.Start(); ////////////////////////////////////// // // start the S2255 controller // the 2255 controller has a polling loop that looks for 2255 devices to be added/deleted by the user plugging/unplugging the cables // as new devices are detected, the stored config data is read and the channels are assigned and start running as appropriate // the image data flows into this class via callbacks. this class then pushes the data up a layer after adding GPS and time stamps. if (AsService) { try { S2255Controller.S2255Controller.PAL_NTSC_MODE videoStandard = S2255Controller.S2255Controller.PAL_NTSC_MODE.NTSC; string NTSC_PAL = UserSettings.Get(UserSettingTags.VideoSetup_PAL_NTSC); if (NTSC_PAL != null) { if (NTSC_PAL.Equals(UserSettingTags.VideoSetup_PAL)) videoStandard = S2255Controller.S2255Controller.PAL_NTSC_MODE.PAL; } unsafe { m_S2255Controller = new S2255Controller.S2255Controller(videoStandard, m_AppData, m_EabledChannelArray); m_S2255Controller.OnNewFrame += new S2255Controller.S2255Controller.OnNewFrameFromDeviceEvent(OnReceiveNewImageFromS2255Device); m_S2255Controller.StartThreads(); } } catch (Exception ex) { m_Log.Trace(ex, ErrorLog.LOG_TYPE.FATAL); } ////////////////////////////////////// // // start the GPS Controller string GPSPort = FindDevicePort.GetGPSCommPort(); m_GPSController = new GPSController(PutNewGPSData, m_AppData); if (m_S2255Controller.GetReadyStatus) m_FrameGenReadyStatus = true; else m_FrameGenReadyStatus = false; } if (!AsService) { MovieFileController = new MovieFiles(m_AppData); MovieFileController.OnNewImage += new MovieFiles.OnNewImageEvent(MovieFiles_OnNewImage); MovieFileController.Start(); } } catch (Exception ex) { m_Log.Trace(ex, ErrorLog.LOG_TYPE.FATAL);} }
private static extern int FLIReadTemperature(IntPtr dev, CHANNEL channel, out double temperature);
public double ReadTemperature(CHANNEL channel) { double temperature; int status = FLIReadTemperature(dev, channel, out temperature); if (0 != status) throw new Win32Exception(-status); return temperature; }