| 109 | }*/ |
| 110 | |
| 111 | ARFCNList SpectrumMap::topPower(GSM::GSMBand band, unsigned count) const |
| 112 | { |
| 113 | char q[200]; |
| 114 | sprintf(q,"SELECT ARFCN FROM SPECTRUM_MAP WHERE BAND=%u ORDER BY RSSI DESC", band); |
| 115 | |
| 116 | ARFCNList retVal; |
| 117 | sqlite3_stmt *stmt; |
| 118 | sqlite3_prepare_statement(mDB,&stmt,q); |
| 119 | int src = sqlite3_run_query(mDB,stmt); |
| 120 | while ((retVal.size()<count) && src==SQLITE_ROW) { |
| 121 | unsigned ARFCN = (unsigned)sqlite3_column_int(stmt,0); |
| 122 | retVal.push_back(ARFCN); |
| 123 | src = sqlite3_run_query(mDB,stmt); |
| 124 | } |
| 125 | sqlite3_finalize(stmt); |
| 126 | return retVal; |
| 127 | } |
| 128 | |
| 129 | |
| 130 | ARFCNList SpectrumMap::minimumPower(GSM::GSMBand band, unsigned count) const |