EMANE  1.2.1
EMANE::SpectrumMonitor Class Reference

#include <spectrummonitor.h>

Inheritance diagram for EMANE::SpectrumMonitor:
EMANE::SpectrumServiceProvider

Public Types

enum  NoiseMode { NoiseMode::NONE, NoiseMode::ALL, NoiseMode::OUTOFBAND }
 

Public Member Functions

 SpectrumMonitor ()
 
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::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)
 
FrequencySet getFrequencies () const override
 
double getReceiverSensitivitydBm () const override
 
SpectrumWindow request_i (const TimePoint &now, std::uint64_t u64FrequencyHz, const Microseconds &duration=Microseconds::zero(), const TimePoint &timepoint=TimePoint::min()) const
 
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
 

Detailed Description

Definition at line 50 of file spectrummonitor.h.

Member Enumeration Documentation

◆ NoiseMode

Enumerator
NONE 
ALL 
OUTOFBAND 

Definition at line 56 of file spectrummonitor.h.

Constructor & Destructor Documentation

◆ SpectrumMonitor()

EMANE::SpectrumMonitor::SpectrumMonitor ( )

Definition at line 50 of file spectrummonitor.cc.

Member Function Documentation

◆ dump()

std::vector< double > EMANE::SpectrumMonitor::dump ( std::uint64_t  u64FrequencyHz) const

Definition at line 479 of file spectrummonitor.cc.

◆ getFrequencies()

EMANE::FrequencySet EMANE::SpectrumMonitor::getFrequencies ( ) const
overridevirtual

Gets the set of monitored frequencies

Returns
frequency set

Implements EMANE::SpectrumServiceProvider.

Definition at line 411 of file spectrummonitor.cc.

◆ getReceiverSensitivitydBm()

double EMANE::SpectrumMonitor::getReceiverSensitivitydBm ( ) const
overridevirtual

Gets the receiver sensitivity in dBm

Returns
receiver sensitivity

Implements EMANE::SpectrumServiceProvider.

Definition at line 425 of file spectrummonitor.cc.

◆ initialize()

void EMANE::SpectrumMonitor::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 
)

Definition at line 61 of file spectrummonitor.cc.

◆ request()

EMANE::SpectrumWindow EMANE::SpectrumMonitor::request ( std::uint64_t  u64FrequencyHz,
const Microseconds duration = Microseconds::zero(),
const TimePoint startTime = TimePoint::min() 
) const
overridevirtual

Gets a spectrum window

Parameters
u64FrequencyHzFrequency to query for its spectrum window
durationThe amount of time in microseconds to request. If not specified the default will indicate maximum duration configured for the FrameworkPHY (default only recommended for DSA type functionality).
startTimeThe start time of the spectrum window request. If not specified the default value will indicate now - maximum duration configured for the FrameworkPHY (default only recommended for DSA type functionality).
Precondition
The requested frequency must me a monitored frequency
The duration cannot be more than the maximum duration configured for the FrameworkPHY
The start time plus the duration cannot be greater than now
The start time cannot be less than now minus the maximum duration configured for the FrameworkPHY
Returns
A spectrum window
Exceptions
SpectrumServiceExceptionwhen the request parameters violate preconditions.
Note
Request duration should almost always be the span contained in the Controls::ReceivePropertiesControlMessage.
Request startTime should be the start of reception (SoR) which is the start of transmission (SoT) + propagation delay + offset of the first frequency segment. SoT and propagation delay are contained in the Controls::ReceivePropertiesControlMessage. Frequency segment offset is contained in the Controls::FrequencyControlMessage.
Can be passed to Utils::maxBinNoiseFloorRange or Utils::maxBinNoiseFloor.

Implements EMANE::SpectrumServiceProvider.

Definition at line 472 of file spectrummonitor.cc.

◆ request_i()

EMANE::SpectrumWindow EMANE::SpectrumMonitor::request_i ( const TimePoint now,
std::uint64_t  u64FrequencyHz,
const Microseconds duration = Microseconds::zero(),
const TimePoint timepoint = TimePoint::min() 
) const

Definition at line 433 of file spectrummonitor.cc.

◆ update()

std::tuple< EMANE::TimePoint, EMANE::Microseconds, EMANE::Microseconds, EMANE::FrequencySegments, bool > EMANE::SpectrumMonitor::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 
)

Definition at line 114 of file spectrummonitor.cc.


The documentation for this class was generated from the following files: