14 #ifndef HH_SENF_Ext_NetEmu_WLAN_AthSpectralScan_ 15 #define HH_SENF_Ext_NetEmu_WLAN_AthSpectralScan_ 1 41 typedef std::function<void (std::uint64_t tsft, std::uint16_t frequency, unsigned numBins, void * spectralSample)>
AthSpectralScanCallback;
46 bool spectralSetting( std::string option, std::string value);
47 bool spectralSetting( std::string option,
unsigned value);
48 unsigned spectralSetting( std::string option)
const;
50 bool callback(AthSpectralScanCallback
const & cb);
52 void frequency(std::uint32_t
freq, std::uint32_t bandwidth, std::int32_t offset = 0);
54 bool detected()
const;
55 bool is_ath9k()
const;
56 bool is_ath10k()
const;
58 void stats(std::ostream & os);
60 unsigned spectralPeriod()
const;
61 unsigned spectralFFTPeriod()
const;
62 unsigned spectralShortRepeat()
const;
63 unsigned spectralCount()
const;
64 unsigned spectralBins()
const;
66 bool spectralPeriod(
unsigned v);
67 bool spectralFFTPeriod(
unsigned v);
68 bool spectralShortRepeat(
unsigned v);
69 bool spectralCount(
unsigned v);
70 bool spectralBins(
unsigned v);
75 std::string spectralPath_;
76 AthSpectralScanCallback callback_;
77 std::uint32_t frequency_;
78 std::int32_t frequencyOffset_;
80 unsigned spectralFrames_;
81 unsigned spectralValidSamples_;
82 unsigned spectralUnknown_;
83 unsigned spectralTruncated_;
84 unsigned spectralFrequencyMismatch_;
86 void handleSpectralEvent(
int fd);
friend friend class FileBody
std::function< void(std::uint64_t tsft, std::uint16_t frequency, unsigned numBins, void *spectralSample)> AthSpectralScanCallback