public bool SetBandwidth(SpectraCyberBandwidthEnum bandwidth) { // Our spectra cyber does not use this command /* * string Command = ""; * * if (bandwidth.GetValue().Equals("15Khz")) * { * Command = "!B000"; * * } * else if (bandwidth.GetValue().Equals("30Khz")) * { * Command = "!B001"; * } * * SpectraCyberRequest Request = new SpectraCyberRequest( * SpectraCyberCommandTypeEnum.CHANGE_SETTING, * Command, * false, * 4 * ); * * SpectraCyberResponse Response = new SpectraCyberResponse(); * SendCommand(Request, ref Response); * * configVals.bandwidth = bandwidth; * * return Response.RequestSuccessful; */ return(true); }
public SpectraCyberConfig(SpectraCyberModeTypeEnum mode, SpectraCyberIntegrationTimeEnum integration_time, double offset_voltage, double if_gain, SpectraCyberDCGainEnum dc_gain, SpectraCyberBandwidthEnum bandwidth) { _Mode = mode; IntegrationTime = integration_time; OffsetVoltage = offset_voltage; IFGain = if_gain; DCGain = dc_gain; Bandwidth = bandwidth; }
public SpectraCyberConfigValues(SpectraCyberModeTypeEnum spectraCyberModeIN, double offsetVoltageIN, double integrationStepIN, SpectraCyberDCGainEnum specGainIN, SpectraCyberDCGainEnum contGainIN, double IFGainIN, SpectraCyberBandwidthEnum bandwidthIN, double frequencyIN, double rfDataIN, double scanTimeIN, double bandscanIn) { spectraCyberMode = spectraCyberModeIN; offsetVoltage = offsetVoltageIN; integrationStep = integrationStepIN; IFGain = IFGainIN; specGain = specGainIN; contGain = contGainIN; bandwidth = bandwidthIN; frequency = frequencyIN; rfData = rfDataIN; scanTime = scanTimeIN; bandscan = bandscanIn; }
public static int GetIntegerValue(this SpectraCyberBandwidthEnum time) { switch (time) { case SpectraCyberBandwidthEnum.SMALL_BANDWIDTH: return(15); case SpectraCyberBandwidthEnum.LARGE_BANDWIDTH: return(1200); // case SpectraCyberBandwidthEnum.UNDEFINED: // throw new System.Exception("UNDEFINED SpectraCyberBandwidthEnum type"); default: return(30); // throw new System.Exception("Unexpected SpectraCyberBandwidthEnum type"); } }
public static string GetValue(this SpectraCyberBandwidthEnum time) { switch (time) { case SpectraCyberBandwidthEnum.SMALL_BANDWIDTH: return("15Khz"); case SpectraCyberBandwidthEnum.LARGE_BANDWIDTH: return("30Khz"); case SpectraCyberBandwidthEnum.UNDEFINED: throw new System.Exception("UNDEFINED SpectraCyberBandwidthEnum type"); default: throw new System.Exception("Unexpected SpectraCyberBandwidthEnum type"); } }