本文整理汇总了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);
}