FERS 1.0.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.
 
RealType getLength () const noexcept
 Retrieves the length of the response.
 
std::string getTransmitterName () const noexcept
 Retrieves the name of the associated transmitter.
 

Detailed Description

Manages radar signal responses from a transmitter.

Definition at line 39 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 48 of file response.h.

48 :
49 _transmitter(transmitter), _wave(wave)
50 {
51 }

◆ ~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 26 of file response.cpp.

26{ _points.push_back(point); }

◆ 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 71 of file response.h.

71{ 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 96 of file response.h.

96{ return endTime() - startTime(); }
RealType startTime() const noexcept
Retrieves the start time of the response.
Definition response.h:64
RealType endTime() const noexcept
Retrieves the end time of the response.
Definition response.h:71

References endTime(), and startTime().

+ Here is the call graph for this function:

◆ getTransmitterName()

std::string serial::Response::getTransmitterName ( ) const
noexcept

Retrieves the name of the associated transmitter.

Returns
The name of the transmitter as a std::string.

Definition at line 24 of file response.cpp.

24{ return _transmitter->getName(); }
const std::string & getName() const noexcept
Retrieves the name of the object.
Definition object.h:68

References radar::Object::getName().

+ 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 28 of file response.cpp.

29 {
30 rate = _wave->getRate();
31 return _wave->render(_points, size, fracWinDelay);
32 }
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:109

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

+ 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 64 of file response.h.

64{ 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: