33 #ifndef EMANEPHYSPECTRUMMONITOR_HEADER_ 34 #define EMANEPHYSPECTRUMMONITOR_HEADER_ 59 std::uint64_t u64BandwidthHz,
60 double dReceiverSensitivityMilliWatt,
69 std::tuple<TimePoint,Microseconds,Microseconds,FrequencySegments,bool>
74 std::uint64_t u64SegmentBandwidthHz,
75 const std::vector<double> & rxPowersMilliWatt,
77 const std::vector<NEMId> & transmitters);
86 std::uint64_t u64FrequencyHz,
88 const TimePoint & timepoint = TimePoint::min())
const;
93 const TimePoint & timepoint = TimePoint::min())
const override;
96 std::vector<double>
dump(std::uint64_t u64FrequencyHz)
const;
99 using NoiseRecorderMap = std::map<std::uint64_t,std::unique_ptr<NoiseRecorder>>;
100 using Cache = std::map<std::uint64_t,std::vector<std::tuple<NoiseRecorder *,double,std::uint64_t>>>;
101 using TransmitterBandwidthCache = std::map<std::uint64_t,std::unique_ptr<Cache>>;
108 TransmitterBandwidthCache transmitterBandwidthCache_;
109 NoiseRecorderMap noiseRecorderMap_;
110 std::uint64_t u64ReceiverBandwidthHz_;
112 double dReceiverSensitivityMilliWatt_;
113 mutable std::mutex mutex_;
117 #endif // EMANEPHYSPECTRUMMONITOR_HEADER_
std::tuple< std::vector< double >, TimePoint, Microseconds, double, bool > SpectrumWindow
The SpectrumServiceProvider interface provides an API to request noise window information.
double getReceiverSensitivitydBm() const override
std::set< std::uint64_t > FrequencySet
std::tuple< TimePoint, Microseconds, Microseconds, FrequencySegments, bool > update(const TimePoint &now, const TimePoint &txTime, const Microseconds &propagationDelay, const FrequencySegments &segments, std::uint64_t u64SegmentBandwidthHz, const std::vector< double > &rxPowersMilliWatt, bool bInBand, const std::vector< NEMId > &transmitters)
std::chrono::microseconds Microseconds
void initialize(const FrequencySet &foi, std::uint64_t u64BandwidthHz, double dReceiverSensitivityMilliWatt, NoiseMode mode, const Microseconds &binSize, const Microseconds &maxOffset, const Microseconds &maxPropagation, const Microseconds &maxDuration, const Microseconds &timeSyncThreshold, bool bMaxClamp)
std::list< FrequencySegment > FrequencySegments
FrequencySet getFrequencies() const override
Clock::time_point TimePoint
SpectrumWindow request(std::uint64_t u64FrequencyHz, const Microseconds &duration=Microseconds::zero(), const TimePoint &timepoint=TimePoint::min()) const override
std::vector< double > dump(std::uint64_t u64FrequencyHz) const
SpectrumWindow request_i(const TimePoint &now, std::uint64_t u64FrequencyHz, const Microseconds &duration=Microseconds::zero(), const TimePoint &timepoint=TimePoint::min()) const