MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / freqcorr

Function freqcorr

CLI/CLI.cpp:1710–1728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1708
1709
1710static CLIStatus freqcorr(int argc, char** argv, ostream& os)
1711{
1712 os << "current freq. offset is " << gConfig.getNum("TRX.RadioFrequencyOffset") << endl;
1713 if (argc==1) return SUCCESS;
1714 if (argc!=2) return BAD_NUM_ARGS;
1715
1716 if (!gConfig.isValidValue("TRX.RadioFrequencyOffset", argv[1])) {
1717 os << "Invalid new value for freq. offset It must be in range (";
1718 os << gConfig.mSchema["TRX.RadioFrequencyOffset"].getValidValues() << ")" << endl;
1719 return BAD_VALUE;
1720 }
1721
1722 int newOffset = gTRX.ARFCN(0)->setFreqOffset(atoi(argv[1]));
1723 os << "new freq. offset is " << newOffset << endl;
1724
1725 gConfig.set("TRX.RadioFrequencyOffset",newOffset);
1726
1727 return SUCCESS;
1728}
1729
1730
1731

Callers

nothing calls this directly

Calls 3

setFreqOffsetMethod · 0.80
ARFCNMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected