15#include <condition_variable>
58 const SimId id = 0) noexcept;
88 [[nodiscard]]
bool checkFlag(
RecvFlag flag) const noexcept {
return (_flags &
static_cast<int>(flag)) != 0; }
166 [[nodiscard]]
bool isActive() const noexcept {
return _is_active; }
172 void setActive(
const bool active)
noexcept { _is_active = active; }
184 std::vector<std::unique_ptr<serial::Response>>
drainInbox() noexcept;
250 [[nodiscard]]
const std::vector<ComplexType>&
getCwData()
const {
return _cw_iq_data; }
264 return _pulsed_interference_log;
271 void setSchedule(std::vector<SchedulePeriod> schedule);
277 [[nodiscard]]
const std::vector<SchedulePeriod>&
getSchedule() const noexcept {
return _schedule; }
289 bool _is_active =
false;
294 std::vector<SchedulePeriod> _schedule;
300 std::vector<std::unique_ptr<serial::Response>>
302 std::mutex _inbox_mutex;
303 std::queue<core::RenderingJob> _finalizer_queue;
304 std::mutex _finalizer_queue_mutex;
305 std::condition_variable _finalizer_queue_cv;
308 std::vector<std::unique_ptr<serial::Response>>
309 _pulsed_interference_log;
310 std::mutex _interference_log_mutex;
311 std::vector<ComplexType> _cw_iq_data;
312 std::mutex _cw_mutex;
A class representing a vector in spherical coordinates.
Represents a radar system on a platform.
SimId getId() const noexcept
Retrieves the unique ID of the radar object.
Manages radar signal reception and response processing.
void addInterferenceToLog(std::unique_ptr< serial::Response > response) noexcept
Adds a pulsed interference response to the receiver's CW-mode log.
void setCwSample(size_t index, ComplexType sample)
Sets a single IQ sample at a specific index for CW simulation.
std::mt19937 & getRngEngine() noexcept
Gets the receiver's internal random number generator engine.
void setMode(OperationMode mode) noexcept
Sets the operational mode of the receiver.
void setActive(const bool active) noexcept
Sets the active state of the receiver.
bool checkFlag(RecvFlag flag) const noexcept
Checks if a specific flag is set.
std::vector< std::unique_ptr< serial::Response > > drainInbox() noexcept
Moves all responses from the inbox into a RenderingJob.
void setFlag(RecvFlag flag) noexcept
Sets a receiver flag.
const std::vector< SchedulePeriod > & getSchedule() const noexcept
Retrieves the list of active reception periods.
bool isActive() const noexcept
Checks if the receiver is currently active (listening).
unsigned getWindowCount() const noexcept
Gets the number of radar windows.
RealType getWindowStart(unsigned window) const
Retrieves the start time of a specific radar window.
void clearFlag(RecvFlag flag) noexcept
Clears a receiver flag.
std::optional< RealType > getNextWindowTime(RealType time) const
Determines the next valid window start time at or after the given time.
RecvFlag
Enumeration for receiver configuration flags.
void prepareCwData(size_t numSamples)
Prepares the internal storage for 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.
void enqueueFinalizerJob(core::RenderingJob &&job)
Adds a completed RenderingJob to the finalizer queue.
SimId getId() const noexcept
Retrieves the unique ID of the receiver.
RealType getNoiseTemperature() const noexcept
Retrieves the noise temperature of the receiver.
OperationMode getMode() const noexcept
Gets the operational mode of the receiver.
RealType getWindowPrf() const noexcept
Retrieves the pulse repetition frequency (PRF) of the radar window.
bool waitAndDequeueFinalizerJob(core::RenderingJob &job)
Waits for and dequeues a RenderingJob from the finalizer queue.
RealType getWindowSkip() const noexcept
Retrieves the window skip time.
void setWindowProperties(RealType length, RealType prf, RealType skip) noexcept
Sets the properties for radar windows.
void addResponseToInbox(std::unique_ptr< serial::Response > response) noexcept
Adds a response to the receiver's pulsed-mode inbox.
const std::vector< ComplexType > & getCwData() const
Retrieves the collected CW IQ data.
void setNoiseTemperature(RealType temp)
Sets the noise temperature of the receiver.
RealType getWindowLength() const noexcept
Retrieves the radar window length.
double RealType
Type for real numbers.
std::complex< RealType > ComplexType
Type for complex numbers.
OperationMode
Defines the operational mode of a radar component.
Defines the Radar class and associated functionality.
Defines the data packet for asynchronous receiver finalization.
Classes for managing radar signal responses.
uint64_t SimId
64-bit Unique Simulation ID.