本文整理汇总了C++中ConfigurationTable::isValidValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigurationTable::isValidValue方法的具体用法?C++ ConfigurationTable::isValidValue怎么用?C++ ConfigurationTable::isValidValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigurationTable
的用法示例。
在下文中一共展示了ConfigurationTable::isValidValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
COUT("\nStarting the system...");
// is the radio running?
// Start the transceiver interface.
LOG(INFO) << "checking transceiver";
//gTRX.ARFCN(0)->powerOn();
//sleep(gConfig.getNum("TRX.Timeout.Start"));
//bool haveTRX = gTRX.ARFCN(0)->powerOn(false); This prints an inapplicable warning message.
bool haveTRX = gTRX.ARFCN(0)->trxRunning(); // This does not print an inapplicable warning message.
Thread transceiverThread;
if (!haveTRX) {
LOG(ALERT) << "starting the transceiver";
transceiverThread.start((void*(*)(void*)) startTransceiver, NULL);
// sleep to let the FPGA code load
// TODO: we should be "pinging" the radio instead of sleeping
sleep(5);
} else {
LOG(NOTICE) << "transceiver already running";
}
// Start the SIP interface.
SIP::SIPInterfaceStart();
// Start the peer interface
gPeerInterface.start();
// Sync factory calibration as defaults from radio EEPROM
signed sdrsn = gTRX.ARFCN(0)->getFactoryCalibration("sdrsn");
if (sdrsn != 0 && sdrsn != 65535) {
signed val;
val = gTRX.ARFCN(0)->getFactoryCalibration("band");
if (gConfig.isValidValue("GSM.Radio.Band", val)) {
gConfig.mSchema["GSM.Radio.Band"].updateDefaultValue(val);
}
val = gTRX.ARFCN(0)->getFactoryCalibration("freq");
if (gConfig.isValidValue("TRX.RadioFrequencyOffset", val)) {
gConfig.mSchema["TRX.RadioFrequencyOffset"].updateDefaultValue(val);
}
val = gTRX.ARFCN(0)->getFactoryCalibration("rxgain");
if (gConfig.isValidValue("GSM.Radio.RxGain", val)) {
gConfig.mSchema["GSM.Radio.RxGain"].updateDefaultValue(val);
}
val = gTRX.ARFCN(0)->getFactoryCalibration("txgain");
if (gConfig.isValidValue("TRX.TxAttenOffset", val)) {
gConfig.mSchema["TRX.TxAttenOffset"].updateDefaultValue(val);
}
}
// Limit valid ARFCNs to current band
gConfig.mSchema["GSM.Radio.C0"].updateValidValues(getARFCNsString(gConfig.getNum("GSM.Radio.Band")));
//
// Configure the radio.
//
gTRX.start();
// Set up the interface to the radio.
// Get a handle to the C0 transceiver interface.
ARFCNManager* C0radio = gTRX.ARFCN(0);