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

Function select_rate

Transceiver52M/UHDDevice.cpp:103–122  ·  view source on GitHub ↗

* Select sample rate based on device type and requested samples-per-symbol. * The base rate is either GSM symbol rate, 270.833 kHz, or the minimum * usable channel spacing of 400 kHz. */

Source from the content-addressed store, hash-verified

101 * usable channel spacing of 400 kHz.
102 */
103static double select_rate(uhd_dev_type type, int sps)
104{
105 if ((sps != 4) && (sps != 1))
106 return -9999.99;
107
108 switch (type) {
109 case USRP2:
110 return USRP2_BASE_RT * sps;
111 case B100:
112 return B100_BASE_RT * sps;
113 case B2XX:
114 case UMTRX:
115 return GSMRATE * sps;
116 default:
117 break;
118 }
119
120 LOG(ALERT) << "Unknown device type " << type;
121 return -9999.99;
122}
123
124/** Timestamp conversion
125 @param timestamp a UHD or OpenBTS timestamp

Callers 1

openMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected