mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Add channel utilization
This commit is contained in:
parent
8a3216f942
commit
f0f5534c82
2 changed files with 27 additions and 2 deletions
|
@ -18,8 +18,8 @@ struct probe_metric_s dawn_metric;
|
|||
struct probe_metric_s {
|
||||
int ht_support;
|
||||
int vht_support;
|
||||
int n_ht_support;
|
||||
int n_vht_support;
|
||||
int no_ht_support;
|
||||
int no_vht_support;
|
||||
int rssi;
|
||||
int freq;
|
||||
};
|
||||
|
|
|
@ -38,6 +38,22 @@ struct probe_metric_s uci_get_dawn_metric()
|
|||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.vht_support = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_no_ht_support[] = "dawn.metric.no_ht_support";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_no_ht_support, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.no_ht_support = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_no_vht_support[] = "dawn.metric.no_vht_support";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_vht_support, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.no_vht_support = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_rssi[] = "dawn.metric.freq";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_rssi, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
|
@ -54,6 +70,15 @@ struct probe_metric_s uci_get_dawn_metric()
|
|||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.freq = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_freq[] = "dawn.metric.chan_util";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_freq, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.freq = atoi(ptr.o->v.string);
|
||||
|
||||
|
||||
uci_free_context (c);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue