FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
timing::PrototypeTiming Class Reference

Manages timing properties such as frequency, offsets, and synchronization. More...

#include "prototype_timing.h"

Public Member Functions

 PrototypeTiming (std::string name, const SimId id=0) noexcept
 Constructor for PrototypeTiming.
 
 ~PrototypeTiming ()=default
 
 PrototypeTiming (const PrototypeTiming &)=default
 
 PrototypeTiming (PrototypeTiming &&)=default
 
PrototypeTimingoperator= (const PrototypeTiming &)=default
 
PrototypeTimingoperator= (PrototypeTiming &&)=default
 
void copyAlphas (std::vector< RealType > &alphas, std::vector< RealType > &weights) const noexcept
 Copies the alphas and weights vectors.
 
RealType getFrequency () const noexcept
 Gets the current frequency.
 
std::string getName () const
 Gets the name of the timing source.
 
SimId getId () const noexcept
 Gets the unique ID of the timing source.
 
bool getSyncOnPulse () const noexcept
 Checks if synchronization on pulse is enabled.
 
std::optional< RealTypegetPhaseOffset () const noexcept
 Gets the phase offset.
 
std::optional< RealTypegetFreqOffset () const noexcept
 Gets the frequency offset.
 
std::optional< RealTypegetRandomFreqOffsetStdev () const noexcept
 Gets the random frequency-offset standard deviation.
 
std::optional< RealTypegetRandomPhaseOffsetStdev () const noexcept
 Gets the random phase-offset standard deviation.
 
void setFrequency (const RealType freq) noexcept
 Sets the frequency value.
 
void setSyncOnPulse () noexcept
 Enables synchronization on pulse.
 
void clearSyncOnPulse () noexcept
 Disables synchronization on pulse.
 
void setAlpha (RealType alpha, RealType weight) noexcept
 Sets an alpha and weight value.
 
void clearNoiseEntries () noexcept
 Clears all noise entries.
 
void setFreqOffset (RealType offset) noexcept
 Sets the frequency offset.
 
void clearFreqOffset () noexcept
 Clears the frequency offset.
 
void setPhaseOffset (RealType offset) noexcept
 Sets the phase offset.
 
void clearPhaseOffset () noexcept
 Clears the phase offset.
 
void setRandomFreqOffsetStdev (RealType stdev) noexcept
 Sets a random frequency offset standard deviation.
 
void setRandomPhaseOffsetStdev (RealType stdev) noexcept
 Sets a random phase offset standard deviation.
 
void clearRandomFreqOffsetStdev () noexcept
 Clears the random frequency offset standard deviation.
 
void clearRandomPhaseOffsetStdev () noexcept
 Clears the random phase offset standard deviation.
 
void setName (std::string name) noexcept
 Sets the name of the timing source.
 

Detailed Description

Manages timing properties such as frequency, offsets, and synchronization.

Definition at line 29 of file prototype_timing.h.

Constructor & Destructor Documentation

◆ PrototypeTiming() [1/3]

timing::PrototypeTiming::PrototypeTiming ( std::string  name,
const SimId  id = 0 
)
explicitnoexcept

Constructor for PrototypeTiming.

Parameters
nameThe name of the timing source.

Definition at line 37 of file prototype_timing.h.

37 :
38 _id(id == 0 ? SimIdGenerator::instance().generateId(ObjectType::Timing) : id), _name(std::move(name))
39 {
40 }
static SimIdGenerator & instance()
Get the singleton instance of SimIdGenerator.
Definition sim_id.h:48
math::Vec3 max

◆ ~PrototypeTiming()

timing::PrototypeTiming::~PrototypeTiming ( )
default

◆ PrototypeTiming() [2/3]

timing::PrototypeTiming::PrototypeTiming ( const PrototypeTiming )
default

◆ PrototypeTiming() [3/3]

timing::PrototypeTiming::PrototypeTiming ( PrototypeTiming &&  )
default

Member Function Documentation

◆ clearFreqOffset()

void timing::PrototypeTiming::clearFreqOffset ( )
noexcept

Clears the frequency offset.

Definition at line 148 of file prototype_timing.h.

148{ _freq_offset = std::nullopt; }

◆ clearNoiseEntries()

void timing::PrototypeTiming::clearNoiseEntries ( )
noexcept

Clears all noise entries.

Definition at line 33 of file prototype_timing.cpp.

34 {
35 _alphas.clear();
36 _weights.clear();
37 }

◆ clearPhaseOffset()

void timing::PrototypeTiming::clearPhaseOffset ( )
noexcept

Clears the phase offset.

Definition at line 160 of file prototype_timing.h.

160{ _phase_offset = std::nullopt; }

◆ clearRandomFreqOffsetStdev()

void timing::PrototypeTiming::clearRandomFreqOffsetStdev ( )
noexcept

Clears the random frequency offset standard deviation.

Definition at line 179 of file prototype_timing.h.

179{ _random_freq_stdev = std::nullopt; }

◆ clearRandomPhaseOffsetStdev()

void timing::PrototypeTiming::clearRandomPhaseOffsetStdev ( )
noexcept

Clears the random phase offset standard deviation.

Definition at line 184 of file prototype_timing.h.

184{ _random_phase_stdev = std::nullopt; }

◆ clearSyncOnPulse()

void timing::PrototypeTiming::clearSyncOnPulse ( )
noexcept

Disables synchronization on pulse.

Definition at line 123 of file prototype_timing.h.

123{ _sync_on_pulse = false; }

◆ copyAlphas()

void timing::PrototypeTiming::copyAlphas ( std::vector< RealType > &  alphas,
std::vector< RealType > &  weights 
) const
noexcept

Copies the alphas and weights vectors.

Parameters
alphasReference to the vector where alpha values will be copied.
weightsReference to the vector where weight values will be copied.

Definition at line 27 of file prototype_timing.cpp.

28 {
29 alphas = _alphas;
30 weights = _weights;
31 }

References max.

◆ getFreqOffset()

std::optional< RealType > timing::PrototypeTiming::getFreqOffset ( ) const
noexcept

Gets the frequency offset.

Returns
The frequency offset value.

Definition at line 100 of file prototype_timing.h.

100{ return _freq_offset; }

◆ getFrequency()

RealType timing::PrototypeTiming::getFrequency ( ) const
noexcept

Gets the current frequency.

Returns
The current frequency value.

Definition at line 65 of file prototype_timing.h.

65{ return _frequency; }

◆ getId()

SimId timing::PrototypeTiming::getId ( ) const
noexcept

Gets the unique ID of the timing source.

Returns
The timing source SimId.

Definition at line 79 of file prototype_timing.h.

79{ return _id; }

◆ getName()

std::string timing::PrototypeTiming::getName ( ) const

Gets the name of the timing source.

Returns
The name of the timing source.

Definition at line 72 of file prototype_timing.h.

72{ return _name; }

◆ getPhaseOffset()

std::optional< RealType > timing::PrototypeTiming::getPhaseOffset ( ) const
noexcept

Gets the phase offset.

Returns
The phase offset value.

Definition at line 93 of file prototype_timing.h.

93{ return _phase_offset; }

◆ getRandomFreqOffsetStdev()

std::optional< RealType > timing::PrototypeTiming::getRandomFreqOffsetStdev ( ) const
noexcept

Gets the random frequency-offset standard deviation.

Definition at line 103 of file prototype_timing.h.

103{ return _random_freq_stdev; }

◆ getRandomPhaseOffsetStdev()

std::optional< RealType > timing::PrototypeTiming::getRandomPhaseOffsetStdev ( ) const
noexcept

Gets the random phase-offset standard deviation.

Definition at line 106 of file prototype_timing.h.

106{ return _random_phase_stdev; }

◆ getSyncOnPulse()

bool timing::PrototypeTiming::getSyncOnPulse ( ) const
noexcept

Checks if synchronization on pulse is enabled.

Returns
True if synchronization on pulse is enabled, false otherwise.

Definition at line 86 of file prototype_timing.h.

86{ return _sync_on_pulse; }

◆ operator=() [1/2]

PrototypeTiming & timing::PrototypeTiming::operator= ( const PrototypeTiming )
default

◆ operator=() [2/2]

PrototypeTiming & timing::PrototypeTiming::operator= ( PrototypeTiming &&  )
default

◆ setAlpha()

void timing::PrototypeTiming::setAlpha ( RealType  alpha,
RealType  weight 
)
noexcept

Sets an alpha and weight value.

Parameters
alphaThe alpha value to be added.
weightThe weight value to be added.

Definition at line 21 of file prototype_timing.cpp.

22 {
23 _alphas.emplace_back(alpha);
24 _weights.emplace_back(weight);
25 }

References max.

◆ setFreqOffset()

void timing::PrototypeTiming::setFreqOffset ( RealType  offset)
noexcept

Sets the frequency offset.

Parameters
offsetThe frequency offset to be set.

Definition at line 143 of file prototype_timing.h.

143{ _freq_offset = offset; }

References max.

◆ setFrequency()

void timing::PrototypeTiming::setFrequency ( const RealType  freq)
noexcept

Sets the frequency value.

Parameters
freqThe frequency value to be set.

Definition at line 113 of file prototype_timing.h.

113{ _frequency = freq; }

References max.

◆ setName()

void timing::PrototypeTiming::setName ( std::string  name)
noexcept

Sets the name of the timing source.

Parameters
nameThe new name.

Definition at line 191 of file prototype_timing.h.

191{ _name = std::move(name); }

◆ setPhaseOffset()

void timing::PrototypeTiming::setPhaseOffset ( RealType  offset)
noexcept

Sets the phase offset.

Parameters
offsetThe phase offset to be set.

Definition at line 155 of file prototype_timing.h.

155{ _phase_offset = offset; }

References max.

◆ setRandomFreqOffsetStdev()

void timing::PrototypeTiming::setRandomFreqOffsetStdev ( RealType  stdev)
noexcept

Sets a random frequency offset standard deviation.

Parameters
stdevThe standard deviation for generating the random frequency offset.

Definition at line 167 of file prototype_timing.h.

167{ _random_freq_stdev = stdev; }

References max.

◆ setRandomPhaseOffsetStdev()

void timing::PrototypeTiming::setRandomPhaseOffsetStdev ( RealType  stdev)
noexcept

Sets a random phase offset standard deviation.

Parameters
stdevThe standard deviation for generating the random phase offset.

Definition at line 174 of file prototype_timing.h.

174{ _random_phase_stdev = stdev; }

References max.

◆ setSyncOnPulse()

void timing::PrototypeTiming::setSyncOnPulse ( )
noexcept

Enables synchronization on pulse.

Definition at line 118 of file prototype_timing.h.

118{ _sync_on_pulse = true; }

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