FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
serial::Response Class Reference

Manages radar signal responses from a transmitter. More...

#include "response.h"

Public Member Functions

 Response (const fers_signal::RadarSignal *wave, const radar::Transmitter *transmitter) noexcept
 Constructor for the Response class.
 
 ~Response ()=default
 
 Response (const Response &)=delete
 
Responseoperator= (const Response &)=delete
 
 Response (Response &&)=delete
 
Responseoperator= (Response &&)=delete
 
RealType startTime () const noexcept
 Retrieves the start time of the response.
 
RealType endTime () const noexcept
 Retrieves the end time of the response.
 
void addInterpPoint (const interp::InterpPoint &point)
 Adds an interpolation point to the response.
 
std::vector< ComplexTyperenderBinary (RealType &rate, unsigned &size, RealType fracWinDelay) const
 Renders the response in binary format.
 
std::vector< ComplexTyperenderSlice (RealType outputRate, RealType outputStartTime, std::size_t sampleCount, RealType fracWinDelay) const
 Renders a bounded absolute-time response slice on the requested output grid.
 
RealType sampleRate () const noexcept
 Returns the waveform native sample rate.
 
unsigned sampleCount () const noexcept
 Returns the waveform native sample count.
 
RealType getLength () const noexcept
 Retrieves the length of the response.
 
SimId getTransmitterId () const noexcept
 Retrieves the ID of the associated transmitter.
 

Detailed Description

Manages radar signal responses from a transmitter.

Definition at line 41 of file response.h.

Constructor & Destructor Documentation

◆ Response() [1/3]

serial::Response::Response ( const fers_signal::RadarSignal wave,
const radar::Transmitter transmitter 
)
noexcept

Constructor for the Response class.

Parameters
wavePointer to the radar signal object.
transmitterPointer to the transmitter object.

Definition at line 50 of file response.h.

50 :
51 _transmitter(transmitter), _wave(wave)
52 {
53 }
const Transmitter & transmitter
math::Vec3 max

◆ ~Response()

serial::Response::~Response ( )
default

◆ Response() [2/3]

serial::Response::Response ( const Response )
delete

◆ Response() [3/3]

serial::Response::Response ( Response &&  )
delete

Member Function Documentation

◆ addInterpPoint()

void serial::Response::addInterpPoint ( const interp::InterpPoint point)

Adds an interpolation point to the response.

Parameters
pointThe interpolation point to be added.
Exceptions
std::logic_errorIf the new point has a time earlier than the last point.

Definition at line 27 of file response.cpp.

27{ _points.push_back(point); }

References max.

◆ endTime()

RealType serial::Response::endTime ( ) const
noexcept

Retrieves the end time of the response.

Returns
End time as a RealType. Returns 0.0 if no points are present.

Definition at line 73 of file response.h.

73{ return _points.empty() ? 0.0 : _points.back().time; }

Referenced by getLength().

+ Here is the caller graph for this function:

◆ getLength()

RealType serial::Response::getLength ( ) const
noexcept

Retrieves the length of the response.

Returns
The length of the response as a RealType.

Definition at line 108 of file response.h.

108{ return endTime() - startTime(); }
RealType startTime() const noexcept
Retrieves the start time of the response.
Definition response.h:66
RealType endTime() const noexcept
Retrieves the end time of the response.
Definition response.h:73

References endTime(), and startTime().

+ Here is the call graph for this function:

◆ getTransmitterId()

SimId serial::Response::getTransmitterId ( ) const
noexcept

Retrieves the ID of the associated transmitter.

Returns
The transmitter SimId.

Definition at line 25 of file response.cpp.

25{ return _transmitter->getId(); }
SimId getId() const noexcept
Retrieves the unique ID of the transmitter.
Definition transmitter.h:88

References radar::Transmitter::getId().

+ Here is the call graph for this function:

◆ operator=() [1/2]

Response & serial::Response::operator= ( const Response )
delete

◆ operator=() [2/2]

Response & serial::Response::operator= ( Response &&  )
delete

◆ renderBinary()

std::vector< ComplexType > serial::Response::renderBinary ( RealType rate,
unsigned size,
RealType  fracWinDelay 
) const

Renders the response in binary format.

Parameters
rateOutput parameter for the signal rate.
sizeOutput parameter for the size of the binary data.
fracWinDelayDelay factor applied during windowing.
Returns
A vector of ComplexType representing the binary data.

Definition at line 29 of file response.cpp.

30 {
31 rate = _wave->getRate();
32 return _wave->render(_points, size, fracWinDelay);
33 }
RealType getRate() const noexcept
Gets the sample rate of the radar signal.
std::vector< ComplexType > render(const std::vector< interp::InterpPoint > &points, unsigned &size, RealType fracWinDelay) const
Renders the radar signal.
RealType rate() noexcept
Get the rendering sample rate.
Definition parameters.h:121

References fers_signal::RadarSignal::getRate(), max, and fers_signal::RadarSignal::render().

+ Here is the call graph for this function:

◆ renderSlice()

std::vector< ComplexType > serial::Response::renderSlice ( RealType  outputRate,
RealType  outputStartTime,
std::size_t  sampleCount,
RealType  fracWinDelay 
) const

Renders a bounded absolute-time response slice on the requested output grid.

Definition at line 35 of file response.cpp.

37 {
39 }
std::vector< ComplexType > renderSlice(const std::vector< interp::InterpPoint > &points, RealType outputStartTime, RealType outputSampleRate, std::size_t sampleCount, RealType fracWinDelay) const
Renders a bounded absolute-time slice on the requested output grid.
unsigned sampleCount() const noexcept
Returns the waveform native sample count.
Definition response.cpp:43

References max, fers_signal::RadarSignal::renderSlice(), and sampleCount().

+ Here is the call graph for this function:

◆ sampleCount()

unsigned serial::Response::sampleCount ( ) const
noexcept

Returns the waveform native sample count.

Definition at line 43 of file response.cpp.

43{ return _wave->getSampleCount(); }
unsigned getSampleCount() const noexcept
Gets the number of native samples in the underlying signal.

References fers_signal::RadarSignal::getSampleCount().

Referenced by renderSlice().

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

◆ sampleRate()

RealType serial::Response::sampleRate ( ) const
noexcept

Returns the waveform native sample rate.

Definition at line 41 of file response.cpp.

41{ return _wave->getRate(); }

References fers_signal::RadarSignal::getRate().

+ Here is the call graph for this function:

◆ startTime()

RealType serial::Response::startTime ( ) const
noexcept

Retrieves the start time of the response.

Returns
Start time as a RealType. Returns 0.0 if no points are present.

Definition at line 66 of file response.h.

66{ return _points.empty() ? 0.0 : _points.front().time; }

Referenced by getLength().

+ Here is the caller graph for this function:

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