当前位置: 首页>>代码示例>>C++>>正文


C++ MixedData::getString方法代码示例

本文整理汇总了C++中MixedData::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ MixedData::getString方法的具体用法?C++ MixedData::getString怎么用?C++ MixedData::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MixedData的用法示例。


在下文中一共展示了MixedData::getString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: defineAttributes

void HPSidebandLockDevice::defineAttributes()
{

	//Contact arroyo to determine initial temperature setpoint
	//Note that defineAttributes does NOT get called until after all the partners are registered.
	//Channel 2 for Arroyos is the read on the temperature, channel 0 allows a general query to get the temperature setpoint
	MixedValue valueIn;
	valueIn.setValue("TEC:SET:T?");
	MixedData dataOut;
	bool success = partnerDevice("Arroyo").read(0, valueIn, dataOut);
	double tempSetpoint;
	if (success && STI::Utils::stringToValue(dataOut.getString(), tempSetpoint))
		temperatureSetpoint = tempSetpoint;
	else
		cout << "Could not contact Arroyo to determine current temperature setpoint" << endl;

	//Temperature parameters
	addAttribute("Crystal Temp. Setpoint (deg C)", temperatureSetpoint);
	addAttribute("Sideband Asymmetry Gain", gainSidebandAsymmetry);
	addAttribute("Maximum temperature step (deg C)", maxTemperatureStep);
	addAttribute("Enable Asymmetry Lock", (asymmetryLockEnabled ? "True" : "False"), "True, False");
	
	//RF parameters
	addAttribute("Calibration Trace RF Setpoint", rfSetpointCalibration);
	addAttribute("RF modulation setpoint", rfSetpoint);
	
	
	//"Sideband/Carrier"
	addAttribute("Peak Ratio Gain", gainPeakRatio);
	addAttribute("Enable Peak Ratio Lock", (peakRatioLockEnabled ? "True" : "False"), "True, False");
	
	addAttribute("Feedback delay (ms)", feedbackDelay_ms);

	//Peak finding algorithm attributes
	addAttribute("Calibration Trace FSR (ms)", calibrationFSR_ms);
	addAttribute("Calibration Trace Peak Height (V)", calibrationPeakHeight_V);
	addAttribute("1st Sideband to Carrier Spacing (ms)", firstSidebandSpacing_ms);
	addAttribute("2nd Sideband to Carrier Spacing (ms)", secondSidebandSpacing_ms);
	addAttribute("Peak Search Target Range (ms)", peakTargetRange_ms);
	
	addAttribute("Minimum Spectrum X Position (ms)", minSpectrumX_ms);
	addAttribute("Maximum Fractional Sideband Splitting Change", maximumFractionalChangeSplitting);
	
	addAttribute("Peak Ratio Selection", "1st sideband/carrier", "1st sideband/carrier, 2nd sidebands/1st sidebands");

	addAttribute("Carrier-Calibration Offset (ms)", carrierOffset_ms);
}
开发者ID:jasonhogan,项目名称:sti,代码行数:47,代码来源:HPSidebandLockDevice.cpp


注:本文中的MixedData::getString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。