mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
atrf-path: generalized sweep interface (for reuse)
- sweep.h (struct sweep ), atrf-path.c (sample, do_sweeps, main): pass sweep parameters via a struct - sweep.h (do_sweep), atrf-path.c (do_sweep, do_sweeps): separated single sweep and made it public - sweep.h (struct sample), atrf-path.c (sample, print_sweep, do_sweeps): made "sample" and do_sweep return the sample value/vector and moved output from "sample" to print_sweep
This commit is contained in:
37
tools/atrf-path/sweep.h
Normal file
37
tools/atrf-path/sweep.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* atrf-path/sweep.h - Measure path characteristics
|
||||
*
|
||||
* Written 2011 by Werner Almesberger
|
||||
* Copyright 2011 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SWEEP_H
|
||||
#define SWEEP_H
|
||||
|
||||
#include "atrf.h"
|
||||
|
||||
|
||||
struct sweep {
|
||||
struct atrf_dsc *tx;
|
||||
struct atrf_dsc *rx;
|
||||
int trim_tx;
|
||||
int trim_rx;
|
||||
int power;
|
||||
int samples;
|
||||
};
|
||||
|
||||
struct sample {
|
||||
double avg;
|
||||
double min, max;
|
||||
};
|
||||
|
||||
|
||||
void do_sweep(const struct sweep *sweep, struct sample *res);
|
||||
|
||||
#endif /* !SWEEP_H */
|
||||
Reference in New Issue
Block a user