mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2026-01-27 10:23:13 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -515,7 +515,7 @@ namespace OpenWifi::GWObjects {
|
||||
void FrequencyRange::to_json(Poco::JSON::Object &Obj) const {
|
||||
field_to_json(Obj, "from", from);
|
||||
field_to_json(Obj, "to", to);
|
||||
field_to_json(Obj, "bw", bw);
|
||||
field_to_json(Obj, "channelWidth", channelWidth);
|
||||
field_to_json(Obj, "powerDb", powerDb);
|
||||
field_to_json(Obj, "options", options);
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace OpenWifi::GWObjects {
|
||||
struct FrequencyRange {
|
||||
float from = 0.0;
|
||||
float to = 0.0;
|
||||
int bw = 0;
|
||||
int channelWidth = 0;
|
||||
int powerDb = 0;
|
||||
RangeOptions options;
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace OpenWifi {
|
||||
if(inCountry) {
|
||||
GWObjects::FrequencyRange fr;
|
||||
auto tokens = Poco::StringTokenizer(line,",", Poco::StringTokenizer::TOK_TRIM);
|
||||
std::sscanf(tokens[0].c_str(),"(%f - %f @ %d)", &fr.from, &fr.to, &fr.bw);
|
||||
std::sscanf(tokens[0].c_str(),"(%f - %f @ %d)", &fr.from, &fr.to, &fr.channelWidth);
|
||||
if(tokens[1].find("mW")!=std::string::npos) {
|
||||
int temp_pwr;
|
||||
std::sscanf(tokens[1].c_str(),"(%d mW)", &temp_pwr);
|
||||
|
||||
Reference in New Issue
Block a user