FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
radar::Receiver Class Referencefinal

Manages radar signal reception and response processing. More...

#include "receiver.h"

+ Inheritance diagram for radar::Receiver:
+ Collaboration diagram for radar::Receiver:

Public Types

enum class  RecvFlag { FLAG_NODIRECT = 1 , FLAG_NOPROPLOSS = 2 }
 Enumeration for receiver configuration flags. More...
 

Public Member Functions

 Receiver (Platform *platform, std::string name, unsigned seed, OperationMode mode) noexcept
 Constructs a Receiver object.
 
 ~Receiver () override=default
 
 Receiver (const Receiver &)=delete
 
 Receiver (Receiver &&)=delete
 
Receiveroperator= (const Receiver &)=delete
 
Receiveroperator= (Receiver &&)=delete
 
void addResponseToInbox (std::unique_ptr< serial::Response > response) noexcept
 Adds a response to the receiver's pulsed-mode inbox.
 
void addInterferenceToLog (std::unique_ptr< serial::Response > response) noexcept
 Adds a pulsed interference response to the receiver's CW-mode log.
 
bool checkFlag (RecvFlag flag) const noexcept
 Checks if a specific flag is set.
 
RealType getNoiseTemperature () const noexcept
 Retrieves the noise temperature of the receiver.
 
RealType getWindowLength () const noexcept
 Retrieves the radar window length.
 
RealType getWindowPrf () const noexcept
 Retrieves the pulse repetition frequency (PRF) of the radar window.
 
RealType getWindowSkip () const noexcept
 Retrieves the window skip time.
 
RealType getNoiseTemperature (const math::SVec3 &angle) const noexcept override
 Gets the noise temperature for a specific angle.
 
RealType getWindowStart (unsigned window) const
 Retrieves the start time of a specific radar window.
 
unsigned getWindowCount () const noexcept
 Gets the number of radar windows.
 
std::mt19937 & getRngEngine () noexcept
 Gets the receiver's internal random number generator engine.
 
OperationMode getMode () const noexcept
 Gets the operational mode of the receiver.
 
bool isActive () const noexcept
 Checks if the receiver is currently active (listening).
 
void setActive (const bool active) noexcept
 Sets the active state of the receiver.
 
std::vector< std::unique_ptr< serial::Response > > drainInbox () noexcept
 Moves all responses from the inbox into a RenderingJob.
 
void enqueueFinalizerJob (core::RenderingJob &&job)
 Adds a completed RenderingJob to the finalizer queue.
 
bool waitAndDequeueFinalizerJob (core::RenderingJob &job)
 Waits for and dequeues a RenderingJob from the finalizer queue.
 
void setWindowProperties (RealType length, RealType prf, RealType skip) noexcept
 Sets the properties for radar windows.
 
void setFlag (RecvFlag flag) noexcept
 Sets a receiver flag.
 
void setNoiseTemperature (RealType temp)
 Sets the noise temperature of the receiver.
 
void prepareCwData (size_t numSamples)
 Prepares the internal storage for CW IQ data.
 
void setCwSample (size_t index, ComplexType sample)
 Sets a single IQ sample at a specific index for CW simulation.
 
const std::vector< ComplexType > & getCwData () const
 Retrieves the collected CW IQ data.
 
std::vector< ComplexType > & getMutableCwData ()
 Retrieves the collected CW IQ data for modification.
 
const std::vector< std::unique_ptr< serial::Response > > & getPulsedInterferenceLog () const
 Retrieves the log of pulsed interferences for CW mode.
 
void setSchedule (std::vector< SchedulePeriod > schedule)
 Sets the active schedule for the receiver.
 
const std::vector< SchedulePeriod > & getSchedule () const noexcept
 Retrieves the list of active reception periods.
 
std::optional< RealTypegetNextWindowTime (RealType time) const
 Determines the next valid window start time at or after the given time.
 
const RadargetAttached () const noexcept
 Retrieves the attached radar object.
 
const antenna::AntennagetAntenna () const noexcept
 Gets the antenna associated with this radar.
 
RealType getGain (const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const
 Calculates the radar gain based on input angles and wavelength.
 
std::shared_ptr< timing::TiminggetTiming () const
 Retrieves the timing source for the radar.
 
void setTiming (const std::shared_ptr< timing::Timing > &tim)
 Sets the timing source for the radar.
 
void setAntenna (const antenna::Antenna *ant)
 Sets the antenna for the radar.
 
void setAttached (const Radar *obj)
 Attaches another radar object to this radar.
 
math::Vec3 getPosition (const RealType time) const
 Retrieves the position of the object.
 
math::SVec3 getRotation (const RealType time) const
 Retrieves the rotation of the object.
 
PlatformgetPlatform () const noexcept
 Retrieves the associated platform of the object.
 
const std::string & getName () const noexcept
 Retrieves the name of the object.
 

Protected Attributes

std::shared_ptr< timing::Timing_timing
 Timing source for the radar.
 

Detailed Description

Manages radar signal reception and response processing.

Definition at line 35 of file receiver.h.

Member Enumeration Documentation

◆ RecvFlag

enum class radar::Receiver::RecvFlag
strong

Enumeration for receiver configuration flags.

Enumerator
FLAG_NODIRECT 
FLAG_NOPROPLOSS 

Definition at line 42 of file receiver.h.

Constructor & Destructor Documentation

◆ Receiver() [1/3]

radar::Receiver::Receiver ( Platform platform,
std::string  name,
unsigned  seed,
OperationMode  mode 
)
explicitnoexcept

Constructs a Receiver object.

Parameters
platformThe platform associated with this receiver.
nameThe name of the receiver.
seedThe seed for the receiver's internal random number generator.
modeThe operational mode (PULSED_MODE or CW_MODE).

Definition at line 23 of file receiver.cpp.

23 :
24 Radar(platform, std::move(name)), _mode(mode), _rng(seed)
25 {
26 }
Radar(Platform *platform, std::string name) noexcept
Constructs a Radar object.
Definition radar_obj.h:54

◆ ~Receiver()

radar::Receiver::~Receiver ( )
overridedefault

◆ Receiver() [2/3]

radar::Receiver::Receiver ( const Receiver )
delete

◆ Receiver() [3/3]

radar::Receiver::Receiver ( Receiver &&  )
delete

Member Function Documentation

◆ addInterferenceToLog()

void radar::Receiver::addInterferenceToLog ( std::unique_ptr< serial::Response response)
noexcept

Adds a pulsed interference response to the receiver's CW-mode log.

Parameters
responseA unique pointer to the response object.

Definition at line 34 of file receiver.cpp.

35 {
36 std::lock_guard lock(_interference_log_mutex);
37 _pulsed_interference_log.push_back(std::move(response));
38 }

◆ addResponseToInbox()

void radar::Receiver::addResponseToInbox ( std::unique_ptr< serial::Response response)
noexcept

Adds a response to the receiver's pulsed-mode inbox.

Parameters
responseA unique pointer to the response object.

Definition at line 28 of file receiver.cpp.

29 {
30 std::lock_guard lock(_inbox_mutex);
31 _inbox.push_back(std::move(response));
32 }

◆ checkFlag()

bool radar::Receiver::checkFlag ( RecvFlag  flag) const
noexcept

Checks if a specific flag is set.

Parameters
flagThe flag to check.
Returns
True if the flag is set, false otherwise.

Definition at line 86 of file receiver.h.

86{ return _flags & static_cast<int>(flag); }

Referenced by simulation::calculateDirectPathContribution(), simulation::calculatePreviewLinks(), simulation::calculateReflectedPathContribution(), processing::runPulsedFinalizer(), simulation::solveRe(), simulation::solveReDirect(), and radar::to_json().

+ Here is the caller graph for this function:

◆ drainInbox()

std::vector< std::unique_ptr< serial::Response > > radar::Receiver::drainInbox ( )
noexcept

Moves all responses from the inbox into a RenderingJob.

Returns
A vector of unique pointers to the responses.

Definition at line 40 of file receiver.cpp.

41 {
42 std::lock_guard lock(_inbox_mutex);
43 std::vector<std::unique_ptr<serial::Response>> drained_responses;
44 drained_responses.swap(_inbox);
45 return drained_responses;
46 }

◆ enqueueFinalizerJob()

void radar::Receiver::enqueueFinalizerJob ( core::RenderingJob &&  job)

Adds a completed RenderingJob to the finalizer queue.

Parameters
jobThe RenderingJob to enqueue.

Definition at line 48 of file receiver.cpp.

49 {
50 {
51 std::lock_guard lock(_finalizer_queue_mutex);
52 _finalizer_queue.push(std::move(job));
53 }
54 _finalizer_queue_cv.notify_one();
55 }

◆ getAntenna()

const antenna::Antenna * radar::Radar::getAntenna ( ) const
noexceptinherited

Gets the antenna associated with this radar.

Returns
Pointer to the associated antenna.

Definition at line 78 of file radar_obj.h.

78{ return _antenna; }

Referenced by radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getAttached()

const Radar * radar::Radar::getAttached ( ) const
noexceptinherited

Retrieves the attached radar object.

Returns
Pointer to the attached radar object.

Definition at line 71 of file radar_obj.h.

71{ return _attached; }

Referenced by simulation::calculatePreviewLinks(), and simulation::calculateResponse().

+ Here is the caller graph for this function:

◆ getCwData()

const std::vector< ComplexType > & radar::Receiver::getCwData ( ) const

Retrieves the collected CW IQ data.

Returns
A constant reference to the vector of complex IQ samples.

Definition at line 228 of file receiver.h.

228{ return _cw_iq_data; }

◆ getGain()

RealType radar::Radar::getGain ( const math::SVec3 angle,
const math::SVec3 refangle,
RealType  wavelength 
) const
inherited

Calculates the radar gain based on input angles and wavelength.

Parameters
angleThe radar's pointing angle.
refangleThe reference angle for comparison.
wavelengthThe wavelength of the radar signal.
Returns
The calculated radar gain.

Definition at line 26 of file radar_obj.cpp.

27 {
28 return _antenna->getGain(angle, refangle, wavelength);
29 }
virtual RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const =0
Computes the gain of the antenna based on the input angle and reference angle.

References antenna::Antenna::getGain().

+ Here is the call graph for this function:

◆ getMode()

OperationMode radar::Receiver::getMode ( ) const
noexcept

Gets the operational mode of the receiver.

Returns
The operational mode (PULSED_MODE or CW_MODE).

Definition at line 151 of file receiver.h.

151{ return _mode; }

Referenced by radar::to_json().

+ Here is the caller graph for this function:

◆ getMutableCwData()

std::vector< ComplexType > & radar::Receiver::getMutableCwData ( )

Retrieves the collected CW IQ data for modification.

Returns
A mutable reference to the vector of complex IQ samples.

Definition at line 234 of file receiver.h.

234{ return _cw_iq_data; }

Referenced by processing::finalizeCwReceiver().

+ Here is the caller graph for this function:

◆ getName()

const std::string & radar::Object::getName ( ) const
noexceptinherited

Retrieves the name of the object.

Returns
A const reference to the string representing the object's name.

Definition at line 68 of file object.h.

68{ return _name; }

Referenced by simulation::calculatePreviewLinks(), simulation::calculateResponse(), processing::finalizeCwReceiver(), serial::Response::getTransmitterName(), processing::runPulsedFinalizer(), setNoiseTemperature(), radar::to_json(), radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getNextWindowTime()

std::optional< RealType > radar::Receiver::getNextWindowTime ( RealType  time) const

Determines the next valid window start time at or after the given time.

Parameters
timeThe proposed window start time.
Returns
The actual start time, or nullopt if no valid time exists in the schedule.

Definition at line 130 of file receiver.cpp.

131 {
132 // If no schedule is defined, assume always on.
133 if (_schedule.empty())
134 {
135 return time;
136 }
137 for (const auto& period : _schedule)
138 {
139 // If time is within this period, it's valid.
140 if (time >= period.start && time <= period.end)
141 {
142 return time;
143 }
144 // If time is before this period, skip to the start of this period.
145 if (time < period.start)
146 {
147 return period.start;
148 }
149 // If time is after this period, continue to next period.
150 }
151 // Time is after the last scheduled period.
152 return std::nullopt;
153 }

◆ getNoiseTemperature() [1/2]

RealType radar::Receiver::getNoiseTemperature ( ) const
noexcept

Retrieves the noise temperature of the receiver.

Returns
The noise temperature.

Definition at line 93 of file receiver.h.

93{ return _noise_temperature; }

Referenced by simulation::calculatePreviewLinks(), processing::finalizeCwReceiver(), processing::runPulsedFinalizer(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getNoiseTemperature() [2/2]

RealType radar::Receiver::getNoiseTemperature ( const math::SVec3 angle) const
overridevirtualnoexcept

Gets the noise temperature for a specific angle.

Parameters
angleThe angle in spherical coordinates (SVec3).
Returns
The noise temperature at the given angle.

Reimplemented from radar::Radar.

Definition at line 73 of file receiver.cpp.

74 {
75 return _noise_temperature + Radar::getNoiseTemperature(angle);
76 }
virtual RealType getNoiseTemperature(const math::SVec3 &angle) const noexcept
Gets the noise temperature of the radar.
Definition radar_obj.cpp:31

References radar::Radar::getNoiseTemperature().

+ Here is the call graph for this function:

◆ getPlatform()

Platform * radar::Object::getPlatform ( ) const
noexceptinherited

Retrieves the associated platform of the object.

Returns
A pointer to the Platform object associated with this object.

Definition at line 61 of file object.h.

61{ return _platform; }

Referenced by simulation::calculateDirectPathContribution(), simulation::calculateReflectedPathContribution(), and simulation::calculateResponse().

+ Here is the caller graph for this function:

◆ getPosition()

math::Vec3 radar::Object::getPosition ( const RealType  time) const
inherited

Retrieves the position of the object.

Parameters
timeThe time at which to get the position of the object.
Returns
A math::Vec3 representing the position of the object.

Definition at line 46 of file object.h.

46{ return _platform->getPosition(time); }
math::Vec3 getPosition(const RealType time) const
Gets the position of the platform at a specific time.
Definition platform.h:74

References radar::Platform::getPosition().

Referenced by simulation::calculatePreviewLinks(), simulation::solveRe(), and simulation::solveReDirect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPulsedInterferenceLog()

const std::vector< std::unique_ptr< serial::Response > > & radar::Receiver::getPulsedInterferenceLog ( ) const

Retrieves the log of pulsed interferences for CW mode.

Returns
A const reference to the vector of interference responses.

Definition at line 240 of file receiver.h.

241 {
242 return _pulsed_interference_log;
243 }

Referenced by processing::finalizeCwReceiver().

+ Here is the caller graph for this function:

◆ getRngEngine()

std::mt19937 & radar::Receiver::getRngEngine ( )
noexcept

Gets the receiver's internal random number generator engine.

Returns
A mutable reference to the RNG engine.

Definition at line 144 of file receiver.h.

144{ return _rng; }

Referenced by processing::finalizeCwReceiver(), and processing::runPulsedFinalizer().

+ Here is the caller graph for this function:

◆ getRotation()

math::SVec3 radar::Object::getRotation ( const RealType  time) const
inherited

Retrieves the rotation of the object.

Parameters
timeThe time at which to get the rotation of the object.
Returns
A math::SVec3 representing the rotation of the object.

Definition at line 54 of file object.h.

54{ return _platform->getRotation(time); }
math::SVec3 getRotation(const RealType time) const
Gets the rotation of the platform at a specific time.
Definition platform.h:82

References radar::Platform::getRotation().

Referenced by radar::FileTarget::getRcs(), and processing::runPulsedFinalizer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSchedule()

const std::vector< SchedulePeriod > & radar::Receiver::getSchedule ( ) const
noexcept

Retrieves the list of active reception periods.

Returns
A const reference to the schedule vector.

Definition at line 255 of file receiver.h.

255{ return _schedule; }

Referenced by simulation::calculatePreviewLinks(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getTiming()

std::shared_ptr< timing::Timing > radar::Radar::getTiming ( ) const
inherited

Retrieves the timing source for the radar.

Returns
Shared pointer to the timing source.

Definition at line 66 of file radar_obj.cpp.

67 {
68 if (!_timing)
69 {
70 LOG(Level::FATAL, "Radar::GetTiming called before timing set");
71 throw std::runtime_error("Radar::GetTiming called before timing set");
72 }
73 return _timing;
74 }
std::shared_ptr< timing::Timing > _timing
Timing source for the radar.
Definition radar_obj.h:129
#define LOG(level,...)
Definition logging.h:19

References radar::Radar::_timing, and LOG.

Referenced by processing::finalizeCwReceiver(), processing::runPulsedFinalizer(), radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getWindowCount()

unsigned radar::Receiver::getWindowCount ( ) const
noexcept

Gets the number of radar windows.

Returns
The total number of radar windows.

Definition at line 96 of file receiver.cpp.

97 {
99 const RealType pulses = time * _window_prf;
100 return static_cast<unsigned>(std::ceil(pulses));
101 }
double RealType
Type for real numbers.
Definition config.h:27
RealType endTime() noexcept
Get the end time for the simulation.
Definition parameters.h:97
RealType startTime() noexcept
Get the start time for the simulation.
Definition parameters.h:91

References params::endTime(), and params::startTime().

+ Here is the call graph for this function:

◆ getWindowLength()

RealType radar::Receiver::getWindowLength ( ) const
noexcept

Retrieves the radar window length.

Returns
The radar window length.

Definition at line 100 of file receiver.h.

100{ return _window_length; }

Referenced by processing::runPulsedFinalizer(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getWindowPrf()

RealType radar::Receiver::getWindowPrf ( ) const
noexcept

Retrieves the pulse repetition frequency (PRF) of the radar window.

Returns
The PRF of the radar window.

Definition at line 107 of file receiver.h.

107{ return _window_prf; }

Referenced by processing::runPulsedFinalizer(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getWindowSkip()

RealType radar::Receiver::getWindowSkip ( ) const
noexcept

Retrieves the window skip time.

Returns
The window skip time.

Definition at line 114 of file receiver.h.

114{ return _window_skip; }

Referenced by processing::runPulsedFinalizer(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getWindowStart()

RealType radar::Receiver::getWindowStart ( unsigned  window) const

Retrieves the start time of a specific radar window.

Parameters
windowThe index of the window.
Returns
The start time of the specified window.
Exceptions
std::logic_errorIf the receiver is not associated with a timing source.

Definition at line 103 of file receiver.cpp.

104 {
105 const RealType stime = static_cast<RealType>(window) / _window_prf + _window_skip;
106 if (!_timing)
107 {
108 LOG(logging::Level::FATAL, "Receiver must be associated with timing source");
109 throw std::logic_error("Receiver must be associated with timing source");
110 }
111 return stime;
112 }
@ FATAL
Fatal level for severe error events.

References radar::Radar::_timing, logging::FATAL, and LOG.

◆ isActive()

bool radar::Receiver::isActive ( ) const
noexcept

Checks if the receiver is currently active (listening).

Returns
True if active, false otherwise.

Definition at line 157 of file receiver.h.

157{ return _is_active; }

◆ operator=() [1/2]

Receiver & radar::Receiver::operator= ( const Receiver )
delete

◆ operator=() [2/2]

Receiver & radar::Receiver::operator= ( Receiver &&  )
delete

◆ prepareCwData()

void radar::Receiver::prepareCwData ( size_t  numSamples)

Prepares the internal storage for CW IQ data.

Parameters
numSamplesThe total number of samples to allocate memory for.

Definition at line 114 of file receiver.cpp.

115 {
116 std::lock_guard lock(_cw_mutex);
117 _cw_iq_data.resize(numSamples);
118 }

◆ setActive()

void radar::Receiver::setActive ( const bool  active)
noexcept

Sets the active state of the receiver.

Parameters
activeThe new active state.

Definition at line 163 of file receiver.h.

163{ _is_active = active; }

Referenced by core::runEventDrivenSim().

+ Here is the caller graph for this function:

◆ setAntenna()

void radar::Radar::setAntenna ( const antenna::Antenna ant)
inherited

Sets the antenna for the radar.

Parameters
antPointer to the antenna to set.

Definition at line 46 of file radar_obj.cpp.

47 {
48 if (!ant)
49 {
50 LOG(Level::FATAL, "Transmitter's antenna set to null");
51 throw std::logic_error("Transmitter's antenna set to null");
52 }
53 _antenna = ant;
54 }

References LOG.

◆ setAttached()

void radar::Radar::setAttached ( const Radar obj)
inherited

Attaches another radar object to this radar.

Parameters
objPointer to the radar object to attach.
Exceptions
std::runtime_errorIf another object is already attached.

Definition at line 56 of file radar_obj.cpp.

57 {
58 if (_attached)
59 {
60 LOG(Level::FATAL, "Attempted to attach second object to transmitter");
61 throw std::runtime_error("Attempted to attach second object to transmitter");
62 }
63 _attached = obj;
64 }

References LOG.

◆ setCwSample()

void radar::Receiver::setCwSample ( size_t  index,
ComplexType  sample 
)

Sets a single IQ sample at a specific index for CW simulation.

Parameters
indexThe index at which to store the sample.
sampleThe complex IQ sample.

Definition at line 120 of file receiver.cpp.

121 {
122 if (index < _cw_iq_data.size())
123 {
124 _cw_iq_data[index] += sample;
125 }
126 }

◆ setFlag()

void radar::Receiver::setFlag ( RecvFlag  flag)
noexcept

Sets a receiver flag.

Parameters
flagThe flag to set.

Definition at line 201 of file receiver.h.

201{ _flags |= static_cast<int>(flag); }

◆ setNoiseTemperature()

void radar::Receiver::setNoiseTemperature ( RealType  temp)

Sets the noise temperature of the receiver.

Parameters
tempThe new noise temperature.
Exceptions
std::runtime_errorIf the noise temperature is negative.

Definition at line 78 of file receiver.cpp.

79 {
80 if (temp < -EPSILON)
81 {
82 LOG(logging::Level::FATAL, "Noise temperature for receiver {} is negative", getName());
83 throw std::runtime_error("Noise temperature must be positive");
84 }
85 _noise_temperature = temp;
86 }
const std::string & getName() const noexcept
Retrieves the name of the object.
Definition object.h:68
constexpr RealType EPSILON
Machine epsilon for real numbers.
Definition config.h:51

References EPSILON, logging::FATAL, radar::Object::getName(), and LOG.

+ Here is the call graph for this function:

◆ setSchedule()

void radar::Receiver::setSchedule ( std::vector< SchedulePeriod schedule)

Sets the active schedule for the receiver.

Parameters
scheduleA vector of active periods.

Definition at line 128 of file receiver.cpp.

128{ _schedule = std::move(schedule); }

◆ setTiming()

void radar::Radar::setTiming ( const std::shared_ptr< timing::Timing > &  tim)
inherited

Sets the timing source for the radar.

Parameters
timShared pointer to the timing source to set.

Definition at line 36 of file radar_obj.cpp.

37 {
38 if (!tim)
39 {
40 LOG(Level::FATAL, "Radar timing source must not be null");
41 throw std::runtime_error("Radar timing source must not be null");
42 }
43 _timing = tim;
44 }

References radar::Radar::_timing, and LOG.

◆ setWindowProperties()

void radar::Receiver::setWindowProperties ( RealType  length,
RealType  prf,
RealType  skip 
)
noexcept

Sets the properties for radar windows.

Parameters
lengthThe length of the radar window.
prfThe pulse repetition frequency.
skipThe skip time between windows.

Definition at line 88 of file receiver.cpp.

89 {
90 const auto rate = params::rate() * params::oversampleRatio();
91 _window_length = length;
92 _window_prf = 1 / (std::floor(rate / prf) / rate);
93 _window_skip = std::floor(rate * skip) / rate;
94 }
RealType rate() noexcept
Get the rendering sample rate.
Definition parameters.h:109
unsigned oversampleRatio() noexcept
Get the oversampling ratio.
Definition parameters.h:139

References params::oversampleRatio(), and params::rate().

+ Here is the call graph for this function:

◆ waitAndDequeueFinalizerJob()

bool radar::Receiver::waitAndDequeueFinalizerJob ( core::RenderingJob job)

Waits for and dequeues a RenderingJob from the finalizer queue.

This is a blocking call, intended for use by the dedicated finalizer thread.

Parameters
jobA reference to a RenderingJob to be filled.
Returns
false if a shutdown signal is received, true otherwise.

Definition at line 57 of file receiver.cpp.

58 {
59 std::unique_lock lock(_finalizer_queue_mutex);
60 _finalizer_queue_cv.wait(lock, [this] { return !_finalizer_queue.empty(); });
61
62 job = std::move(_finalizer_queue.front());
63 _finalizer_queue.pop();
64
65 // Check for shutdown signal (negative duration)
66 if (job.duration < 0.0)
67 {
68 return false; // Shutdown signal
69 }
70 return true;
71 }
RealType duration
The duration of the receive window in seconds.

References core::RenderingJob::duration.

Referenced by processing::runPulsedFinalizer().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _timing

std::shared_ptr<timing::Timing> radar::Radar::_timing
protectedinherited

Timing source for the radar.

Definition at line 129 of file radar_obj.h.

Referenced by radar::Radar::getTiming(), getWindowStart(), and radar::Radar::setTiming().


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