41 lines
903 B
C++
41 lines
903 B
C++
/*
|
||
* © Copyright 2014 – Urheberrechtshinweis
|
||
* Alle Rechte vorbehalten / All Rights Reserved
|
||
*
|
||
* Programmcode ist urheberrechtlich geschuetzt.
|
||
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
|
||
* Keine Verwendung ohne explizite Genehmigung.
|
||
* (vgl. § 106 ff UrhG / § 97 UrhG)
|
||
*/
|
||
|
||
#ifndef INDOOR_WIFICHANNELS_H
|
||
#define INDOOR_WIFICHANNELS_H
|
||
|
||
class WiFiChannels {
|
||
|
||
public:
|
||
|
||
static int freqToChannel(const int freq) {
|
||
switch(freq) {
|
||
case 2412: return 1;
|
||
case 2417: return 2;
|
||
case 2422: return 3;
|
||
case 2427: return 4;
|
||
case 2432: return 5;
|
||
case 2437: return 6;
|
||
case 2442: return 7;
|
||
case 2447: return 8;
|
||
case 2452: return 9;
|
||
case 2457: return 10;
|
||
case 2462: return 11;
|
||
case 2467: return 12;
|
||
case 2472: return 13;
|
||
case 2484: return 14;
|
||
}
|
||
throw "error";
|
||
}
|
||
|
||
};
|
||
|
||
#endif // INDOOR_WIFICHANNELS_H
|